Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Move "Users display format" field

Mir Bhatia90485ca5ef98
diff --git a/app/controllers/admin/settings/display_settings_controller.rb b/app/controllers/admin/settings/display_settings_controller.rb
index 4b453a5a99a..d3a70c0b191 100644
--- a/app/controllers/admin/settings/display_settings_controller.rb
+++ b/app/controllers/admin/settings/display_settings_controller.rb
@@ -32,13 +32,6 @@ module Admin::Settings
before_action :validate_start_of_week_year, only: :update
- def show
- @options = {}
- @options[:user_format] = User::USER_FORMATS_STRUCTURE.keys.map { |f| [User.current.name(f), f.to_s] }
-
- respond_to :html
- end
-
def default_breadcrumb
t(:label_display)
end
diff --git a/app/controllers/admin/settings/users_settings_controller.rb b/app/controllers/admin/settings/users_settings_controller.rb
index 2b39bdc95c8..0021e563942 100644
--- a/app/controllers/admin/settings/users_settings_controller.rb
+++ b/app/controllers/admin/settings/users_settings_controller.rb
@@ -30,6 +30,13 @@ module Admin::Settings
class UsersSettingsController < ::Admin::SettingsController
menu_item :user_settings
+ def show
+ @options = {}
+ @options[:user_format] = User::USER_FORMATS_STRUCTURE.keys.map { |f| [User.current.name(f), f.to_s] }
+
+ respond_to :html
+ end
+
def default_breadcrumb
t(:label_user_settings)
end
diff --git a/app/views/admin/settings/display_settings/show.html.erb b/app/views/admin/settings/display_settings/show.html.erb
index 07bf21568fa..17baea2fee2 100644
--- a/app/views/admin/settings/display_settings/show.html.erb
+++ b/app/views/admin/settings/display_settings/show.html.erb
@@ -67,9 +67,6 @@ See COPYRIGHT and LICENSE files for more details.
container_class: '-slim' %>
</div>
- <div class="form--field">
- <%= setting_select :user_format, @options[:user_format], container_class: '-slim' %>
- </div>
</section>
<%= styled_button_tag t(:button_save), class: '-highlight -with-icon icon-checkmark' %>
diff --git a/app/views/admin/settings/users_settings/show.html.erb b/app/views/admin/settings/users_settings/show.html.erb
index ee6604eacf8..15bf3ab50d2 100644
--- a/app/views/admin/settings/users_settings/show.html.erb
+++ b/app/views/admin/settings/users_settings/show.html.erb
@@ -53,6 +53,15 @@ See COPYRIGHT and LICENSE files for more details.
</div>
</fieldset>
+ <fieldset class="form--fieldset">
+ <legend class="form--fieldset-legend"><%= t(:'settings.user.display_format')%></legend>
+
+ <div class="form--field">
+ <%= setting_select :user_format, @options[:user_format], container_class: '-slim' %>
+ </div>
+
+ </fieldset>
+
<fieldset class="form--fieldset">
<legend class="form--fieldset-legend"><%= t(:'settings.user.deletion')%></legend>
<div class="form--field">
diff --git a/config/initializers/menus.rb b/config/initializers/menus.rb
index 00eaf8a66cc..b0adc5ac4aa 100644
--- a/config/initializers/menus.rb
+++ b/config/initializers/menus.rb
@@ -188,7 +188,7 @@ Redmine::MenuManager.map :admin_menu do |menu|
menu.push :user_settings,
{ controller: '/admin/settings/users_settings', action: :show },
if: Proc.new { User.current.admin? },
- caption: :label_setting_plural,
+ caption: :label_users_settings,
parent: :users_and_permissions
menu.push :users,
diff --git a/config/locales/en.yml b/config/locales/en.yml
index f6486ae9d83..f169a19902d 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -2054,6 +2054,7 @@ en:
label_user_plural: "Users"
label_user_search: "Search for user"
label_user_settings: "User settings"
+ label_users_settings: "Users settings"
label_version_new: "New version"
label_version_plural: "Versions"
label_version_sharing_descendants: "With subprojects"
@@ -2717,7 +2718,7 @@ en:
setting_sys_api_description: "The repository management web service provides integration and user authorization for accessing repositories."
setting_time_format: "Time format"
setting_accessibility_mode_for_anonymous: "Enable accessibility mode for anonymous users"
- setting_user_format: "Users display format"
+ setting_user_format: "Users name format"
setting_user_default_timezone: "Users default time zone"
setting_users_deletable_by_admins: "User accounts deletable by admins"
setting_users_deletable_by_self: "Users allowed to delete their accounts"
@@ -2756,6 +2757,7 @@ en:
section_project_overview: "Settings for project overview list"
user:
default_preferences: "Default preferences"
+ display_format: "Display format"
deletion: "Deletion"
highlighting:
mode_long: