summaryrefslogtreecommitdiffstats
path: root/app/views/projects
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-08-26 07:55:57 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-08-26 07:55:57 +0000
commitedba1f692b5a2648392718834a5cb8fb244b7ca6 (patch)
tree437ad518019f8f36bf32a9d181b5bcabe9beca32 /app/views/projects
parentc1eb587c6dcc9b955a1718bf431c8db77ed3bd5e (diff)
downloadredmine-edba1f692b5a2648392718834a5cb8fb244b7ca6.tar.gz
redmine-edba1f692b5a2648392718834a5cb8fb244b7ca6.zip
Gantt chart can now be exported to a graphic file (png).
This functionality is only available if RMagick is present. git-svn-id: http://redmine.rubyforge.org/svn/trunk@666 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/gantt.rhtml6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/views/projects/gantt.rhtml b/app/views/projects/gantt.rhtml
index c46ef9f5f..1de8242ea 100644
--- a/app/views/projects/gantt.rhtml
+++ b/app/views/projects/gantt.rhtml
@@ -22,10 +22,10 @@ g_height = [(20 * @events.length + 6)+150, 206].max
t_height = g_height + headers_height
%>
-<% cache(:year => @year_from, :month => @month_from, :months => @months, :zoom => @zoom, :tracker_ids => @selected_tracker_ids, :subprojects => params[:with_subprojects], :lang => current_language) do %>
<div class="contextual">
<%= l(:label_export_to) %>
-<%= link_to 'PDF', {:zoom => @zoom, :year => @year_from, :month => @month_from, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects], :output => 'pdf'}, :class => 'icon icon-pdf' %>
+<%= link_to 'PDF', {:zoom => @zoom, :year => @year_from, :month => @month_from, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects], :format => 'pdf'}, :class => 'icon icon-pdf' %>
+<%= link_to 'PNG', {:zoom => @zoom, :year => @year_from, :month => @month_from, :months => @months, :tracker_ids => @selected_tracker_ids, :with_subprojects => params[:with_subprojects], :format => 'png'}, :class => 'icon icon-image' if respond_to?('gantt_image') %>
</div>
<h2><%= l(:label_gantt) %></h2>
@@ -72,6 +72,8 @@ t_height = g_height + headers_height
</table>
<% end %>
+<% cache(:year => @year_from, :month => @month_from, :months => @months, :zoom => @zoom, :tracker_ids => @selected_tracker_ids, :subprojects => params[:with_subprojects], :lang => current_language) do %>
+
<table width="100%" style="border:0; border-collapse: collapse;">
<tr>
<td style="width:<%= subject_width %>px;">