Patch #6688 ยป query_enhancements_in_calendar_and_gantt-r4249.diff
| app/views/projects/index.rhtml (working copy) | ||
|---|---|---|
|
<%= 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' }%>
|
||
|
</div>
|
||
| app/views/calendars/show.html.erb (working copy) | ||
|---|---|---|
|
<h2><%= l(:label_calendar) %></h2>
|
||
|
<h2><%= @query.new_record? ? l(:label_calendar) : h(@query.name) %></h2>
|
||
|
<% 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%>
|
||
| ... | ... | |
|
}, :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' %>
|
||
|
</p>
|
||
|
<% end %>
|
||
| ... | ... | |
|
<% content_for :sidebar do %>
|
||
|
<%= render :partial => 'issues/sidebar' %>
|
||
|
<% end %>
|
||
|
<% html_title(l(:label_calendar)) -%>
|
||
| app/views/gantts/show.html.erb (working copy) | ||
|---|---|---|
|
<% @gantt.view = self %>
|
||
|
<h2><%= l(:label_gantt) %></h2>
|
||
|
<h2><%= @query.new_record? ? l(:label_gantt) : h(@query.name) %></h2>
|
||
|
<% 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%>
|
||
| ... | ... | |
|
}, :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' %>
|
||
|
</p>
|
||
|
<% end %>
|
||
| ... | ... | |
|
<% content_for :sidebar do %>
|
||
|
<%= render :partial => 'issues/sidebar' %>
|
||
|
<% end %>
|
||
|
<% html_title(l(:label_gantt)) -%>
|
||
| app/views/issues/_sidebar.rhtml (working copy) | ||
|---|---|---|
|
<% 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) %><br />
|
||
|
<% end %>
|
||
|
<% if User.current.allowed_to?(:view_gantt, @project, :global => true) %>
|
||
|
<%= link_to(l(:label_gantt), :controller => 'gantts', :action => 'show', :project_id => @project) %><br />
|
||
|
<% end %>
|
||
|
<%= call_hook(:view_issues_sidebar_planning_bottom) %>
|
||
|
<% unless sidebar_queries.empty? -%>
|
||
|
<h3><%= l(:label_query_plural) %></h3>
|
||
|
<% sidebar_queries.each do |query| -%>
|
||
|
<%= link_to(h(query.name), :controller => 'issues', :action => 'index', :project_id => @project, :query_id => query) %><br />
|
||
|
<%= link_to(h(query.name), :controller => controller_name, :action => (controller_name == 'issues' ? 'index' : 'show'), :project_id => @project, :query_id => query) %><br />
|
||
|
<% end -%>
|
||
|
<%= call_hook(:view_issues_sidebar_queries_bottom) %>
|
||
|
<% end -%>
|
||