39 lines
1.6 KiB
Plaintext
39 lines
1.6 KiB
Plaintext
<tr>
|
|
<td>
|
|
<%= task_request.created_at.strftime('%D') %>
|
|
</td>
|
|
<td>
|
|
<%= task_request.deadline.try(:strftime, '%D') %>
|
|
</td>
|
|
<td>
|
|
<%= task_request.time_allowed %>
|
|
</td>
|
|
<td>
|
|
<%= task_request.status.titleize %>
|
|
</td>
|
|
<% if params[:completed_only] %>
|
|
<td>
|
|
<%= task_request.deliverable_url %>
|
|
</td>
|
|
<% end %>
|
|
<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 policy(task_request).show? %>
|
|
<%= link_to fa_icon("tasks fw", text: "View"), [task_request.project, task_request], class: "dropdown-item", target: '_blank' %>
|
|
<% end %>
|
|
<% if policy(task_request).edit? %>
|
|
<%= link_to fa_icon("pencil fw", text: "Edit"), [:edit, task_request.project, task_request], class: "dropdown-item" %>
|
|
<% end %>
|
|
<% if policy(task_request).open_deliverable? && task_request.status == "completed" %>
|
|
<%= link_to fa_icon("external-link fw", text: t(".actions.open_deliverable")), task_request.deliverable_url, class: "dropdown-item", target: '_blank' %>
|
|
<% end %>
|
|
<% if policy(task_request).cancel? && !task_request.cancelled? %>
|
|
<%= link_to fa_icon("ban fw", text: "Cancel"), [:cancel, task_request.project, task_request], class: "dropdown-item", method: :post %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|