Highlight winner
This commit is contained in:
parent
25c3650e59
commit
0b08485ffc
5 changed files with 2117 additions and 2 deletions
|
|
@ -42,6 +42,7 @@
|
|||
|
||||
<table class="table mb-4">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th><%= _("Rank") %></th>
|
||||
<th><%= _("Candidate") %></th>
|
||||
<th><%= _("Majority Judgment") %></th>
|
||||
|
|
@ -51,8 +52,15 @@
|
|||
<% i = 0 %>
|
||||
<% @vote.candidates.sort { |a, b| a.mj <=> b.mj }.reverse.each do |candidate| %>
|
||||
<% i = i + 1 %>
|
||||
<tr>
|
||||
<td><%= i %></td>
|
||||
<% if i == 1 %>
|
||||
<tr class="table-success">
|
||||
<td><i class="bi bi-trophy-fill"></i></td>
|
||||
<td><%= i %></i></td>
|
||||
<% else %>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><%= i %></td>
|
||||
<% end %>
|
||||
<td><%= candidate.name %></td>
|
||||
<% value = settings.values.select { |e| e[:id] == candidate.mj.mj }.first %>
|
||||
<td class="h5"><span class="badge bg-<%= value[:id] %>"><%= _(value[:label]) %></span></td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue