<%=l :label_glossary_terms %>
<%= link_to_if_authorized l(:label_glossary_term_new),
{ controller: :glossary_terms, action: :new, project_id: @project },
class: 'icon icon-add' %>
<%= render partial: 'sidebar' %>
<% if @grouping == '1' %>
<% categorized_terms = @glossary_terms.reject { |t| t.category_id.nil? } %>
<% uncategorized_terms = @glossary_terms.where(category_id: nil) %>
<% categorized_terms.group_by(&:category).each do |category, terms| %>
<%= category.name %>
<%= render partial: 'index_terms', locals: {terms: terms} %>
<% end %>
<%=l :label_not_categorized %>
<%= render 'index_terms', terms: uncategorized_terms %>
<% else %>
<%= render 'index_terms', terms: @glossary_terms %>
<% end %>
<% other_formats_links do |f| %>
<%= f.link_to_with_query_parameters 'CSV' %>
<% end %>