Initial commit
This commit is contained in:
27
app/views/downloads/_download.html.erb
Normal file
27
app/views/downloads/_download.html.erb
Normal file
@@ -0,0 +1,27 @@
|
||||
<tr>
|
||||
<td>
|
||||
<%= download.name %>
|
||||
</td>
|
||||
<td>
|
||||
<%= download.release_type&.titleize %>
|
||||
</td>
|
||||
<td>
|
||||
<%= download.status.titleize %>
|
||||
</td>
|
||||
<td>
|
||||
<%= download.created_at.strftime("%D %T") %>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
<%= button_tag t(".actions.manage"), class: "btn btn-light btn-sm dropdown-toggle border", data: { toggle: "dropdown", boundary: "window" }, aria: { haspopup: true, expanded: false } %>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<% if download.file.attached? %>
|
||||
<%= link_to fa_icon("download fw", text: "Download"), download.file, class: "dropdown-item", target: :_blank %>
|
||||
<% end %>
|
||||
<% if policy(download).destroy? %>
|
||||
<%= link_to fa_icon("trash fw", text: "Delete"), download_path(download, project_id: download.project.id), class: "dropdown-item", method: :delete, data: { confirm: "Are you sure?" } %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
Reference in New Issue
Block a user