From c142af56ab3c40b7677f161984a71a1a2031548c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Tue, 14 Mar 2023 09:59:27 +0100 Subject: [PATCH] HTML self-closing tags --- README.md | 2 +- app/helpers/dmsf_files_helper.rb | 4 +-- app/views/dmsf/edit.html.erb | 8 ++--- app/views/dmsf_files/_links.html.erb | 2 +- app/views/dmsf_files/show.html.erb | 2 +- app/views/dmsf_links/_form.html.erb | 2 +- app/views/dmsf_mailer/files_updated.html.erb | 2 +- app/views/dmsf_mailer/send_documents.html.erb | 10 +++--- app/views/dmsf_workflows/_action.html.erb | 4 +-- app/views/dmsf_workflows/_steps.html.erb | 4 +-- app/views/settings/_dmsf_columns.html.erb | 4 +-- app/views/settings/_dmsf_settings.html.erb | 32 +++++++++---------- lib/dav4rack/resource.rb | 6 ++-- lib/redmine_dmsf/macros.rb | 2 +- lib/redmine_dmsf/webdav/base_resource.rb | 6 ++-- 15 files changed, 45 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index aa1c9146..9a9ef0f0 100644 --- a/README.md +++ b/README.md @@ -329,4 +329,4 @@ Additional Documentation --- -Special thanks to JetBrains logo for providing an excelent IDE. +Special thanks to JetBrains logo for providing an excellent IDE. diff --git a/app/helpers/dmsf_files_helper.rb b/app/helpers/dmsf_files_helper.rb index 6b908061..10612017 100644 --- a/app/helpers/dmsf_files_helper.rb +++ b/app/helpers/dmsf_files_helper.rb @@ -25,8 +25,8 @@ module DmsfFilesHelper # If there is

tag, the text is moved one column to the right by Redmin's CSS. A new line causes double new line. text.gsub! '

', '' text.gsub! '

', '' - text.gsub! "\n\n", '
' - text.gsub "\n\t", '
' + text.gsub! "\n\n", '
' + text.gsub "\n\t", '
' end end diff --git a/app/views/dmsf/edit.html.erb b/app/views/dmsf/edit.html.erb index 8bdbe74e..4f93581c 100644 --- a/app/views/dmsf/edit.html.erb +++ b/app/views/dmsf/edit.html.erb @@ -99,13 +99,13 @@ <% end %> <% end %> -
+
<% users = dir.permissions_users %> <% checkboxes = users_checkboxes(users, true) %> <%= checkboxes %>
<% if checkboxes.present? %> -
+
<% end %> <% end %> <%= label_tag '', l(:label_dmsf_permissions) %> @@ -117,13 +117,13 @@ <% end %> -
+
<% users = @folder.permissions_users %> <% checkboxes = users_checkboxes(users) %> <%= checkboxes %>
<% if checkboxes.present? %> -
+
<% end %> <%= link_to l(:label_user_search_add), diff --git a/app/views/dmsf_files/_links.html.erb b/app/views/dmsf_files/_links.html.erb index e2d199c1..fcc3aa52 100644 --- a/app/views/dmsf_files/_links.html.erb +++ b/app/views/dmsf_files/_links.html.erb @@ -21,7 +21,7 @@ %> <% if links.present? %> -
+

<%= l(:menu_dmsf) %>

diff --git a/app/views/dmsf_files/show.html.erb b/app/views/dmsf_files/show.html.erb index da066ca2..b2175dea 100644 --- a/app/views/dmsf_files/show.html.erb +++ b/app/views/dmsf_files/show.html.erb @@ -167,7 +167,7 @@ -
+
<% end %> <%= pagination_links_full @revision_pages, @revision_count %> diff --git a/app/views/dmsf_links/_form.html.erb b/app/views/dmsf_links/_form.html.erb index 418ea82d..1529e958 100644 --- a/app/views/dmsf_links/_form.html.erb +++ b/app/views/dmsf_links/_form.html.erb @@ -33,7 +33,7 @@
<% if (@type == 'link_from') && !@container %>

- <%= radio_button_tag :external_link, 'false', true %> <%= l(:label_internal) %>
+ <%= radio_button_tag :external_link, 'false', true %> <%= l(:label_internal) %>
<%= radio_button_tag :external_link, 'true', false %> <%= l(:label_external) %>

<% end %> diff --git a/app/views/dmsf_mailer/files_updated.html.erb b/app/views/dmsf_mailer/files_updated.html.erb index f82ac1ec..4c82db36 100644 --- a/app/views/dmsf_mailer/files_updated.html.erb +++ b/app/views/dmsf_mailer/files_updated.html.erb @@ -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? %> -
    <%= h(file.last_revision.comment) %> +
    <%= h(file.last_revision.comment) %> <% end %>

<% end %> \ No newline at end of file diff --git a/app/views/dmsf_mailer/send_documents.html.erb b/app/views/dmsf_mailer/send_documents.html.erb index de050e19..5f8a4e84 100644 --- a/app/views/dmsf_mailer/send_documents.html.erb +++ b/app/views/dmsf_mailer/send_documents.html.erb @@ -33,9 +33,9 @@ <% folder.folder_tree.each do |name, i| %> <% dir = DmsfFolder.find_by(id: i) %> <% if dir && !folders.include?(dir) %> -
+
<%= link_to h(dir.dmsf_path_str), dmsf_folder_url(id: dir.project_id, folder_id: dir.id, only_path: false) %> -

+

<% 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)) %>  (<%= link_to(h(file.name), dmsf_file_url(file)) %>) <% end %> -
+
<% files << file %> <% end %> <% end %> @@ -61,7 +61,7 @@ <% end %> <% end %> <% if @files.present? %> -
+
<% 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) %>  (<%= link_to h(file.name), dmsf_file_url(file) %>) <% end %> -
+
<% files << file %> <% end %> <% end %> diff --git a/app/views/dmsf_workflows/_action.html.erb b/app/views/dmsf_workflows/_action.html.erb index a0d54032..d94ecb63 100644 --- a/app/views/dmsf_workflows/_action.html.erb +++ b/app/views/dmsf_workflows/_action.html.erb @@ -37,12 +37,12 @@ <%= radio_button_tag 'step_action', DmsfWorkflowStepAction::ACTION_REJECT, false, onclick: 'noteMandatory(true);' %> <%= l(:label_dmsf_wokflow_action_reject) %> -
+
<%= text_area_tag :note, '', placeholder: l(:message_dmsf_wokflow_note), style: 'width: 90%' %>

- <%= label_tag 'delegate', l(:label_dmsf_wokflow_action_delegate) %>
+ <%= label_tag 'delegate', l(:label_dmsf_wokflow_action_delegate) %>
<%= 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])}')" %>
diff --git a/app/views/dmsf_workflows/_steps.html.erb b/app/views/dmsf_workflows/_steps.html.erb index c4829ebd..c3599ff9 100644 --- a/app/views/dmsf_workflows/_steps.html.erb +++ b/app/views/dmsf_workflows/_steps.html.erb @@ -94,13 +94,13 @@ step.operator == DmsfWorkflowStep::OPERATOR_AND %> <%= DmsfWorkflowStep.soperator(DmsfWorkflowStep::OPERATOR_AND) %> -
+
-
+
 <%= delete_link delete_step_dmsf_workflow_path(step: step.id) %>
diff --git a/app/views/settings/_dmsf_columns.html.erb b/app/views/settings/_dmsf_columns.html.erb index 1b1d7a1e..f65025b4 100644 --- a/app/views/settings/_dmsf_columns.html.erb +++ b/app/views/settings/_dmsf_columns.html.erb @@ -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 %> -
+
<% 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 %> -
+
<% end %>

diff --git a/app/views/settings/_dmsf_settings.html.erb b/app/views/settings/_dmsf_settings.html.erb index d8b5bedb..0c30e7cf 100644 --- a/app/views/settings/_dmsf_settings.html.erb +++ b/app/views/settings/_dmsf_settings.html.erb @@ -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'] %> - <%= l(:note_dmsf_act_as_attachable) %>
+ <%= l(:note_dmsf_act_as_attachable) %>
<%= l(:label_default) %>: <%= l(:general_text_No) %>

@@ -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'] %> - <%= l(:note_dmsf_projects_as_subfolders) %>
+ <%= l(:note_dmsf_projects_as_subfolders) %>
<%= l(:label_default) %>: <%= l(:general_text_No) %>

@@ -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'] %> - <%= l(:note_dmsf_global_menu_disabled) %>
+ <%= l(:note_dmsf_global_menu_disabled) %>
<%= l(:label_default) %>: <%= l(:general_text_No) %>

@@ -168,7 +168,7 @@

-
+
<%= l(:label_dmsf_columns) %> @@ -183,7 +183,7 @@ options_for_select(options, selected: @settings['dmsf_default_query']) %>

-
+
<%= l(:heading_send_documents_by_email) %> @@ -212,7 +212,7 @@

-
+
<%= l(:field_label_dmsf_workflow) %> @@ -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'] %> - <%= l(:note_dmsf_keep_documents_locked) %>
+ <%= l(:note_dmsf_keep_documents_locked) %>
<%= l(:label_default)%>: <%= l(:general_text_No)%>

@@ -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 %> - <%= l(:only_approval_zero_minor_version) %>
<%= l(:label_default) %>: <%= l(:general_text_No)%> + <%= l(:only_approval_zero_minor_version) %>
<%= l(:label_default) %>: <%= l(:general_text_No)%>

-
+
<%= l(:label_webdav) %> @@ -271,7 +271,7 @@ [l(:select_option_webdav_readwrite), 'WEBDAV_READ_WRITE']], selected: @settings['dmsf_webdav_strategy']), onchange: "$('#dmsf_webdav_ro_block').toggle()" %> -
+
<%= l(:note_webdav_strategy).html_safe %> <%= l(:label_default) %>: <%= l(:select_option_webdav_readonly) %> @@ -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 %> - <%= l(:note_webdav_disable_versioning) %>
+ <%= l(:note_webdav_disable_versioning) %>
<%= l(:label_default) %>: ^\~\$|\.tmp$

@@ -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'] %> - <%= l(:note_webdav_use_project_names) %>
+ <%= l(:note_webdav_use_project_names) %>
<%= l(:label_default)%>: <%= l(:general_text_No)%>

-
+
<% begin %> <% require 'xapian' %> @@ -354,11 +354,11 @@

<%= 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) %>
+ disabled: xapian_disabled, checked: true %> <%= l(:option_stem_none) %>
<%= radio_button_tag 'settings[dmsf_stemming_strategy]', 'STEM_SOME', @settings['dmsf_stemming_strategy'] == 'STEM_SOME', - disabled: xapian_disabled %> <%= l(:option_stem_some) %>
+ disabled: xapian_disabled %> <%= l(:option_stem_some) %>
<%= radio_button_tag 'settings[dmsf_stemming_strategy]', 'STEM_ALL', @settings['dmsf_stemming_strategy'] == 'STEM_ALL', - disabled: xapian_disabled %> <%= l(:option_stem_all) %>
+ disabled: xapian_disabled %> <%= l(:option_stem_all) %>
<%= l(:text_stemming_info) %> diff --git a/lib/dav4rack/resource.rb b/lib/dav4rack/resource.rb index ce7810f6..707f50f3 100644 --- a/lib/dav4rack/resource.rb +++ b/lib/dav4rack/resource.rb @@ -466,10 +466,10 @@ module Dav4rack # Index page template for GETs on collection def index_page ' %s - -

%s


+ +

%s


Name
- %s
Name Size TypeLast Modified

' + Last Modified %s
' end def properties_xml_with_depth(process_properties, depth = request.depth) diff --git a/lib/redmine_dmsf/macros.rb b/lib/redmine_dmsf/macros.rb index ee934a23..70a4cd09 100644 --- a/lib/redmine_dmsf/macros.rb +++ b/lib/redmine_dmsf/macros.rb @@ -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", '
').html_safe + file.text_preview(args[1]).gsub("\n", '
').html_safe else raise l(:notice_not_authorized) end diff --git a/lib/redmine_dmsf/webdav/base_resource.rb b/lib/redmine_dmsf/webdav/base_resource.rb index ced710d5..228f09aa 100644 --- a/lib/redmine_dmsf/webdav/base_resource.rb +++ b/lib/redmine_dmsf/webdav/base_resource.rb @@ -69,11 +69,11 @@ module RedmineDmsf %s - +

%s

-
+
@@ -83,7 +83,7 @@ module RedmineDmsf %s
#{l(:field_name)}
-
+
}