]> source.dussan.org Git - redmine.git/commitdiff
Fixed: Planning title displayed in the project sidebar even if there is no link below.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 23 Sep 2007 22:00:21 +0000 (22:00 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 23 Sep 2007 22:00:21 +0000 (22:00 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@754 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/projects/show.rhtml

index 8d6c0c9a4bd3052e056be7132abc47ceaac03c77..6671af1ca31a57f8ef6c0abbe079359b5756e2fa 100644 (file)
     <%= l(:label_tracker) %>: <%= new_issue_selector %>
     <% end %>
     
+    <% planning_links = []
+      planning_links << link_to_if_authorized(l(:label_calendar), :action => 'calendar', :id => @project)
+      planning_links << link_to_if_authorized(l(:label_gantt), :action => 'gantt', :id => @project)
+      planning_links.compact!
+      unless planning_links.empty? %>
     <h3>Planning</h3>
-    <p><%= link_to_if_authorized l(:label_calendar), :action => 'calendar', :id => @project %> |
-    <%= link_to_if_authorized l(:label_gantt), :action => 'gantt', :id => @project %></p>
+    <p><%= planning_links.join(' | ') %></p>
+    <% end %>
     
     <% if @total_hours && User.current.allowed_to?(:view_time_entries, @project) %>
     <h3><%= l(:label_spent_time) %></h3>