diff app/helpers/projects_helper.rb @ 1517:dffacf8a6908 redmine-2.5

Update to Redmine SVN revision 13367 on 2.5-stable branch
author Chris Cannam
date Tue, 09 Sep 2014 09:29:00 +0100
parents e248c7af89ec
children a1bdbf8a87d5
line wrap: on
line diff
--- a/app/helpers/projects_helper.rb	Tue Sep 09 09:28:31 2014 +0100
+++ b/app/helpers/projects_helper.rb	Tue Sep 09 09:29:00 2014 +0100
@@ -51,6 +51,15 @@
     content_tag('select', options.html_safe, :name => 'project[parent_id]', :id => 'project_parent_id')
   end
 
+  def render_project_action_links
+    links = []
+    links << link_to(l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add') if User.current.allowed_to?(:add_project, nil, :global => true)
+    links << link_to(l(:label_issue_view_all), issues_path) if User.current.allowed_to?(:view_issues, nil, :global => true)
+    links << link_to(l(:label_overall_spent_time), time_entries_path) if User.current.allowed_to?(:view_time_entries, nil, :global => true)
+    links << link_to(l(:label_overall_activity), { :controller => 'activities', :action => 'index', :id => nil })
+    links.join(" | ").html_safe
+  end
+
   # Renders the projects index
   def render_project_hierarchy(projects)
     render_project_nested_lists(projects) do |project|