redmine_glossary/app/views/glossary_terms/index.html.erb

29 lines
890 B
Plaintext
Raw Normal View History

<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">
<%= 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>
<%= 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| %>
<h3><%= category.name %></h3>
<%= render partial: 'index_terms', locals: {terms: terms} %>
<% end %>
<h3><%=l :label_not_categorized %></h3>
<%= render 'index_terms', terms: uncategorized_terms %>
<% else %>
<%= render 'index_terms', terms: @glossary_terms %>
<% end %>
2019-12-07 19:05:44 +01:00
<% other_formats_links do |f| %>
<%= f.link_to_with_query_parameters 'CSV' %>
<% end %>