Feature #32116
closedAdd configured theme to Redmine::Info
0%
Description
Administration | Information
Displays various info about system, but doesn't display which theme is currently being used.
Environment: Redmine version 3.4.10.stable Ruby version 2.3.3-p222 (2016-11-21) [x86_64-linux] Rails version 4.2.11.1 Environment production Database adapter Mysql2 SCM: Subversion 1.9.3 Git 2.7.4 Filesystem Redmine plugins:
It is important to know which theme is used, because there is many themes available on internet,
and some themes don't show everything, or have bugs.
Files
Related issues
Updated by Go MAEDA about 5 years ago
- File 32116-20191006@2x.png 32116-20191006@2x.png added
- File 32116.patch 32116.patch added
+1
The theme is important information to investigate UI issues. Here is a patch to add Setting.ui_theme to admin/info page.
Updated by Aleksandar Pavic about 5 years ago
Thanks @Go MAEDA, I've followed your code, and delivered patch for 3.3.1 I guess it will work on other 3.x versions as well...
Updated by Marius BĂLTEANU about 5 years ago
I'm not sure if it's a good idea to show the configured "Theme" in the information page because the setting is already available in "settings?tab=display". For me, Information page is more about the system, environment, framework and tools which are not configurable in the admin. Also, why display only "Theme" and no other settings as well?
Updated by Aleksandar Pavic about 5 years ago
Theme is important to investigate UI issues, there are also some commercially available themes, which use white text on white background for example, and people are posting "info" data on sites like stackoverflow, or forums, IRC chats, asking for help, and we can't reproduce their issues, since issues are theme related.
Updated by Go MAEDA over 3 years ago
- Related to Feature #35686: Add configured theme and whether it includes JavaScript to Redmine::Info. added
Updated by Marius BĂLTEANU over 3 years ago
Indeed, there were a lot of cases when this information would help us investigate more quickly the issues reported by the users. I think we should add this info.
Updated by Marius BĂLTEANU over 3 years ago
- Target version set to Candidate for next major release
Updated by Mischa The Evil over 3 years ago
- File 2021-08-05_01-36-12.png 2021-08-05_01-36-12.png added
- File 0001-Add-current-theme-and-whether-it-includes-JavaScript.patch 0001-Add-current-theme-and-whether-it-includes-JavaScript.patch added
- Subject changed from Display used theme on information page to Add configured theme to Redmine::Info
A slightly alternative, more extensive, approach was posted by me as an up-to-date patch in another, duplicating issue:
Mischa The Evil wrote in #35686:
Given that a fair amount of (UI) issues are caused by a third-party theme (see e.g. recently closed #35258 and #35534), it would be really helpful if information about the configured theme and whether it includes JavaScript is added to
Redmine::Info
.Example:
I'll leave a patch against current trunk.
I'll modify the subject of this issue because Redmine::Info.enviroment
is also (supposed to be?) displayed as the output of the 'rake/rails about' command (see source:/trunk/bin/about@21131#L6).
Updated by Mischa The Evil over 3 years ago
- Related to deleted (Feature #35686: Add configured theme and whether it includes JavaScript to Redmine::Info.)
Updated by Mischa The Evil over 3 years ago
- Has duplicate Feature #35686: Add configured theme and whether it includes JavaScript to Redmine::Info. added
Updated by Go MAEDA over 3 years ago
- Target version changed from Candidate for next major release to 5.0.0
Setting the target version to 5.0.0.
Updated by Go MAEDA about 3 years ago
- Status changed from New to Closed
- Assignee set to Go MAEDA
- Resolution set to Fixed
Committed the patch after fixing RuboCop offenses by running "rubocop -a". Thank you.
$ bundle exec rubocop -a lib/redmine/info.rb Inspecting 1 file W Offenses: lib/redmine/info.rb:24:9: C: [Corrected] Style/MultilineIfModifier: Favor a normal unless-statement over a modifier clause in a multiline statement. theme_js = (Redmine::Themes.theme(Setting.ui_theme).javascripts.include?('theme') ? ... ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lib/redmine/info.rb:24:22: C: [Corrected] Style/MultilineTernaryOperator: Avoid multi-line ternary operators, use if or unless instead. theme_js = (Redmine::Themes.theme(Setting.ui_theme).javascripts.include?('theme') ? ... ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lib/redmine/info.rb:25:24: C: [Corrected] Style/MultilineTernaryOperator: Avoid multi-line ternary operators, use if or unless instead. theme_js = (Redmine::Themes.theme(Setting.ui_theme).javascripts.include?('theme') ? ... ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lib/redmine/info.rb:26:3: C: [Corrected] Layout/IndentationWidth: Use 2 (not -21) spaces for indentation. ' (includes JavaScript)' ^^^^^^^^^^^^^^^^^^^^^ lib/redmine/info.rb:27:1: C: [Corrected] Layout/ElseAlignment: Align else with if. else ^^^^ lib/redmine/info.rb:28:3: C: [Corrected] Layout/IndentationWidth: Use 2 (not -21) spaces for indentation. '' ... ^^ lib/redmine/info.rb:28:24: C: [Corrected] Style/RedundantInterpolation: Prefer to_s over string interpolation. theme_string = "#{theme + theme_js.to_s}" ^^^^^^^^^^^^^^^^^^^^^^^^^^ lib/redmine/info.rb:29:1: W: [Corrected] Layout/EndAlignment: end at 29, 0 is not aligned with if at 25, 23. end ^^^ 1 file inspected, 8 offenses detected, 8 offenses corrected
Updated by Mischa The Evil over 2 years ago
- Related to Defect #36932: Handle nil return of Redmine::Themes.theme(Setting.ui_theme) in Redmine::Info.environment added