Easier conditional usage.

This commit is contained in:
Senén Rodero Rodríguez
2017-07-18 19:21:17 +02:00
parent 249641fe23
commit 16987e7eb8

View File

@@ -5,15 +5,16 @@
<%= proposal.summary %> <%= proposal.summary %>
</td> </td>
<% if author?(proposal) %> <% if proposal.retired? %>
<td class="text-center"> <td class="text-center">
<%= link_to t("users.proposals.send_notification"), <%= link_to t("users.proposals.send_notification"),
new_proposal_notification_path(proposal_id: proposal.id), new_proposal_notification_path(proposal_id: proposal.id),
class: 'button hollow' %> class: 'button hollow' %>
</td> </td>
<% end %>
<% if author?(proposal) || proposal.retired? %> <% elsif author?(proposal) %>
<td class="text-center"> <td class="text-center">
<% if proposal.retired? %> <% if proposal.retired? %>
<span class="label alert"><%= t('users.proposals.retired') %></span> <span class="label alert"><%= t('users.proposals.retired') %></span>
@@ -23,6 +24,7 @@
class: 'button hollow alert' %> class: 'button hollow alert' %>
<% end %> <% end %>
</td> </td>
<% end %> <% end %>
</tr> </tr>