Highlight winner
This commit is contained in:
parent
25c3650e59
commit
0b08485ffc
5 changed files with 2117 additions and 2 deletions
2106
public/bootstrap-icons.css
vendored
Normal file
2106
public/bootstrap-icons.css
vendored
Normal file
File diff suppressed because it is too large
Load diff
BIN
public/fonts/bootstrap-icons.woff
Normal file
BIN
public/fonts/bootstrap-icons.woff
Normal file
Binary file not shown.
BIN
public/fonts/bootstrap-icons.woff2
Normal file
BIN
public/fonts/bootstrap-icons.woff2
Normal file
Binary file not shown.
|
|
@ -7,6 +7,7 @@
|
||||||
<script src="/chartkick.js"></script>
|
<script src="/chartkick.js"></script>
|
||||||
<script src="/Chart.bundle.js"></script>
|
<script src="/Chart.bundle.js"></script>
|
||||||
<link rel="stylesheet" href="/bootstrap.css">
|
<link rel="stylesheet" href="/bootstrap.css">
|
||||||
|
<link rel="stylesheet" href="/bootstrap-icons.css">
|
||||||
<link rel="stylesheet" href="/style.css">
|
<link rel="stylesheet" href="/style.css">
|
||||||
</head>
|
</head>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@
|
||||||
|
|
||||||
<table class="table mb-4">
|
<table class="table mb-4">
|
||||||
<tr>
|
<tr>
|
||||||
|
<th></th>
|
||||||
<th><%= _("Rank") %></th>
|
<th><%= _("Rank") %></th>
|
||||||
<th><%= _("Candidate") %></th>
|
<th><%= _("Candidate") %></th>
|
||||||
<th><%= _("Majority Judgment") %></th>
|
<th><%= _("Majority Judgment") %></th>
|
||||||
|
|
@ -51,8 +52,15 @@
|
||||||
<% i = 0 %>
|
<% i = 0 %>
|
||||||
<% @vote.candidates.sort { |a, b| a.mj <=> b.mj }.reverse.each do |candidate| %>
|
<% @vote.candidates.sort { |a, b| a.mj <=> b.mj }.reverse.each do |candidate| %>
|
||||||
<% i = i + 1 %>
|
<% i = i + 1 %>
|
||||||
|
<% if i == 1 %>
|
||||||
|
<tr class="table-success">
|
||||||
|
<td><i class="bi bi-trophy-fill"></i></td>
|
||||||
|
<td><%= i %></i></td>
|
||||||
|
<% else %>
|
||||||
<tr>
|
<tr>
|
||||||
|
<td></td>
|
||||||
<td><%= i %></td>
|
<td><%= i %></td>
|
||||||
|
<% end %>
|
||||||
<td><%= candidate.name %></td>
|
<td><%= candidate.name %></td>
|
||||||
<% value = settings.values.select { |e| e[:id] == candidate.mj.mj }.first %>
|
<% value = settings.values.select { |e| e[:id] == candidate.mj.mj }.first %>
|
||||||
<td class="h5"><span class="badge bg-<%= value[:id] %>"><%= _(value[:label]) %></span></td>
|
<td class="h5"><span class="badge bg-<%= value[:id] %>"><%= _(value[:label]) %></span></td>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue