Makes saved query filters visible (#2883).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2892 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
3477ded32a
commit
b4c55ea4de
|
@ -1,16 +1,12 @@
|
||||||
<% form_tag({}, :id => 'query_form') do %>
|
|
||||||
<% if @query.new_record? %>
|
|
||||||
<h2><%= l(:label_calendar) %></h2>
|
<h2><%= l(:label_calendar) %></h2>
|
||||||
|
|
||||||
|
<% form_tag({}, :id => 'query_form') do %>
|
||||||
<fieldset id="filters" class="collapsible">
|
<fieldset id="filters" class="collapsible">
|
||||||
<legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
|
<legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
|
||||||
<div>
|
<div>
|
||||||
<%= render :partial => 'queries/filters', :locals => {:query => @query} %>
|
<%= render :partial => 'queries/filters', :locals => {:query => @query} %>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<% else %>
|
|
||||||
<h2><%=h @query.name %></h2>
|
|
||||||
<% html_title @query.name %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<p style="float:right;">
|
<p style="float:right;">
|
||||||
<%= link_to_remote ('« ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")),
|
<%= link_to_remote ('« ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")),
|
||||||
|
|
|
@ -1,16 +1,12 @@
|
||||||
|
<h2><%= l(:label_gantt) %></h2>
|
||||||
|
|
||||||
<% form_tag(params.merge(:month => nil, :year => nil, :months => nil), :id => 'query_form') do %>
|
<% form_tag(params.merge(:month => nil, :year => nil, :months => nil), :id => 'query_form') do %>
|
||||||
<% if @query.new_record? %>
|
|
||||||
<h2><%=l(:label_gantt)%></h2>
|
|
||||||
<fieldset id="filters" class="collapsible">
|
<fieldset id="filters" class="collapsible">
|
||||||
<legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
|
<legend onclick="toggleFieldset(this);"><%= l(:label_filter_plural) %></legend>
|
||||||
<div>
|
<div>
|
||||||
<%= render :partial => 'queries/filters', :locals => {:query => @query} %>
|
<%= render :partial => 'queries/filters', :locals => {:query => @query} %>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<% else %>
|
|
||||||
<h2><%=h @query.name %></h2>
|
|
||||||
<% html_title @query.name %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<p style="float:right;">
|
<p style="float:right;">
|
||||||
<%= if @gantt.zoom < 4
|
<%= if @gantt.zoom < 4
|
||||||
|
|
|
@ -1,8 +1,14 @@
|
||||||
<% if @query.new_record? %>
|
<div class="contextual">
|
||||||
<h2><%=l(:label_issue_plural)%></h2>
|
<% if !@query.new_record? && @query.editable_by?(User.current) %>
|
||||||
<% html_title(l(:label_issue_plural)) %>
|
<%= link_to l(:button_edit), {:controller => 'queries', :action => 'edit', :id => @query}, :class => 'icon icon-edit' %>
|
||||||
|
<%= link_to l(:button_delete), {:controller => 'queries', :action => 'destroy', :id => @query}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<% form_tag({ :controller => 'queries', :action => 'new' }, :id => 'query_form') do %>
|
<h2><%= @query.new_record? ? l(:label_issue_plural) : h(@query.name) %></h2>
|
||||||
|
<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
|
||||||
|
|
||||||
|
<% form_tag({ :controller => 'queries', :action => 'new' }, :id => 'query_form') do %>
|
||||||
<%= hidden_field_tag('project_id', @project.to_param) if @project %>
|
<%= hidden_field_tag('project_id', @project.to_param) if @project %>
|
||||||
<div id="query_form_content">
|
<div id="query_form_content">
|
||||||
<fieldset id="filters" class="collapsible">
|
<fieldset id="filters" class="collapsible">
|
||||||
|
@ -33,21 +39,10 @@
|
||||||
:update => "content",
|
:update => "content",
|
||||||
}, :class => 'icon icon-reload' %>
|
}, :class => 'icon icon-reload' %>
|
||||||
|
|
||||||
<% if User.current.allowed_to?(:save_queries, @project, :global => true) %>
|
<% if @query.new_record? && User.current.allowed_to?(:save_queries, @project, :global => true) %>
|
||||||
<%= link_to l(:button_save), {}, :onclick => "$('query_form').submit(); return false;", :class => 'icon icon-save' %>
|
<%= link_to l(:button_save), {}, :onclick => "$('query_form').submit(); return false;", :class => 'icon icon-save' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</p>
|
</p>
|
||||||
<% end %>
|
|
||||||
<% else %>
|
|
||||||
<div class="contextual">
|
|
||||||
<% if @query.editable_by?(User.current) %>
|
|
||||||
<%= link_to l(:button_edit), {:controller => 'queries', :action => 'edit', :id => @query}, :class => 'icon icon-edit' %>
|
|
||||||
<%= link_to l(:button_delete), {:controller => 'queries', :action => 'destroy', :id => @query}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
|
|
||||||
<% end %>
|
|
||||||
</div>
|
|
||||||
<h2><%=h @query.name %></h2>
|
|
||||||
<div id="query_form"></div>
|
|
||||||
<% html_title @query.name %>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= error_messages_for 'query' %>
|
<%= error_messages_for 'query' %>
|
||||||
|
|
Loading…
Reference in New Issue