Nuevo plugin Redmine Glossary 0.9.2

This commit is contained in:
Manuel Cillero 2019-01-29 19:42:59 +01:00
parent 5d298a7529
commit 693eb3ee50
72 changed files with 2962 additions and 0 deletions

View file

@ -0,0 +1,44 @@
<% urlopts = {:controller => 'glossary_styles', :action => 'edit',
:project_id => @project,
:glossary_style_id => @glossary_style.id}
add_search_params(urlopts)
form = form_for @glossary_style, :url => urlopts do |f| %>
<label> <%= f.check_box "show_desc" %> <%= l(:label_glossary_style_show_desc) %> </label>
<br />
<%=h l(:label_project) %>
<%=
options = []
options << [l(:label_glossary_style_project_current), GlossaryStyle::ProjectCurrent]
options << [l(:label_glossary_style_project_mine), GlossaryStyle::ProjectMine] if User.current.logged?
options << [l(:label_glossary_style_project_all), GlossaryStyle::ProjectAll]
f.select('project_scope', options)
%>
<fieldset id="grouping"><legend><%= l(:label_grouping) %></legend>
<% group_labels = [:label_none, :field_category, :label_project] %>
<% for gby in [GlossaryStyle::GroupByNone,
GlossaryStyle::GroupByCategory,
GlossaryStyle::GroupByProject] %>
<label><%= f.radio_button('groupby', gby,
{ :checked => (gby == @glossary_style.groupby ) } ) %>
<%= l(group_labels[gby]) %></label>
<% end %>
</fieldset>
<fieldset id="sort"><legend><%= l(:label_sort) %></legend>
<% for cnt in 0...2 %>
<%= cnt+1 %> : <%= params_select(f, "sort_item_#{cnt}", default_sort_params) %><br />
<% end %>
</fieldset>
<%= submit_tag l(:label_view) %>
<%= submit_tag l(:button_clear), :name => 'clear' %>
<% end %>
<%= form if Rails::VERSION::MAJOR >= 3 %>

View file

@ -0,0 +1,46 @@
<% form = form_tag({:controller => 'glossary_styles', :action => 'search', :project_id => @project},
{:method => 'get', :id=>'search_form'}
) do %>
<%= hidden_field_tag 'project_id', @project.id.to_s %>
<div id="glossary_search" class="hide-when-print">
<fieldset id="filters" class="collapsible <%= (glossary_searching?) ? "" : "collapsed" %>">
<legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
<div style="<%= (glossary_searching?) ? "" : "display: none;" %>">
<table>
<tr><th><%=h l(:label_search) %></th>
<td>
<%= text_field_tag("search_str", params[:search_str]) %>
</td></tr>
<tr><th><%=h l(:field_category) %></th>
<td>
<%=
select_tag(:search_category,
options_for_select(seach_category_options(@glossary_style.project_scope, @project),
params[:search_category]),
{:include_blank => true})
%>
</td></tr>
<tr><th><%=h l(:label_latest) %></th>
<td>
<%= text_field_tag("latest_days", params[:latest_days], :size=>'10') %>
<%=h l(:label_indays) %>
</td></tr>
</table>
<%= submit_tag l(:label_search) %>
<%= submit_tag l(:button_clear), :name => 'search_clear' %>
</div>
</fieldset>
</div>
<% end %>
<%= form if Rails::VERSION::MAJOR >= 3 %>

View file

@ -0,0 +1 @@
<h2>GlossaryStyles#edit</h2>