<%- model_class = Plan -%>
<% javascript "toolbar.js" %>
<h1>
<%= t("helpers.project.projects_title") %>
</h1>
<!-- if the user has projects -->
<% if @plans.count > 0 %>
<p>
<%= raw t("helpers.project.project_text_when_project")%>
</p>
<%= render(partial: "toolbar") %>
<table id="dmp_table" class="dmp_table tablesorter">
<thead>
<%= render(partial: "plan_list_head") %>
</thead>
<tbody>
<% @plans.each do |plan| %>
<%= render(partial: "plan_list_item", locals: { plan: plan } ) %>
<% end %>
</tbody>
</table>
<!-- if the user does not have projects -->
<% else %>
<p>
<%= raw t("helpers.project.project_text_when_no_project")%>
</p>
<% end %>
<!-- link button to create a new project -->
<p>
<%= link_to t(".new", :default => t("helpers.project.create")),
new_plan_path,
:class => "btn btn-primary" %>
</p>