]> source.dussan.org Git - redmine.git/commitdiff
Make project settings more accessible (#22090).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 20 Jun 2019 07:56:54 +0000 (07:56 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 20 Jun 2019 07:56:54 +0000 (07:56 +0000)
Patch by Jan Schulz-Hofen and Go MAEDA.

git-svn-id: http://svn.redmine.org/redmine/trunk@18283 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/boards/index.html.erb
app/views/boards/show.html.erb
app/views/issues/index.html.erb
app/views/projects/show.html.erb
app/views/repositories/_navigation.html.erb
app/views/timelog/index.html.erb
app/views/timelog/report.html.erb
app/views/versions/index.html.erb

index 21280e1afd3749ad4c75108b9a86efcd6dd6bc56..89df7aae5fa094c2828b7b040ea01e09524b2842 100644 (file)
@@ -1,3 +1,9 @@
+<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">
index 02dffa278e135f0d110c29fd18405bee99b4fa27..b80ff0383ee19771a0ec20d377a3a5e6deb05e6f 100644 (file)
@@ -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;">
index d5a77ca5107e1aed692bd719cc2d7fa09e1e0263..5efc222056c60b981700d2d028c3d210b54af5d4 100644 (file)
@@ -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>
index c46ec9cab0e56fe6ac0e5ed5ae958c679b81cad1..a3ac9b14f78ed441c7939456cc48e8f396ca3b84 100644 (file)
       <%= 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>
index 0bd6e33cf5c5c3546ad7a9739dd71b0bd753a8f0..37a2f177c9aeab0db1c43e6eb8d10b88a63a7101 100644 (file)
             {: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,
index 3c904f3eccefc9925fc6e6c3a56a4715af264c3e..0ce69caddfc4da11b411aed05e71c70d983877d0 100644 (file)
@@ -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>
index 24425a55d099faa35d3877e80015bb08775a9dc3..ee6f0f83b1c8415598ad8308b1e73292c836fb85 100644 (file)
@@ -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>
index 44e2559299cac334197cb44115ce50ddfcbad41a..02952b209e3fe83b4af734db4987afa8ae545ff6 100644 (file)
@@ -1,6 +1,9 @@
 <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>