From 16987e7eb8bc6cb4c95255b9cb3e666adfe7c9d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sen=C3=A9n=20Rodero=20Rodr=C3=ADguez?= Date: Tue, 18 Jul 2017 19:21:17 +0200 Subject: [PATCH] Easier conditional usage. --- app/views/users/_proposal.html.erb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/users/_proposal.html.erb b/app/views/users/_proposal.html.erb index f5a361c19..cd41de6f8 100644 --- a/app/views/users/_proposal.html.erb +++ b/app/views/users/_proposal.html.erb @@ -5,15 +5,16 @@ <%= proposal.summary %> - <% if author?(proposal) %> + <% if proposal.retired? %> + <%= link_to t("users.proposals.send_notification"), new_proposal_notification_path(proposal_id: proposal.id), class: 'button hollow' %> - <% end %> - <% if author?(proposal) || proposal.retired? %> + <% elsif author?(proposal) %> + <% if proposal.retired? %> <%= t('users.proposals.retired') %> @@ -23,6 +24,7 @@ class: 'button hollow alert' %> <% end %> + <% end %>