Dashboard routes have been refactored. Now instead of having resources for dashboard and routes inside a dashboard namespace the proposal routes contain a dashboar singleton containing everything related to it.
26 lines
926 B
Plaintext
26 lines
926 B
Plaintext
<% content_for :action_title, t("dashboard.index.title") %>
|
|
<% if current_editable?(proposal) %>
|
|
<%= link_to t("dashboard.index.edit_proposal_link"), edit_proposal_path(proposal), target: '_blank', class: 'button hollow' %>
|
|
|
|
<% end %>
|
|
|
|
<% if can_destroy_image?(proposal) %>
|
|
<%= link_to t("images.remove_image"),
|
|
image_path(proposal.image, from: request.url),
|
|
method: :delete,
|
|
class: 'button hollow alert',
|
|
data: { confirm: t("images.actions.destroy.confirm") } %>
|
|
<% end %>
|
|
|
|
<% unless proposal.retired? %>
|
|
<%= link_to t("dashboard.index.retire"),
|
|
retire_form_proposal_path(proposal),
|
|
class: 'button hollow alert',
|
|
target: '_blank' %>
|
|
<% end %>
|
|
|
|
<% if can?(:publish, proposal) %>
|
|
<%= link_to t("dashboard.index.publish"), publish_proposal_dashboard_path(proposal), class: 'button success', method: :patch %>
|
|
<% end %>
|
|
|