<%=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' %>
<% 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_in_category', locals: {terms: terms} %>
<% end %>
<%=l :label_not_categorized %>
<%= render 'index_in_category', terms: uncategorized_terms %>