From ea73cbceeed7ac73f5fb9b3807129fc14e41398f Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 14 Jan 2017 09:58:53 +0000 Subject: [PATCH] Move 'New ...' links to above item tables in project settings (#24720). Patch by Mischa The Evil. git-svn-id: http://svn.redmine.org/redmine/trunk@16183 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/projects/settings/_boards.html.erb | 8 ++++---- app/views/projects/settings/_issue_categories.html.erb | 4 ++-- app/views/projects/settings/_repositories.html.erb | 8 ++++---- app/views/projects/settings/_versions.html.erb | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/views/projects/settings/_boards.html.erb b/app/views/projects/settings/_boards.html.erb index 16506c889..99479e55a 100644 --- a/app/views/projects/settings/_boards.html.erb +++ b/app/views/projects/settings/_boards.html.erb @@ -1,3 +1,7 @@ +<% if User.current.allowed_to?(:manage_boards, @project) %> +

<%= link_to l(:label_board_new), new_project_board_path(@project), :class => 'icon icon-add' %>

+<% end %> + <% if @project.boards.any? %>
@@ -27,7 +31,3 @@ <% else %>

<%= l(:label_no_data) %>

<% end %> - -<% if User.current.allowed_to?(:manage_boards, @project) %> -

<%= link_to l(:label_board_new), new_project_board_path(@project), :class => 'icon icon-add' %>

-<% end %> diff --git a/app/views/projects/settings/_issue_categories.html.erb b/app/views/projects/settings/_issue_categories.html.erb index 8a04f2555..d1e219ee6 100644 --- a/app/views/projects/settings/_issue_categories.html.erb +++ b/app/views/projects/settings/_issue_categories.html.erb @@ -1,3 +1,5 @@ +

<%= link_to l(:label_issue_category_new), new_project_issue_category_path(@project), :class => 'icon icon-add' if User.current.allowed_to?(:manage_categories, @project) %>

+ <% if @project.issue_categories.any? %> @@ -25,5 +27,3 @@ <% else %>

<%= l(:label_no_data) %>

<% end %> - -

<%= link_to l(:label_issue_category_new), new_project_issue_category_path(@project), :class => 'icon icon-add' if User.current.allowed_to?(:manage_categories, @project) %>

diff --git a/app/views/projects/settings/_repositories.html.erb b/app/views/projects/settings/_repositories.html.erb index e60164caa..61a1bb24e 100644 --- a/app/views/projects/settings/_repositories.html.erb +++ b/app/views/projects/settings/_repositories.html.erb @@ -1,3 +1,7 @@ +<% if User.current.allowed_to?(:manage_repository, @project) %> +

<%= link_to l(:label_repository_new), new_project_repository_path(@project), :class => 'icon icon-add' %>

+<% end %> + <% if @project.repositories.any? %>
@@ -35,7 +39,3 @@ <% else %>

<%= l(:label_no_data) %>

<% end %> - -<% if User.current.allowed_to?(:manage_repository, @project) %> -

<%= link_to l(:label_repository_new), new_project_repository_path(@project), :class => 'icon icon-add' %>

-<% end %> diff --git a/app/views/projects/settings/_versions.html.erb b/app/views/projects/settings/_versions.html.erb index 8173433f6..420b64e43 100644 --- a/app/views/projects/settings/_versions.html.erb +++ b/app/views/projects/settings/_versions.html.erb @@ -1,3 +1,5 @@ +

<%= link_to l(:label_version_new), new_project_version_path(@project, :back_url => ''), :class => 'icon icon-add' if User.current.allowed_to?(:manage_versions, @project) %>

+ <%= form_tag(settings_project_path(@project, :tab => 'versions'), :method => :get) do %>
<%= l(:label_filter_plural) %> @@ -48,5 +50,3 @@ <%= link_to l(:label_close_versions), close_completed_project_versions_path(@project), :method => :put %> <% end %> - -

<%= link_to l(:label_version_new), new_project_version_path(@project, :back_url => ''), :class => 'icon icon-add' if User.current.allowed_to?(:manage_versions, @project) %>

-- 2.39.5