-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from laruby2/kangkyu/fix-updating
Fix updating
- Loading branch information
Showing
9 changed files
with
40 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
<%= turbo_stream_from "activity" %> | ||
|
||
<p><%= pluralize @users, "user" %></p> | ||
<p><%= pluralize @rounds, "round" %></p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<%= turbo_stream_from "activity" %> | ||
|
||
<div class="max-w-md mx-auto mt-5"> | ||
<h2 class="text-2xl font-semibold mb-4">“<%= link_to @round.title, round_path(@round) %>” round result</h2> | ||
</div> | ||
|
||
<ul class="w-full font-medium text-gray-900 bg-white border border-gray-200 dark:bg-gray-700 dark:border-gray-600 dark:text-white"> | ||
<%= turbo_frame_tag "admin_contestants" do %> | ||
<%= render @contestants %> | ||
<% end %> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
<div class="max-w-md mx-auto mt-5"> | ||
<h2 class="text-2xl font-semibold mb-4">Welcome to “<%= @round.title %>” round</h2> | ||
<% if current_user.owner?(@round) %> | ||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4"> | ||
<div> | ||
<p class="text-md font-bold mb-2">Owner menu</p> | ||
<ul class="list-disc list-inside"> | ||
<li><%= link_to "list of audiences", owner_round_audiences_path(@round) %></li> | ||
<li><%= link_to "list of contestants", owner_round_contestants_path(@round) %></li> | ||
</ul> | ||
</div> | ||
<% if current_user.owner?(@round) %> | ||
<div> | ||
<p class="text-md font-bold mb-2">Owner menu</p> | ||
<ul class="list-disc list-inside"> | ||
<li><%= link_to "list of audiences", owner_round_audiences_path(@round) %></li> | ||
<li><%= link_to "list of contestants", owner_round_contestants_path(@round) %></li> | ||
</ul> | ||
</div> | ||
<% else %> | ||
<div> | ||
<p class="text-md mb-2">User <span class="font-bold"><%= @round.owner.username %></span> started it</p> | ||
<% if !current_user.audience?(@round) %> | ||
<%= button_to "Join the audience", new_round_audience_path(@round), method: :get, class: "bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4" %> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
</div> | ||
<% elsif !current_user.audience?(@round) %> | ||
<%= button_to "Join the audience", new_round_audience_path(@round), method: :get, class: "bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4" %> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters