2018-05-04 09:00:43 +02:00
|
|
|
<h2><%=l :label_glossary_terms %></h2>
|
2018-05-01 17:42:01 +02:00
|
|
|
|
2018-05-05 14:04:21 +02:00
|
|
|
<div class="contextual">
|
2018-05-20 15:19:01 +02:00
|
|
|
<%= link_to_if_authorized l(:label_glossary_term_new),
|
|
|
|
{ controller: :glossary_terms, action: :new, project_id: @project },
|
|
|
|
class: 'icon icon-add' %>
|
2018-05-05 14:04:21 +02:00
|
|
|
</div>
|
2018-05-19 21:43:22 +02:00
|
|
|
|
|
|
|
<%= render partial: 'sidebar' %>
|
|
|
|
|
2018-05-26 17:33:05 +02:00
|
|
|
<% 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| %>
|
|
|
|
<h3><%= category.name %></h3>
|
|
|
|
<%= render partial: 'index_in_category', locals: {terms: terms} %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<h3><%=l :label_not_categorized %></h3>
|
|
|
|
<%= render 'index_in_category', terms: uncategorized_terms %>
|
|
|
|
|
|
|
|
|