Defect #26778 ยป 26778.patch
| app/helpers/application_helper.rb | ||
|---|---|---|
|
def body_css_classes
|
||
|
css = []
|
||
|
if theme = Redmine::Themes.theme(Setting.ui_theme)
|
||
|
css << 'theme-' + theme.name
|
||
|
css << 'theme-' + theme.name.tr(' ', '_')
|
||
|
end
|
||
|
css << 'project-' + @project.identifier if @project && @project.identifier.present?
|
||
| test/integration/lib/redmine/themes_test.rb | ||
|---|---|---|
|
ensure
|
||
|
Redmine::Utils.relative_url_root = ''
|
||
|
end
|
||
|
def test_body_css_class_with_spaces_in_theme_name
|
||
|
@theme.instance_variable_set(:@name, 'Foo bar baz')
|
||
|
get '/'
|
||
|
assert_response :success
|
||
|
assert_select 'body[class~="theme-Foo_bar_baz"]'
|
||
|
end
|
||
|
end
|
||