Project

General

Profile

Defect #26778 ยป 26778.patch

Go MAEDA, 2024-10-19 02:16

View differences:

app/helpers/application_helper.rb
863 863
  def body_css_classes
864 864
    css = []
865 865
    if theme = Redmine::Themes.theme(Setting.ui_theme)
866
      css << 'theme-' + theme.name
866
      css << 'theme-' + theme.name.tr(' ', '_')
867 867
    end
868 868

  
869 869
    css << 'project-' + @project.identifier if @project && @project.identifier.present?
test/integration/lib/redmine/themes_test.rb
101 101
  ensure
102 102
    Redmine::Utils.relative_url_root = ''
103 103
  end
104

  
105
  def test_body_css_class_with_spaces_in_theme_name
106
    @theme.instance_variable_set(:@name, 'Foo bar baz')
107
    get '/'
108

  
109
    assert_response :success
110
    assert_select 'body[class~="theme-Foo_bar_baz"]'
111
  end
104 112
end
    (1-1/1)