1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-31 11:37:14 +00:00

Add data-text-formatting attribute for selected markup language to body tag (#20620).

Patch by Go MAEDA.


git-svn-id: https://svn.redmine.org/redmine/trunk@22472 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2023-11-21 01:03:43 +00:00
parent 9e07e16bf1
commit f5d68651a0
2 changed files with 11 additions and 1 deletions

View File

@ -17,7 +17,7 @@
<!-- page specific tags -->
<%= yield :header_tags -%>
</head>
<body class="<%= body_css_classes %>">
<body class="<%= body_css_classes %>" data-text-formatting="<%= Setting.text_formatting %>">
<%= call_hook :view_layouts_base_body_top %>
<div id="wrapper">

View File

@ -117,6 +117,16 @@ class WelcomeControllerTest < Redmine::ControllerTest
assert_select 'body.textarea-proportional'
end
def test_data_text_setting_attribute
formats = %w(textile common_mark)
formats.each do |format|
with_settings text_formatting: format do
get :index
assert_select 'body[data-text-formatting=?]', format
end
end
end
def test_logout_link_should_post
@request.session[:user_id] = 2