]> source.dussan.org Git - redmine.git/commitdiff
Add plugin CSS classes to plugin settings views (#33453).
authorGo MAEDA <maeda@farend.jp>
Tue, 9 Jun 2020 05:20:45 +0000 (05:20 +0000)
committerGo MAEDA <maeda@farend.jp>
Tue, 9 Jun 2020 05:20:45 +0000 (05:20 +0000)
Contributed by Alexander Meindl.

git-svn-id: http://svn.redmine.org/redmine/trunk@19813 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/settings/plugin.html.erb
test/functional/settings_controller_test.rb

index 0d5b837d35b40fa9fb4442a5f76c9e047a8998b8..d8712a042474abcc050b00ec366e00b315df2e68 100644 (file)
@@ -1,6 +1,6 @@
 <%= title [l(:label_plugins), {:controller => 'admin', :action => 'plugins'}], @plugin.name %>
 
-<div id="settings">
+<div id="settings" class="plugin plugin-<%= @plugin.id %>">
 <%= form_tag({:action => 'plugin'}) do %>
 <div class="box tabular settings">
 <%= render :partial => @partial, :locals => {:settings => @settings}%>
index 12a6cef38dcf18a3c4b6609dd4d19974d2b7521b..b9b4c971fcb6f7c0af48fe593fb0471e6d947893 100644 (file)
@@ -211,8 +211,10 @@ class SettingsControllerTest < Redmine::ControllerTest
     get :plugin, :params => {:id => 'foo'}
     assert_response :success
 
-    assert_select 'form[action="/settings/plugin/foo"]' do
-      assert_select 'input[name=?][value=?]', 'settings[sample_setting]', 'Plugin setting value'
+    assert_select '#settings.plugin.plugin-foo' do
+      assert_select 'form[action="/settings/plugin/foo"]' do
+        assert_select 'input[name=?][value=?]', 'settings[sample_setting]', 'Plugin setting value'
+      end
     end
   ensure
     Redmine::Plugin.unregister(:foo)