Adding project ID to CSS classes at least in issue screen (but whereever it is possibe)
I would appreciate to have textual project ID (not a database numeric ID but the text typed into project form) in page's CSS classes - at leas for issue related pages, but it would be great to have it in all project - related pages (wiki, noews ... etc).
It would allow to distinct renrering of the same part of screend in different projects using custom CSS files.
Concrete use case is that we have UAT (acceptance testing) subrojects of each project, that are targeted to end users with minimal computer experiences. We allows only single tracker in this project (UAT_bug) and want hide all page elements that are not absolutely neccesdsary to make this page as simple as possible.
Since we use redmine for lots of different project type and project-specific settings are limitted, it is not so easy to configure look of issue page in each project differently. I guess this would be a way how to achieve this.
Another way (maybe better) would be to add additional field to project setting (let say "Project category" that's value (if set) would be passed to the CSS class. But in this case I still would put there the project ID.
#1 Updated by Radek Terber about 4 years ago
Also it would be great to add CSS class about tracker and perhaps about issue status into both "static" abd "dynamic" part of issue screen. "Static" part means that which is shown only (and cannot be changed), "dynamic" part meand the form for issue editing.
#2 Updated by Daniel Felix about 4 years ago
You can achive this by adding just one line here: source:/trunk/app/helpers/application_helper.rb#L491
For example replace:
def body_css_classes css =  if theme = Redmine::Themes.theme(Setting.ui_theme) css << 'theme-' + theme.name end css << 'controller-' + controller_name css << 'action-' + action_name css.join(' ') end
def body_css_classes css =  if theme = Redmine::Themes.theme(Setting.ui_theme) css << 'theme-' + theme.name end css << 'email@example.com if @project css << 'controller-' + controller_name css << 'action-' + action_name css.join(' ') end
css << 'firstname.lastname@example.org if @project
#3 Updated by Mischa The Evil about 4 years ago
- Category set to UI
- Status changed from New to Closed