Addresses @iacoco comments

This commit is contained in:
Juan Salvador Pérez García
2018-06-13 18:34:56 +02:00
parent 96d5a9b5ff
commit 305a0059bd
4 changed files with 20 additions and 15 deletions

View File

@@ -1,31 +1,29 @@
<tr id="proposal_<%= proposal.id %>">
<td class="small-9">
<td class="small-7">
<strong><%= link_to proposal.title, proposal, proposal.retired? ? { class: 'retired' } : {} %></strong>
<br>
<%= proposal.summary %>
</td>
<td class="small-2 text-center">
<% if proposal.retired? %>
<span class="label alert"><%= t('users.proposals.retired') %></span>
<% elsif proposal.draft? %>
<span class="label info"><%= t('users.proposals.draft') %></span>
<% else %>
<span class="label success"><%= t('users.proposals.published') %></span>
<% end %>
</td>
<% if proposal.retired? %>
<td class="text-center" colspan="2">
<span class="label alert"><%= t('users.proposals.retired') %></span>
</td>
<td></td>
<% elsif can?(:dashboard, proposal) %>
<td>
<% if proposal.retired? %>
<span class="label alert"><%= t('users.proposals.retired') %></span>
<% else %>
<%= link_to t('proposals.show.dashboard_proposal_link'),
proposal_dashboard_index_path(proposal), class: 'button hollow expanded' %>
<% end %>
</td>
<% else %>
<td class="text-center" colspan="2">
<td class="text-center">
<%= link_to t('users.proposals.see'), proposal, class: 'button hollow' %>
</td>
<% end %>
</tr>