<div class="row">
<div class="col-md-12">
<h1><%= raw _('DMP Templates') %></h1>
<% if @templates.count > 0 %>
<p class="left-indent"><%= _('Templates are provided by a funder, an institution, or a trusted party.') %></p>
<% else %>
<p class="left-indent"><%= _('There are currently no public Templates.')%></p>
<% end %>
</div>
</div>
<div class="row">
<div class="col-md-12">
<% if @templates.count > 0 %>
<div class="table-responsive">
<table class="table table-hover tablesorter">
<thead>
<% if @templates.count > TABLE_FILTER_MIN_ROWS %>
<tr>
<th colspan="3" class="sorter-false">
<%= render(partial: "shared/table_filter",
locals: {path: public_templates_path, placeholder: _('Filter templates')}) %>
</th>
</tr>
<% end %>
<tr>
<th><%= _('Template Name') %></th>
<th><%= _('Organisation Name') %></th>
<th class="sorter-false text-center"><%= _('Download') %></th>
</tr>
</thead>
<tbody>
<% @templates.each do |template| %>
<tr>
<td><%= template.title %></td>
<td><%= template.org.name %></td>
<td class="text-center">
<%= link_to _('DOCX'), template_export_path(template.dmptemplate_id, format: :docx), target: '_blank' %>
<%= link_to _('PDF'), template_export_path(template.dmptemplate_id, format: :pdf), target: '_blank' %>
</td>
</tr>
<% end %>
</table>
</div>
<% end %>
</div>
</div>