<%# locals: { controller, action, paginable, scope, current } %>
<div class="table-responsive">
<table class="table table-hover tablesorter">
<thead>
<tr>
<th><%= _('Title') %> <%= paginable_sort_link('title') %></th>
<th class="text-center"><%= _('Version') %> <%= paginable_sort_link('version') %></th>
<th class="text-center"><%= _('Published') %> <%= paginable_sort_link('published') %></th>
<th><%= _('Last updated') %> <%= paginable_sort_link('updated_at') %></th>
<th class="text-center sorter-false"><%= _('Actions') %></th>
</tr>
</thead>
<tbody>
<% scope.each do |org_template| %>
<tr>
<td>
<%= org_template.title%>
<% if org_template == current && !org_template.published%>
<i class="fa fa-pencil-square-o" aria-hidden="true"></i> <em><%=_('Draft')%></em>
<% end %>
</td>
<td class="text-center">
<%= org_template.version %>
</td>
<td class="text-center">
<%= (org_template.published? ? _('Yes') : _('No')) %>
</td>
<td>
<%= l org_template.updated_at.to_date, formats: :short %>
</td>
<td class="text-center">
<%= link_to (org_template == current ? _('Edit') : _('View')), edit_org_admin_template_path(id: org_template), class: "dmp_table_link"%>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>