Allow administrators to edit and update images of any budget investment.
This commit is contained in:
@@ -5,12 +5,12 @@
|
||||
<% if investment.image.exists? %>
|
||||
<picture>
|
||||
<source srcset="<%= investment.image.url(:medium) %>"
|
||||
alt="<%= investment.image_description %>"
|
||||
title= "<%= investment.image_description %>"
|
||||
alt="<%= investment.image_title %>"
|
||||
title= "<%= investment.image_title %>"
|
||||
media="(max-width: 640px)">
|
||||
<img srcset="<%= investment.image.url(:thumb) %>"
|
||||
alt="<%= investment.image_description %>"
|
||||
title="<%= investment.image_description %>">
|
||||
alt="<%= investment.image_title %>"
|
||||
title="<%= investment.image_title %>">
|
||||
</picture>
|
||||
<% else %>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
class: 'button hollow float-right' %>
|
||||
<% end %>
|
||||
|
||||
<% if author_of?(investment, current_user) %>
|
||||
<% if author_of?(investment, current_user) || (current_user && current_user.administrator?) %>
|
||||
<%= link_to t("budgets.investments.show.edit_image"),
|
||||
edit_image_budget_investment_path(investment.budget, investment),
|
||||
class: 'button hollow float-right' %>
|
||||
|
||||
Reference in New Issue
Block a user