Feature #27672 » 0003-Fix-changeable-items-on-the-queries-form.patch
| app/views/gantts/show.html.erb | ||
|---|---|---|
|
<% @gantt.view = self %>
|
||
|
<div class="contextual">
|
||
|
<% if !@query.new_record? && @query.editable_by?(User.current) %>
|
||
|
<%= link_to l(:button_edit), edit_query_path(@query, :gantt => 1), :class => 'icon icon-edit' %>
|
||
|
<%= delete_link query_path(@query, :gantt => 1) %>
|
||
|
<% end %>
|
||
|
</div>
|
||
|
<h2><%= @query.new_record? ? l(:label_gantt) : @query.name %></h2>
|
||
| ... | ... | |
|
:class => 'icon icon-checked' %>
|
||
|
<%= link_to l(:button_clear), { :project_id => @project, :set_filter => 1 },
|
||
|
:class => 'icon icon-reload' %>
|
||
|
<% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
|
||
|
<%= link_to_function l(:button_save),
|
||
|
"$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit();",
|
||
|
:class => 'icon icon-save' %>
|
||
|
<% if @query.new_record? %>
|
||
|
<% if User.current.allowed_to?(:save_queries, @project, :global => true) %>
|
||
|
<%= link_to_function l(:button_save),
|
||
|
"$('#query_form').attr('action', '#{ @project ? new_project_query_path(@project) : new_query_path }').submit();",
|
||
|
:class => 'icon icon-save' %>
|
||
|
<% end %>
|
||
|
<% else %>
|
||
|
<% if @query.editable_by?(User.current) %>
|
||
|
<%= link_to l(:button_edit), edit_query_path(@query, :gantt => 1), :class => 'icon icon-edit' %>
|
||
|
<%= delete_link query_path(@query, :gantt => 1) %>
|
||
|
<% end %>
|
||
|
<% end %>
|
||
|
</p>
|
||
|
</div>
|
||
| app/views/queries/_form.html.erb | ||
|---|---|---|
|
<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 params[:gantt] %>
|
||
|
<fieldset id="options"><legend><%= l(:label_options) %></legend>
|
||
|
<p><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>
|
||
|
<% unless params[:gantt] %>
|
||
|
<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>
|
||
| ... | ... | |
|
<p><label><%= l(:label_total_plural) %></label>
|
||
|
<%= available_totalable_columns_tags(@query) %></p>
|
||
|
</fieldset>
|
||
|
<% else %>
|
||
|
<fieldset id="options"><legend><%= l(:label_options) %></legend>
|
||
|
<p><label><%= l(:button_show) %></label>
|
||
|
<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 %> <%= l(:label_gantt_selected_columns) %></label>
|
||
|
</p>
|
||
|
</fieldset>
|
||
|
<% end %>
|
||
|
</fieldset>
|
||
|
</div>
|
||
|
<fieldset id="filters"><legend><%= l(:label_filter_plural) %></legend>
|
||
| ... | ... | |
|
</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>
|
||