Index: app/views/projects/index.rhtml
===================================================================
--- app/views/projects/index.rhtml (revision 4249)
+++ app/views/projects/index.rhtml (working copy)
@@ -6,6 +6,8 @@
<%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add') + ' |' if User.current.allowed_to?(:add_project, nil, :global => true) %>
<%= link_to(l(:label_issue_view_all), { :controller => 'issues' }) + ' |' if User.current.allowed_to?(:view_issues, nil, :global => true) %>
<%= link_to(l(:label_overall_spent_time), { :controller => 'time_entries' }) + ' |' if User.current.allowed_to?(:view_time_entries, nil, :global => true) %>
+ <%= link_to(l(:label_calendar), { :controller => 'calendars', :action => 'show' }) + ' |' if User.current.allowed_to?(:view_calendar, nil, :global => true) %>
+ <%= link_to(l(:label_gantt), { :controller => 'gantts', :action => 'show' }) + ' |' if User.current.allowed_to?(:view_gantt, nil, :global => true) %>
<%= link_to l(:label_overall_activity), { :controller => 'activities', :action => 'index' }%>
Index: app/views/calendars/show.html.erb
===================================================================
--- app/views/calendars/show.html.erb (revision 4249)
+++ app/views/calendars/show.html.erb (working copy)
@@ -1,4 +1,5 @@
-
<%= l(:label_calendar) %>
+<%= @query.new_record? ? l(:label_calendar) : h(@query.name) %>
+<% html_title(@query.new_record? ? l(:label_calendar) : @query.name) %>
<% form_tag(calendar_path, :method => :put, :id => 'query_form') do %>
<%= hidden_field_tag('project_id', @project.to_param) if @project%>
@@ -26,10 +27,10 @@
}, :class => 'icon icon-checked' %>
<%= link_to_remote l(:button_clear),
- { :url => { :project_id => @project, :set_filter => (@query.new_record? ? 1 : nil) },
- :method => :put,
+ { :url => { :project_id => @project, :set_filter => 1 },
+ :method => :get,
:update => "content",
- }, :class => 'icon icon-reload' if @query.new_record? %>
+ }, :class => 'icon icon-reload' %>
<% end %>
@@ -47,5 +48,3 @@
<% content_for :sidebar do %>
<%= render :partial => 'issues/sidebar' %>
<% end %>
-
-<% html_title(l(:label_calendar)) -%>
Index: app/views/gantts/show.html.erb
===================================================================
--- app/views/gantts/show.html.erb (revision 4249)
+++ app/views/gantts/show.html.erb (working copy)
@@ -1,5 +1,6 @@
<% @gantt.view = self %>
-<%= l(:label_gantt) %>
+<%= @query.new_record? ? l(:label_gantt) : h(@query.name) %>
+<% html_title(@query.new_record? ? l(:label_gantt) : @query.name) %>
<% form_tag(gantt_path(:month => params[:month], :year => params[:year], :months => params[:months]), :method => :put, :id => 'query_form') do %>
<%= hidden_field_tag('project_id', @project.to_param) if @project%>
@@ -29,10 +30,10 @@
}, :class => 'icon icon-checked' %>
<%= link_to_remote l(:button_clear),
- { :url => { :project_id => @project, :set_filter => (@query.new_record? ? 1 : nil) },
- :method => :put,
+ { :url => { :project_id => @project, :set_filter => 1 },
+ :method => :get,
:update => "content",
- }, :class => 'icon icon-reload' if @query.new_record? %>
+ }, :class => 'icon icon-reload' %>
<% end %>
@@ -184,5 +185,3 @@
<% content_for :sidebar do %>
<%= render :partial => 'issues/sidebar' %>
<% end %>
-
-<% html_title(l(:label_gantt)) -%>
Index: app/views/issues/_sidebar.rhtml
===================================================================
--- app/views/issues/_sidebar.rhtml (revision 4249)
+++ app/views/issues/_sidebar.rhtml (working copy)
@@ -5,19 +5,12 @@
<% end %>
<%= call_hook(:view_issues_sidebar_issues_bottom) %>
-<% if User.current.allowed_to?(:view_calendar, @project, :global => true) %>
- <%= link_to(l(:label_calendar), :controller => 'calendars', :action => 'show', :project_id => @project) %>
-<% end %>
-<% if User.current.allowed_to?(:view_gantt, @project, :global => true) %>
- <%= link_to(l(:label_gantt), :controller => 'gantts', :action => 'show', :project_id => @project) %>
-<% end %>
-<%= call_hook(:view_issues_sidebar_planning_bottom) %>
-
<% unless sidebar_queries.empty? -%>
<%= l(:label_query_plural) %>
<% sidebar_queries.each do |query| -%>
-<%= link_to(h(query.name), :controller => 'issues', :action => 'index', :project_id => @project, :query_id => query) %>
+<%= link_to(h(query.name), :controller => controller_name, :action => (controller_name == 'issues' ? 'index' : 'show'), :project_id => @project, :query_id => query) %>
+
<% end -%>
<%= call_hook(:view_issues_sidebar_queries_bottom) %>
<% end -%>