diff --git a/app/views/public_pages/plan_index.html.erb b/app/views/public_pages/plan_index.html.erb index 3ea9622..f8fb614 100644 --- a/app/views/public_pages/plan_index.html.erb +++ b/app/views/public_pages/plan_index.html.erb @@ -3,11 +3,6 @@

<%= raw _('Public DMPs') %>

-
-
- -
-
<% if @plans.count > 0 %>

@@ -18,25 +13,29 @@ <%= _("There are currently no public DMPs.")%>

<% end %> +
+
+
+
<% if @plans.count > 0 %> -
- +
+
<% if @plans.count > TABLE_FILTER_MIN_ROWS %> - <% end %> - - - - - + + + + + @@ -46,10 +45,8 @@ - <% end %> diff --git a/app/views/public_pages/template_index.html.erb b/app/views/public_pages/template_index.html.erb index e49f7a1..b081e20 100644 --- a/app/views/public_pages/template_index.html.erb +++ b/app/views/public_pages/template_index.html.erb @@ -1,41 +1,41 @@

<%= raw _('DMP Templates') %>

+ + <% if @templates.count > 0 %> +

<%= _('Templates are provided by a funder, an institution, or a trusted party.') %>

+ <% else %> +

<%= _('There are currently no public Templates.')%>

+ <% end %>
<% if @templates.count > 0 %> -

<%= _('Templates are provided by a funder, an institution, or a trusted party.') %>

- <% else %> -

<%= _('There are currently no public Templates.')%>

- <% end %> - - <% if @templates.count > 0 %> -
-
+ <%= render(partial: "shared/table_filter", locals: {path: public_plans_path, placeholder: _('Filter plans')}) %> - +
<%= _('Project Title') %><%= _('Template') %><%= _('Institution') %><%= _('Owner') %><%= _('Download') %><%= _('Project Title') %><%= _('Template') %><%= _('Institution') %><%= _('Owner') %><%= _('Download') %>
<%= plan.template.title %> <%= (plan.owner.nil? || plan.owner.org.nil? ? _('Not Applicable') : plan.owner.org.name) %> <%= (plan.owner.nil? ? _('Unknown') : plan.owner.name(false)) %> - <%= link_to _('PDF'), - plan_export_path(plan, format: :pdf), - class: "dmp_table_link" %> + + <%= link_to _('PDF'), plan_export_path(plan, format: :pdf), class: "dmp_table_link" %>
+
+
<% if @templates.count > TABLE_FILTER_MIN_ROWS %> - <% end %> - - - + + + <% @templates.each do |template| %> - + -
+ <%= render(partial: "shared/table_filter", - locals: {path: public_templates_path, placeholder: _('Filter templates')}) %> - + locals: {path: public_templates_path, placeholder: _('Filter templates')}) %> +
<%= _('Template Name') %><%= _('Organisation Name') %><%= _('Download') %><%= _('Template Name') %><%= _('Organisation Name') %><%= _('Download') %>
<%= template.title %> <%= template.org.name %> + <%= link_to _('DOCX'), template_export_path(template.dmptemplate_id, format: :docx) %> <%= link_to _('PDF'), template_export_path(template.dmptemplate_id, format: :pdf) %>