adds links in ballot view to no voted groups

This commit is contained in:
Juanjo Bazán
2017-05-09 11:27:07 +02:00
parent c14a604618
commit 4ae6ec75e7
4 changed files with 34 additions and 3 deletions

View File

@@ -19,9 +19,9 @@
</div>
<div class="row ballot">
<% @ballot.groups.order(name: :asc).each do |group| %>
<div id="<%= dom_id(group) %>"
class="small-12 medium-6 column end">
<% ballot_groups = @ballot.groups.order(name: :asc) %>
<% ballot_groups.each do |group| %>
<div id="<%= dom_id(group) %>" class="small-12 medium-6 column end">
<div class="margin-top ballot-content">
<div class="subtitle">
<h3>
@@ -52,4 +52,21 @@
</div>
</div>
<% end %>
<% no_balloted_groups = @budget.groups.order(name: :asc) - ballot_groups %>
<% no_balloted_groups.each do |group| %>
<div id="<%= dom_id(group) %>" class="small-12 medium-6 column end">
<div class="margin-top ballot-content">
<div class="subtitle">
<h3>
<%= group.name %>
</h3>
<strong>
<%= link_to t("budgets.ballots.show.no_balloted_group_yet"), budget_group_path(@budget, group) %>
</strong>
</div>
</div>
</div>
<% end %>
</div>