Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions app/views/puzzles/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@
<%= button_to 'Logout', session_path(1), method: :delete, class: "btn" %>
</div>

<h1>Pending Puzzles</h1>
<h1>Pending Puzzles - Total: <%= @pending_puzzles.count %></h1>
<%= render partial: 'puzzles_table', locals: { puzzles: @pending_puzzles, actions: :pending } %>

<h1>Approved Puzzles</h1>
<h1>
Approved Puzzles - Total: <%= @approved_puzzles.count %>
<% if @approved_puzzles.count < 5 %>
<span title="Less than 5 approved puzzles!" style="color: #eab308; font-size: 1.2em; vertical-align: middle;">⚠️</span>
<% end %>
</h1>
<%= render partial: 'puzzles_table', locals: { puzzles: @approved_puzzles, actions: :approved } %>

<h1>Rejected Puzzles</h1>
<h1>Rejected Puzzles - Total: <%= @rejected_puzzles.count %></h1>
<%= render partial: 'puzzles_table', locals: { puzzles: @rejected_puzzles, actions: :rejected } %>

<h1>Archive Puzzles</h1>
<h1>Archive Puzzles - Total: <%= @archived_puzzles.count %></h1>
<p>These puzzles have already been sent to the users.</p>
<%= render partial: 'puzzles_table', locals: { puzzles: @archived_puzzles, actions: :archived } %>