Redmine 4.1.1

This commit is contained in:
Manuel Cillero 2020-11-22 21:20:06 +01:00
parent 33e7b881a5
commit 3d976f1b3b
1593 changed files with 36180 additions and 19489 deletions

View file

@ -7,44 +7,61 @@
<p><label for="query_name"><%=l(:field_name)%></label>
<%= text_field 'query', 'name', :size => 80 %></p>
<% if User.current.admin? || User.current.allowed_to?(:manage_public_queries, @query.project) %>
<% if User.current.admin? ||
User.current.allowed_to?(:manage_public_queries, @query.project) %>
<p><label><%=l(:field_visible)%></label>
<label class="block"><%= radio_button 'query', 'visibility', Query::VISIBILITY_PRIVATE %> <%= l(:label_visibility_private) %></label>
<label class="block"><%= radio_button 'query', 'visibility', Query::VISIBILITY_PUBLIC %> <%= l(:label_visibility_public) %></label>
<label class="block"><%= radio_button 'query', 'visibility', Query::VISIBILITY_ROLES %> <%= l(:label_visibility_roles) %>:</label>
<% Role.givable.sorted.each do |role| %>
<label class="block role-visibility"><%= check_box_tag 'query[role_ids][]', role.id, @query.roles.include?(role), :id => nil %> <%= role.name %></label>
<% unless @query.type == 'ProjectQuery' %>
<label class="block"><%= radio_button 'query', 'visibility', Query::VISIBILITY_ROLES %> <%= l(:label_visibility_roles) %>:</label>
<% Role.givable.sorted.each do |role| %>
<label class="block role-visibility"><%= check_box_tag 'query[role_ids][]', role.id, @query.roles.include?(role), :id => nil %> <%= role.name %></label>
<% end %>
<%= hidden_field_tag 'query[role_ids][]', '' %>
<% end %>
<%= hidden_field_tag 'query[role_ids][]', '' %>
</p>
<% end %>
<p><label for="query_is_for_all"><%=l(:field_is_for_all)%></label>
<%= check_box_tag 'query_is_for_all', 1, @query.project.nil?, :class => (User.current.admin? ? '' : 'disable-unless-private') %></p>
<% unless @query.type == 'ProjectQuery' %>
<p><label for="query_is_for_all"><%=l(:field_is_for_all)%></label>
<%= check_box_tag 'query_is_for_all', 1, @query.project.nil?, :class => (User.current.admin? ? '' : 'disable-unless-private') %></p>
<% end %>
<% unless params[:gantt] %>
<fieldset id="options"><legend><%= l(:label_options) %></legend>
<p><label for="query_default_columns"><%=l(:label_default_columns)%></label>
<% if @query.available_display_types.size > 1 %>
<p><label for='display_type'><%= l(:label_display_type) %></label>
<%= available_display_types_tags(@query) %>
</p>
<% end %>
<p id ="default_columns"><label for="query_default_columns"><%=l(:label_default_columns)%></label>
<%= check_box_tag 'default_columns', 1, @query.has_default_columns?, :id => 'query_default_columns',
:data => {:disables => "#columns, .block_columns input"} %></p>
<p><label for="query_group_by"><%= l(:field_group_by) %></label>
<%= select 'query', 'group_by', @query.groupable_columns.collect {|c| [c.caption, c.name.to_s]}, :include_blank => true %></p>
<% unless params[:gantt] %>
<p id="group_by"><label for="query_group_by"><%= l(:field_group_by) %></label>
<%= select 'query', 'group_by', @query.groupable_columns.collect {|c| [c.caption, c.name.to_s]}, :include_blank => true %></p>
<p class="block_columns"><label><%= l(:button_show) %></label>
<%= available_block_columns_tags(@query) %></p>
<% unless @query.available_block_columns.empty? %>
<p class="block_columns"><label><%= l(:button_show) %></label>
<%= available_block_columns_tags(@query) %></p>
<% end %>
<p><label><%= l(:label_total_plural) %></label>
<%= available_totalable_columns_tags(@query) %></p>
</fieldset>
<% unless @query.available_totalable_columns.empty? %>
<p class="totable_columns"><label><%= l(:label_total_plural) %></label>
<%= available_totalable_columns_tags(@query) %></p>
<% end %>
<% else %>
<fieldset id="options"><legend><%= l(:label_options) %></legend>
<p><label><%= l(:button_show) %></label>
<%= hidden_field_tag 'query[draw_relations]', '0' %>
<%= hidden_field_tag 'query[draw_progress_line]', '0' %>
<%= hidden_field_tag 'query[draw_selected_columns]', '0' %>
<label class="inline"><%= check_box_tag "query[draw_relations]", "1", @query.draw_relations %> <%= l(:label_related_issues) %></label>
<label class="inline"><%= check_box_tag "query[draw_progress_line]", "1", @query.draw_progress_line %> <%= l(:label_gantt_progress_line) %></label>
<label class="inline"><%= check_box_tag "query[draw_selected_columns]", "1", @query.draw_selected_columns, :data => { :enables => 'span.query-columns select, span.query-columns input'} %> <%= l(:description_selected_columns) %></label>
</p>
</fieldset>
<% end %>
</fieldset>
</div>
<fieldset id="filters"><legend><%= l(:label_filter_plural) %></legend>
@ -52,7 +69,7 @@
</fieldset>
<% unless params[:gantt] %>
<fieldset><legend><%= l(:label_sort) %></legend>
<fieldset id="sort"><legend><%= l(:label_sort) %></legend>
<% 3.times do |i| %>
<%= content_tag(:span, "#{i+1}:", :class => 'query_sort_criteria_count')%>
<%= label_tag "query_sort_criteria_attribute_" + i.to_s,
@ -70,12 +87,10 @@
</fieldset>
<% end %>
<% unless params[:gantt] %>
<%= content_tag 'fieldset', :id => 'columns' do %>
<legend><%= l(:field_column_names) %></legend>
<%= render_query_columns_selection(query) %>
<% end %>
<% end %>
</div>
@ -89,4 +104,15 @@ $(document).ready(function(){
$("input.disable-unless-private").attr('disabled', !private_checked);
}).trigger('change');
});
$(function ($) {
$('input[name=display_type]').change(function () {
var option = $('input[name=display_type]:checked').val();
if (option == 'board') {
$('fieldset#columns, fieldset#sort, p#default_columns, p#group_by').hide();
} else {
$('fieldset#columns, fieldset#sort, p#default_columns, p#group_by').show();
}
}).change();
});
<% end %>