HTML self-closing tags

This commit is contained in:
Karel Pičman 2023-03-14 09:59:27 +01:00
parent 29ef1318a1
commit c142af56ab
15 changed files with 45 additions and 45 deletions

View File

@ -329,4 +329,4 @@ Additional Documentation
---
Special thanks to <a href="https://jetbrains.com"><img src="jetbrains-variant-3.svg" alt="JetBrains logo" width="59" height="68"/></a> for providing an excelent IDE.
Special thanks to <a href="https://jetbrains.com"><img src="jetbrains-variant-3.svg" alt="JetBrains logo" width="59" height="68"></a> for providing an excellent IDE.

View File

@ -25,8 +25,8 @@ module DmsfFilesHelper
# If there is <p> tag, the text is moved one column to the right by Redmin's CSS. A new line causes double new line.
text.gsub! '<p>', ''
text.gsub! '</p>', ''
text.gsub! "\n\n", '<br/>'
text.gsub "\n\t", '<br/>'
text.gsub! "\n\n", '<br>'
text.gsub "\n\t", '<br>'
end
end

View File

@ -99,13 +99,13 @@
<% end %>
<% end %>
<span id="inherited_user_permissions">
<br/>
<br>
<% users = dir.permissions_users %>
<% checkboxes = users_checkboxes(users, true) %>
<%= checkboxes %>
</span>
<% if checkboxes.present? %>
<br/>
<br>
<% end %>
<% end %>
<%= label_tag '', l(:label_dmsf_permissions) %>
@ -117,13 +117,13 @@
</label>
<% end %>
<span id="user_permissions">
<br/>
<br>
<% users = @folder.permissions_users %>
<% checkboxes = users_checkboxes(users) %>
<%= checkboxes %>
</span>
<% if checkboxes.present? %>
<br/>
<br>
<% end %>
<span class="search_for_watchers">
<%= link_to l(:label_user_search_add),

View File

@ -21,7 +21,7 @@
%>
<% if links.present? %>
<hr/>
<hr>
<p>
<strong><%= l(:menu_dmsf) %></strong>
</p>

View File

@ -167,7 +167,7 @@
</div>
</div>
</div>
<br/>
<br>
<% end %>
<span class="pagination"><%= pagination_links_full @revision_pages, @revision_count %></span>

View File

@ -33,7 +33,7 @@
<div class="box tabular">
<% if (@type == 'link_from') && !@container %>
<p>
<%= radio_button_tag :external_link, 'false', true %> <%= l(:label_internal) %><br/>
<%= radio_button_tag :external_link, 'false', true %> <%= l(:label_internal) %><br>
<%= radio_button_tag :external_link, 'true', false %> <%= l(:label_external) %>
</p>
<% end %>

View File

@ -29,7 +29,7 @@
<%= "#{file.last_revision.workflow_str(true)}," if file.last_revision.workflow_str(true) != l(:title_none) %>
<%= link_to l(:link_details, title: h(file.title)), dmsf_file_url(file) %>
<% if file.last_revision.comment.present? %>
<br/><span style="font-size: 0.9em">&nbsp;&nbsp;&nbsp;&nbsp;<em><%= h(file.last_revision.comment) %></em></span>
<br><span style="font-size: 0.9em">&nbsp;&nbsp;&nbsp;&nbsp;<em><%= h(file.last_revision.comment) %></em></span>
<% end %>
</p>
<% end %>

View File

@ -33,9 +33,9 @@
<% folder.folder_tree.each do |name, i| %>
<% dir = DmsfFolder.find_by(id: i) %>
<% if dir && !folders.include?(dir) %>
<br/>
<br>
<%= link_to h(dir.dmsf_path_str), dmsf_folder_url(id: dir.project_id, folder_id: dir.id, only_path: false) %>
<br/><br/>
<br><br>
<% dir.dmsf_files.each do |file| %>
<% unless files.include?(file) %>
<% if @public_urls %>
@ -50,7 +50,7 @@
<%= link_to(h(file.title), dmsf_file_url(file)) %>
&nbsp;(<%= link_to(h(file.name), dmsf_file_url(file)) %>)
<% end %>
<br/>
<br>
<% files << file %>
<% end %>
<% end %>
@ -61,7 +61,7 @@
<% end %>
<% end %>
<% if @files.present? %>
<br/>
<br>
<% JSON.parse(@files).each do |id| %>
<% file = DmsfFile.find_by_id id %>
<% if file && !files.include?(file) %>
@ -77,7 +77,7 @@
<%= link_to h(file.title), dmsf_file_url(file) %>
&nbsp;(<%= link_to h(file.name), dmsf_file_url(file) %>)
<% end %>
<br/>
<br>
<% files << file %>
<% end %>
<% end %>

View File

@ -37,12 +37,12 @@
<%= radio_button_tag 'step_action', DmsfWorkflowStepAction::ACTION_REJECT, false, onclick: 'noteMandatory(true);' %>
<%= l(:label_dmsf_wokflow_action_reject) %>
</label>
<br/>
<br>
<%= text_area_tag :note, '', placeholder: l(:message_dmsf_wokflow_note), style: 'width: 90%' %>
</p>
<div>
<%= label_tag 'delegate', l(:label_dmsf_wokflow_action_delegate) %><br/>
<%= label_tag 'delegate', l(:label_dmsf_wokflow_action_delegate) %><br>
<%= text_field_tag 'user_search', nil %>
<%= late_javascript_tag "observeSearchfield('user_search', null, '#{escape_javascript autocomplete_for_user_dmsf_workflow_path(@dmsf_workflow, dmsf_workflow_step_assignment_id: params[:dmsf_workflow_step_assignment_id], dmsf_file_revision_id: params[:dmsf_file_revision_id])}')" %>
<div id="dmsf_users_for_delegate">

View File

@ -94,13 +94,13 @@
step.operator == DmsfWorkflowStep::OPERATOR_AND %>
<%= DmsfWorkflowStep.soperator(DmsfWorkflowStep::OPERATOR_AND) %>
</label>
<br/>
<br>
<label>
<%= radio_button_tag "operator_step[#{step.id}]", DmsfWorkflowStep::OPERATOR_OR,
step.operator == DmsfWorkflowStep::OPERATOR_OR %>
<%= DmsfWorkflowStep.soperator(DmsfWorkflowStep::OPERATOR_OR) %>
</label>
<br/>
<br>
&nbsp;<%= delete_link delete_step_dmsf_workflow_path(step: step.id) %>
</div>
<div class="dmsf-child-container">

View File

@ -34,12 +34,12 @@
<% columns.each_with_index do |column, i| %>
<%= check_box_tag 'settings[dmsf_columns][]', column, selected_columns.include?(column), id: "dmsf_column_#{i}" %>
<%= l("label_column_#{column}").capitalize %>
<br/>
<br>
<% end %>
<% columns = cfs.map{ |c| c.name }
columns.each_with_index do |column, i| %>
<%= check_box_tag 'settings[dmsf_columns][]', column, selected_columns.include?(column), id: "dmsf_column_#{i}" %>
<%= h column.capitalize %>
<br/>
<br>
<% end %>
</p>

View File

@ -137,7 +137,7 @@
<%= content_tag :label, l(:label_act_as_attachable) %>
<%= check_box_tag 'settings[dmsf_act_as_attachable]', true, @settings['dmsf_act_as_attachable'] %>
<em class="info">
<%= l(:note_dmsf_act_as_attachable) %><br/>
<%= l(:note_dmsf_act_as_attachable) %><br>
<%= l(:label_default) %>: <%= l(:general_text_No) %>
</em>
</p>
@ -146,7 +146,7 @@
<%= content_tag :label, l(:label_dmsf_projects_as_subfolders) %>
<%= check_box_tag 'settings[dmsf_projects_as_subfolders]', true, @settings['dmsf_projects_as_subfolders'] %>
<em class="info">
<%= l(:note_dmsf_projects_as_subfolders) %><br/>
<%= l(:note_dmsf_projects_as_subfolders) %><br>
<%= l(:label_default) %>: <%= l(:general_text_No) %>
</em>
</p>
@ -155,7 +155,7 @@
<%= content_tag :label, l(:label_dmsf_global_menu_disabled) %>
<%= check_box_tag 'settings[dmsf_global_menu_disabled]', true, @settings['dmsf_global_menu_disabled'] %>
<em class="info">
<%= l(:note_dmsf_global_menu_disabled) %><br/>
<%= l(:note_dmsf_global_menu_disabled) %><br>
<%= l(:label_default) %>: <%= l(:general_text_No) %>
</em>
</p>
@ -168,7 +168,7 @@
</em>
</p>
<hr/>
<hr>
<em class="info">
<%= l(:label_dmsf_columns) %>
</em>
@ -183,7 +183,7 @@
options_for_select(options, selected: @settings['dmsf_default_query']) %>
</p>
<hr/>
<hr>
<em class="info">
<%= l(:heading_send_documents_by_email) %>
</em>
@ -212,7 +212,7 @@
</em>
</p>
<hr/>
<hr>
<em class="info">
<%= l(:field_label_dmsf_workflow) %>
</em>
@ -221,7 +221,7 @@
<%= content_tag :label, l(:label_dmsf_keep_documents_locked) %>
<%= check_box_tag 'settings[dmsf_keep_documents_locked]', false, @settings['dmsf_keep_documents_locked'] %>
<em class="info">
<%= l(:note_dmsf_keep_documents_locked) %><br/>
<%= l(:note_dmsf_keep_documents_locked) %><br>
<%= l(:label_default)%>: <%= l(:general_text_No)%>
</em>
</p>
@ -230,11 +230,11 @@
<%= content_tag(:label, l(:only_approval_zero_minor_version)) %>
<%= check_box_tag 'settings[only_approval_zero_minor_version]', false, @settings['only_approval_zero_minor_version'], size: 50 %>
<em class="info">
<%= l(:only_approval_zero_minor_version) %><br/> <%= l(:label_default) %>: <%= l(:general_text_No)%>
<%= l(:only_approval_zero_minor_version) %><br> <%= l(:label_default) %>: <%= l(:general_text_No)%>
</em>
</p>
<hr/>
<hr>
<em class="info">
<%= l(:label_webdav) %>
</em>
@ -271,7 +271,7 @@
[l(:select_option_webdav_readwrite), 'WEBDAV_READ_WRITE']],
selected: @settings['dmsf_webdav_strategy']),
onchange: "$('#dmsf_webdav_ro_block').toggle()" %>
<br/>
<br>
<em class="info">
<%= l(:note_webdav_strategy).html_safe %> <%= l(:label_default) %>: <%= l(:select_option_webdav_readonly) %>
</em>
@ -298,7 +298,7 @@
<%= content_tag :label, l(:label_webdav_disable_versioning) %>
<%= text_field_tag 'settings[dmsf_webdav_disable_versioning]', @settings['dmsf_webdav_disable_versioning'], size: 50 %>
<em class="info">
<%= l(:note_webdav_disable_versioning) %> <br/>
<%= l(:note_webdav_disable_versioning) %> <br>
<%= l(:label_default) %>: ^\~\$|\.tmp$
</em>
</p>
@ -307,14 +307,14 @@
<%= content_tag :label, l(:label_webdav_use_project_names) %>
<%= check_box_tag 'settings[dmsf_webdav_use_project_names]', true, @settings['dmsf_webdav_use_project_names'] %>
<em class="info">
<%= l(:note_webdav_use_project_names) %> <br/>
<%= l(:note_webdav_use_project_names) %> <br>
<%= l(:label_default)%>: <%= l(:general_text_No)%>
</em>
</p>
</div>
</div>
<hr/>
<hr>
<% begin %>
<% require 'xapian' %>
@ -354,11 +354,11 @@
<p>
<%= content_tag :label, l(:label_stem_strategy) %>
<%= radio_button_tag 'settings[dmsf_stemming_strategy]', 'STEM_NONE', @settings['dmsf_stemming_strategy'] == 'STEM_NONE',
disabled: xapian_disabled, checked: true %> <%= l(:option_stem_none) %><br/>
disabled: xapian_disabled, checked: true %> <%= l(:option_stem_none) %><br>
<%= radio_button_tag 'settings[dmsf_stemming_strategy]', 'STEM_SOME', @settings['dmsf_stemming_strategy'] == 'STEM_SOME',
disabled: xapian_disabled %> <%= l(:option_stem_some) %><br/>
disabled: xapian_disabled %> <%= l(:option_stem_some) %><br>
<%= radio_button_tag 'settings[dmsf_stemming_strategy]', 'STEM_ALL', @settings['dmsf_stemming_strategy'] == 'STEM_ALL',
disabled: xapian_disabled %> <%= l(:option_stem_all) %><br/>
disabled: xapian_disabled %> <%= l(:option_stem_all) %><br>
<em class="info">
<%= l(:text_stemming_info) %>
</em>

View File

@ -466,10 +466,10 @@ module Dav4rack
# Index page template for GETs on collection
def index_page
'<html><head> <title>%s</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /></head>
<body> <h1>%s</h1> <hr /> <table> <tr> <th class="name">Name</th>
<meta http-equiv="content-type" content="text/html; charset=utf-8"></head>
<body> <h1>%s</h1> <hr> <table> <tr> <th class="name">Name</th>
<th class="size">Size</th> <th class="type">Type</th>
<th class="mtime">Last Modified</th> </tr> %s </table> <hr /> </body></html>'
<th class="mtime">Last Modified</th> </tr> %s </table> <hr> </body></html>'
end
def properties_xml_with_depth(process_properties, depth = request.depth)

View File

@ -154,7 +154,7 @@ module RedmineDmsf
raise ArgumentError if args.length < 2 # Requires file id and lines number
file = DmsfFile.visible.find args[0]
if User.current&.allowed_to?(:view_dmsf_files, file.project)
file.text_preview(args[1]).gsub("\n", '<br/>').html_safe
file.text_preview(args[1]).gsub("\n", '<br>').html_safe
else
raise l(:notice_not_authorized)
end

View File

@ -69,11 +69,11 @@ module RedmineDmsf
<html lang="#{current_language}">
<head>
<title>%s</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body>
<h1>%s</h1>
<hr/>
<hr>
<table>
<tr>
<th class="name">#{l(:field_name)}</th>
@ -83,7 +83,7 @@ module RedmineDmsf
</tr>
%s
</table>
<hr/>
<hr>
</body>
</html>
}