improve Download button for Material releases

This commit is contained in:
Bilal
2020-09-07 12:47:31 +03:00
parent 1cf18e8f85
commit 4128d96941
3 changed files with 8 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
<div class="row">
<div class="col-md-12">
<input id="total_entries" type=hidden value=<%= @material_releases.total_entries %> />
<div class="d-md-flex d-sm-flex flex-sm-column flex-md-row flex-md-wrap mb-3">
<% if policy(MaterialRelease).new? %>
<%= link_to fa_icon("plus", text: t(".actions.new")), [:new, @project, :material_release], class: "btn btn-primary mr-2 mb-2" %>
@@ -10,7 +11,7 @@
<% end %>
<% if @material_releases.any? && policy(MaterialRelease).download_multiple? %>
<%= link_to "Download All", [@project, :contract_downloads, release_type: @material_releases.name], method: :post, remote: true, class: "btn btn-light border ml-auto mr-2 mb-2", data: {
<%= button_to "Download", [@project, :contract_downloads, release_type: @material_releases.name], id: "download_releases", method: :post, remote: true, class: "btn btn-light border ml-auto mr-2 mb-2", data: {
disable_with: "Please wait..." } %>
<% end %>