2018-05-19 21:43:22 +02:00
|
|
|
<% content_for :sidebar do %>
|
|
|
|
<h3><%=l :label_view %></h3>
|
|
|
|
|
2018-06-02 06:28:09 +02:00
|
|
|
<%= form_with url: project_glossary_terms_path, method: :get, local: true do |form| %>
|
|
|
|
<fieldset>
|
|
|
|
<legend><%=l :label_grouping %></legend>
|
|
|
|
<%= form.radio_button :grouping, 1, checked: @grouping == '1' ? 'checked' : nil %>
|
|
|
|
<%= form.label :grouping, l(:label_categorized), vaule: 1 %>
|
|
|
|
<%= form.radio_button :grouping, 0, checked: @grouping == '0' ? 'checked' : nil %>
|
|
|
|
<%= form.label :grouping, l(:label_not_categorized), value: 0 %>
|
|
|
|
</fieldset>
|
|
|
|
<%= form.submit l(:label_view) %>
|
|
|
|
<% end %>
|
|
|
|
|
2018-05-19 21:43:22 +02:00
|
|
|
<h3><%=l :label_glossary_term %></h3>
|
2018-05-20 15:19:01 +02:00
|
|
|
<p><%= link_to_if_authorized l(:label_glossary_term_new),
|
|
|
|
{ controller: :glossary_terms, action: :new, project_id: @project },
|
2018-05-19 21:43:22 +02:00
|
|
|
class: 'icon icon-add' %></p>
|
|
|
|
|
2019-12-01 13:51:18 +01:00
|
|
|
<fieldset class="collapsible collapsed">
|
|
|
|
<legend onclick="toggleFieldset(this);" class="icon icon-collapsed">
|
|
|
|
<%=l :label_glossary_term_import_csv %>
|
|
|
|
</legend>
|
|
|
|
<div style="display: none;">
|
|
|
|
<%= form_with url: import_project_glossary_terms_path, method: :post, local: true do |form| %>
|
|
|
|
<%= form.file_field :file %>
|
|
|
|
<%= form.submit l(:label_import) %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
|
2018-05-19 21:43:22 +02:00
|
|
|
<h3><%=l :label_glossary_category %></h3>
|
2018-05-20 15:19:01 +02:00
|
|
|
<p><%= link_to_if_authorized l(:label_glossary_category_new),
|
|
|
|
{ controller: :glossary_categories, action: :new, project_id: @project},
|
|
|
|
class: 'icon icon-add' %></p>
|
|
|
|
|
2018-05-19 21:43:22 +02:00
|
|
|
<p><%= link_to l(:label_glossary_categories),
|
|
|
|
project_glossary_categories_path %></p>
|
|
|
|
|
|
|
|
<h3><%=l :label_glossary_index %></h3>
|
|
|
|
<table>
|
|
|
|
<% l(:index_en).each_line do |line| %>
|
|
|
|
<tr>
|
|
|
|
<% line.split(" ").each do |ch| %>
|
|
|
|
<td><%= link_to ch, project_glossary_terms_path(index: ch) %></td>
|
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|
2018-06-05 18:21:17 +02:00
|
|
|
<table>
|
|
|
|
<% l(:index_rubi).each_line do |line| %>
|
|
|
|
<tr>
|
|
|
|
<% line.split(" ").each do |char| %>
|
|
|
|
<td>
|
|
|
|
<%= link_to char, project_glossary_terms_path(index_rubi: char) %>
|
|
|
|
</td>
|
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</table>
|
2018-05-19 21:43:22 +02:00
|
|
|
<% end %>
|