Commit 56a10dd0 authored by jplang's avatar jplang

Make project settings more accessible (#22090).

Patch by Jan Schulz-Hofen and Go MAEDA.

git-svn-id: https://svn.redmine.org/redmine/trunk@18283 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 1c79a2ea
<div class="contextual">
<%= link_to_if_authorized l(:label_settings),
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'boards'},
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_boards, @project) %>
</div>
<h2><%= l(:label_board_plural) %></h2>
<table class="list boards">
......
......@@ -6,6 +6,10 @@
:class => 'icon icon-add',
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.allowed_to?(:add_messages, @board.project) %>
<%= watcher_link(@board, User.current) %>
<%= link_to_if_authorized l(:label_settings),
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'boards'},
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_boards, @project) %>
</div>
<div id="add-message" style="display:none;">
......
......@@ -2,6 +2,9 @@
<% if User.current.allowed_to?(:add_issues, @project, :global => true) && (@project.nil? || Issue.allowed_target_trackers(@project).any?) %>
<%= link_to l(:label_issue_new), _new_project_issue_path(@project), :class => 'icon icon-add new-issue' %>
<% end %>
<%= link_to_if_authorized l(:label_settings),
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'issues'},
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_categories, @project) %>
</div>
<h2><%= @query.new_record? ? l(:label_issue_plural) : @query.name %></h2>
......
......@@ -10,6 +10,10 @@
<%= link_to l(:button_reopen), reopen_project_path(@project), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-unlock' %>
<% end %>
<% end %>
<%= link_to_if_authorized l(:label_settings),
{:controller => 'projects', :action => 'settings', :id => @project},
:class => 'icon icon-settings' if User.current.allowed_to?(:edit_project, @project) %>
</div>
<h2><%=l(:label_overview)%></h2>
......
......@@ -15,6 +15,10 @@
{:action => 'stats', :id => @project, :repository_id => @repository.identifier_param},
:class => 'icon icon-stats' if @repository.supports_all_revisions? %>
<%= link_to_if_authorized l(:label_settings),
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'repositories'},
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_repository, @project) %>
<%= form_tag({:action => controller.action_name,
:id => @project,
:repository_id => @repository.identifier_param,
......
......@@ -2,6 +2,9 @@
<%= link_to l(:button_log_time),
_new_time_entry_path(@project, @query.filtered_issue_id),
:class => 'icon icon-time-add' if User.current.allowed_to?(:log_time, @project, :global => true) %>
<%= link_to_if_authorized l(:label_settings),
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'activities'},
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_project_activities, @project) %>
</div>
<h2><%= @query.new_record? ? l(:label_spent_time) : @query.name %></h2>
......
......@@ -2,6 +2,9 @@
<%= link_to l(:button_log_time),
_new_time_entry_path(@project, @issue),
:class => 'icon icon-time-add' if User.current.allowed_to?(:log_time, @project, :global => true) %>
<%= link_to_if_authorized l(:label_settings),
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'activities'},
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_project_activities, @project) %>
</div>
<h2><%= @query.new_record? ? l(:label_spent_time) : @query.name %></h2>
......
<div class="contextual">
<%= link_to(l(:label_version_new), new_project_version_path(@project),
:class => 'icon icon-add') if User.current.allowed_to?(:manage_versions, @project) %>
<%= link_to_if_authorized l(:label_settings),
{:controller => 'projects', :action => 'settings', :id => @project, :tab => 'versions'},
:class => 'icon icon-settings' if User.current.allowed_to?(:manage_versions, @project) %>
</div>
<h2><%=l(:label_roadmap)%></h2>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment