summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-12-18 20:15:49 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-12-18 20:15:49 +0000
commit111950108aca2f528ecb0ba00042d92d9b6a8c0d (patch)
tree3473c9af703a36374fca65008ebc27808b83cc68 /app
parent6bf0723d0654e58bc6c8fc19759ff8fb6502a18f (diff)
downloadredmine-111950108aca2f528ecb0ba00042d92d9b6a8c0d.tar.gz
redmine-111950108aca2f528ecb0ba00042d92d9b6a8c0d.zip
Issue sidebar cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3189 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/views/issues/_sidebar.rhtml14
-rw-r--r--app/views/projects/show.rhtml19
2 files changed, 15 insertions, 18 deletions
diff --git a/app/views/issues/_sidebar.rhtml b/app/views/issues/_sidebar.rhtml
index 076091fbd..2296cc8e9 100644
--- a/app/views/issues/_sidebar.rhtml
+++ b/app/views/issues/_sidebar.rhtml
@@ -5,15 +5,13 @@
<% end %>
<%= call_hook(:view_issues_sidebar_issues_bottom) %>
-<% planning_links = []
- planning_links << link_to(l(:label_calendar), :controller => 'issues', :action => 'calendar', :project_id => @project) if User.current.allowed_to?(:view_calendar, @project, :global => true)
- planning_links << link_to(l(:label_gantt), :controller => 'issues', :action => 'gantt', :project_id => @project) if User.current.allowed_to?(:view_gantt, @project, :global => true)
-%>
-<% unless planning_links.empty? %>
-<h3><%= l(:label_planning) %></h3>
-<p><%= planning_links.join(' | ') %></p>
-<%= call_hook(:view_issues_sidebar_planning_bottom) %>
+<% if User.current.allowed_to?(:view_calendar, @project, :global => true) %>
+ <%= link_to(l(:label_calendar), :controller => 'issues', :action => 'calendar', :project_id => @project) %><br />
+<% end %>
+<% if User.current.allowed_to?(:view_gantt, @project, :global => true) %>
+ <%= link_to(l(:label_gantt), :controller => 'issues', :action => 'gantt', :project_id => @project) %><br />
<% end %>
+<%= call_hook(:view_issues_sidebar_planning_bottom) %>
<% unless sidebar_queries.empty? -%>
<h3><%= l(:label_query_plural) %></h3>
diff --git a/app/views/projects/show.rhtml b/app/views/projects/show.rhtml
index 1e751e2b0..a59c329c3 100644
--- a/app/views/projects/show.rhtml
+++ b/app/views/projects/show.rhtml
@@ -28,7 +28,15 @@
</li>
<% end %>
</ul>
- <p><%= link_to l(:label_issue_view_all), :controller => 'issues', :action => 'index', :project_id => @project, :set_filter => 1 %></p>
+ <p>
+ <%= link_to l(:label_issue_view_all), :controller => 'issues', :action => 'index', :project_id => @project, :set_filter => 1 %>
+ <% if User.current.allowed_to?(:view_calendar, @project, :global => true) %>
+ | <%= link_to(l(:label_calendar), :controller => 'issues', :action => 'calendar', :project_id => @project) %>
+ <% end %>
+ <% if User.current.allowed_to?(:view_gantt, @project, :global => true) %>
+ | <%= link_to(l(:label_gantt), :controller => 'issues', :action => 'gantt', :project_id => @project) %>
+ <% end %>
+ </p>
</div>
<% end %>
<%= call_hook(:view_projects_show_left, :project => @project) %>
@@ -55,15 +63,6 @@
</div>
<% content_for :sidebar do %>
- <% planning_links = []
- planning_links << link_to_if_authorized(l(:label_calendar), :controller => 'issues', :action => 'calendar', :project_id => @project)
- planning_links << link_to_if_authorized(l(:label_gantt), :controller => 'issues', :action => 'gantt', :project_id => @project)
- planning_links.compact!
- unless planning_links.empty? %>
- <h3><%= l(:label_planning) %></h3>
- <p><%= planning_links.join(' | ') %></p>
- <% end %>
-
<% if @total_hours && User.current.allowed_to?(:view_time_entries, @project) %>
<h3><%= l(:label_spent_time) %></h3>
<p><span class="icon icon-time"><%= l_hours(@total_hours) %></span></p>