Upstream sync

This commit is contained in:
Senad Uka
2020-09-01 17:15:16 +02:00
parent 95a14ab2f6
commit f611382e9e
21 changed files with 107 additions and 53 deletions

View File

@@ -9,10 +9,10 @@
<% end %>
</td>
<td>
<% if material_release.photo.attached? %>
<%= image_tag medium_variant(material_release.photo), class: "img-fluid" %>
<% if material_release.files.any? %>
<%= material_release.files.size %>
<% else %>
<%= fa_icon("warning", text: t(".no_photos"), class: "text-danger") %>
<%= fa_icon("warning", text: t(".no_media"), class: "text-danger") %>
<% end %>
</td>
<td>
@@ -41,8 +41,8 @@
<% if policy(material_release.tags).new? %>
<%= link_to fa_icon("tags fw", text: "Tags"), [:new, material_release, :acts_as_taggable_on_tag], class: "dropdown-item", remote: true %>
<% end %>
<% if policy(material_release).edit_photos? %>
<%= link_to fa_icon("picture-o fw", text: "Photos"), [:edit, material_release, :photos], class: "dropdown-item" %>
<% if policy(material_release).edit_files? %>
<%= link_to fa_icon("file-o fw", text: "Add Media"), [:edit, material_release, :files], class: "dropdown-item" %>
<% end %>
<% if policy(Contract).show? && (material_release.contract.attached? || material_release.contract_template.present?) %>
<%= link_to fa_icon("download fw", text: "Download"), [material_release, :contracts, format: "pdf"], class: "dropdown-item", target: "_blank" %>