From 50794b08a925a6a06f9a76f6f08085e3250bf04c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 5 Dec 2008 15:41:32 +0000 Subject: Cross-project gantt and calendar (#1157). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2088 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/issues/_sidebar.rhtml | 11 +++++------ app/views/issues/gantt.rfpdf | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'app/views') diff --git a/app/views/issues/_sidebar.rhtml b/app/views/issues/_sidebar.rhtml index 1b486966e..788f0b947 100644 --- a/app/views/issues/_sidebar.rhtml +++ b/app/views/issues/_sidebar.rhtml @@ -3,18 +3,17 @@ <% if @project %> <%= link_to l(:field_summary), :controller => 'reports', :action => 'issue_report', :id => @project %>
<%= link_to l(:label_change_log), :controller => 'projects', :action => 'changelog', :id => @project %> +<% end %> <% planning_links = [] - planning_links << link_to_if_authorized(l(:label_calendar), :action => 'calendar', :project_id => @project) - planning_links << link_to_if_authorized(l(:label_gantt), :action => 'gantt', :project_id => @project) - planning_links.compact! - unless planning_links.empty? %> + planning_links << link_to(l(:label_calendar), :action => 'calendar', :project_id => @project) if User.current.allowed_to?(:view_calendar, @project, :global => true) + planning_links << link_to(l(:label_gantt), :action => 'gantt', :project_id => @project) if User.current.allowed_to?(:view_gantt, @project, :global => true) +%> +<% unless planning_links.empty? %>

<%= l(:label_planning) %>

<%= planning_links.join(' | ') %>

<% end %> -<% end %> - <% unless sidebar_queries.empty? -%>

<%= l(:label_query_plural) %>

diff --git a/app/views/issues/gantt.rfpdf b/app/views/issues/gantt.rfpdf index 692e0d261..be7f31a39 100644 --- a/app/views/issues/gantt.rfpdf +++ b/app/views/issues/gantt.rfpdf @@ -1,12 +1,12 @@ <% pdf=IfpdfHelper::IFPDF.new(current_language) -pdf.SetTitle("#{@project.name} - #{l(:label_gantt)}") +pdf.SetTitle("#{l(:label_gantt)} #{@project}") pdf.AliasNbPages pdf.footer_date = format_date(Date.today) pdf.AddPage("L") pdf.SetFontStyle('B',12) pdf.SetX(15) -pdf.Cell(70, 20, @project.name) +pdf.Cell(70, 20, @project.to_s) pdf.Ln pdf.SetFontStyle('B',9) -- cgit v1.2.3