-
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.
Add owner name on rounds show page for audiences
Add round name on audience vote page Change styling a bit
- Loading branch information
Showing
4 changed files
with
23 additions
and
19 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
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 |
---|---|---|
@@ -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> |