@@ -51,6 +51,15 module ProjectsHelper | |||
|
51 | 51 | content_tag('select', options.html_safe, :name => 'project[parent_id]', :id => 'project_parent_id') |
|
52 | 52 | end |
|
53 | 53 | |
|
54 | def render_project_action_links | |
|
55 | links = [] | |
|
56 | 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) | |
|
57 | links << link_to(l(:label_issue_view_all), issues_path) if User.current.allowed_to?(:view_issues, nil, :global => true) | |
|
58 | links << link_to(l(:label_overall_spent_time), time_entries_path) if User.current.allowed_to?(:view_time_entries, nil, :global => true) | |
|
59 | links << link_to(l(:label_overall_activity), { :controller => 'activities', :action => 'index', :id => nil }) | |
|
60 | links.join(" | ").html_safe | |
|
61 | end | |
|
62 | ||
|
54 | 63 | # Renders the projects index |
|
55 | 64 | def render_project_hierarchy(projects) |
|
56 | 65 | render_project_nested_lists(projects) do |project| |
@@ -3,12 +3,7 | |||
|
3 | 3 | <% end %> |
|
4 | 4 | |
|
5 | 5 | <div class="contextual"> |
|
6 | <%= link_to(l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add') + ' |' if User.current.allowed_to?(:add_project, nil, :global => true) %> | |
|
7 | <%= link_to(l(:label_issue_view_all), issues_path) + ' |' if User.current.allowed_to?(:view_issues, nil, :global => true) %> | |
|
8 | <%= link_to(l(:label_overall_spent_time), time_entries_path) + ' |' if User.current.allowed_to?(:view_time_entries, nil, :global => true) %> | |
|
9 | <%= link_to l(:label_overall_activity), | |
|
10 | { :controller => 'activities', :action => 'index', | |
|
11 | :id => nil } %> | |
|
6 | <%= render_project_action_links %> | |
|
12 | 7 | </div> |
|
13 | 8 | |
|
14 | 9 | <h2><%= l(:label_project_plural) %></h2> |
General Comments 0
You need to be logged in to leave comments.
Login now