From 72c93d74e2356ebbcecb524d53e4f803ed1c65a7 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Tue, 10 Nov 2020 14:36:24 +0100 Subject: [PATCH 01/67] Missing icons #1186 --- lib/redmine_dmsf/hooks/views/base_view_hooks.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine_dmsf/hooks/views/base_view_hooks.rb b/lib/redmine_dmsf/hooks/views/base_view_hooks.rb index ef95c871..dd6e3574 100644 --- a/lib/redmine_dmsf/hooks/views/base_view_hooks.rb +++ b/lib/redmine_dmsf/hooks/views/base_view_hooks.rb @@ -25,7 +25,7 @@ module RedmineDmsf class DmsfViewListener < Redmine::Hook::ViewListener def view_layouts_base_html_head(context={}) - return unless /^(Dmsf|Projects|Issues|Queries|EasyCrmCases)/.match?(context[:controller].class.name) + return unless /^(Dmsf|Projects|Issues|Queries|EasyCrmCases|MyController)/.match?(context[:controller].class.name) meta = "\n".html_safe + stylesheet_link_tag('redmine_dmsf.css', plugin: :redmine_dmsf) + "\n".html_safe + stylesheet_link_tag('select2.min.css', plugin: :redmine_dmsf) + "\n".html_safe + javascript_include_tag('select2.min.js', plugin: :redmine_dmsf, defer: true) + From c18c5766ae02a95cb40fe07833e83320883845d6 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Wed, 11 Nov 2020 07:16:51 +0100 Subject: [PATCH 02/67] Typo in config/locales/ru.yml file #1189 --- config/locales/ru.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/ru.yml b/config/locales/ru.yml index a411c32c..1f405c2d 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -145,7 +145,7 @@ ru: label_default_notifications: Значение по умолчанию для уведомлений heading_uploaded_files: Загруженные файлы link_documents: Документы - permission_view_dmsf_file_revision_accesses: Показывать загрзуки файлов в ленте активности + permission_view_dmsf_file_revision_accesses: Показывать загрузки файлов в ленте активности permission_view_dmsf_file_revisions: Показывать изменение файлов в ленте активности permission_view_dmsf_folders: Просматривать папки permission_user_preferences: Собственные настройки для проекта From d8c59c9b4d3416921a5759ddb1b326ff4b69028b Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Thu, 12 Nov 2020 11:31:17 +0100 Subject: [PATCH 03/67] Easy tuning --- app/views/dmsf/_query_rows.erb | 2 +- app/views/dmsf_files/show.html.erb | 2 +- assets/stylesheets/easy_extensions.css | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/views/dmsf/_query_rows.erb b/app/views/dmsf/_query_rows.erb index 8a900dfc..e8ffc2c3 100644 --- a/app/views/dmsf/_query_rows.erb +++ b/app/views/dmsf/_query_rows.erb @@ -39,7 +39,7 @@ <% unless system %> <% if defined?(EasyExtensions) %> - <%= link_to '', '#', title: l(:button_actions), class: 'icon-only icon-actions js-contextmenu' %> + <%= link_to '', '#', title: l(:button_actions), class: 'icon-only icon-actions js-contextmenu icon-more-horiz' %> <% else %> <%= link_to_context_menu %> <% end %> diff --git a/app/views/dmsf_files/show.html.erb b/app/views/dmsf_files/show.html.erb index f6b805b2..1f89dc2a 100644 --- a/app/views/dmsf_files/show.html.erb +++ b/app/views/dmsf_files/show.html.erb @@ -99,7 +99,7 @@ <% if revision.description.present? %>
<%= content_tag :div, l(:label_description), class: 'label' %> - <% text = clean_wiki_text(textilizable(revision.description)) %> + <% text = clean_wiki_text(textilizable(h(revision.description))) %> <%= content_tag :div, text.html_safe, class: 'value wiki' %>
<% end %> diff --git a/assets/stylesheets/easy_extensions.css b/assets/stylesheets/easy_extensions.css index 912543f9..2bf6c13c 100644 --- a/assets/stylesheets/easy_extensions.css +++ b/assets/stylesheets/easy_extensions.css @@ -31,10 +31,6 @@ .dmsf-tree.idnt-9 td.dmsf-title { padding-left: 6.5em; } /* Font icons */ -table.dmsf > tbody > tr > td a.icon-actions::before { - content: "\F01D8"; -} - #sidebar ul > li > a.icon-only.icon-clear-query { background-image: url(../../../images/close_hl.png); background-repeat: no-repeat; From b2b4b6f03f065393686d413aa29bc4cca3b5a6bd Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Fri, 13 Nov 2020 09:09:24 +0100 Subject: [PATCH 04/67] #1189 Russion localisation update by @jip --- config/locales/pt-BR.yml | 2 +- config/locales/ru.yml | 86 ++++++++++++++++++++-------------------- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 8ffd053c..ae82f4a5 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -85,7 +85,7 @@ pt-BR: title_lock_file: Clique aqui para impedir alterações por outro usuário title_download_checked: Download em arquivo compactado title_send_checked_by_email: Enviar por e-mail - link_user_preferences: Suas preferências de projeto DMSF + link_user_preferences: Suas preferências de projeto DMS heading_send_documents_by_email: Enviar documentos por e-mail label_email_from: Remetente label_email_to: Destinatário diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 1f405c2d..5fd815b4 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -21,8 +21,8 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ru: - dmsf: DMSF # Custom fields tab title - label_dmsf_file_plural: Файлы DMSF # Email subject & Search options + dmsf: DMS # Custom fields tab title + label_dmsf_file_plural: Файлы DMS # Email subject & Search options label_dmsf_file_revision_plural: Изменения документов label_dmsf_file_revision_access_plural: Доступы к документам warning_no_entries_selected: Файлы не выбраны @@ -85,7 +85,7 @@ ru: title_lock_file: Заблокируйте файл, чтобы запретить его изменение другими участниками title_download_checked: Скачать выбранные файлы title_send_checked_by_email: Отправить выбранные файлы по электронной почте - link_user_preferences: Ваши настройки DMSF для проекта + link_user_preferences: Ваши настройки DMS для проекта heading_send_documents_by_email: Отправить документы по электронной почте label_email_from: От label_email_to: Кому @@ -137,11 +137,11 @@ ru: option_stem_none: Нет (По умолчанию) option_stem_some: Некоторые option_stem_all: Все - text_stemming_info: "This controls how the query parser will apply the stemming algorithm. The default value is - STEM_NONE. The possible values are: STEM_NONE - Don't perform any stemming, STEM_SOME - Search for stemmed forms - of terms except for those which start with a capital letter, or are followed by certain characters - (currently:'/@<>=*[{\"'), or are used with operators which need positional information. Stemmed terms are prefixed - with 'Z', STEM_ALL - Search for stemmed forms of all words (note: no 'Z' prefix is added)." + text_stemming_info: "Определяет, как анализатор запроса будет применять алгоритм стемминга. Значение по умолчанию: + STEM_NONE. Возможные значения: STEM_NONE - Не выполнять никакого стемминга, STEM_SOME - Искать словоформы за + исключением тех, что начинаются с прописной буквы, или завершаются определенными символами (сейчас + это:'/@<>=*[{\"'), или использованы с операторами, для которых требуется позиционная информация. К словоформам + добавляется приставка 'Z', STEM_ALL - Искать словоформы всех слов (примечание: приставка 'Z' не добавляется)." label_default_notifications: Значение по умолчанию для уведомлений heading_uploaded_files: Загруженные файлы link_documents: Документы @@ -180,7 +180,7 @@ ru: error_file_can_not_be_created: Файл не может быть создан в каталоге хранения файлов error_wrong_zip_encoding: Неверная кодировка zip warning_xapian_not_available: Xapian не доступен - menu_dmsf: DMSF # Project tab title + menu_dmsf: DMS # Project tab title label_physical_file_delete: Физическое удаление файла user_is_not_project_member: Вы не являетесь участником проекта heading_access_downloads_emails: Скачивание / Отправка по почте @@ -189,13 +189,13 @@ ru: label_dmsf_updated: Документ обновлен label_dmsf_downloaded: Документ скачан title_total_size_of_all_files: Общий размер всех файлов в этой папке - project_module_dmsf: DMSF # Project module name + project_module_dmsf: DMS # Project module name warning_no_project_to_copy_file_to: Не выбран проект, в который нужно скопировать файл comment_copied_from: "Скопировано из %{source}" field_target_project: Целевой проект field_target_folder: Целевая папка title_copy_or_move: Копировать/Переместить - label_dmsf_folder_plural: Папки DMSF # Search options + label_dmsf_folder_plural: Папки DMS # Search options comment_moved_from: "Перемещен из %{source}" error_target_folder_same: Целевая папка и проект совпадают с текущими title_copy: Копировать @@ -353,7 +353,7 @@ ru: label_document_url: Url label_last_revision_id: ID редакции - + label_webdav_disable_versioning: Паттерн игнорирования версионности note_webdav_disable_versioning: Файлы попадающие под регулярное выражение не будут иметь редакций. По умолчанию временные файлы MsOffice. @@ -362,59 +362,59 @@ ru: note_dmsf_keep_documents_locked: Документы остануться заблокированными после утверждения note_global: (Глобальный) field_dmsf_not_inheritable: Не наследуемый - + label_webdav_use_project_names: Имя проекта вместо идентификатора note_webdav_use_project_names: Использовать имя проекта вместо идентификатора для папки в WebDAV. label_last_approver: Последним рассматривал label_act_as_attachable: Разрешить вложения - note_dmsf_act_as_attachable: Разрешить прикреплять документы из DMSF к задачам. + note_dmsf_act_as_attachable: Разрешить прикреплять документы из DMS к задачам. label_user_search_add: Найти пользователя - label_dmsf_attachments: DMSF вложения + label_dmsf_attachments: DMS вложения label_basic_attachments: Базовые вложения label_tmpdir: Каталог временных файлов - error_file_tmpdir_does_not_exist: "Temporary file path doesn't exist and can't be created" - error_tmpfile_can_not_be_created: "Files can't be created in temporary file path directory" + error_file_tmpdir_does_not_exist: "Каталог временных файлов не существует и не может быть создан" + error_tmpfile_can_not_be_created: "Невозможно создавать файлы в каталоге временных файлов" - label_email_from_override: From - text_email_from_override: The user currently logged in - label_email_reply_to: Reply-to + label_email_from_override: От кого + text_email_from_override: Пользователь сейчас в системе + label_email_reply_to: Кому - label_enable_cjk_ngrams: Enable generation of n-grams from CJK text - text_enable_cjk_ngrams: "With this enabled, spans of CJK characters are split into unigrams and bigrams, with the - unigrams carrying positional information. Non-CJK characters are split into words as normal. The corresponding - option needs to have been used at index time. - e.g: XAPIAN_CJK_NGRAM=true ruby plugins/redmine_dmsf/extra/xapian_indexer.rb -fv" + label_enable_cjk_ngrams: Включить генерацию n-грамм из CJK текста + text_enable_cjk_ngrams: "Когда включено, последовательность CJK символов разбивается на униграммы и биграммы, при этом + униграммы несут позиционную информацию. Не-CJK символы разбиваются на слова как обычно. Соответствующая + опция должна быть использована при индексации. + Пример: XAPIAN_CJK_NGRAM=true ruby plugins/redmine_dmsf/extra/xapian_indexer.rb -fv" - label_dmsf_fast_links: Fast links - text_dmsf_fast_links_info: You will be able to manually enter a target folder's ID when creating links in order to speed - up the process of creating links. + label_dmsf_fast_links: Быстрые ссылки + text_dmsf_fast_links_info: Вы сможете вручную ввести ID целевого каталога при создании ссылок, чтобы ускорить + процесс создания ссылок. - label_dmsf_permissions: Allow access only to - label_inherited_permissions: Inherited Access for + label_dmsf_permissions: Разрешить доступ только для + label_inherited_permissions: Унаследованный доступ для - button_edit_content: Edit content - field_workflow: Workflow - field_modified: Date - field_updated: Date - field_count: D/L - field_first_at: First - field_last_at: Last - field_size: Size + button_edit_content: Изменить содержимое + field_workflow: Рабочий процесс + field_modified: Дата изменения + field_updated: Дата обновления + field_count: Загрузки + field_first_at: Первый + field_last_at: Последний + field_size: Размер - label_add_width: Add with + label_add_width: Добавить с - dmsf_webdav_ignore_1b_file_for_authentication: Ignore 1b file sent for authentication - dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin + dmsf_webdav_ignore_1b_file_for_authentication: Игнорировать однобайтовый файл, отправляемый для аутентификации + dmsf_webdav_ignore_1b_file_for_authentication_info: Плагин WebDAV программы Total Commander easy_pages: modules: - dmsf_locked_documents: My locked documents - dmsf_open_approvals: My open approvals + dmsf_locked_documents: Мои заблокированные документы + dmsf_open_approvals: Мои открытые согласования module_category: easy_dms: Easy DMS From 1699273ea1f98e63a169dd107e45910f4ce24371 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Fri, 13 Nov 2020 09:20:05 +0100 Subject: [PATCH 05/67] Copy/Move links in context menu #1190 --- app/views/dmsf_context_menus/_file.html.erb | 8 ++++---- app/views/dmsf_context_menus/_folder.html.erb | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/views/dmsf_context_menus/_file.html.erb b/app/views/dmsf_context_menus/_file.html.erb index 02be2c00..794f63b1 100644 --- a/app/views/dmsf_context_menus/_file.html.erb +++ b/app/views/dmsf_context_menus/_file.html.erb @@ -24,11 +24,11 @@ <%= context_menu_link l(:button_edit), dmsf_file_path(id: dmsf_file), class: 'icon icon-edit', disabled: !allowed || (locked && !unlockable) %> -
  • - <%= link_to "#{l(:button_copy)}/#{l(:button_move)}", copy_file_path(id: dmsf_file), - title: l(:title_copy), class: 'icon icon-copy', disabled: !dmsf_link.nil? %> -
  • <% unless dmsf_link %> +
  • + <%= link_to "#{l(:button_copy)}/#{l(:button_move)}", copy_file_path(id: dmsf_file), + title: l(:title_copy), class: 'icon icon-copy' %> +
  • <%= link_to l(:label_link_to), new_dmsf_link_path(project_id: project.id, dmsf_folder_id: dmsf_file.dmsf_folder&.id, diff --git a/app/views/dmsf_context_menus/_folder.html.erb b/app/views/dmsf_context_menus/_folder.html.erb index 263db48c..4ba89c60 100644 --- a/app/views/dmsf_context_menus/_folder.html.erb +++ b/app/views/dmsf_context_menus/_folder.html.erb @@ -24,11 +24,11 @@ <%= context_menu_link l(:button_edit), edit_dmsf_path(id: project, folder_id: dmsf_folder), class: 'icon icon-edit', disabled: !allowed || locked %>
  • -
  • - <%= context_menu_link "#{l(:button_copy)}/#{l(:button_move)}", copy_folder_path(id: dmsf_folder), - class: 'icon icon-copy', disabled: !allowed || locked %> -
  • <% unless dmsf_link %> +
  • + <%= context_menu_link "#{l(:button_copy)}/#{l(:button_move)}", copy_folder_path(id: dmsf_folder), + class: 'icon icon-copy', disabled: !allowed || locked %> +
  • <%= context_menu_link l(:label_link_to), new_dmsf_link_path(project_id: project.id, dmsf_folder_id: dmsf_folder.id, type: 'link_to'), From 6d9a44e2aab28d06b50b49bed238a17bbf621454 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Fri, 13 Nov 2020 13:16:50 +0100 Subject: [PATCH 06/67] Project templates --- lib/redmine_dmsf/webdav/base_resource.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/redmine_dmsf/webdav/base_resource.rb b/lib/redmine_dmsf/webdav/base_resource.rb index 58da4a0c..7bef1ad7 100644 --- a/lib/redmine_dmsf/webdav/base_resource.rb +++ b/lib/redmine_dmsf/webdav/base_resource.rb @@ -178,7 +178,9 @@ module RedmineDmsf end def load_projects(project_scope) - project_scope.visible.find_each do |p| + scope = project_scope.visible + scope = scope.non_templates if scope.respond_to?(:non_templates) + scope.visible.find_each do |p| if dmsf_available?(p) @children << child_project(p) end @@ -220,8 +222,10 @@ module RedmineDmsf return if @project # We have already got it pinfo = @path.split('/').drop(1) i = 1 + project_scope = Project.visible + project_scope = project_scope.non_templates if project_scope.respond_to?(:non_templates) while pinfo.length > 0 - prj = BaseResource::get_project(Project.visible, pinfo.first, @project) + prj = BaseResource::get_project(project_scope, pinfo.first, @project) if prj @project = prj if pinfo.length == 1 From 8513f817bb8007f5543aca441a71bbf9a7a2de62 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Fri, 13 Nov 2020 13:39:18 +0100 Subject: [PATCH 07/67] Project templates --- lib/redmine_dmsf/webdav/base_resource.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine_dmsf/webdav/base_resource.rb b/lib/redmine_dmsf/webdav/base_resource.rb index 7bef1ad7..03c67865 100644 --- a/lib/redmine_dmsf/webdav/base_resource.rb +++ b/lib/redmine_dmsf/webdav/base_resource.rb @@ -180,7 +180,7 @@ module RedmineDmsf def load_projects(project_scope) scope = project_scope.visible scope = scope.non_templates if scope.respond_to?(:non_templates) - scope.visible.find_each do |p| + scope.find_each do |p| if dmsf_available?(p) @children << child_project(p) end From 99bba3710cb6ca861c76d7dfe95a8e6a0d4d8197 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Mon, 16 Nov 2020 14:11:15 +0100 Subject: [PATCH 08/67] Display HTML files inline #1191 --- app/models/dmsf_file.rb | 6 +++++- test/unit/dmsf_file_test.rb | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/models/dmsf_file.rb b/app/models/dmsf_file.rb index a38533f4..2a04cc2d 100644 --- a/app/models/dmsf_file.rb +++ b/app/models/dmsf_file.rb @@ -464,8 +464,12 @@ class DmsfFile < ActiveRecord::Base last_revision && Redmine::MimeType.is_type?('video', last_revision.disk_filename) end + def html? + last_revision && (Redmine::MimeType.of(last_revision.disk_filename) == 'text/html') + end + def disposition - (image? || pdf? || video?) ? 'inline' : 'attachment' + (image? || pdf? || video? || html?) ? 'inline' : 'attachment' end def preview(limit) diff --git a/test/unit/dmsf_file_test.rb b/test/unit/dmsf_file_test.rb index 74ba252b..26daac94 100644 --- a/test/unit/dmsf_file_test.rb +++ b/test/unit/dmsf_file_test.rb @@ -195,6 +195,9 @@ class DmsfFileTest < RedmineDmsf::Test::UnitTest # Video @file1.last_revision.disk_filename = 'test.mp4' assert_equal 'inline', @file1.disposition + # HTML + @file1.last_revision.disk_filename = 'test.html' + assert_equal 'inline', @file1.disposition end def test_image @@ -221,6 +224,12 @@ class DmsfFileTest < RedmineDmsf::Test::UnitTest assert @file1.video? end + def test_html + assert !@file1.html? + @file1.last_revision.disk_filename = 'test.html' + assert @file1.html? + end + def test_findn_file_by_name assert DmsfFile.find_file_by_name(@project1, nil, 'test.txt') assert_nil DmsfFile.find_file_by_name(@project1, nil, 'test.odt') From ce234a09f2ee722dde3a7d2b3f93d9b083d076b6 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Tue, 17 Nov 2020 08:30:24 +0100 Subject: [PATCH 09/67] Use project names as default for Easy --- init.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.rb b/init.rb index 8d283452..aa27f3ae 100644 --- a/init.rb +++ b/init.rb @@ -58,7 +58,7 @@ Redmine::Plugin.register :redmine_dmsf do 'dmsf_documents_email_reply_to' => '', 'dmsf_documents_email_links_only' => nil, 'dmsf_enable_cjk_ngrams' => nil, - 'dmsf_webdav_use_project_names' => nil, + 'dmsf_webdav_use_project_names' => Redmine::Plugin.installed?(:easy_extensions) ? '1' : nil, 'dmsf_webdav_ignore_1b_file_for_authentication' => '1' } end From 134809357512afaee4fd26ed90f0245e73475e2e Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Mon, 30 Nov 2020 10:05:56 +0100 Subject: [PATCH 10/67] Clean up --- README.md | 2 +- assets/images/assigned.png | Bin 459 -> 0 bytes assets/images/none.png | Bin 776 -> 0 bytes assets/images/waiting_for_approval.png | Bin 630 -> 0 bytes 4 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 assets/images/assigned.png delete mode 100644 assets/images/none.png delete mode 100644 assets/images/waiting_for_approval.png diff --git a/README.md b/README.md index 0ff62c38..fbf0cdf7 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ Thumbnail with height of 200px: `{{dmsftn(8)}}` Thumbnail with custom size: `{{dmsftn(8, size=300)}}` -Inline video of the file with id 8; it must be an image file such as MP4: `{{dmsf_video(9)}}` +Inline video of the file with id 8; it must be a video file such as MP4: `{{dmsf_video(9)}}` Inline video with custom size: `{{dmsf_video(9, size=300)}}` diff --git a/assets/images/assigned.png b/assets/images/assigned.png deleted file mode 100644 index 0257b1d8c11a997228863a7ce7430a21365c5b98..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 459 zcmV;+0W|)JP)Px#0%A)?L;(MXkIcUS000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i*l13^pv) zghBNH00B=)L_t(2&u!2>NJ3#0#_|9AUMhr7!-uII7JCU8V+TInW?uWL-L;K!1;0Dc?71jrOAjzvlNwGi|JXF zX^%EajgltKfDF4d7elzQt(trY>w}R6YF*q9l$aMQEhZ?T#QVU0aC~)|4<>o%xhSIo zLb}jJ{wNP{pvtEWRiVu=S-#fxGBOl%=H?Uj+*S-g#&p#|i!mN)#`iKHLdGTo2yQ8# z4xBmCe(H=+`G#+`AT``2rCxk~xOqh7AazPx#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i*l1 z4J-%9*C<&400M|fL_t(I%axKrNK%F&Ur=-Yg z{*FI>-_H-e-!BK3m`EhTBjPNjl&6&L6G9%)ONiZwxbFA+d6&xts;WY-qmaAJ^TV6!G7K_DBP?99Y#dc6&Aw zi73Aqrvw54x6|oN8iw(vwY4?4x3?G8G%Xp6#Wnx{C;-TzP$+J-T3`3|^*zaCGV=8F zwA*U6K65&q;laVdjcT>}p{=crsjB*-P$+yy#Kid%j^lta2Gwfyo2F^^$HvBTq9}$D zaeZWD%$#@M*UVp&P2)80m- zaeZxV?dU=P06;pOUL6`5;!CAcR1gHT*=*Eqw~yxY`SEhOoRB1Gxv9?2&(AL{E-s$! z?(Uv#Z*QM1EG%UIb0z`0 diff --git a/assets/images/waiting_for_approval.png b/assets/images/waiting_for_approval.png deleted file mode 100644 index 97cdace94954b0956029d15bd123998c7f9a160d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 630 zcmV-+0*U>JP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i*l1 z4JtCoK1=)n00H(%L_t(I%axL`OCwPbhrhSab&b&&gcMQG1+ywHlI?Pcg0Z{8;>vWX zqrnZPm;42>u$Sv>1A<(mVi7QnTd1XpSR`nQh@x3d^or#q-YFNSdykple7~6yd?nIp z9U(T5Qb$!QNSW#RLU9lw4w#+Q85)AyTe!T`m97PZurUmsNCbR7Fbwed7P})@TeHx# z4NTMP+!5UoC`z7K3{(}`Z3u_q>I$UX{J+5ZdXjK>k@0c3zlV_#xVwXDwSuDL1OTa& zg%B1(IBab>9mPSUEVH~EL`ryh@%$Hy;JR_L*+Yd?Do-eM!pzJze*X#SbpB01$~@6% zkU#)hEf^k#av7eUHpylW0eTR^W^N98d%-lJRI;({Ae#1*!NDZaC_FwwDD-D_6%-}+ zeu#a2UXts=(h^KfB~g?E=I22O&@_+|90wHT2boOc4U$+a$iu@o48!x-Zo}lH*KuqN zo}VEQfb(;>xyg~q>~zjpQY!sodRnL1v@i^Kef4NYM?K$uKQtQPI1aX*_ Date: Wed, 2 Dec 2020 12:08:13 +0100 Subject: [PATCH 11/67] #1188 Remember the chosen option --- .../hooks/redmine_dmsf/_view_projects_form.html.erb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/views/hooks/redmine_dmsf/_view_projects_form.html.erb b/app/views/hooks/redmine_dmsf/_view_projects_form.html.erb index 1d6b0213..4366dfc6 100644 --- a/app/views/hooks/redmine_dmsf/_view_projects_form.html.erb +++ b/app/views/hooks/redmine_dmsf/_view_projects_form.html.erb @@ -24,7 +24,15 @@ <% if @project.new_record? && @source_project %>

    - - + +

    <% end %> From 6375720bcf286ccbec34544a75627af425a3601d Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Wed, 2 Dec 2020 13:56:03 +0100 Subject: [PATCH 12/67] #1187 Options of project copying --- .../redmine_dmsf/_view_projects_form.html.erb | 12 +++++++-- config/locales/cs.yml | 3 ++- config/locales/de.yml | 3 ++- config/locales/en.yml | 3 ++- config/locales/es.yml | 3 ++- config/locales/fr.yml | 3 ++- config/locales/hu.yml | 3 ++- config/locales/it.yml | 3 ++- config/locales/ja.yml | 3 ++- config/locales/ko.yml | 3 ++- config/locales/nl.yml | 3 ++- config/locales/pl.yml | 3 ++- config/locales/pt-BR.yml | 3 ++- config/locales/ru.yml | 3 ++- config/locales/sl.yml | 3 ++- config/locales/zh-TW.yml | 4 +-- config/locales/zh.yml | 3 ++- lib/redmine_dmsf/patches/project_patch.rb | 25 +++++++++++-------- 18 files changed, 57 insertions(+), 29 deletions(-) diff --git a/app/views/hooks/redmine_dmsf/_view_projects_form.html.erb b/app/views/hooks/redmine_dmsf/_view_projects_form.html.erb index 4366dfc6..6c4d3055 100644 --- a/app/views/hooks/redmine_dmsf/_view_projects_form.html.erb +++ b/app/views/hooks/redmine_dmsf/_view_projects_form.html.erb @@ -24,10 +24,18 @@ <% if @project.new_record? && @source_project %>

    + <% counts = @source_project.dmsf_count %> +

  • diff --git a/app/views/dmsf_context_menus/_folder.html.erb b/app/views/dmsf_context_menus/_folder.html.erb index 4ba89c60..cf6cb2eb 100644 --- a/app/views/dmsf_context_menus/_folder.html.erb +++ b/app/views/dmsf_context_menus/_folder.html.erb @@ -68,5 +68,5 @@ <%= context_menu_link l(:button_delete), dmsf_link ? dmsf_link_path(id: dmsf_link, folder_id: folder) : delete_dmsf_path(id: project, folder_id: dmsf_folder, parent_id: folder), data: { confirm: l(:text_are_you_sure) }, method: :delete, class: 'icon icon-del', id: 'dmsf-cm-delete', - disabled: !allowed || locked %> + disabled: !allowed || (locked && !dmsf_link) %> From b5fc8ece60275dee58f4628f7820f2de6121c802 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Thu, 10 Dec 2020 10:41:40 +0100 Subject: [PATCH 18/67] A warning by deleting non-empty folders --- app/models/dmsf_folder.rb | 4 ++++ app/views/dmsf/edit.html.erb | 2 +- app/views/dmsf_context_menus/_folder.html.erb | 7 ++++--- config/locales/cs.yml | 2 ++ config/locales/de.yml | 2 ++ config/locales/en.yml | 2 ++ config/locales/es.yml | 2 ++ config/locales/fr.yml | 2 ++ config/locales/hu.yml | 2 ++ config/locales/it.yml | 2 ++ config/locales/ja.yml | 2 ++ config/locales/ko.yml | 2 ++ config/locales/nl.yml | 2 ++ config/locales/pl.yml | 2 ++ config/locales/pt-BR.yml | 2 ++ config/locales/ru.yml | 2 ++ config/locales/sl.yml | 2 ++ config/locales/zh-TW.yml | 2 ++ config/locales/zh.yml | 2 ++ test/unit/dmsf_folder_test.rb | 5 +++++ 20 files changed, 46 insertions(+), 4 deletions(-) diff --git a/app/models/dmsf_folder.rb b/app/models/dmsf_folder.rb index e3174bb5..cd4b3b35 100644 --- a/app/models/dmsf_folder.rb +++ b/app/models/dmsf_folder.rb @@ -587,6 +587,10 @@ class DmsfFolder < ActiveRecord::Base classes.join ' ' end + def empty? + !(dmsf_folders.visible.exists? || dmsf_files.visible.exists? || dmsf_links.visible.exists?) + end + private def self.directory_subtree(tree, folder, level, current_folder) diff --git a/app/views/dmsf/edit.html.erb b/app/views/dmsf/edit.html.erb index b31c580a..1bc49ec1 100644 --- a/app/views/dmsf/edit.html.erb +++ b/app/views/dmsf/edit.html.erb @@ -49,7 +49,7 @@ <% end %> <% unless @folder.locked? %> <%= link_to l(:button_delete), delete_dmsf_path(id: @project, folder_id: @folder), - data: { confirm: l(:text_are_you_sure) }, + data: { confirm: "#{l(:text_are_you_sure)}\n#{l(:text_not_empty) unless @folder.empty?}" }, title: l(:button_delete), class: 'icon icon-del', method: :delete %> <% end %> <% end %> diff --git a/app/views/dmsf_context_menus/_folder.html.erb b/app/views/dmsf_context_menus/_folder.html.erb index cf6cb2eb..62804c71 100644 --- a/app/views/dmsf_context_menus/_folder.html.erb +++ b/app/views/dmsf_context_menus/_folder.html.erb @@ -66,7 +66,8 @@
  • <%= context_menu_link l(:button_delete), - dmsf_link ? dmsf_link_path(id: dmsf_link, folder_id: folder) : delete_dmsf_path(id: project, folder_id: dmsf_folder, parent_id: folder), - data: { confirm: l(:text_are_you_sure) }, method: :delete, class: 'icon icon-del', id: 'dmsf-cm-delete', - disabled: !allowed || (locked && !dmsf_link) %> + dmsf_link ? dmsf_link_path(id: dmsf_link, folder_id: folder) : + delete_dmsf_path(id: project, folder_id: dmsf_folder, parent_id: folder), + data: { confirm: "#{l(:text_are_you_sure)}\n#{l(:text_not_empty) unless dmsf_folder.empty?}" }, method: :delete, + class: 'icon icon-del', id: 'dmsf-cm-delete', disabled: !allowed || (locked && !dmsf_link) %>
  • diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 7a69314a..002f1e4b 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -412,6 +412,8 @@ cs: dmsf_webdav_ignore_1b_file_for_authentication: Ignorovat 1b soubor poslaný kvůli autentizaci dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin + text_not_empty: Adresář není prázdný. + easy_pages: modules: dmsf_locked_documents: My locked documents diff --git a/config/locales/de.yml b/config/locales/de.yml index 232addcd..4b2e4e6c 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -411,6 +411,8 @@ de: dmsf_webdav_ignore_1b_file_for_authentication: Ignoriern 1b Datai geschickt wegen der Autorization dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin + text_not_empty: Der Ordner ist nich leer. + easy_pages: modules: dmsf_locked_documents: Von mir gesperrte Dokumente diff --git a/config/locales/en.yml b/config/locales/en.yml index 71d0cbc6..cbea3481 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -412,6 +412,8 @@ en: dmsf_webdav_ignore_1b_file_for_authentication: Ignore 1b file sent for authentication dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin + text_not_empty: The folder is not empty. + easy_pages: modules: dmsf_locked_documents: My locked documents diff --git a/config/locales/es.yml b/config/locales/es.yml index c9dd5bd8..71e20c96 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -412,6 +412,8 @@ es: dmsf_webdav_ignore_1b_file_for_authentication: Ignore 1b file sent for authentication dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin + text_not_empty: The folder is not empty. + easy_pages: modules: dmsf_locked_documents: My locked documents diff --git a/config/locales/fr.yml b/config/locales/fr.yml index c82f0fa5..ee653d12 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -412,6 +412,8 @@ fr: dmsf_webdav_ignore_1b_file_for_authentication: Ignore 1b file sent for authentication dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin + text_not_empty: The folder is not empty. + easy_pages: modules: dmsf_locked_documents: My locked documents diff --git a/config/locales/hu.yml b/config/locales/hu.yml index afd4cb96..4ca411e5 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -411,6 +411,8 @@ hu: dmsf_webdav_ignore_1b_file_for_authentication: Ignore 1b file sent for authentication dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin + text_not_empty: The folder is not empty. + easy_pages: modules: dmsf_locked_documents: My locked documents diff --git a/config/locales/it.yml b/config/locales/it.yml index 449b7e8a..4dd11ac0 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -412,6 +412,8 @@ it: # Italian strings thx 2 Matteo Arceci! dmsf_webdav_ignore_1b_file_for_authentication: Ignore 1b file sent for authentication dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin + text_not_empty: The folder is not empty. + easy_pages: modules: dmsf_locked_documents: My locked documents diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 0261953b..8e22ac90 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -412,6 +412,8 @@ ja: dmsf_webdav_ignore_1b_file_for_authentication: Ignore 1b file sent for authentication dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin + text_not_empty: The folder is not empty. + easy_pages: modules: dmsf_locked_documents: 自分がロック中の文書 diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 112dd2e7..e3f752fe 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -411,6 +411,8 @@ ko: dmsf_webdav_ignore_1b_file_for_authentication: Ignore 1b file sent for authentication dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin + text_not_empty: The folder is not empty. + easy_pages: modules: dmsf_locked_documents: 내 잠긴 파일 diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 4d8f996b..2e103ce6 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -412,6 +412,8 @@ nl: dmsf_webdav_ignore_1b_file_for_authentication: Ignore 1b file sent for authentication dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin + text_not_empty: The folder is not empty. + easy_pages: modules: dmsf_locked_documents: My locked documents diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 3469dda7..e439be44 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -412,6 +412,8 @@ pl: dmsf_webdav_ignore_1b_file_for_authentication: Ignore 1b file sent for authentication dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin + text_not_empty: The folder is not empty. + easy_pages: modules: dmsf_locked_documents: My locked documents diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index d7e81ab1..e5cb6727 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -412,6 +412,8 @@ pt-BR: dmsf_webdav_ignore_1b_file_for_authentication: Ignore 1b file sent for authentication dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin + text_not_empty: The folder is not empty. + easy_pages: modules: dmsf_locked_documents: My locked documents diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 4f2e9420..9de9e9af 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -412,6 +412,8 @@ ru: dmsf_webdav_ignore_1b_file_for_authentication: Игнорировать однобайтовый файл, отправляемый для аутентификации dmsf_webdav_ignore_1b_file_for_authentication_info: Плагин WebDAV программы Total Commander + text_not_empty: The folder is not empty. + easy_pages: modules: dmsf_locked_documents: Мои заблокированные документы diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 027fde33..4c0cd975 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -412,6 +412,8 @@ sl: dmsf_webdav_ignore_1b_file_for_authentication: Ignore 1b file sent for authentication dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin + text_not_empty: The folder is not empty. + easy_pages: modules: dmsf_locked_documents: My locked documents diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 5a88d3b8..6566c546 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -411,6 +411,8 @@ zh-TW: dmsf_webdav_ignore_1b_file_for_authentication: Ignore 1b file sent for authentication dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin + text_not_empty: The folder is not empty. + easy_pages: modules: dmsf_locked_documents: My locked documents diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 72cecd80..488d2315 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -412,6 +412,8 @@ zh: dmsf_webdav_ignore_1b_file_for_authentication: Ignore 1b file sent for authentication dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin + text_not_empty: The folder is not empty. + easy_pages: modules: dmsf_locked_documents: My locked documents diff --git a/test/unit/dmsf_folder_test.rb b/test/unit/dmsf_folder_test.rb index c7eaa62b..45415b53 100644 --- a/test/unit/dmsf_folder_test.rb +++ b/test/unit/dmsf_folder_test.rb @@ -253,4 +253,9 @@ class DmsfFolderTest < RedmineDmsf::Test::UnitTest assert !@folder1.save end + def test_empty + assert !@folder1.empty? + assert @folder6.empty? + end + end \ No newline at end of file From b396844bec632d1fd265c92b8c8bc14b72fee4df Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Thu, 17 Dec 2020 09:41:39 +0100 Subject: [PATCH 19/67] #1194 tests --- test/functional/dmsf_context_menus_controller_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/functional/dmsf_context_menus_controller_test.rb b/test/functional/dmsf_context_menus_controller_test.rb index 6a84a323..6b92fe7e 100644 --- a/test/functional/dmsf_context_menus_controller_test.rb +++ b/test/functional/dmsf_context_menus_controller_test.rb @@ -160,7 +160,7 @@ class DmsfContextMenusControllerTest < RedmineDmsf::Test::TestCase assert_select 'a.icon-unlock', text: l(:button_unlock) assert_select 'a.icon-lock', text: l(:button_lock), count: 0 assert_select 'a.icon-email-add.disabled', text: l(:label_notifications_on) - assert_select 'a.icon-del.disabled', text: l(:button_delete) + assert_select 'a.icon-del', text: l(:button_delete) end def test_dmsf_url_link From e326878f3c9fffff2be9ac0547ade869dfb13f71 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Thu, 17 Dec 2020 10:31:52 +0100 Subject: [PATCH 20/67] #1079 travis --- Gemfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Gemfile b/Gemfile index 32921442..81a9bebb 100644 --- a/Gemfile +++ b/Gemfile @@ -20,6 +20,8 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +source 'https://rubygems.org' + gem 'zip-zip' gem 'simple_enum' gem 'uuidtools' From 149e675379a8231c1cf19863db9e824857e6125d Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Thu, 17 Dec 2020 10:56:44 +0100 Subject: [PATCH 21/67] #1079 travis --- .travis.yml | 3 ++- test/ci/mysql.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4bbe4471..38652540 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,8 @@ rvm: before_script: - sudo mysql -e 'CREATE DATABASE IF NOT EXISTS test CHARACTER SET utf8mb4;' - - sudo mysql -e "GRANT ALL PRIVILEGES ON test.* TO 'travis'@'%';"; + - sudo mysql -e "CREATE USER 'dmsf'@'localhost' IDENTIFIED BY 'pes+kocka'"; + - sudo mysql -e "GRANT ALL PRIVILEGES ON test.* TO 'dmsf'@'%'"; - psql -c 'create database test;' -U postgres - export WORKSPACE=`pwd`/workspace - export PATH_TO_DMSF=`pwd` diff --git a/test/ci/mysql.yml b/test/ci/mysql.yml index 148d8a9f..afa89274 100644 --- a/test/ci/mysql.yml +++ b/test/ci/mysql.yml @@ -2,6 +2,7 @@ test: adapter: mysql2 database: test - username: travis + username: dmsf + password: "pes+kocka" encoding: utf8mb4 collation: utf8mb4_unicode_ci \ No newline at end of file From e66ee5d12283b596d0505fdfc042a06610a39b8b Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Thu, 17 Dec 2020 11:57:06 +0100 Subject: [PATCH 22/67] #1079 travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 38652540..3b0413a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,7 @@ rvm: before_script: - sudo mysql -e 'CREATE DATABASE IF NOT EXISTS test CHARACTER SET utf8mb4;' - sudo mysql -e "CREATE USER 'dmsf'@'localhost' IDENTIFIED BY 'pes+kocka'"; - - sudo mysql -e "GRANT ALL PRIVILEGES ON test.* TO 'dmsf'@'%'"; + - sudo mysql -e "GRANT ALL PRIVILEGES ON test.* TO 'dmsf'@'localhost'"; - psql -c 'create database test;' -U postgres - export WORKSPACE=`pwd`/workspace - export PATH_TO_DMSF=`pwd` From f8ce208dad1fdc2cf3bac886280e21f4b5dea7f3 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Thu, 17 Dec 2020 12:31:36 +0100 Subject: [PATCH 23/67] #1079 travis --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 3b0413a8..0890f2af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -64,3 +64,4 @@ services: addons: mariadb: '10.5' + postgresql: '9.6' From 985cd4b504e9523823fd5f34002078b5af6c9b15 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Thu, 17 Dec 2020 12:55:14 +0100 Subject: [PATCH 24/67] #1079 travis --- .travis.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0890f2af..7ef14533 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,6 +49,8 @@ after_script: - bash -x ./test/ci/redmine_install.sh -u env: + global: + - PGPORT=5433 - DB=sqlite REDMINE_GIT_TAG=4.0-stable - DB=mysql REDMINE_GIT_TAG=4.0-stable - DB=postgres REDMINE_GIT_TAG=4.0-stable @@ -64,4 +66,8 @@ services: addons: mariadb: '10.5' - postgresql: '9.6' + postgresql: '10' + apt: + packages: + - postgresql-10 + - postgresql-client-10 From da2236254700ded28cf487840ad36768c135d9ea Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Thu, 17 Dec 2020 14:18:29 +0100 Subject: [PATCH 25/67] #1079 travis --- .travis.yml | 8 ++++---- test/ci/mysql.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7ef14533..fe1f30c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,7 @@ rvm: before_script: - sudo mysql -e 'CREATE DATABASE IF NOT EXISTS test CHARACTER SET utf8mb4;' - - sudo mysql -e "CREATE USER 'dmsf'@'localhost' IDENTIFIED BY 'pes+kocka'"; + - sudo mysql -e "CREATE USER 'dmsf'@'localhost' IDENTIFIED BY 'eGCq9ueVpUH3'"; - sudo mysql -e "GRANT ALL PRIVILEGES ON test.* TO 'dmsf'@'localhost'"; - psql -c 'create database test;' -U postgres - export WORKSPACE=`pwd`/workspace @@ -66,8 +66,8 @@ services: addons: mariadb: '10.5' - postgresql: '10' + postgresql: '12' apt: packages: - - postgresql-10 - - postgresql-client-10 + - postgresql-12 + - postgresql-client-12 diff --git a/test/ci/mysql.yml b/test/ci/mysql.yml index afa89274..dad1f7b7 100644 --- a/test/ci/mysql.yml +++ b/test/ci/mysql.yml @@ -3,6 +3,6 @@ test: adapter: mysql2 database: test username: dmsf - password: "pes+kocka" + password: "eGCq9ueVpUH3" encoding: utf8mb4 collation: utf8mb4_unicode_ci \ No newline at end of file From 3988afce99d04602d8c9474042e4ae522eb7473d Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Fri, 18 Dec 2020 08:27:45 +0100 Subject: [PATCH 26/67] #1079 travis --- .travis.yml | 1 + test/ci/postgres.yml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index fe1f30c1..6d25fb13 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,6 +33,7 @@ before_script: - sudo mysql -e "CREATE USER 'dmsf'@'localhost' IDENTIFIED BY 'eGCq9ueVpUH3'"; - sudo mysql -e "GRANT ALL PRIVILEGES ON test.* TO 'dmsf'@'localhost'"; - psql -c 'create database test;' -U postgres + - psql -c "ALTER ROLE postgres WITH PASSWORD 'ErgiLXF5Nr4M'" - export WORKSPACE=`pwd`/workspace - export PATH_TO_DMSF=`pwd` - export PATH_TO_REDMINE=$WORKSPACE/redmine diff --git a/test/ci/postgres.yml b/test/ci/postgres.yml index 0269c6e1..d3283a51 100644 --- a/test/ci/postgres.yml +++ b/test/ci/postgres.yml @@ -2,4 +2,6 @@ test: adapter: postgresql database: test + username: postgres + password: "ErgiLXF5Nr4M" encoding: utf8 \ No newline at end of file From b16414c1f4d72757a7c375f918535fe524d00f74 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Mon, 21 Dec 2020 15:44:29 +0100 Subject: [PATCH 27/67] #1195 Move to the bottom button --- app/controllers/dmsf_upload_controller.rb | 2 +- app/views/dmsf_upload/upload_files.html.erb | 27 ++++++++++++++++++++- assets/stylesheets/redmine_dmsf.css | 25 +++++++++++++++++++ 3 files changed, 52 insertions(+), 2 deletions(-) diff --git a/app/controllers/dmsf_upload_controller.rb b/app/controllers/dmsf_upload_controller.rb index fba1b671..f003ff1d 100644 --- a/app/controllers/dmsf_upload_controller.rb +++ b/app/controllers/dmsf_upload_controller.rb @@ -71,7 +71,7 @@ class DmsfUploadController < ApplicationController @attachment.skip_description_required = true end begin - Attachment.skip_callback(:commit, :after, :reuse_existing_file_if_possible) + Attachment.skip_callback(:commit, :after, :reuse_existing_file_if_possible, raise: false) saved = @attachment.save ensure Attachment.set_callback(:commit, :after, :reuse_existing_file_if_possible) diff --git a/app/views/dmsf_upload/upload_files.html.erb b/app/views/dmsf_upload/upload_files.html.erb index d6babffc..f26b2660 100644 --- a/app/views/dmsf_upload/upload_files.html.erb +++ b/app/views/dmsf_upload/upload_files.html.erb @@ -27,6 +27,12 @@ <%= render partial: '/dmsf/path', locals: { folder: @folder, filename: nil, title: l(:heading_uploaded_files) } %> +<% if @uploads.size > 1 %> + +<% end %> + <% if (@folder && @folder.description.present?) || @project.dmsf_description.present? %>
    <%= textilizable(@folder ? @folder.description : @project.dmsf_description) %> @@ -39,7 +45,7 @@ <% if upload.locked %> <%= render partial: 'upload_file_locked', locals: { upload: upload, i: i } %> <% else %> - <%= render partial: 'upload_file', locals: { upload: upload, i: i, wiki: @wiki } %> + <%= render partial: 'upload_file', locals: { upload: upload, i: i, wiki: @wiki, n: @uploads.size } %> <% end %> <% end %>
    @@ -47,3 +53,22 @@
    <% end %> <% end %> + +<%= late_javascript_tag do %> + // When the user scrolls the page, execute scrollFunction + window.onscroll = function() { + scrollFunction() + }; + var scroller = $(".dmsf-scroll"); + var firstUploadBox = $(".dmfs-box-tabular:first"); + var offset = firstUploadBox.offset(); + // Add the sticky class to the header when you reach its scroll position. + // Remove "sticky" when you leave the scroll position + function scrollFunction() { + if (window.pageYOffset > offset.top) { + scroller.addClass("dmsf-sticky"); + } else { + scroller.removeClass("dmsf-sticky"); + } + } +<% end %> diff --git a/assets/stylesheets/redmine_dmsf.css b/assets/stylesheets/redmine_dmsf.css index c5e86f8d..a47a90dc 100644 --- a/assets/stylesheets/redmine_dmsf.css +++ b/assets/stylesheets/redmine_dmsf.css @@ -327,6 +327,31 @@ div[id*="revision_access_"] { padding-top: 10px } +a.dmsf-scroll-down { + background: url(../../../images/arrow_down.png) no-repeat 5px 50%; + background-color: #759FCF; + text-decoration: none; + color: #FFFFFF; + font-weight: bold; + font-size: 0.8em; + float: right; + padding: 2px 9px 3px 20px; + margin-right: 20px; + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; +} + +div.dmsf-sticky { + position: fixed; + right: 10px; + top: 0; + z-index: 10000; +} + +div.dmsf-scroll { + width: 100%; +} + /* New link form */ #dmsf_link_target_file_id, #dmsf_link_target_folder_id, #dmsf_link_target_project_id, #dmsf_link_name{ min-width: 40%; From aef55090c58122bc3ba03f759c2d7d41449f79b2 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Mon, 21 Dec 2020 15:44:59 +0100 Subject: [PATCH 28/67] WebDAV disabled --- app/views/settings/_dmsf_settings.html.erb | 11 +++++++++-- config/locales/cs.yml | 2 ++ config/locales/de.yml | 2 ++ config/locales/en.yml | 2 ++ config/locales/es.yml | 2 ++ config/locales/fr.yml | 2 ++ config/locales/hu.yml | 2 ++ config/locales/it.yml | 2 ++ config/locales/ja.yml | 2 ++ config/locales/ko.yml | 2 ++ config/locales/nl.yml | 2 ++ config/locales/pl.yml | 2 ++ config/locales/pt-BR.yml | 2 ++ config/locales/ru.yml | 2 ++ config/locales/sl.yml | 2 ++ config/locales/zh-TW.yml | 2 ++ config/locales/zh.yml | 2 ++ init.rb | 2 +- 18 files changed, 42 insertions(+), 3 deletions(-) diff --git a/app/views/settings/_dmsf_settings.html.erb b/app/views/settings/_dmsf_settings.html.erb index 8dedab1b..bc9665ac 100644 --- a/app/views/settings/_dmsf_settings.html.erb +++ b/app/views/settings/_dmsf_settings.html.erb @@ -207,13 +207,20 @@

    <%= content_tag :label, l(:label_webdav) %> + <% webdav_disabled = Redmine::Plugin.installed?(:easy_extensions) && EasyHostingServices::EasyMultiTenancy.activated? %> <%= select_tag 'settings[dmsf_webdav]', options_for_select([ [l(:select_option_deactivated), nil], [l(:select_option_activated), '1']], - selected: @settings['dmsf_webdav']) %> + selected: @settings['dmsf_webdav'], + disabled: webdav_disabled) %> - <%= l(:note_webdav, protocol: Setting.protocol, domain: Setting.host_name).html_safe %> <%= l(:label_default) %>: <%= l(:select_option_activated) %> + <% if webdav_disabled %> + <%= l(:note_webdav_disabled) %> + <% else %> + <%= l(:note_webdav, protocol: Setting.protocol, domain: Setting.host_name).html_safe %> + <%= l(:label_default) %>: <%= l(:select_option_activated) %> + <% end %>

    diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 002f1e4b..4587ed79 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -413,6 +413,8 @@ cs: dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin text_not_empty: Adresář není prázdný. + label_scroll_down: Posunout se dolů + note_webdav_disabled: WebDAV je zablokovaný. Kontaktujte administrátora. easy_pages: modules: diff --git a/config/locales/de.yml b/config/locales/de.yml index 4b2e4e6c..50dac368 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -412,6 +412,8 @@ de: dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin text_not_empty: Der Ordner ist nich leer. + label_scroll_down: Runterscrollen + note_webdav_disabled: WebDAV is disabled. Contact the administrator. easy_pages: modules: diff --git a/config/locales/en.yml b/config/locales/en.yml index cbea3481..400bcc8c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -413,6 +413,8 @@ en: dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin text_not_empty: The folder is not empty. + label_scroll_down: Scroll down + note_webdav_disabled: WebDAV is disabled. Contact the administrator. easy_pages: modules: diff --git a/config/locales/es.yml b/config/locales/es.yml index 71e20c96..1bad0a84 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -413,6 +413,8 @@ es: dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin text_not_empty: The folder is not empty. + label_scroll_down: Scroll down + note_webdav_disabled: WebDAV is disabled. Contact the administrator. easy_pages: modules: diff --git a/config/locales/fr.yml b/config/locales/fr.yml index ee653d12..b59e5fe9 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -413,6 +413,8 @@ fr: dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin text_not_empty: The folder is not empty. + label_scroll_down: Scroll down + note_webdav_disabled: WebDAV is disabled. Contact the administrator. easy_pages: modules: diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 4ca411e5..bc5df1e8 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -412,6 +412,8 @@ hu: dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin text_not_empty: The folder is not empty. + label_scroll_down: Scroll down + note_webdav_disabled: WebDAV is disabled. Contact the administrator. easy_pages: modules: diff --git a/config/locales/it.yml b/config/locales/it.yml index 4dd11ac0..55f62023 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -413,6 +413,8 @@ it: # Italian strings thx 2 Matteo Arceci! dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin text_not_empty: The folder is not empty. + label_scroll_down: Scroll down + note_webdav_disabled: WebDAV is disabled. Contact the administrator. easy_pages: modules: diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 8e22ac90..23aa8097 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -413,6 +413,8 @@ ja: dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin text_not_empty: The folder is not empty. + label_scroll_down: Scroll down + note_webdav_disabled: WebDAV is disabled. Contact the administrator. easy_pages: modules: diff --git a/config/locales/ko.yml b/config/locales/ko.yml index e3f752fe..fa1bc27e 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -412,6 +412,8 @@ ko: dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin text_not_empty: The folder is not empty. + label_scroll_down: Scroll down + note_webdav_disabled: WebDAV is disabled. Contact the administrator. easy_pages: modules: diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 2e103ce6..5ef318c5 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -413,6 +413,8 @@ nl: dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin text_not_empty: The folder is not empty. + label_scroll_down: Scroll down + note_webdav_disabled: WebDAV is disabled. Contact the administrator. easy_pages: modules: diff --git a/config/locales/pl.yml b/config/locales/pl.yml index e439be44..78cbc726 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -413,6 +413,8 @@ pl: dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin text_not_empty: The folder is not empty. + label_scroll_down: Scroll down + note_webdav_disabled: WebDAV is disabled. Contact the administrator. easy_pages: modules: diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index e5cb6727..bfaeb358 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -413,6 +413,8 @@ pt-BR: dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin text_not_empty: The folder is not empty. + label_scroll_down: Scroll down + note_webdav_disabled: WebDAV is disabled. Contact the administrator. easy_pages: modules: diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 9de9e9af..b28bc2a3 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -413,6 +413,8 @@ ru: dmsf_webdav_ignore_1b_file_for_authentication_info: Плагин WebDAV программы Total Commander text_not_empty: The folder is not empty. + label_scroll_down: Scroll down + note_webdav_disabled: WebDAV is disabled. Contact the administrator. easy_pages: modules: diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 4c0cd975..db7095b6 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -413,6 +413,8 @@ sl: dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin text_not_empty: The folder is not empty. + label_scroll_down: Scroll down + note_webdav_disabled: WebDAV is disabled. Contact the administrator. easy_pages: modules: diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 6566c546..c3418c4b 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -412,6 +412,8 @@ zh-TW: dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin text_not_empty: The folder is not empty. + label_scroll_down: Scroll down + note_webdav_disabled: WebDAV is disabled. Contact the administrator. easy_pages: modules: diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 488d2315..90f87c2d 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -413,6 +413,8 @@ zh: dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin text_not_empty: The folder is not empty. + label_scroll_down: Scroll down + note_webdav_disabled: WebDAV is disabled. Contact the administrator. easy_pages: modules: diff --git a/init.rb b/init.rb index aa27f3ae..81a867c9 100644 --- a/init.rb +++ b/init.rb @@ -45,7 +45,7 @@ Redmine::Plugin.register :redmine_dmsf do 'dmsf_index_database' => File.expand_path('dmsf_index', Rails.root), 'dmsf_stemming_lang' => 'english', 'dmsf_stemming_strategy' => 'STEM_NONE', - 'dmsf_webdav' => '1', + 'dmsf_webdav' => (Redmine::Plugin.installed?(:easy_extensions) && EasyHostingServices::EasyMultiTenancy.activated?) ? nil : '1', 'dmsf_display_notified_recipients' => nil, 'dmsf_global_title_format' => '', 'dmsf_columns' => %w(title size modified version workflow author), From 6d227fd64e0d39c8ba392dac607f0029416d090b Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Mon, 21 Dec 2020 16:01:55 +0100 Subject: [PATCH 29/67] #1195 Move to the bottom button --- app/views/dmsf_upload/upload_files.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/dmsf_upload/upload_files.html.erb b/app/views/dmsf_upload/upload_files.html.erb index f26b2660..4c1164f5 100644 --- a/app/views/dmsf_upload/upload_files.html.erb +++ b/app/views/dmsf_upload/upload_files.html.erb @@ -45,7 +45,7 @@ <% if upload.locked %> <%= render partial: 'upload_file_locked', locals: { upload: upload, i: i } %> <% else %> - <%= render partial: 'upload_file', locals: { upload: upload, i: i, wiki: @wiki, n: @uploads.size } %> + <%= render partial: 'upload_file', locals: { upload: upload, i: i, wiki: @wiki } %> <% end %> <% end %>
    From 42e02fcf18d49954196d9b72f7863d7cd2307324 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Tue, 22 Dec 2020 08:25:23 +0100 Subject: [PATCH 30/67] #1079 travis --- .travis.yml | 7 ------- test/ci/postgres.yml | 2 -- 2 files changed, 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6d25fb13..94dcc683 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,6 @@ before_script: - sudo mysql -e "CREATE USER 'dmsf'@'localhost' IDENTIFIED BY 'eGCq9ueVpUH3'"; - sudo mysql -e "GRANT ALL PRIVILEGES ON test.* TO 'dmsf'@'localhost'"; - psql -c 'create database test;' -U postgres - - psql -c "ALTER ROLE postgres WITH PASSWORD 'ErgiLXF5Nr4M'" - export WORKSPACE=`pwd`/workspace - export PATH_TO_DMSF=`pwd` - export PATH_TO_REDMINE=$WORKSPACE/redmine @@ -51,7 +50,6 @@ after_script: env: global: - - PGPORT=5433 - DB=sqlite REDMINE_GIT_TAG=4.0-stable - DB=mysql REDMINE_GIT_TAG=4.0-stable - DB=postgres REDMINE_GIT_TAG=4.0-stable @@ -67,8 +65,3 @@ services: addons: mariadb: '10.5' - postgresql: '12' - apt: - packages: - - postgresql-12 - - postgresql-client-12 diff --git a/test/ci/postgres.yml b/test/ci/postgres.yml index d3283a51..0269c6e1 100644 --- a/test/ci/postgres.yml +++ b/test/ci/postgres.yml @@ -2,6 +2,4 @@ test: adapter: postgresql database: test - username: postgres - password: "ErgiLXF5Nr4M" encoding: utf8 \ No newline at end of file From ef2574f1c678e01985c449aae0a132ca172dd0e5 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Tue, 22 Dec 2020 08:31:46 +0100 Subject: [PATCH 31/67] WebDAV disabled better --- app/views/settings/_dmsf_settings.html.erb | 2 +- init.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/settings/_dmsf_settings.html.erb b/app/views/settings/_dmsf_settings.html.erb index bc9665ac..dc821ab4 100644 --- a/app/views/settings/_dmsf_settings.html.erb +++ b/app/views/settings/_dmsf_settings.html.erb @@ -207,7 +207,7 @@

    <%= content_tag :label, l(:label_webdav) %> - <% webdav_disabled = Redmine::Plugin.installed?(:easy_extensions) && EasyHostingServices::EasyMultiTenancy.activated? %> + <% webdav_disabled = Redmine::Plugin.installed?(:easy_hosting_services) && EasyHostingServices::EasyMultiTenancy.activated? %> <%= select_tag 'settings[dmsf_webdav]', options_for_select([ [l(:select_option_deactivated), nil], diff --git a/init.rb b/init.rb index 81a867c9..09670fef 100644 --- a/init.rb +++ b/init.rb @@ -45,7 +45,7 @@ Redmine::Plugin.register :redmine_dmsf do 'dmsf_index_database' => File.expand_path('dmsf_index', Rails.root), 'dmsf_stemming_lang' => 'english', 'dmsf_stemming_strategy' => 'STEM_NONE', - 'dmsf_webdav' => (Redmine::Plugin.installed?(:easy_extensions) && EasyHostingServices::EasyMultiTenancy.activated?) ? nil : '1', + 'dmsf_webdav' => (Redmine::Plugin.installed?(:easy_hosting_services) && EasyHostingServices::EasyMultiTenancy.activated?) ? nil : '1', 'dmsf_display_notified_recipients' => nil, 'dmsf_global_title_format' => '', 'dmsf_columns' => %w(title size modified version workflow author), From 433d058c01fb8b6a59bf57840bd7020e39abc923 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Tue, 22 Dec 2020 08:42:25 +0100 Subject: [PATCH 32/67] #1079 travis --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 94dcc683..ddf71306 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ language: ruby sudo: true -dist: focal +dist: bionic rvm: - 2.6 @@ -64,4 +64,4 @@ services: - postgresql addons: - mariadb: '10.5' + mariadb: '10.4' From d4cb7de7cae84e7aaba549dde359bcc9ea948187 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Mon, 28 Dec 2020 09:30:27 +0100 Subject: [PATCH 33/67] #Add workflow step name to mail notification #1196 --- app/controllers/dmsf_workflows_controller.rb | 7 +++++-- app/models/dmsf_mailer.rb | 13 +++++++------ app/models/dmsf_workflow.rb | 4 +++- config/locales/cs.yml | 4 ++-- config/locales/de.yml | 4 ++-- config/locales/en.yml | 4 ++-- config/locales/es.yml | 4 ++-- config/locales/fr.yml | 4 ++-- config/locales/hu.yml | 4 ++-- config/locales/it.yml | 4 ++-- config/locales/ja.yml | 4 ++-- config/locales/ko.yml | 4 ++-- config/locales/nl.yml | 4 ++-- config/locales/pl.yml | 4 ++-- config/locales/pt-BR.yml | 4 ++-- config/locales/ru.yml | 4 ++-- config/locales/sl.yml | 4 ++-- config/locales/zh-TW.yml | 4 ++-- config/locales/zh.yml | 4 ++-- lib/tasks/dmsf_alert_approvals.rake | 7 +++++-- 20 files changed, 52 insertions(+), 43 deletions(-) diff --git a/app/controllers/dmsf_workflows_controller.rb b/app/controllers/dmsf_workflows_controller.rb index 57f19d8c..e5ef7d69 100644 --- a/app/controllers/dmsf_workflows_controller.rb +++ b/app/controllers/dmsf_workflows_controller.rb @@ -122,7 +122,8 @@ class DmsfWorkflowsController < ApplicationController :text_email_subject_delegated, :text_email_finished_delegated, :text_email_to_proceed, - action.note) + action.note, + action.dmsf_workflow_step_assignment.dmsf_workflow_step) if Setting.plugin_redmine_dmsf['dmsf_display_notified_recipients'] flash[:warning] = l(:warning_email_notifications, to: delegate.name) end @@ -141,7 +142,9 @@ class DmsfWorkflowsController < ApplicationController revision, :text_email_subject_requires_approval, :text_email_finished_step, - :text_email_to_proceed) + :text_email_to_proceed, + nil, + assignment.dmsf_workflow_step) end end to = revision.dmsf_workflow_assigned_by_user diff --git a/app/models/dmsf_mailer.rb b/app/models/dmsf_mailer.rb index 9e0e4a4c..4282e197 100644 --- a/app/models/dmsf_mailer.rb +++ b/app/models/dmsf_mailer.rb @@ -108,13 +108,14 @@ class DmsfMailer < Mailer res end - def self.deliver_workflow_notification(users, workflow, revision, subject_id, text1_id, text2_id, notice = nil) + def self.deliver_workflow_notification(users, workflow, revision, subject_id, text1_id, text2_id, notice = nil, step = nil) users.each do |user| - workflow_notification(user, workflow, revision, subject_id.to_s, text1_id.to_s, text2_id.to_s, notice).deliver_now + workflow_notification(user, workflow, revision, subject_id.to_s, text1_id.to_s, text2_id.to_s, notice, + step&.name).deliver_now end end - def workflow_notification(user, workflow, revision, subject_id, text1_id, text2_id, notice = nil) + def workflow_notification(user, workflow, revision, subject_id, text1_id, text2_id, notice, stepname) if user && workflow && revision if revision.dmsf_file && revision.dmsf_file.project @project = revision.dmsf_file.project @@ -125,13 +126,13 @@ class DmsfMailer < Mailer message_id workflow @workflow = workflow @revision = revision - @text1 = l(text1_id, name: workflow.name, filename: revision.dmsf_file.name, notice: notice) + @text1 = l(text1_id, name: workflow.name, filename: revision.dmsf_file.name, notice: notice, stepname: stepname) @text2 = l(text2_id) @notice = notice @author = revision.dmsf_workflow_assigned_by_user - @author = User.anonymous unless @author + @author ||= User.anonymous mail to: user.mail, - subject: "[#{@project.name} - #{l(:field_label_dmsf_workflow)}] #{@workflow.name} #{l(subject_id)}" + subject: "[#{@project.name} - #{l(:field_label_dmsf_workflow)}] #{@workflow.name} #{l(subject_id)} #{stepname}" end end diff --git a/app/models/dmsf_workflow.rb b/app/models/dmsf_workflow.rb index 2dbff559..83989054 100644 --- a/app/models/dmsf_workflow.rb +++ b/app/models/dmsf_workflow.rb @@ -218,7 +218,9 @@ class DmsfWorkflow < ActiveRecord::Base revision, :text_email_subject_started, :text_email_started, - :text_email_to_proceed) + :text_email_to_proceed, + nil, + assignments.first&.dmsf_workflow_step) if Setting.plugin_redmine_dmsf['dmsf_display_notified_recipients'] unless recipients.blank? to = recipients.collect{ |r| r.name }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ') diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 4587ed79..364af95a 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -280,13 +280,13 @@ cs: text_email_finished_rejected: "Schvalovací proces '%{name}' přiřazený k dokumentu '%{filename}' byl dokončen a dokument byl zamítnut, protože '%{notice}'." text_email_finished_delegated: "Schvalovací proces '%{name}' přiřazený k dokumentu '%{filename}' byl delegován, - protože '%{notice}' a od Vás se očekává schválení v aktuálním schvalovacím kroku." + protože '%{notice}' a od Vás se očekává schválení v aktuálním schvalovacím kroku '%{stepname}'." text_email_finished_step: "Schvalovací proces '%{name}' přiřazený k dokumentu '%{filename}' právě ukončil jeden ze schvalovacích kroků a od Vás se očekává schválení v dalším schvalovacím kroku." text_email_finished_step_short: "Schvalovací proces '%{name}' přiřazený k dokumentu '%{filename}' právě ukončil jeden ze schvalovacích kroků." text_email_started: "Schvalovací proces '%{name}' přiřazený k dokumentu '%{filename}' byl zahájen a od Vás se očekává - schválení v aktuálním schvalovacím kroku." + schválení v aktuálním schvalovacím kroku '%{stepname}'." text_email_to_proceed: Pro schválení klikněte na zaškrtávací ikonku vedle dokumentu v text_email_to_see_history: Pro zobrazení historie schvalovacího procesu klikněte na status dokumentu v diff --git a/config/locales/de.yml b/config/locales/de.yml index 50dac368..1d38949f 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -281,13 +281,13 @@ de: text_email_finished_rejected: "Der Genehmigungs-Workflow '%{name}' zugewiesen an die Datei '%{filename}' ist abgeschlossen, aber die Datei wurde abgelehnt, weil: '%{notice}'." text_email_finished_delegated: "Der Genehmigungs-Workflow '%{name}' zugewiesen an die Datei '%{filename}' wurde an - dich deligiert, weil: '%{notice}' und weil deine Zustimmung im aktuellen Genehmigungsschritt benötigt wird." + dich deligiert, weil: '%{notice}' und weil deine Zustimmung im aktuellen Genehmigungsschritt '%{stepname}' benötigt wird." text_email_finished_step: "Der Genehmigungs-Workflow '%{name}' zugewiesen an die Datei '%{filename}' hat grade einen Zustimmungsschritt abgeschlossen und im nächsten Genehmigungsschritt wird deine Zustimmung benötigt." text_email_finished_step_short: "Der Genehmigungs-Workflow '%{name}' zugewiesen an die Datei '%{filename}' hat grade einen Genehmigungsschritt abgeschlossen." text_email_started: "Der Genehmigungs-Workflow '%{name}' zugewiesen an '%{filename}' wurde gestartet und im aktuellen - Genehmigungsschritt wird deine Zustimmung benötigt." + Genehmigungsschritt '%{stepname}' wird deine Zustimmung benötigt." text_email_to_proceed: Um fortzufahren klicke auf das Häckchen neben der Datei in text_email_to_see_history: Um den Verlauf des Genehmigungs-Workflows zu sehen klicke auf den Workflowstatus zur Datei in diff --git a/config/locales/en.yml b/config/locales/en.yml index 400bcc8c..ebeb8e8e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -280,13 +280,13 @@ en: text_email_finished_rejected: "The approval workflow '%{name}' assigned to '%{filename}' document has just been finished and the document has been rejected because of '%{notice}'." text_email_finished_delegated: "The approval workflow '%{name}' assigned to '%{filename}' document has just been - delegated because of '%{notice}' and you are expected to do an approval in the current approval step." + delegated because of '%{notice}' and you are expected to do an approval in the current approval step '%{stepname}'." text_email_finished_step: "The approval workflow '%{name}' assigned to '%{filename}' document has just finished one of the approval steps and you are expected to do an approval in the next approval step." text_email_finished_step_short: "The approval workflow '%{name}' assigned to '%{filename}' document has just finished one of the approval steps." text_email_started: "The approval workflow '%{name}' assigned to '%{filename}' document has just been started and you - are expected to do an approval in the current approval step." + are expected to do an approval in the current approval step '%{stepname}'." text_email_to_proceed: To proceed click on the check box icon next to the document in text_email_to_see_history: To see the approval history click on the workflow status of the document in diff --git a/config/locales/es.yml b/config/locales/es.yml index 1bad0a84..551a4b4c 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -280,13 +280,13 @@ es: text_email_finished_rejected: "El flujo de trabajo de aprobación '%{name}' asignado al documento '%{filename}' acaba de ser terminado y él ha sido rechazado por el siguiente motivo '%{notice}'." text_email_finished_delegated: "El flujo de trabajo de aprobación '%{name}' asignado al documento '%{filename}' acaba - de ser delegado por '%{notice}' y se espera que haga una aprobación en la etapa de aprobación actual." + de ser delegado por '%{notice}' y se espera que haga una aprobación en la etapa de aprobación actual '%{stepname}'." text_email_finished_step: "El flujo de trabajo de aprobación '%{name}' asignado al documento '%{filename}' acaba de terminar uno de los pasos de aprobación y se espera que haga una aprobación en el siguiente paso." text_email_finished_step_short: "El flujo de trabajo de aprobación '%{name}' asignado al documento '%{filename}' acaba de finalizar uno de los pasos de aprobación." text_email_started: "El flujo de trabajo de aprobación '%{name}' asignado al documento '%{filename}' acaba de - iniciarse y se espera que haga una aprobación en la etapa de aprobación actual." + iniciarse y se espera que haga una aprobación en la etapa de aprobación actual '%{stepname}'." text_email_to_proceed: "Para continuar, haga clic en el icono de la casilla de verificación al lado del documento" text_email_to_see_history: "Para ver el historial de aprobación haga clic en el estado del flujo de trabajo del documento" diff --git a/config/locales/fr.yml b/config/locales/fr.yml index b59e5fe9..498a8f3f 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -280,13 +280,13 @@ fr: text_email_finished_rejected: "Le flux de validation '%{name}' assigné au document '%{filename}' vient de se terminer et le document a été rejeté pour la raison '%{notice}'." text_email_finished_delegated: "Le flux de validation '%{name}' assigné au document '%{filename}' a été délégué pour - la raison '%{notice}' et vous êtes tenu d'approuver l'étape actuelle." + la raison '%{notice}' et vous êtes tenu d'approuver l'étape actuelle '%{stepname}'." text_email_finished_step: "Le flux de validation '%{name}' assigné au document '%{filename}' a passé une des étapes d'approbation et vous êtes tenu d'approuver l'étape suivante." text_email_finished_step_short: "Le flux de validation '%{name}' assigné au document '%{filename}' a passé une des étapes d'approbation." text_email_started: "Le flux de validation '%{name}' assigné au document '%{filename}' vient de démarrer et vous êtes - tenu d'approuver l'étape actuelle." + tenu d'approuver l'étape actuelle '%{stepname}'." text_email_to_proceed: "Pour ce faire, cliquez sur l'icône de validation à côté du document dans" text_email_to_see_history: "Pour consulter l'historique de validation, cliquez sur le statut du flux du document dans" diff --git a/config/locales/hu.yml b/config/locales/hu.yml index bc5df1e8..f1a79520 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -281,13 +281,13 @@ hu: hozzárendelésre, befejeződött és visszautasításra került a következő üzenettel: '%{notice}'." text_email_finished_delegated: "A '%{name}' jóváhagyási workflow amely a '%{filename}' dokumentumhoz került hozzárendelésre, Önhöz került az alábbi megjegyzés '%{notice}' miatt és a jelenlegi lépésben az Ön jóváhagyására - vár." + vár '%{stepname}'." text_email_finished_step: "A '%{name}' jóváhagyási workflow-ban amely a '%{filename}' dokumentumhoz került hozzárendelésre, egy lépés teljesült és a következő lépésben lépésben az Ön jóváhagyására vár." text_email_finished_step_short: "A '%{name}' jóváhagyási workflow-ban amely a '%{filename}' dokumentumhoz került hozzárendelésre, egy lépés teljesült a folyamatban." text_email_started: "A '%{name}' jóváhagyási workflow amely a '%{filename}' dokumentumhoz került hozzárendelésre, - elindult és a jelenlegi lépésben az Ön jóváhagyására vár." + elindult és a jelenlegi lépésben az Ön jóváhagyására vár '%{stepname}'." text_email_to_proceed: A folytatáshoz kattintson a négyzetre a dokumentum mellett text_email_to_see_history: Ha meg akarja nézni a jóváhagyási előzményeket, akkor kattintson a dokumentumon belül a workflow státuszra diff --git a/config/locales/it.yml b/config/locales/it.yml index 55f62023..ee902869 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -280,13 +280,13 @@ it: # Italian strings thx 2 Matteo Arceci! text_email_finished_rejected: "L'approvazione di flusso di lavoro '%{name}' assegnato a '%{filename}' è stata completata ma il documento è stato rifiutato a causa di '%{notice}'." text_email_finished_delegated: "L'approvazione di flusso di lavoro '%{name}' assegnato a '%{filename}' è stata - delegata a causa di '%{notice}' e sei tenuto ad approvare nel passo corrente." + delegata a causa di '%{notice}' e sei tenuto ad approvare nel passo corrente '%{stepname}'." text_email_finished_step: "L'approvazione di flusso di lavoro '%{name}' assegnato a '%{filename}' ha completato uno dei passi di approvazione e sei tenuto ad approvare il prossimo passo." text_email_finished_step_short: "L'approvazione di flusso di lavoro '%{name}' assegnato a '%{filename}' ha completato uno dei passi di approvazione." text_email_started: "L'approvazione di flusso di lavoro '%{name}' assegnato a '%{filename}' è stato inizializzato e - sei tenuto ad approvare il passo corrente." + sei tenuto ad approvare il passo corrente '%{stepname}'." text_email_to_proceed: Per proseguire clicca sull'icona checkbox a fianco del documento text_email_to_see_history: Per vedere la storia di approvazione clicca sullo stato del flusso di lavoro del documento diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 23aa8097..41dd928d 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -280,13 +280,13 @@ ja: text_email_finished_rejected: "承認ワークフロー '%{name}' において '%{filename}' が否認されました。理由:'%{notice}'。" text_email_finished_delegated: "承認ワークフロー '%{name}' において代理承認が依頼されました。承認対象 '%{filename}' - の内容をご確認の上、承認・否認のご判断をお願い致します(依頼主コメント:'%{notice}')。" + の内容をご確認の上、承認・否認のご判断をお願い致します(依頼主コメント:'%{notice}')。'%{stepname}'" text_email_finished_step: "承認ワークフロー '%{name}' からの承認依頼です。承認対象 '%{filename}' の内容をご確認の上、承認・否認のご判断をお願い致します。" text_email_finished_step_short: "承認ワークフロー '%{name}' において '%{filename}' の承認ステップが一つ終了しました。" text_email_started: "承認ワークフロー '%{name}' からの承認依頼です。承認対象 '%{filename}' - の内容をご確認の上、承認・否認のご判断をお願い致します。" + の内容をご確認の上、承認・否認のご判断をお願い致します。'%{stepname}'" text_email_to_proceed: 次のURLを開き内容を確認の上、右端のチェックマークをクリックし承認・否認の選択をしてください。 text_email_to_see_history: 次のURLで承認ワークフローの履歴を確認することができます。 diff --git a/config/locales/ko.yml b/config/locales/ko.yml index fa1bc27e..f560a2c0 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -279,13 +279,13 @@ ko: text_email_finished_rejected: "'%{filename}' 문서에 지정된 승인 작업 흐름 '%{name}'이 방금 완료되었지만, '%{notice}'로 인해 문서가 반려되었습니다." - text_email_finished_delegated: "'%{filename}' 문서에 지정된 승인 작업 흐름 '%{name}'이 방금 완료되었지만, '%{notice}'로 인해 위임되었으며, 사용자는 현재 승인 과정에서 승인하셔야 합니다." + text_email_finished_delegated: "'%{filename}' 문서에 지정된 승인 작업 흐름 '%{name}'이 방금 완료되었지만, '%{notice}'로 인해 위임되었으며, 사용자는 현재 승인 과정에서 승인하셔야 합니다 '%{stepname}'." text_email_finished_step: "'%{filename}' 문서에 지정된 승인 작업 흐름 '%{name}'이 방금 완료되었지만, 승인 단계 중 한 개가 승인되었으며 사용자께서 다음 승인 단계를 승인하셔야 합니다" text_email_finished_step_short: "'%{filename}'문서에 지정된 승인 작업 흐름 '%{name}'이 방금 완료되었으며, 승인 단계 중 한 단계가 완료되었습니다." - text_email_started: "'%{filename}'문서에 지정된 승인 작업 흐름 '%{name}'이 방금 시작되었으며, 사용자께서는 현재 승인 단계에서 승인을 하셔야 합니다." + text_email_started: "'%{filename}'문서에 지정된 승인 작업 흐름 '%{name}'이 방금 시작되었으며, 사용자께서는 현재 승인 단계에서 승인을 하셔야 합니다 '%{stepname}'." text_email_to_proceed: 다음으로 진행하기 위해 문서 옆에 있는 체크 상지 아이콘을 클릭하세요 text_email_to_see_history: 승인 내역을 확인하기 위해 작업 흐름 상태 문서를 클릭하세요 diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 5ef318c5..20a1269e 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -280,14 +280,14 @@ nl: text_email_finished_rejected: "De goedkeuring workflow '%{name}' toegewezen aan '%{filename}' document is zojuist afgerond en het document is afgewezen vanwege '%{notice}'." text_email_finished_delegated: "De goedkeuring workflow '%{name}' toegewezen aan '%{filename}' document is zojuist - gedelegeerd omdat '%{notice}' en er wordt verwacht dat u een goedkeuring doet in de huidige goedkeuringsstap." + gedelegeerd omdat '%{notice}' en er wordt verwacht dat u een goedkeuring doet in de huidige goedkeuringsstap '%{stepname}'." text_email_finished_step: "De goedkeuring workflow '%{name}' toegewezen aan '%{filename}' document heeft zojuist een van de goedkeurende stappen afgerond en er wordt verwacht dat u een goedkeuring doet in de volgenden goedkeuringsstap." text_email_finished_step_short: "De goedkeuring workflow '%{name}' toegewezen aan '%{filename}' document heeft zojuist een van de goedkeuringsstappen afgerond." text_email_started: "De goedkeurende workflow '%{name}' toegewezen aan '%{filename}' document is zojuist gestart en er - wordt verwacht dat u een goedkeuring doet in de huidige goedkeuringsstap." + wordt verwacht dat u een goedkeuring doet in de huidige goedkeuringsstap '%{stepname}'." text_email_to_proceed: Klik om door te gaan om het het vinkjes icoon naast het document in text_email_to_see_history: Klik om de goedkeuringsgeschiedenis te bekijken op de workflow status van het document in text_email_to_see_status: Klik om de huidige status van de goedkeuring workflow te bekijken op het workflow status diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 78cbc726..45c8e976 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -280,13 +280,13 @@ pl: text_email_finished_rejected: "Proces akceptacji '%{name}' dokumentu '%{filename}' został właśnie zakończony. Dokument został odrzucony z powodu '%{notice}'." text_email_finished_delegated: "Proces akceptacji '%{name}' dokumentu '%{filename}' został właśnie delegowany z powodu - '%{notice}'. Zostałeś wskazany jako akceptujący w bieżącym kroku zatwierdzania." + '%{notice}'. Zostałeś wskazany jako akceptujący w bieżącym kroku zatwierdzania '%{stepname}'." text_email_finished_step: "Zakończono krok w procesie akceptacji '%{name}' dokumentu '%{filename}'. Jesteś kolejną osobą decyzyjną w procesie akceptacji." text_email_finished_step_short: "Zakończono krok w procesie akceptacji '%{name}' dokumentu '%{filename}'." text_email_started: "Proces akceptacji '%{name}' dokuentu '%{filename}' został uruchomiony. Jesteś osobą akceptującą w - bieżącym kroku zatwierdzania." + bieżącym kroku zatwierdzania '%{stepname}'." text_email_to_proceed: Aby procedować zaznacz check box przy dokumencie text_email_to_see_history: Aby zobaczyć historię akceptacji kliknij w proces akceptacji dokumentu diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index bfaeb358..7f14cbb6 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -280,13 +280,13 @@ pt-BR: text_email_finished_rejected: "O workflow de aprovação '%{name}' definido para o documento '%{filename}' foi finalizado e o documento foi reprovado devido a '%{notice}'." text_email_finished_delegated: "O workflow de aprovação '%{name}' definido para o documento '%{filename}' foi - atribuido pois '%{notice}' e está aguardando a sua aprovação na etapa atual." + atribuido pois '%{notice}' e está aguardando a sua aprovação na etapa atual '%{stepname}'." text_email_finished_step: "O workflow de aprovação '%{name}' definido para o documento '%{filename}' foi aprovado na etapa anterior e está aguardando a sua aprovação na etapa atual." text_email_finished_step_short: "O workflow de aprovação '%{name}' definido para o documento '%{filename}' foi aprovado em uma das suas etapas de aprovação." text_email_started: "O workflow de aprovação '%{name}' definido para o documento '%{filename}' foi iniciado e está - aguardando a sua aprovação na etapa atual." + aguardando a sua aprovação na etapa atual '%{stepname}'." text_email_to_proceed: Para dar continuidade ao fluxo, clique no íncone ao lado do documento text_email_to_see_history: Para visualizar o histórico de workflow de aprovação clique no status do workflow disponível ao lado do documento diff --git a/config/locales/ru.yml b/config/locales/ru.yml index b28bc2a3..4dce803a 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -280,13 +280,13 @@ ru: text_email_finished_rejected: "Процесс согласования '%{name}' документа '%{filename}' только что завершился и документ был отклонен по причине '%{notice}'." text_email_finished_delegated: "Процесс согласования '%{name}' документа '%{filename}' только что был делегирован по - причине '%{notice}' и и ожидает Вашего рассмотрения." + причине '%{notice}' и и ожидает Вашего рассмотрения '%{stepname}'." text_email_finished_step: "Процесс согласования '%{name}' документа '%{filename}' только что завершил один из шагов согласования и ожидает Вашего рассмотрения." text_email_finished_step_short: "Процесс согласования '%{name}' документа '%{filename}' только что завершил один из шагов." text_email_started: "Процесс согласования '%{name}' документа '%{filename}' только что начался и ожидает Вашего - рассмотрения." + рассмотрения '%{stepname}'." text_email_to_proceed: Для продолжения поставьте отметку рядом с документом в text_email_to_see_history: Для просмотра истории согласования нажмите статус согласования документа в diff --git a/config/locales/sl.yml b/config/locales/sl.yml index db7095b6..37be39b5 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -280,13 +280,13 @@ sl: text_email_finished_rejected: "The approval workflow '%{name}' assigned to '%{filename}' document has just been finished and the document has been rejected because of '%{notice}'." text_email_finished_delegated: "The approval workflow '%{name}' assigned to '%{filename}' document has just been - delegated because of '%{notice}' and you are expected to do an approval in the current approval step." + delegated because of '%{notice}' and you are expected to do an approval in the current approval step '%{stepname}'." text_email_finished_step: "The approval workflow '%{name}' assigned to '%{filename}' document has just finished one of the approval steps and you are expected to do an approval in the next approval step." text_email_finished_step_short: "The approval workflow '%{name}' assigned to '%{filename}' document has just finished one of the approval steps." text_email_started: "The approval workflow '%{name}' assigned to '%{filename}' document has just been started and you - are expected to do an approval in the current approval step." + are expected to do an approval in the current approval step '%{stepname}'." text_email_to_proceed: To proceed click on the check box icon next to the document in text_email_to_see_history: To see the approval history click on the workflow status of the document in diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index c3418c4b..1768c7c4 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -279,13 +279,13 @@ zh-TW: text_email_finished_rejected: "The approval workflow '%{name}' assigned to '%{filename}' document has just been finished and the document has been rejected because of '%{notice}'." text_email_finished_delegated: "The approval workflow '%{name}' assigned to '%{filename}' document has just been - delegated because of '%{notice}' and you are expected to do an approval in the current approval step." + delegated because of '%{notice}' and you are expected to do an approval in the current approval step '%{stepname}'." text_email_finished_step: "The approval workflow '%{name}' assigned to '%{filename}' document has just finished one of the approval steps and you are expected to do an approval in the next approval step." text_email_finished_step_short: "The approval workflow '%{name}' assigned to '%{filename}' document has just finished one of the approval steps." text_email_started: "The approval workflow '%{name}' assigned to '%{filename}' document has just been started and you - are expected to do an approval in the current approval step." + are expected to do an approval in the current approval step '%{stepname}'." text_email_to_proceed: To proceed click on the check box icon next to the document in text_email_to_see_history: To see the approval history click on the workflow status of the document in diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 90f87c2d..ca9d35dd 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -280,13 +280,13 @@ zh: text_email_finished_rejected: "The approval workflow '%{name}' assigned to '%{filename}' document has just been finished and the document has been rejected because of '%{notice}'." text_email_finished_delegated: "The approval workflow '%{name}' assigned to '%{filename}' document has just been - delegated because of '%{notice}' and you are expected to do an approval in the current approval step." + delegated because of '%{notice}' and you are expected to do an approval in the current approval step '%{stepname}'." text_email_finished_step: "The approval workflow '%{name}' assigned to '%{filename}' document has just finished one of the approval steps and you are expected to do an approval in the next approval step." text_email_finished_step_short: "The approval workflow '%{name}' assigned to '%{filename}' document has just finished one of the approval steps." text_email_started: "The approval workflow '%{name}' assigned to '%{filename}' document has just been started and you - are expected to do an approval in the current approval step." + are expected to do an approval in the current approval step '%{stepname}'." text_email_to_proceed: To proceed click on the check box icon next to the document in text_email_to_see_history: To see the approval history click on the workflow status of the document in diff --git a/lib/tasks/dmsf_alert_approvals.rake b/lib/tasks/dmsf_alert_approvals.rake index f809b370..b0ec5532 100644 --- a/lib/tasks/dmsf_alert_approvals.rake +++ b/lib/tasks/dmsf_alert_approvals.rake @@ -55,11 +55,14 @@ class DmsfAlertApprovals else DmsfMailer.deliver_workflow_notification( [assignment.user], - workflow, + workflow, revision, :text_email_subject_requires_approval, :text_email_finished_step, - :text_email_to_proceed) + :text_email_to_proceed, + nil, + assignment.dmsf_workflow_step + ) end end end From 4f8fb8509764c9504f44f3888ebe3b8ad8bfe5cf Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Tue, 29 Dec 2020 08:39:23 +0100 Subject: [PATCH 34/67] #1196 If name is not set --- app/models/dmsf_mailer.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/models/dmsf_mailer.rb b/app/models/dmsf_mailer.rb index 4282e197..86a8c205 100644 --- a/app/models/dmsf_mailer.rb +++ b/app/models/dmsf_mailer.rb @@ -108,14 +108,15 @@ class DmsfMailer < Mailer res end - def self.deliver_workflow_notification(users, workflow, revision, subject_id, text1_id, text2_id, notice = nil, step = nil) + def self.deliver_workflow_notification(users, workflow, revision, subject_id, text1_id, text2_id, notice = nil, tep = nil) + step_name = (step && step.name.present?) ? step.name : step.step users.each do |user| workflow_notification(user, workflow, revision, subject_id.to_s, text1_id.to_s, text2_id.to_s, notice, - step&.name).deliver_now + step_name).deliver_now end end - def workflow_notification(user, workflow, revision, subject_id, text1_id, text2_id, notice, stepname) + def workflow_notification(user, workflow, revision, subject_id, text1_id, text2_id, notice, step_name) if user && workflow && revision if revision.dmsf_file && revision.dmsf_file.project @project = revision.dmsf_file.project @@ -126,13 +127,13 @@ class DmsfMailer < Mailer message_id workflow @workflow = workflow @revision = revision - @text1 = l(text1_id, name: workflow.name, filename: revision.dmsf_file.name, notice: notice, stepname: stepname) + @text1 = l(text1_id, name: workflow.name, filename: revision.dmsf_file.name, notice: notice, stepname: step_name) @text2 = l(text2_id) @notice = notice @author = revision.dmsf_workflow_assigned_by_user @author ||= User.anonymous mail to: user.mail, - subject: "[#{@project.name} - #{l(:field_label_dmsf_workflow)}] #{@workflow.name} #{l(subject_id)} #{stepname}" + subject: "[#{@project.name} - #{l(:field_label_dmsf_workflow)}] #{@workflow.name} #{l(subject_id)} #{step_name}" end end From 2485f718ccead97cc7cadda1f49e5cf498d55b08 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Wed, 30 Dec 2020 08:36:30 +0100 Subject: [PATCH 35/67] #1196 keying mistake --- app/models/dmsf_mailer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/dmsf_mailer.rb b/app/models/dmsf_mailer.rb index 86a8c205..203050ca 100644 --- a/app/models/dmsf_mailer.rb +++ b/app/models/dmsf_mailer.rb @@ -108,7 +108,7 @@ class DmsfMailer < Mailer res end - def self.deliver_workflow_notification(users, workflow, revision, subject_id, text1_id, text2_id, notice = nil, tep = nil) + def self.deliver_workflow_notification(users, workflow, revision, subject_id, text1_id, text2_id, notice = nil, step = nil) step_name = (step && step.name.present?) ? step.name : step.step users.each do |user| workflow_notification(user, workflow, revision, subject_id.to_s, text1_id.to_s, text2_id.to_s, notice, From 6dd8817aa5de2e4de99b7d386d8df85c1b16345a Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Mon, 4 Jan 2021 17:22:43 +0100 Subject: [PATCH 36/67] Independent Version column's name --- app/models/dmsf_query.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/dmsf_query.rb b/app/models/dmsf_query.rb index fbd84a34..d9a66f7a 100644 --- a/app/models/dmsf_query.rb +++ b/app/models/dmsf_query.rb @@ -33,7 +33,7 @@ class DmsfQuery < Query DmsfTitleQueryColumn.new(:title, sortable: 'title', frozen: true), QueryColumn.new(:size, sortable: 'size'), DmsfModifiedQueryColumn.new(:modified, sortable: 'updated'), - DmsfVersionQueryColumn.new(:version, sortable: 'major_version, minor_version'), + DmsfVersionQueryColumn.new(:version, sortable: 'major_version, minor_version', caption: :label_dmsf_version), QueryColumn.new(:workflow, sortable: 'workflow'), QueryColumn.new(:author, sortable: 'firstname, lastname') ] From 7e697d26e31e1b0b1113cb57cfc6c691c342211b Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Tue, 5 Jan 2021 08:32:34 +0100 Subject: [PATCH 37/67] #1196 If name is not set --- app/models/dmsf_mailer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/dmsf_mailer.rb b/app/models/dmsf_mailer.rb index 203050ca..d1d6412a 100644 --- a/app/models/dmsf_mailer.rb +++ b/app/models/dmsf_mailer.rb @@ -109,7 +109,7 @@ class DmsfMailer < Mailer end def self.deliver_workflow_notification(users, workflow, revision, subject_id, text1_id, text2_id, notice = nil, step = nil) - step_name = (step && step.name.present?) ? step.name : step.step + step_name = (step && step.name.present?) ? step.name : step&.step users.each do |user| workflow_notification(user, workflow, revision, subject_id.to_s, text1_id.to_s, text2_id.to_s, notice, step_name).deliver_now From f07e58abdb04f1b3eb7cf6a69221c01a6f89636d Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Tue, 5 Jan 2021 12:19:06 +0100 Subject: [PATCH 38/67] #1198 MSSQLworkaround --- app/models/dmsf_query.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/models/dmsf_query.rb b/app/models/dmsf_query.rb index d9a66f7a..0e6167e0 100644 --- a/app/models/dmsf_query.rb +++ b/app/models/dmsf_query.rb @@ -297,7 +297,7 @@ class DmsfQuery < Query 1 AS sort #{cf_columns}}). joins(:dmsf_file_revisions). joins('LEFT JOIN users ON dmsf_file_revisions.user_id = users.id '). - where('dmsf_file_revisions.id = (SELECT r.id FROM dmsf_file_revisions r WHERE r.created_at = (SELECT MAX(created_at) FROM dmsf_file_revisions rr WHERE rr.dmsf_file_id = dmsf_files.id) AND r.dmsf_file_id = dmsf_files.id ORDER BY id DESC LIMIT 1)') + where(sub_query) if dmsf_folder_id scope.where dmsf_files: { dmsf_folder_id: dmsf_folder_id, deleted: deleted } else @@ -338,7 +338,7 @@ class DmsfQuery < Query joins('JOIN dmsf_files ON dmsf_files.id = dmsf_links.target_id'). joins('JOIN dmsf_file_revisions ON dmsf_file_revisions.dmsf_file_id = dmsf_files.id'). joins('LEFT JOIN users ON dmsf_file_revisions.user_id = users.id '). - where('dmsf_file_revisions.id = (SELECT r.id FROM dmsf_file_revisions r WHERE r.created_at = (SELECT MAX(created_at) FROM dmsf_file_revisions rr WHERE rr.dmsf_file_id = dmsf_files.id) AND r.dmsf_file_id = dmsf_files.id ORDER BY id DESC LIMIT 1)') + where(sub_query) if dmsf_folder_id scope.where dmsf_links: { target_type: 'DmsfFile', dmsf_folder_id: dmsf_folder_id, deleted: deleted } else @@ -387,7 +387,15 @@ class DmsfQuery < Query scope.where dmsf_links: { target_type: 'DmsfUrl', project_id: project.id, dmsf_folder_id: nil, deleted: deleted } end end + end + def sub_query + case ActiveRecord::Base.connection.adapter_name.downcase + when 'sqlserver' + 'dmsf_file_revisions.id = (SELECT TOP 1 r.id FROM dmsf_file_revisions r WHERE r.created_at = (SELECT MAX(created_at) FROM dmsf_file_revisions rr WHERE rr.dmsf_file_id = dmsf_files.id) AND r.dmsf_file_id = dmsf_files.id ORDER BY id DESC)' + else + 'dmsf_file_revisions.id = (SELECT r.id FROM dmsf_file_revisions r WHERE r.created_at = (SELECT MAX(created_at) FROM dmsf_file_revisions rr WHERE rr.dmsf_file_id = dmsf_files.id) AND r.dmsf_file_id = dmsf_files.id ORDER BY id DESC LIMIT 1)' + end end end From 07857b5ecb2831b1c78dfdfeba29ade0936d2db3 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Wed, 6 Jan 2021 17:55:36 +0100 Subject: [PATCH 39/67] #1199 Breakdown structure of folders --- app/helpers/dmsf_queries_helper.rb | 49 +++++++++++++++++-------- test/functional/dmsf_controller_test.rb | 19 ++++++++++ 2 files changed, 52 insertions(+), 16 deletions(-) diff --git a/app/helpers/dmsf_queries_helper.rb b/app/helpers/dmsf_queries_helper.rb index e4bf778f..767d65e2 100644 --- a/app/helpers/dmsf_queries_helper.rb +++ b/app/helpers/dmsf_queries_helper.rb @@ -50,20 +50,20 @@ module DmsfQueriesHelper when :id case item.type when 'file', 'file-link' - if item.deleted && (item.deleted > 0) + if item&.deleted > 0 super column, item, value else link_to h(value), dmsf_file_path(id: item.id) end when 'folder', 'folder-link' if item.id - if item.deleted && (item.deleted > 0) + if item&.deleted > 0 super column, item, value else link_to h(value), edit_dmsf_path(id: item.project_id, folder_id: item.id) end else - if item.deleted && (item.deleted > 0) + if item&.deleted > 0 super column, item, item.project_id else link_to h(item.project_id), edit_root_dmsf_path(id: item.project_id) @@ -90,42 +90,50 @@ module DmsfQueriesHelper end case item.type when 'folder' - if item.deleted && (item.deleted > 0) + if item&.deleted > 0 tag = content_tag('span', value, class: 'icon icon-folder') else - tag = "".html_safe + - link_to(h(value), dmsf_folder_path(id: item.project, folder_id: item.id), class: 'icon icon-folder') + tag = link_to(h(value), dmsf_folder_path(id: item.project, folder_id: item.id), class: 'icon icon-folder') + unless filter_any? + tag = "".html_safe + tag + end end tag + content_tag('div', item.filename, class: 'dmsf-filename', title: l(:title_filename_for_download)) when 'folder-link' - if item.deleted && (item.deleted > 0) + if item&.deleted > 0 tag = content_tag('span', value, class: 'icon icon-folder') else - tag = "".html_safe + # For links we use revision_id containing dmsf_folder.id in fact - link_to(h(value), dmsf_folder_path(id: item.project, folder_id: item.revision_id), class: 'icon icon-folder') + tag = link_to(h(value), dmsf_folder_path(id: item.project, folder_id: item.revision_id), class: 'icon icon-folder') + unless filter_any? + tag = "".html_safe + tag + end end tag + content_tag('div', item.filename, class: 'dmsf-filename', title: l(:label_target_folder)) when 'file', 'file-link' - if item.deleted && (item.deleted > 0) + if item&.deleted > 0 tag = content_tag('span', value, class: "icon icon-file #{DmsfHelper.filetype_css(item.filename)}") else # For links we use revision_id containing dmsf_file.id in fact file_view_url = url_for({ controller: :dmsf_files, action: 'view', id: (item.type == 'file') ? item.id : item.revision_id }) content_type = Redmine::MimeType.of(value) content_type = 'application/octet-stream' if content_type.blank? - tag = "".html_safe + - link_to(h(value), file_view_url, target: '_blank', + tag = link_to(h(value), file_view_url, target: '_blank', class: "icon icon-file #{DmsfHelper.filetype_css(item.filename)}", 'data-downloadurl': "#{content_type}:#{h(value)}:#{file_view_url}") + unless filter_any? + tag = "".html_safe + tag + end end tag + content_tag('div', item.filename, class: 'dmsf-filename', title: l(:title_filename_for_download)) when 'url-link' - if item.deleted && (item.deleted > 0) + if item&.deleted > 0 tag = content_tag('span', value, class: 'icon icon-link') else - tag = "".html_safe + - link_to(h(value), item.filename, target: '_blank', class: 'icon icon-link') + tag = link_to(h(value), item.filename, target: '_blank', class: 'icon icon-link') + unless filter_any? + tag = "".html_safe + tag + end end tag + content_tag('div', item.filename, class: 'dmsf-filename', title: l(:field_url)) else @@ -135,7 +143,7 @@ module DmsfQueriesHelper number_to_human_size value when :workflow if value - if item.workflow_id && (!(item.deleted && (item.deleted > 0))) + if item.workflow_id && (!(item&.deleted > 0)) if item.type == 'file' url = log_dmsf_workflow_path(project_id: item.project_id, id: item.workflow_id, dmsf_file_id: item.id) else @@ -173,4 +181,13 @@ module DmsfQueriesHelper end end + def filter_any? + if params[:v] + params[:v].each do |filter| + return true if (filter.size > 1) && filter[1].all?{ |v| v.present? } + end + end + false + end + end diff --git a/test/functional/dmsf_controller_test.rb b/test/functional/dmsf_controller_test.rb index 536375e4..9e4fae49 100644 --- a/test/functional/dmsf_controller_test.rb +++ b/test/functional/dmsf_controller_test.rb @@ -180,6 +180,25 @@ class DmsfControllerTest < RedmineDmsf::Test::TestCase assert_select 'table.dmsf' # CSV export assert_select 'a.csv' + # 'Zero Size File' document and an expander is present + assert_select 'a', text: @file10.title + assert_select 'span.dmsf_expander' + end + + def test_show_filters_found + get :show, params: { id: @project1.id, f: ['title'], op: { 'title' => '~' }, v: { 'title' => ['Zero'] } } + assert_response :success + # 'Zero Size File' document + assert_select 'a', text: @file10.title + # No expander if a filter is set + assert_select 'span.dmsf_expander', count: 0 + end + + def test_show_filters_not_found + get :show, params: { id: @project1.id, f: ['title'], op: { 'title' => '~' }, v: { 'title' => ['xxx'] } } + assert_response :success + # 'Zero Size File' document + assert_select 'a', text: @file10.title, count: 0 end def test_show_without_file_manipulation From d3e758a091242e130faaf53a8a15bcd700b3ddcf Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Thu, 7 Jan 2021 12:50:49 +0100 Subject: [PATCH 40/67] #1199 Breakdown structure of folders --- app/helpers/dmsf_queries_helper.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/helpers/dmsf_queries_helper.rb b/app/helpers/dmsf_queries_helper.rb index 767d65e2..9b1240e4 100644 --- a/app/helpers/dmsf_queries_helper.rb +++ b/app/helpers/dmsf_queries_helper.rb @@ -84,10 +84,6 @@ module DmsfQueriesHelper super column, item, value end when :title - if defined?(EasyExtensions) - # In case of font icons there is no space - value = ' '.html_safe + value - end case item.type when 'folder' if item&.deleted > 0 From 94e41f16ad815e64da54d26fa67798859abcabc8 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Thu, 7 Jan 2021 14:44:56 +0100 Subject: [PATCH 41/67] #1133 Cyberduck WebDAV client --- lib/redmine_dmsf/webdav/custom_middleware.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/redmine_dmsf/webdav/custom_middleware.rb b/lib/redmine_dmsf/webdav/custom_middleware.rb index 9ad816ef..f47b131d 100644 --- a/lib/redmine_dmsf/webdav/custom_middleware.rb +++ b/lib/redmine_dmsf/webdav/custom_middleware.rb @@ -38,7 +38,8 @@ module RedmineDmsf allow_unauthenticated_options_on_root: true, namespaces: { 'http://apache.org/dav/props/' => 'd', - 'http://ucb.openoffice.org/dav/props/' => 'd' + 'http://ucb.openoffice.org/dav/props/' => 'd', + 'SAR:' => 'd' } ) end From e823478494e77e468a397b9a8a3d79e4edeff794 Mon Sep 17 00:00:00 2001 From: Liane Hampe Date: Thu, 7 Jan 2021 17:34:13 +0100 Subject: [PATCH 42/67] Improve german translations --- config/locales/de.yml | 60 +++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/config/locales/de.yml b/config/locales/de.yml index 71976732..257cb3f4 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -23,8 +23,8 @@ de: dmsf: DMS # Custom fields tab title label_dmsf_file_plural: DMS Dokumente # Email subject & Search options - label_dmsf_file_revision_plural: Dokumenteversion - label_dmsf_file_revision_access_plural: Dokumentezugriffe + label_dmsf_file_revision_plural: Dokumentenversion + label_dmsf_file_revision_access_plural: Dokumentenzugriffe warning_no_entries_selected: Keine Einträge ausgewählt error_email_to_must_be_entered: Es muss ein Email-Empfänger angegeben werden. warning_file_already_locked: Datei schon gesperrt @@ -40,18 +40,18 @@ de: error_folder_creation_failed: Ordnererstellung fehlgeschlagen error_folder_title_must_be_entered: Es muss ein Titel angegeben werden notice_folder_deleted: Ordner gelöscht - error_folder_title_is_already_used: Titel wird schon benutzt. Denk dir was Neues aus. + error_folder_title_is_already_used: Titel wird schon benutzt. Denken Sie sich was Neues aus. notice_folder_details_were_saved: Ordnerdetails wurden gespeichert error_folder_is_locked: Ordner ist gesperrt error_file_is_locked: Datei ist gesperrt notice_file_deleted: Datei gelöscht error_at_least_one_revision_must_be_present: Es muss mindestens eine Version existieren notice_revision_deleted: Version gelöscht - notice_revision_obsoleted: Revision obsoleted + notice_revision_obsoleted: Revision veralted warning_one_of_files_locked: Eine der Dateien ist gesperrt notice_file_revision_created: Dateiversion erstellt - notice_your_preferences_were_saved: Deine Einstellungen wurden gespeichert - notice_your_preferences_were_not_saved: Deine Einstellungen wurden nicht gespeichert + notice_your_preferences_were_saved: Ihre Einstellungen wurden gespeichert + notice_your_preferences_were_not_saved: Ihre Einstellungen wurden nicht gespeichert warning_folder_notifications_already_activated: Ordnerbenachrichtigungen sind schon aktiviert notice_folder_notifications_activated: Ordnerbenachrichtigungen aktiviert @@ -112,7 +112,7 @@ de: heading_revisions: Versionen title_download: Herunterladen title_delete_revision: Version löschen - title_obsolete_revision: Obsolete revision + title_obsolete_revision: Veraltete Revision label_created: Erstellt label_changed: Geändert info_changed_by_user: "%{changed} von" @@ -161,9 +161,9 @@ de: permission_email_documents: Mailversand von Dokumenten label_file: Datei field_folder: Ordner - error_file_commit_require_uploaded_file: Der Commit erfordet eine hochladene Datei + error_file_commit_require_uploaded_file: Die Übertragung erfordet eine hochladene Datei - warning_some_files_were_not_commited: "Einige Dateien wurden wegen Validierungsfehlern nicht commitet: %{files}" + warning_some_files_were_not_commited: "Einige Dateien wurden wegen Validierungsfehlern nicht übertragen: %{files}" error_user_has_not_right_delete_folder: Der Nutzer hat kein Recht den Ordner zu löschen. @@ -183,7 +183,7 @@ de: warning_xapian_not_available: Xapian steht nicht zur Verfügung menu_dmsf: DMS # Project tab title label_physical_file_delete: Datei physisch löschen - user_is_not_project_member: Du bist kein Projektmitglied + user_is_not_project_member: Sie sind kein Projektmitglied heading_access_downloads_emails: Downloads oder Emailversand heading_access_first: Erste heading_access_last: Letzte @@ -245,9 +245,9 @@ de: label_dmsf_wokflow_action_approve: Genehmigen label_dmsf_wokflow_action_reject: Ablehnen label_dmsf_wokflow_action_delegate: Deligieren an - label_dmsf_wokflow_action_assign: Weise einen Genehmigungs-Workflow zu + label_dmsf_wokflow_action_assign: Weisen Sie einen Genehmigungs-Workflow zu label_dmsf_wokflow_action_start: Starte Genehmigungs-Workflow - label_dmsf_workflow_add_approver: "Füge einen neuen Genehmiger mit einer logischen Funktion hinzu:" + label_dmsf_workflow_add_approver: "Fügen Sie einen neuen Genehmiger mit einer logischen Funktion hinzu:" label_or: oder label_action: Aktion label_note: Notiz @@ -265,7 +265,7 @@ de: dmsf_or: ODER dmsf_new_step: Neuer Schritt dmsf_new_step_or_approver: Neuer Schritt oder Neuer Genehmiger - message_dmsf_wokflow_note: Deine Notiz... + message_dmsf_wokflow_note: Ihre Notiz... info_revision: "r%{rev}" link_workflow: Workflow notice_workflow_started: Genehmigungs-Workflow gestartet @@ -280,17 +280,17 @@ de: text_email_finished_rejected: "Der Genehmigungs-Workflow '%{name}' zugewiesen an die Datei '%{filename}' ist abgeschlossen, aber die Datei wurde abgelehnt, weil: '%{notice}'." text_email_finished_delegated: "Der Genehmigungs-Workflow '%{name}' zugewiesen an die Datei '%{filename}' wurde an - dich deligiert, weil: '%{notice}' und weil deine Zustimmung im aktuellen Genehmigungsschritt benötigt wird." - text_email_finished_step: "Der Genehmigungs-Workflow '%{name}' zugewiesen an die Datei '%{filename}' hat grade einen - Zustimmungsschritt abgeschlossen und im nächsten Genehmigungsschritt wird deine Zustimmung benötigt." - text_email_finished_step_short: "Der Genehmigungs-Workflow '%{name}' zugewiesen an die Datei '%{filename}' hat grade + Sie deligiert, weil: '%{notice}' und weil Ihre Zustimmung im aktuellen Genehmigungsschritt benötigt wird." + text_email_finished_step: "Der Genehmigungs-Workflow '%{name}' zugewiesen an die Datei '%{filename}' hat gerade einen + Zustimmungsschritt abgeschlossen und im nächsten Genehmigungsschritt wird Ihre Zustimmung benötigt." + text_email_finished_step_short: "Der Genehmigungs-Workflow '%{name}' zugewiesen an die Datei '%{filename}' hat gerade einen Genehmigungsschritt abgeschlossen." text_email_started: "Der Genehmigungs-Workflow '%{name}' zugewiesen an '%{filename}' wurde gestartet und im aktuellen - Genehmigungsschritt wird deine Zustimmung benötigt." - text_email_to_proceed: Um fortzufahren klicke auf das Häckchen neben der Datei in - text_email_to_see_history: Um den Verlauf des Genehmigungs-Workflows zu sehen klicke auf den Workflowstatus zur Datei + Genehmigungsschritt wird Ihre Zustimmung benötigt." + text_email_to_proceed: Um fortzufahren klicken Sie auf das Häckchen neben der Datei in + text_email_to_see_history: Um den Verlauf des Genehmigungs-Workflows zu sehen klicken Sie auf den Workflowstatus zur Datei in - text_email_to_see_status: Um den aktuellen Status des Genehmigungs-Workflows zu sehen klicke auf den Workflowstatus + text_email_to_see_status: Um den aktuellen Status des Genehmigungs-Workflows zu sehen klicken Sie auf den Workflowstatus zur Datei in title_create_link: Verknüpfung anlegen @@ -368,8 +368,8 @@ de: label_last_approver: Letzter Genehmiger approver - label_act_as_attachable: Act as attachable - note_dmsf_act_as_attachable: Allows to attach documents to objects e.g. issues. + label_act_as_attachable: Dokumente als Anhang + note_dmsf_act_as_attachable: Erlaubt Dokumente als Anhang bei Objekten wie bspw. Tickets label_user_search_add: Benutzer suchen @@ -384,11 +384,11 @@ de: text_email_from_override: Der angemeldete Benutzer label_email_reply_to: Antwort an - label_enable_cjk_ngrams: Enable generation of n-grams from CJK text - text_enable_cjk_ngrams: "With this enabled, spans of CJK characters are split into unigrams and bigrams, with the - unigrams carrying positional information. Non-CJK characters are split into words as normal. The corresponding - option needs to have been used at index time. - e.g: XAPIAN_CJK_NGRAM=true ruby plugins/redmine_dmsf/extra/xapian_indexer.rb -fv" + label_enable_cjk_ngrams: Aktiviere die Erstellung von n-grams aus Koreanischen Texten + text_enable_cjk_ngrams: "With this enabled, Koreanische Zeichenfolgen werden in Monograms and Bigrams zerlegt. + Unigrams enthalten Informationen zur Position. Nicht-Koreanische Zeichenfolgen werden in Wörter zerlegt. Die entsprechende + Option muss beim Indexieren verwendet werden. + Z.B: XAPIAN_CJK_NGRAM=true ruby plugins/redmine_dmsf/extra/xapian_indexer.rb -fv" label_dmsf_fast_links: Schnelle Verknüpfung text_dmsf_fast_links_info: Ermöglicht durch Eingabe der Ordner-ID auf einfache Art und Weise eine Verknüpfung auf den Zielordner zu erstellen. @@ -407,8 +407,8 @@ de: label_add_width: Zugeben mit - dmsf_webdav_ignore_1b_file_for_authentication: Ignoriern 1b Datai geschickt wegen der Autorization - dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin + dmsf_webdav_ignore_1b_file_for_authentication: Ignoriere 1b Dateien,die zur Authentifizierung gesendet werden + dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV Plugin easy_pages: modules: From 0a514fb3a38ed294bf6f3c9971f5d3521fbfe041 Mon Sep 17 00:00:00 2001 From: Liane Hampe Date: Fri, 8 Jan 2021 09:41:26 +0100 Subject: [PATCH 43/67] Improves further german translations Fix typos, wording and grammar. --- config/locales/de.yml | 68 +++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/config/locales/de.yml b/config/locales/de.yml index 257cb3f4..a8d34df9 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -22,11 +22,11 @@ de: dmsf: DMS # Custom fields tab title - label_dmsf_file_plural: DMS Dokumente # Email subject & Search options + label_dmsf_file_plural: DMS Dokumente # E-Mail subject & Search options label_dmsf_file_revision_plural: Dokumentenversion label_dmsf_file_revision_access_plural: Dokumentenzugriffe warning_no_entries_selected: Keine Einträge ausgewählt - error_email_to_must_be_entered: Es muss ein Email-Empfänger angegeben werden. + error_email_to_must_be_entered: Es muss ein E-Mail-Empfänger angegeben werden. warning_file_already_locked: Datei schon gesperrt notice_file_locked: Datei gesperrt warning_file_not_locked: Datei nicht gesperrt @@ -40,7 +40,7 @@ de: error_folder_creation_failed: Ordnererstellung fehlgeschlagen error_folder_title_must_be_entered: Es muss ein Titel angegeben werden notice_folder_deleted: Ordner gelöscht - error_folder_title_is_already_used: Titel wird schon benutzt. Denken Sie sich was Neues aus. + error_folder_title_is_already_used: Titel wird schon benutzt. Denken Sie sich etwas Neues aus. notice_folder_details_were_saved: Ordnerdetails wurden gespeichert error_folder_is_locked: Ordner ist gesperrt error_file_is_locked: Datei ist gesperrt @@ -72,7 +72,7 @@ de: link_modified: Geändert link_ver: Version link_author: Autor - title_check_for_zip_download_or_email: Wähle für ZIP-Download bzw. Email + title_check_for_zip_download_or_email: Wähle für ZIP-Download bzw. E-Mail title_check_for_restore_or_delete: Wähle für Rückstellen oder Löschen title_notifications_active_deactivate: "Benachrichtigungen sind aktiv: Ausschalten" @@ -81,12 +81,12 @@ de: title_locked_by_user: "Gesperrt von %{user}" title_waiting_for_approval: Warte auf Zustimmung title_approved: Zugestimmt - title_unlock_file: Hebe Sperre auf um Änderungen anderer Nutzer zu ermöglichen - title_lock_file: Sperre um Änderungen anderer Nutzer zu verhindern + title_unlock_file: Hebe Sperre auf, um Änderungen anderer Nutzer zu ermöglichen + title_lock_file: Sperre, um Änderungen anderer Nutzer zu verhindern title_download_checked: Download der ausgewählten Dateien in einem ZIP-Archiv - title_send_checked_by_email: Sende gewählte Dateien per Email + title_send_checked_by_email: Sende gewählte Dateien per E-Mail link_user_preferences: DMS Einstellungen - heading_send_documents_by_email: Sende Dateien per Email + heading_send_documents_by_email: Sende Dateien per E-Mail label_email_from: Von label_email_to: An label_email_cc: CC @@ -120,15 +120,15 @@ de: label_mime: Mime label_size: Größe heading_new_revision: Neue Version - option_version_same: gleiche Version + option_version_same: Gleiche Version option_version_minor: Unterversion option_version_major: Hauptversion label_new_content: Neuer Inhalt - note_maximum_number_of_files_uploaded: Beschränkt die maximale Anzahl der Dateien, die auf einmal hochgeladen werden + note_maximum_number_of_files_uploaded: Beschränkt die maximale Anzahl der Dateien, die auf einmal hochgeladen werden können. 0 bedeutet unbeschränkt. label_maximum_files_download: Maximal zulässige Anzahl der Dateien, die heruntergeladen werden können. note_maximum_number_of_files_downloaded: Beschränkt die maximale Anzahl, der Dateien, die auf einmal heruntergeladen - werden können. (per ZIP oder Mail). 0 bedeutet unbeschränkt. + werden können. (per ZIP oder E-Mail). 0 bedeutet unbeschränkt. label_file_storage_directory: Verzeichnis für die Dateiablage label_index_database: Index Datenbank label_stemming_language: Stemming-Sprache @@ -143,7 +143,7 @@ de: mit Ausnahme von Begriffen die mit Grossbuchstaben starten oder die bestimmte Zeichen enthalten ('/@<>=*[{\"'), oder bei welchen mathematische Operatoren vorkommen. Begriffe in der Stammformreduktion weisen ein führendes 'Z' auf, 'ALLES' - Suche nach allen Stammformreduktionen von sämtlichen Begriffen (Hinweis: es ist kein führendes 'Z' vorhanden)." - label_default_notifications: Standardmäßge Dateibenachrichtigungen + label_default_notifications: Standardmäßige Dateibenachrichtigungen heading_uploaded_files: Hochgeladene Dateien link_documents: Dateien permission_view_dmsf_file_revision_accesses: Dokumentzugriffe in Aktivitäten anzeigen @@ -158,10 +158,10 @@ de: permission_file_delete: Datei löschen permission_display_system_folders: Systemordner anzeigen permission_file_approval: Dateien freigeben - permission_email_documents: Mailversand von Dokumenten + permission_email_documents: E-Mailversand von Dokumenten label_file: Datei field_folder: Ordner - error_file_commit_require_uploaded_file: Die Übertragung erfordet eine hochladene Datei + error_file_commit_require_uploaded_file: Die Übertragung erfordet eine hochgeladene Datei warning_some_files_were_not_commited: "Einige Dateien wurden wegen Validierungsfehlern nicht übertragen: %{files}" @@ -170,7 +170,7 @@ de: error_user_has_not_right_delete_file: Der Nutzer hat kein Recht die Datei zu löschen. notice_entries_deleted: Einträge löschen - warning_some_entries_were_not_deleted: "Enige Einträge wurden nicht gelöscht: %{entries}" + warning_some_entries_were_not_deleted: "Einige Einträge wurden nicht gelöscht: %{entries}" title_delete_checked: Löschen ausgewählt title_items: Objekte title_filename_for_download: Dateiname beim Herunterladen oder in ZIP-Archiv verwenden @@ -184,7 +184,7 @@ de: menu_dmsf: DMS # Project tab title label_physical_file_delete: Datei physisch löschen user_is_not_project_member: Sie sind kein Projektmitglied - heading_access_downloads_emails: Downloads oder Emailversand + heading_access_downloads_emails: Downloads oder E-Mailversand heading_access_first: Erste heading_access_last: Letzte label_dmsf_updated: aktualisiert @@ -198,12 +198,12 @@ de: title_copy_or_move: Kopieren/Verschieben label_dmsf_folder_plural: DMS Ordner # Search options comment_moved_from: "Verschoben aus %{source}" - error_target_folder_same: Zielordner und Projekt sind dieselbe wie die aktuellen. + error_target_folder_same: Zielordner und Projekt sind unverändert. title_copy: Kopieren error_max_email_filesize_exceeded: "Maximale Dateigröße der Anlage wurde überschritten. (%{number} MB)" - note_maximum_email_filesize: Maximale Dateigröße der Anhänge, die per E-mail verschickt werden können. 0 bedeutet + note_maximum_email_filesize: Maximale Dateigröße der Anhänge, die per E-Mail verschickt werden können. 0 bedeutet keinen Limit. Angabe in MB. label_maximum_email_filesize: Maximale Dateigröße der Anhänge header_minimum_filesize: Dateifehler wegen minimaler Dateigröße. @@ -230,7 +230,7 @@ de: oder Lesen-und-Schreiben. error_unable_delete_dmsf_workflow: Konnte den Workflow nicht löschen - error_empty_note: Die Notiz darf nicht leer sein. + error_empty_note: Die Notiz darf nicht leer sein error_workflow_assign: Es trat ein Fehler beim Zuweisen des Workflows auf error_cannot_start_workflow: Workflow kann nicht gestartet werden error_cannot_renumber_steps: Schritte können nicht umsortiert werden @@ -260,7 +260,7 @@ de: title_assigned: Zugewiesen title_approval: Genehmigt title_rejected: Abgelehnt - title_obsolete: Obsolet + title_obsolete: Veraltet dmsf_and: UND dmsf_or: ODER dmsf_new_step: Neuer Schritt @@ -272,7 +272,7 @@ de: text_email_subject_approved: genehmigt text_email_subject_rejected: abgelehnt text_email_subject_delegated: deligiert - text_email_subject_requires_approval: benötigt deine Genehmigung + text_email_subject_requires_approval: benötigt Ihre Genehmigung text_email_subject_updated: bearbeitet text_email_subject_started: gestartet text_email_finished_approved: "Der Genehmigungs-Workflow '%{name}' zugewiesen an die Datei '%{filename}' ist @@ -319,7 +319,7 @@ de: label_display_notified_recipients: Zeige benachrichtigte Empfänger note_display_notified_recipients: Der Benutzer wird darüber informiert, wer die Empfänger der E-mail-Benachrichtigungen sind. - warning_email_notifications: "Emailbenachrichtigung wurde gesendet an %{to}" + warning_email_notifications: "E-Mailbenachrichtigung wurde gesendet an %{to}" link_trash_bin: Papierkorb title_restore: Wiederherstellen @@ -340,16 +340,16 @@ de: locked_documents: Gesperrte Dateien open_approvals: Offene Genehmigungs-Workflows - error_maximum_upload_filecount: "Nicht mehr als %{filecount} Datai(en) kann man hochladen." + error_maximum_upload_filecount: "Es können nicht mehr als %{filecount} Datei(en) hochgeladen werden." - label_public_urls: Öffentliches URLs gültig bis + label_public_urls: Öffentliche URLs gültig bis label_webdav: WebDAV label_full_text: Volltext-Suche link_extension: Ext label_webdav_ignore: Zu ignorierende Dateien - note_webdav_ignore: Regulärer Ausdruck (regular expresion) mit Dateiname, die bei PUT-Requests ignoriert wird. + note_webdav_ignore: Regulärer Ausdruck (regular expression) mit Dateinamen, die bei PUT-Requests ignoriert werden. label_document_url: Url label_last_revision_id: Version @@ -361,12 +361,12 @@ de: label_dmsf_keep_documents_locked: Dokumente gesperrt halten note_dmsf_keep_documents_locked: Dokumente werden nach der Genehmigung gesperrt gelassen note_global: (global) - field_dmsf_not_inheritable: Nicht vererbar + field_dmsf_not_inheritable: Nicht vererbbar - label_webdav_use_project_names: Projekt-Name für den Projektordner verwenden - note_webdav_use_project_names: Anstelle der Projekt-Kennung wird der Projekt-Name als Projektordner im Dateisystem verwendet. + label_webdav_use_project_names: Projektname für den Projektordner verwenden + note_webdav_use_project_names: Anstelle der Projektkennung wird der Projektname als Projektordner im Dateisystem verwendet. - label_last_approver: Letzter Genehmiger approver + label_last_approver: Letzter Genehmiger label_act_as_attachable: Dokumente als Anhang note_dmsf_act_as_attachable: Erlaubt Dokumente als Anhang bei Objekten wie bspw. Tickets @@ -385,10 +385,10 @@ de: label_email_reply_to: Antwort an label_enable_cjk_ngrams: Aktiviere die Erstellung von n-grams aus Koreanischen Texten - text_enable_cjk_ngrams: "With this enabled, Koreanische Zeichenfolgen werden in Monograms and Bigrams zerlegt. - Unigrams enthalten Informationen zur Position. Nicht-Koreanische Zeichenfolgen werden in Wörter zerlegt. Die entsprechende - Option muss beim Indexieren verwendet werden. - Z.B: XAPIAN_CJK_NGRAM=true ruby plugins/redmine_dmsf/extra/xapian_indexer.rb -fv" + text_enable_cjk_ngrams: "Mit dieser Aktivierung werden Koreanische Zeichenfolgen in Monograms and Bigrams zerlegt. + Monograms enthalten Informationen zur Position. Nicht-Koreanische Zeichenfolgen werden in Wörter zerlegt. Die entsprechende + Option muss beim Indexieren verwendet werden, + z.B. XAPIAN_CJK_NGRAM=true ruby plugins/redmine_dmsf/extra/xapian_indexer.rb -fv" label_dmsf_fast_links: Schnelle Verknüpfung text_dmsf_fast_links_info: Ermöglicht durch Eingabe der Ordner-ID auf einfache Art und Weise eine Verknüpfung auf den Zielordner zu erstellen. @@ -407,7 +407,7 @@ de: label_add_width: Zugeben mit - dmsf_webdav_ignore_1b_file_for_authentication: Ignoriere 1b Dateien,die zur Authentifizierung gesendet werden + dmsf_webdav_ignore_1b_file_for_authentication: Ignoriere 1b Dateien, die zur Authentifizierung gesendet werden dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV Plugin easy_pages: From 3e31d924900e27ed7d1dafa5dc9da55470e5ff74 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Fri, 8 Jan 2021 10:24:06 +0100 Subject: [PATCH 44/67] #1200 Conflict resolving --- config/locales/de.yml | 114 +++++++++++++++++++++--------------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/config/locales/de.yml b/config/locales/de.yml index 1d38949f..976a0dce 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -22,11 +22,11 @@ de: dmsf: DMS # Custom fields tab title - label_dmsf_file_plural: DMS Dokumente # Email subject & Search options - label_dmsf_file_revision_plural: Dokumenteversion - label_dmsf_file_revision_access_plural: Dokumentezugriffe + label_dmsf_file_plural: DMS Dokumente # E-Mail subject & Search options + label_dmsf_file_revision_plural: Dokumentenversion + label_dmsf_file_revision_access_plural: Dokumentenzugriffe warning_no_entries_selected: Keine Einträge ausgewählt - error_email_to_must_be_entered: Es muss ein Email-Empfänger angegeben werden. + error_email_to_must_be_entered: Es muss ein E-Mail-Empfänger angegeben werden. warning_file_already_locked: Datei schon gesperrt notice_file_locked: Datei gesperrt warning_file_not_locked: Datei nicht gesperrt @@ -40,18 +40,18 @@ de: error_folder_creation_failed: Ordnererstellung fehlgeschlagen error_folder_title_must_be_entered: Es muss ein Titel angegeben werden notice_folder_deleted: Ordner gelöscht - error_folder_title_is_already_used: Titel wird schon benutzt. Denk dir was Neues aus. + error_folder_title_is_already_used: Titel wird schon benutzt. Denken Sie sich etwas Neues aus. notice_folder_details_were_saved: Ordnerdetails wurden gespeichert error_folder_is_locked: Ordner ist gesperrt error_file_is_locked: Datei ist gesperrt notice_file_deleted: Datei gelöscht error_at_least_one_revision_must_be_present: Es muss mindestens eine Version existieren notice_revision_deleted: Version gelöscht - notice_revision_obsoleted: Revision obsoleted + notice_revision_obsoleted: Revision veralted warning_one_of_files_locked: Eine der Dateien ist gesperrt notice_file_revision_created: Dateiversion erstellt - notice_your_preferences_were_saved: Deine Einstellungen wurden gespeichert - notice_your_preferences_were_not_saved: Deine Einstellungen wurden nicht gespeichert + notice_your_preferences_were_saved: Ihre Einstellungen wurden gespeichert + notice_your_preferences_were_not_saved: Ihre Einstellungen wurden nicht gespeichert warning_folder_notifications_already_activated: Ordnerbenachrichtigungen sind schon aktiviert notice_folder_notifications_activated: Ordnerbenachrichtigungen aktiviert @@ -72,7 +72,7 @@ de: link_modified: Geändert link_ver: Version link_author: Autor - title_check_for_zip_download_or_email: Wähle für ZIP-Download bzw. Email + title_check_for_zip_download_or_email: Wähle für ZIP-Download bzw. E-Mail title_check_for_restore_or_delete: Wähle für Rückstellen oder Löschen title_notifications_active_deactivate: "Benachrichtigungen sind aktiv: Ausschalten" @@ -81,12 +81,12 @@ de: title_locked_by_user: "Gesperrt von %{user}" title_waiting_for_approval: Warte auf Zustimmung title_approved: Zugestimmt - title_unlock_file: Hebe Sperre auf um Änderungen anderer Nutzer zu ermöglichen - title_lock_file: Sperre um Änderungen anderer Nutzer zu verhindern + title_unlock_file: Hebe Sperre auf, um Änderungen anderer Nutzer zu ermöglichen + title_lock_file: Sperre, um Änderungen anderer Nutzer zu verhindern title_download_checked: Download der ausgewählten Dateien in einem ZIP-Archiv - title_send_checked_by_email: Sende gewählte Dateien per Email + title_send_checked_by_email: Sende gewählte Dateien per E-Mail link_user_preferences: DMS Einstellungen - heading_send_documents_by_email: Sende Dateien per Email + heading_send_documents_by_email: Sende Dateien per E-Mail label_email_from: Von label_email_to: An label_email_cc: CC @@ -112,7 +112,7 @@ de: heading_revisions: Versionen title_download: Herunterladen title_delete_revision: Version löschen - title_obsolete_revision: Obsolete revision + title_obsolete_revision: Veraltete Revision label_created: Erstellt label_changed: Geändert info_changed_by_user: "%{changed} von" @@ -120,15 +120,15 @@ de: label_mime: Mime label_size: Größe heading_new_revision: Neue Version - option_version_same: gleiche Version + option_version_same: Gleiche Version option_version_minor: Unterversion option_version_major: Hauptversion label_new_content: Neuer Inhalt - note_maximum_number_of_files_uploaded: Beschränkt die maximale Anzahl der Dateien, die auf einmal hochgeladen werden + note_maximum_number_of_files_uploaded: Beschränkt die maximale Anzahl der Dateien, die auf einmal hochgeladen werden können. 0 bedeutet unbeschränkt. label_maximum_files_download: Maximal zulässige Anzahl der Dateien, die heruntergeladen werden können. note_maximum_number_of_files_downloaded: Beschränkt die maximale Anzahl, der Dateien, die auf einmal heruntergeladen - werden können. (per ZIP oder Mail). 0 bedeutet unbeschränkt. + werden können. (per ZIP oder E-Mail). 0 bedeutet unbeschränkt. label_file_storage_directory: Verzeichnis für die Dateiablage label_index_database: Index Datenbank label_stemming_language: Stemming-Sprache @@ -143,7 +143,7 @@ de: mit Ausnahme von Begriffen die mit Grossbuchstaben starten oder die bestimmte Zeichen enthalten ('/@<>=*[{\"'), oder bei welchen mathematische Operatoren vorkommen. Begriffe in der Stammformreduktion weisen ein führendes 'Z' auf, 'ALLES' - Suche nach allen Stammformreduktionen von sämtlichen Begriffen (Hinweis: es ist kein führendes 'Z' vorhanden)." - label_default_notifications: Standardmäßge Dateibenachrichtigungen + label_default_notifications: Standardmäßige Dateibenachrichtigungen heading_uploaded_files: Hochgeladene Dateien link_documents: Dateien permission_view_dmsf_file_revision_accesses: Dokumentzugriffe in Aktivitäten anzeigen @@ -158,19 +158,19 @@ de: permission_file_delete: Datei löschen permission_display_system_folders: Systemordner anzeigen permission_file_approval: Dateien freigeben - permission_email_documents: Mailversand von Dokumenten + permission_email_documents: E-Mailversand von Dokumenten label_file: Datei field_folder: Ordner - error_file_commit_require_uploaded_file: Der Commit erfordet eine hochladene Datei + error_file_commit_require_uploaded_file: Die Übertragung erfordet eine hochgeladene Datei - warning_some_files_were_not_commited: "Einige Dateien wurden wegen Validierungsfehlern nicht commitet: %{files}" + warning_some_files_were_not_commited: "Einige Dateien wurden wegen Validierungsfehlern nicht übertragen: %{files}" error_user_has_not_right_delete_folder: Der Nutzer hat kein Recht den Ordner zu löschen. error_user_has_not_right_delete_file: Der Nutzer hat kein Recht die Datei zu löschen. notice_entries_deleted: Einträge löschen - warning_some_entries_were_not_deleted: "Enige Einträge wurden nicht gelöscht: %{entries}" + warning_some_entries_were_not_deleted: "Einige Einträge wurden nicht gelöscht: %{entries}" title_delete_checked: Löschen ausgewählt title_items: Objekte title_filename_for_download: Dateiname beim Herunterladen oder in ZIP-Archiv verwenden @@ -183,8 +183,8 @@ de: warning_xapian_not_available: Xapian steht nicht zur Verfügung menu_dmsf: DMS # Project tab title label_physical_file_delete: Datei physisch löschen - user_is_not_project_member: Du bist kein Projektmitglied - heading_access_downloads_emails: Downloads oder Emailversand + user_is_not_project_member: Sie sind kein Projektmitglied + heading_access_downloads_emails: Downloads oder E-Mailversand heading_access_first: Erste heading_access_last: Letzte label_dmsf_updated: aktualisiert @@ -198,12 +198,12 @@ de: title_copy_or_move: Kopieren/Verschieben label_dmsf_folder_plural: DMS Ordner # Search options comment_moved_from: "Verschoben aus %{source}" - error_target_folder_same: Zielordner und Projekt sind dieselbe wie die aktuellen. + error_target_folder_same: Zielordner und Projekt sind unverändert. title_copy: Kopieren error_max_email_filesize_exceeded: "Maximale Dateigröße der Anlage wurde überschritten. (%{number} MB)" - note_maximum_email_filesize: Maximale Dateigröße der Anhänge, die per E-mail verschickt werden können. 0 bedeutet + note_maximum_email_filesize: Maximale Dateigröße der Anhänge, die per E-Mail verschickt werden können. 0 bedeutet keinen Limit. Angabe in MB. label_maximum_email_filesize: Maximale Dateigröße der Anhänge header_minimum_filesize: Dateifehler wegen minimaler Dateigröße. @@ -231,7 +231,7 @@ de: oder Lesen-und-Schreiben. error_unable_delete_dmsf_workflow: Konnte den Workflow nicht löschen - error_empty_note: Die Notiz darf nicht leer sein. + error_empty_note: Die Notiz darf nicht leer sein error_workflow_assign: Es trat ein Fehler beim Zuweisen des Workflows auf error_cannot_start_workflow: Workflow kann nicht gestartet werden error_cannot_renumber_steps: Schritte können nicht umsortiert werden @@ -246,9 +246,9 @@ de: label_dmsf_wokflow_action_approve: Genehmigen label_dmsf_wokflow_action_reject: Ablehnen label_dmsf_wokflow_action_delegate: Deligieren an - label_dmsf_wokflow_action_assign: Weise einen Genehmigungs-Workflow zu + label_dmsf_wokflow_action_assign: Weisen Sie einen Genehmigungs-Workflow zu label_dmsf_wokflow_action_start: Starte Genehmigungs-Workflow - label_dmsf_workflow_add_approver: "Füge einen neuen Genehmiger mit einer logischen Funktion hinzu:" + label_dmsf_workflow_add_approver: "Fügen Sie einen neuen Genehmiger mit einer logischen Funktion hinzu:" label_or: oder label_action: Aktion label_note: Notiz @@ -261,19 +261,19 @@ de: title_assigned: Zugewiesen title_approval: Genehmigt title_rejected: Abgelehnt - title_obsolete: Obsolet + title_obsolete: Veraltet dmsf_and: UND dmsf_or: ODER dmsf_new_step: Neuer Schritt dmsf_new_step_or_approver: Neuer Schritt oder Neuer Genehmiger - message_dmsf_wokflow_note: Deine Notiz... + message_dmsf_wokflow_note: Ihre Notiz... info_revision: "r%{rev}" link_workflow: Workflow notice_workflow_started: Genehmigungs-Workflow gestartet text_email_subject_approved: genehmigt text_email_subject_rejected: abgelehnt text_email_subject_delegated: deligiert - text_email_subject_requires_approval: benötigt deine Genehmigung + text_email_subject_requires_approval: benötigt Ihre Genehmigung text_email_subject_updated: bearbeitet text_email_subject_started: gestartet text_email_finished_approved: "Der Genehmigungs-Workflow '%{name}' zugewiesen an die Datei '%{filename}' ist @@ -281,17 +281,17 @@ de: text_email_finished_rejected: "Der Genehmigungs-Workflow '%{name}' zugewiesen an die Datei '%{filename}' ist abgeschlossen, aber die Datei wurde abgelehnt, weil: '%{notice}'." text_email_finished_delegated: "Der Genehmigungs-Workflow '%{name}' zugewiesen an die Datei '%{filename}' wurde an - dich deligiert, weil: '%{notice}' und weil deine Zustimmung im aktuellen Genehmigungsschritt '%{stepname}' benötigt wird." - text_email_finished_step: "Der Genehmigungs-Workflow '%{name}' zugewiesen an die Datei '%{filename}' hat grade einen - Zustimmungsschritt abgeschlossen und im nächsten Genehmigungsschritt wird deine Zustimmung benötigt." - text_email_finished_step_short: "Der Genehmigungs-Workflow '%{name}' zugewiesen an die Datei '%{filename}' hat grade + Sie deligiert, weil: '%{notice}' und weil Ihre Zustimmung im aktuellen Genehmigungsschritt benötigt wird." + text_email_finished_step: "Der Genehmigungs-Workflow '%{name}' zugewiesen an die Datei '%{filename}' hat gerade einen + Zustimmungsschritt abgeschlossen und im nächsten Genehmigungsschritt wird Ihre Zustimmung benötigt." + text_email_finished_step_short: "Der Genehmigungs-Workflow '%{name}' zugewiesen an die Datei '%{filename}' hat gerade einen Genehmigungsschritt abgeschlossen." text_email_started: "Der Genehmigungs-Workflow '%{name}' zugewiesen an '%{filename}' wurde gestartet und im aktuellen - Genehmigungsschritt '%{stepname}' wird deine Zustimmung benötigt." - text_email_to_proceed: Um fortzufahren klicke auf das Häckchen neben der Datei in - text_email_to_see_history: Um den Verlauf des Genehmigungs-Workflows zu sehen klicke auf den Workflowstatus zur Datei + Genehmigungsschritt wird Ihre Zustimmung benötigt." + text_email_to_proceed: Um fortzufahren klicken Sie auf das Häckchen neben der Datei in + text_email_to_see_history: Um den Verlauf des Genehmigungs-Workflows zu sehen klicken Sie auf den Workflowstatus zur Datei in - text_email_to_see_status: Um den aktuellen Status des Genehmigungs-Workflows zu sehen klicke auf den Workflowstatus + text_email_to_see_status: Um den aktuellen Status des Genehmigungs-Workflows zu sehen klicken Sie auf den Workflowstatus zur Datei in title_create_link: Verknüpfung anlegen @@ -320,7 +320,7 @@ de: label_display_notified_recipients: Zeige benachrichtigte Empfänger note_display_notified_recipients: Der Benutzer wird darüber informiert, wer die Empfänger der E-mail-Benachrichtigungen sind. - warning_email_notifications: "Emailbenachrichtigung wurde gesendet an %{to}" + warning_email_notifications: "E-Mailbenachrichtigung wurde gesendet an %{to}" link_trash_bin: Papierkorb title_restore: Wiederherstellen @@ -341,16 +341,16 @@ de: locked_documents: Gesperrte Dateien open_approvals: Offene Genehmigungs-Workflows - error_maximum_upload_filecount: "Nicht mehr als %{filecount} Datai(en) kann man hochladen." + error_maximum_upload_filecount: "Es können nicht mehr als %{filecount} Datei(en) hochgeladen werden." - label_public_urls: Öffentliches URLs gültig bis + label_public_urls: Öffentliche URLs gültig bis label_webdav: WebDAV label_full_text: Volltext-Suche link_extension: Ext label_webdav_ignore: Zu ignorierende Dateien - note_webdav_ignore: Regulärer Ausdruck (regular expresion) mit Dateiname, die bei PUT-Requests ignoriert wird. + note_webdav_ignore: Regulärer Ausdruck (regular expression) mit Dateinamen, die bei PUT-Requests ignoriert werden. label_document_url: Url label_last_revision_id: Version @@ -362,15 +362,15 @@ de: label_dmsf_keep_documents_locked: Dokumente gesperrt halten note_dmsf_keep_documents_locked: Dokumente werden nach der Genehmigung gesperrt gelassen note_global: (global) - field_dmsf_not_inheritable: Nicht vererbar + field_dmsf_not_inheritable: Nicht vererbbar - label_webdav_use_project_names: Projekt-Name für den Projektordner verwenden - note_webdav_use_project_names: Anstelle der Projekt-Kennung wird der Projekt-Name als Projektordner im Dateisystem verwendet. + label_webdav_use_project_names: Projektname für den Projektordner verwenden + note_webdav_use_project_names: Anstelle der Projektkennung wird der Projektname als Projektordner im Dateisystem verwendet. - label_last_approver: Letzter Genehmiger approver + label_last_approver: Letzter Genehmiger - label_act_as_attachable: Act as attachable - note_dmsf_act_as_attachable: Allows to attach documents to objects e.g. issues. + label_act_as_attachable: Dokumente als Anhang + note_dmsf_act_as_attachable: Erlaubt Dokumente als Anhang bei Objekten wie bspw. Tickets label_user_search_add: Benutzer suchen @@ -385,11 +385,11 @@ de: text_email_from_override: Der angemeldete Benutzer label_email_reply_to: Antwort an - label_enable_cjk_ngrams: Enable generation of n-grams from CJK text - text_enable_cjk_ngrams: "With this enabled, spans of CJK characters are split into unigrams and bigrams, with the - unigrams carrying positional information. Non-CJK characters are split into words as normal. The corresponding - option needs to have been used at index time. - e.g: XAPIAN_CJK_NGRAM=true ruby plugins/redmine_dmsf/extra/xapian_indexer.rb -fv" + label_enable_cjk_ngrams: Aktiviere die Erstellung von n-grams aus Koreanischen Texten + text_enable_cjk_ngrams: "Mit dieser Aktivierung werden Koreanische Zeichenfolgen in Monograms and Bigrams zerlegt. + Monograms enthalten Informationen zur Position. Nicht-Koreanische Zeichenfolgen werden in Wörter zerlegt. Die entsprechende + Option muss beim Indexieren verwendet werden, + z.B. XAPIAN_CJK_NGRAM=true ruby plugins/redmine_dmsf/extra/xapian_indexer.rb -fv" label_dmsf_fast_links: Schnelle Verknüpfung text_dmsf_fast_links_info: Ermöglicht durch Eingabe der Ordner-ID auf einfache Art und Weise eine Verknüpfung auf den Zielordner zu erstellen. @@ -408,8 +408,8 @@ de: label_add_width: Zugeben mit - dmsf_webdav_ignore_1b_file_for_authentication: Ignoriern 1b Datai geschickt wegen der Autorization - dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin + dmsf_webdav_ignore_1b_file_for_authentication: Ignoriere 1b Dateien, die zur Authentifizierung gesendet werden + dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV Plugin text_not_empty: Der Ordner ist nich leer. label_scroll_down: Runterscrollen From 3f22ce6f05882eef396984a8a0d617a02a1ab6cd Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Tue, 12 Jan 2021 08:44:32 +0100 Subject: [PATCH 45/67] #1201 Project's roles --- app/controllers/dmsf_controller.rb | 6 ++++++ app/views/dmsf/edit.html.erb | 4 ++-- test/functional/dmsf_controller_test.rb | 9 +++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/app/controllers/dmsf_controller.rb b/app/controllers/dmsf_controller.rb index 2dd387d9..c3244a5f 100644 --- a/app/controllers/dmsf_controller.rb +++ b/app/controllers/dmsf_controller.rb @@ -33,6 +33,7 @@ class DmsfController < ApplicationController # Also try to lookup folder by title if this is an API call before_action :find_folder_by_title, only: [:show] before_action :get_query, only: [:expand_folder, :show, :trash] + before_action :get_project_roles, only: [:new, :edit] accept_api_auth :show, :create, :save, :delete @@ -657,4 +658,9 @@ class DmsfController < ApplicationController end end + def get_project_roles + @project_roles = Role.givable.joins(:member_roles).joins(:members).where( + members: { project_id: @project.id }).distinct + end + end diff --git a/app/views/dmsf/edit.html.erb b/app/views/dmsf/edit.html.erb index 1bc49ec1..aeecfe56 100644 --- a/app/views/dmsf/edit.html.erb +++ b/app/views/dmsf/edit.html.erb @@ -75,7 +75,7 @@ <% dir = @folder.inherited_permissions_from %> <% if dir %> <%= label_tag '', l(:label_inherited_permissions) %> - <% Role.givable.each do |role| %> + <% @project_roles.each do |role| %> <% checked = dir.permission_for_role(role) %> <% if checked %>

    - <%= textilizable(@folder ? @folder.description : @project.dmsf_description) %> + <%= textilizable @folder ? @folder.description : @project.dmsf_description %>
    diff --git a/app/views/dmsf/trash.html.erb b/app/views/dmsf/trash.html.erb index 9bcd75ef..dd69e185 100644 --- a/app/views/dmsf/trash.html.erb +++ b/app/views/dmsf/trash.html.erb @@ -22,14 +22,14 @@ <% html_title l(:dmsf) %> -

    <%= l(:link_trash_bin) %>

    - -
    -
    - <%= textilizable @project.dmsf_description %> -
    +
    + <% if @file_delete_allowed %> + <%= link_to l(:label_empty_trash_bin), empty_trash_path(id: @project), class: 'icon icon-del' %> + <% end %>
    +

    <%= l(:link_trash_bin) %>

    + <%= form_tag(trash_dmsf_path(id: @project), method: :get, id: 'query_form', class: 'dmsf-query-form') do %> <%= render partial: 'queries/query_form' %> <% end %> diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 443b3075..ec8b33dd 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -417,6 +417,7 @@ cs: note_webdav_disabled: WebDAV je zablokovaný. Kontaktujte administrátora. dmsf_copy: "Kopie (%{n})" + label_empty_trash_bin: Vysypat koš easy_pages: modules: diff --git a/config/locales/de.yml b/config/locales/de.yml index 0c6ff060..6127c166 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -416,6 +416,7 @@ de: note_webdav_disabled: WebDAV is disabled. Contact the administrator. dmsf_copy: "Kopie (%{n})" + label_empty_trash_bin: Empty Trash easy_pages: modules: diff --git a/config/locales/en.yml b/config/locales/en.yml index 8f459e83..bf0218e5 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -417,6 +417,7 @@ en: note_webdav_disabled: WebDAV is disabled. Contact the administrator. dmsf_copy: "Copy (%{n})" + label_empty_trash_bin: Empty Trash easy_pages: modules: diff --git a/config/locales/es.yml b/config/locales/es.yml index 73ee3978..6e1b5904 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -417,6 +417,7 @@ es: note_webdav_disabled: WebDAV is disabled. Contact the administrator. dmsf_copy: "Copy (%{n})" + label_empty_trash_bin: Empty Trash easy_pages: modules: diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 3045c14f..d270201f 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -417,6 +417,7 @@ fr: note_webdav_disabled: WebDAV is disabled. Contact the administrator. dmsf_copy: "Copy (%{n})" + label_empty_trash_bin: Empty Trash easy_pages: modules: diff --git a/config/locales/hu.yml b/config/locales/hu.yml index ce95ffc9..11eedee1 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -416,6 +416,7 @@ hu: note_webdav_disabled: WebDAV is disabled. Contact the administrator. dmsf_copy: "Copy (%{n})" + label_empty_trash_bin: Empty Trash easy_pages: modules: diff --git a/config/locales/it.yml b/config/locales/it.yml index eabed390..412ecf12 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -417,6 +417,7 @@ it: # Italian strings thx 2 Matteo Arceci! note_webdav_disabled: WebDAV is disabled. Contact the administrator. dmsf_copy: "Copy (%{n})" + label_empty_trash_bin: Empty Trash easy_pages: modules: diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 75e4e5b2..a137ceb8 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -417,6 +417,7 @@ ja: note_webdav_disabled: WebDAV is disabled. Contact the administrator. dmsf_copy: "Copy (%{n})" + label_empty_trash_bin: Empty Trash easy_pages: modules: diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 913f8f89..ca24790a 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -416,6 +416,7 @@ ko: note_webdav_disabled: WebDAV is disabled. Contact the administrator. dmsf_copy: "Copy (%{n})" + label_empty_trash_bin: Empty Trash easy_pages: modules: diff --git a/config/locales/nl.yml b/config/locales/nl.yml index d421e2a0..454237f1 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -417,6 +417,7 @@ nl: note_webdav_disabled: WebDAV is disabled. Contact the administrator. dmsf_copy: "Copy (%{n})" + label_empty_trash_bin: Empty Trash easy_pages: modules: diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 8f9849f6..af6b2702 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -417,6 +417,7 @@ pl: note_webdav_disabled: WebDAV is disabled. Contact the administrator. dmsf_copy: "Copy (%{n})" + label_empty_trash_bin: Empty Trash easy_pages: modules: diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 26aefa1e..6bce6e3d 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -417,6 +417,7 @@ pt-BR: note_webdav_disabled: WebDAV is disabled. Contact the administrator. dmsf_copy: "Copy (%{n})" + label_empty_trash_bin: Empty Trash easy_pages: modules: diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 7a782bc7..c6f8ddc9 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -417,6 +417,7 @@ ru: note_webdav_disabled: WebDAV is disabled. Contact the administrator. dmsf_copy: "Copy (%{n})" + label_empty_trash_bin: Empty Trash easy_pages: modules: diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 24d629f1..5dfe9340 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -417,6 +417,7 @@ sl: note_webdav_disabled: WebDAV is disabled. Contact the administrator. dmsf_copy: "Copy (%{n})" + label_empty_trash_bin: Empty Trash easy_pages: modules: diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index b6aa3b88..f446897c 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -416,6 +416,7 @@ zh-TW: note_webdav_disabled: WebDAV is disabled. Contact the administrator. dmsf_copy: "Copy (%{n})" + label_empty_trash_bin: Empty Trash easy_pages: modules: diff --git a/config/locales/zh.yml b/config/locales/zh.yml index cc917957..7cff2360 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -417,6 +417,7 @@ zh: note_webdav_disabled: WebDAV is disabled. Contact the administrator. dmsf_copy: "Copy (%{n})" + label_empty_trash_bin: Empty Trash easy_pages: modules: diff --git a/config/routes.rb b/config/routes.rb index 5c6a6054..a0467028 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -54,6 +54,7 @@ if Redmine::Plugin.installed? :redmine_dmsf post '/projects/:id/dmsf/append_email', controller: 'dmsf', action: 'append_email', as: 'append_email_dmsf' get '/projects/:id/dmsf/autocomplete_for_user', controller: 'dmsf', action: 'autocomplete_for_user' put '/projects/:id/dmsf', controller: 'dmsf', action: 'drop' + get '/projects/:id/dmsf/empty_trash', to: 'dmsf#empty_trash', as: 'empty_trash' # dmsf_context_menu_controller match '/projects/:id/dmsf/context_menu', to: 'dmsf_context_menus#dmsf', as: 'dmsf_context_menu', via: [:get, :post] diff --git a/test/functional/dmsf_controller_test.rb b/test/functional/dmsf_controller_test.rb index dc208f14..3227e63f 100644 --- a/test/functional/dmsf_controller_test.rb +++ b/test/functional/dmsf_controller_test.rb @@ -100,6 +100,21 @@ class DmsfControllerTest < RedmineDmsf::Test::TestCase assert_select 'a', href: url_for(controller: :dmsf_files, action: 'view', id: @link2.target_id, only_path: true) end + def test_empty_trash + get :empty_trash, params: { id: @project1.id } + assert_equal 0, DmsfFolder.deleted.where(project_id: @project1.id).all.size + assert_equal 0, DmsfFile.deleted.where(project_id: @project1.id).all.size + assert_equal 0, DmsfLink.deleted.where(project_id: @project1.id).all.size + assert_redirected_to trash_dmsf_path(id: @project1.id) + end + + def test_empty_trash_forbidden + # Missing permissions + @role_manager.remove_permission! :file_delete + get :empty_trash, params: { id: @project1.id } + assert_response :forbidden + end + def test_delete_forbidden # Missing permissions @role_manager.remove_permission! :folder_manipulation From 9daadb785704150afd2e0778cbf9826e3dae223d Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Fri, 5 Feb 2021 14:06:18 +0100 Subject: [PATCH 56/67] Internal error when createting folder --- app/controllers/dmsf_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/dmsf_controller.rb b/app/controllers/dmsf_controller.rb index 5bfa63d8..1b93e691 100644 --- a/app/controllers/dmsf_controller.rb +++ b/app/controllers/dmsf_controller.rb @@ -33,7 +33,7 @@ class DmsfController < ApplicationController # Also try to lookup folder by title if this is an API call before_action :find_folder_by_title, only: [:show] before_action :get_query, only: [:expand_folder, :show, :trash, :empty_trash] - before_action :get_project_roles, only: [:new, :edit] + before_action :get_project_roles, only: [:new, :edit, :create] accept_api_auth :show, :create, :save, :delete From fbce894febce40862561fb4e188f94ba41c3ae46 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Tue, 9 Feb 2021 09:58:22 +0100 Subject: [PATCH 57/67] #1133 Cadaver --- lib/dav4rack/controller.rb | 4 +--- lib/redmine_dmsf/webdav/base_resource.rb | 10 ++++++++++ lib/redmine_dmsf/webdav/dmsf_resource.rb | 10 ---------- lib/redmine_dmsf/webdav/project_resource.rb | 1 + 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/lib/dav4rack/controller.rb b/lib/dav4rack/controller.rb index 91f3c5c1..a042ec3a 100644 --- a/lib/dav4rack/controller.rb +++ b/lib/dav4rack/controller.rb @@ -240,7 +240,6 @@ module DAV4Rack return MultiStatus end - properties = if propfind.nil? or propfind.empty? or propfind.xpath("//#{ns}allprop").first @@ -275,6 +274,7 @@ module DAV4Rack r.multistatus do |xml| xml << r.raw(prop_xml) end + MultiStatus end @@ -320,8 +320,6 @@ module DAV4Rack asked[:timeout] = timeout.split(',').map{|x|x.strip} end - Rails.logger.info ">>> #{request.document}" - ns = request.ns if doc = request.document and lockinfo = doc.xpath("//#{ns}lockinfo") diff --git a/lib/redmine_dmsf/webdav/base_resource.rb b/lib/redmine_dmsf/webdav/base_resource.rb index 7c3c0643..796a3f43 100644 --- a/lib/redmine_dmsf/webdav/base_resource.rb +++ b/lib/redmine_dmsf/webdav/base_resource.rb @@ -216,6 +216,16 @@ module RedmineDmsf prj end + # Adds the given xml namespace to namespaces and returns the prefix + def add_namespace(ns, prefix = "unknown#{rand 65536}") + @__proxy.add_namespace ns, prefix + end + + # returns the prefix for the given namespace, adding it if necessary + def prefix_for(ns_href) + @__proxy.prefix_for ns_href + end + private def get_resource_info diff --git a/lib/redmine_dmsf/webdav/dmsf_resource.rb b/lib/redmine_dmsf/webdav/dmsf_resource.rb index 4ac42233..cb1c08a9 100644 --- a/lib/redmine_dmsf/webdav/dmsf_resource.rb +++ b/lib/redmine_dmsf/webdav/dmsf_resource.rb @@ -672,16 +672,6 @@ module RedmineDmsf x end - # Adds the given xml namespace to namespaces and returns the prefix - def add_namespace(ns, prefix = "unknown#{rand 65536}") - @__proxy.add_namespace ns, prefix - end - - # returns the prefix for the given namespace, adding it if necessary - def prefix_for(ns_href) - @__proxy.prefix_for ns_href - end - private # Prepare file for download using Rack functionality: diff --git a/lib/redmine_dmsf/webdav/project_resource.rb b/lib/redmine_dmsf/webdav/project_resource.rb index e1702f11..e4cea810 100644 --- a/lib/redmine_dmsf/webdav/project_resource.rb +++ b/lib/redmine_dmsf/webdav/project_resource.rb @@ -127,4 +127,5 @@ module RedmineDmsf end end + end From 6d639c0c0d0902245c9a08909c22bfb1fa539d2d Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Tue, 9 Feb 2021 14:10:04 +0100 Subject: [PATCH 58/67] #1204 Empty trash --- app/controllers/dmsf_controller.rb | 6 +++--- init.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/dmsf_controller.rb b/app/controllers/dmsf_controller.rb index 1b93e691..09e348a0 100644 --- a/app/controllers/dmsf_controller.rb +++ b/app/controllers/dmsf_controller.rb @@ -442,13 +442,13 @@ class DmsfController < ApplicationController case node.type when 'folder' folder = DmsfFolder.find_by(id: node.id) - folder.delete true + folder&.delete true when 'file' file = DmsfFile.find_by(id: node.id) - file.delete true + file&.delete true when /link$/ link = DmsfLink.find_by(id: node.id) - link.delete true + link&.delete true end end redirect_back_or_default trash_dmsf_path(id: @project.id) diff --git a/init.rb b/init.rb index e7ef2226..54230017 100644 --- a/init.rb +++ b/init.rb @@ -33,7 +33,7 @@ Redmine::Plugin.register :redmine_dmsf do end author 'Vít Jonáš / Daniel Munn / Karel Pičman' description 'Document Management System Features' - version '2.4.5' + version '2.4.6 devel' requires_redmine version_or_higher: '4.0.0' From ef332c071d3ac830319923a5dd7eefc84ef342df Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Tue, 9 Feb 2021 14:46:24 +0100 Subject: [PATCH 59/67] #1206 Support for .xlsm --- app/models/dmsf_file_revision.rb | 1 + assets/images/filetypes/docx.png | Bin 671 -> 0 bytes assets/images/filetypes/xlsx.png | Bin 744 -> 0 bytes assets/stylesheets/redmine_dmsf.css | 3 ++- 4 files changed, 3 insertions(+), 1 deletion(-) delete mode 100644 assets/images/filetypes/docx.png delete mode 100644 assets/images/filetypes/xlsx.png diff --git a/app/models/dmsf_file_revision.rb b/app/models/dmsf_file_revision.rb index 22cdbb71..66f01560 100644 --- a/app/models/dmsf_file_revision.rb +++ b/app/models/dmsf_file_revision.rb @@ -49,6 +49,7 @@ class DmsfFileRevision < ActiveRecord::Base 'application/vnd.oasis.opendocument.spreadsheet' => 'ms-excel', 'application/vnd.oasis.opendocument.text' => 'ms-word', 'application/vnd.oasis.opendocument.presentation' => 'ms-powerpoint', + 'application/vnd.ms-excel.sheet.macroEnabled.12' => 'ms-exel' }.freeze scope :visible, -> { where(deleted: STATUS_ACTIVE) } diff --git a/assets/images/filetypes/docx.png b/assets/images/filetypes/docx.png deleted file mode 100644 index 8cca68cd195aefc21978dbc5798f6c7c23feb424..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 671 zcmV;Q0$}}#P)Px$EKp2TMgIW*0Wx?fK5Ymuiv>1<2t0@eLYoOovLQ^GI$D@ATed1V+0I%&8~ zYNtSEv_xvTRc)kQb*pE7vqEmfNp#Focgj_J&R>1QSbouWikxnazjBbja*@Awlf8PC zyL*+qewVscfXG>a##n;IU4+D5gv4Nh&0&bcVu{0Lio$1$!D)=aY>vQZiq&_K)qI!O zf||UAoxX#d+JK(sh@ilWqQZ=#!i%Kck*CI&tjUnB)}67! zyx*$6@vp$xv%}iA$n?q5;?~^i(&GBmipsC z{NwHX+=2W^ZoDi{qXYo@b>=l_x|+w{`L9(_xk?%`~Uy{|8ts| zXaE2J0d!JMQvg8b*k%9#00Cl4M??UK1szBL000SaNLh0L01FcU01FcV0GgZ_00007 zbV*G`2ipY`6C4vl$S~&s007@fL_t&-(>;#YRsul`K!Xf36v4#;Dn$lVte|uqSqmt2 zfd$sCAo>4)U<2xX%f06$0RVWsyS=%-D&?evCH2|Qbn^Z6A(4!(R|^-JozSN5T_PDB ze-UrCuuZj=PdC#>up(Y10RYdSG+u1y?QYxJ)GCvB=rU(ZPN)IS1}vG!Q*g!jAv|002ovPDHLk FV1mP)Px$bWluGMgIW*HAxyYO&K*!7&KBBG*cHeSQRv06Et2FHC`GsX%91P4m52JG-DAo zWD+)G8#`zoI&U5`a1A+d9y)g!Ja->Hdmb`qC_8Z?I(;WUeIa0eTta{)MuaR!g)Ksf zHAjd$O^h~AjyXt@KU0%HQkO_rm`7TgNm!mzUYJ#1p;KF;Sa6$dVWL!Fpjc(6TW6|Y zWT;?itzv4dWo@u$bfs`^j=yq{zjBekc9Xq&mAiYDyndIuRe;D@fyP*Z#a)ENUWCM9 zh{Ixu!)1!XXN$pUjKOSKO{OIug>hb;S^8M}e{qOYs@b>=l z_x|+w{`L9(_xk?%`~Uy{|6sFZxBvhE0d!JMQvg8b*k%9#00Cl4M??UK1szBL000Sa zNLh0L01FcU01FcV0GgZ_00007bV*G`2ipY`6CDmX)op(O007`gL_t&-(_>&@V2B9| z4G9YL_q4HLfPm<#%8K%`(h{3$kcf$qzLvU*qMVFau}w8d#H1Pugo=OyKoOI0L)Gdy zO-&!}LK_fZFvyB9mN(T?NZ=~S&&$oRVbHCPkJ6SDkFDkf@w06h)T+HTBDE!S5;^jM zgR?WO7?iw41^K;|1$^0n@|hWy46+~_yo5QWS#pAdGt$i&q+r%E1Lf1x+!;iKc)0l3 z*;ttvGlPTEQe8n#4*;7Fl21)>1_}7( Date: Tue, 9 Feb 2021 18:41:33 +0100 Subject: [PATCH 60/67] The source is no more needed --- Gemfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Gemfile b/Gemfile index 74c2d2f6..ce719de8 100644 --- a/Gemfile +++ b/Gemfile @@ -20,8 +20,6 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -source 'https://rubygems.org' - gem 'zip-zip' gem 'simple_enum' gem 'uuidtools' From 3c84e9b599700484a2595a42596db426842971d9 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Tue, 9 Feb 2021 18:50:47 +0100 Subject: [PATCH 61/67] jQuery backward compatibility --- assets/javascripts/attachments_dmsf.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/attachments_dmsf.js b/assets/javascripts/attachments_dmsf.js index 5bfcdaa0..7387a641 100644 --- a/assets/javascripts/attachments_dmsf.js +++ b/assets/javascripts/attachments_dmsf.js @@ -266,16 +266,18 @@ function dmsfDragOutHandler(e) { } function dmsfSetupFileDrop() { + if (window.File && window.FileList && window.ProgressEvent && window.FormData) { - $.event.fixHooks.drop = { props: [ 'dataTransfer' ] }; + $.event.addProp('dataTransfer'); + + $('form span.dmsf-uploader:not(.dmsffiledroplistner)').has('input:file').each(function () { - $('form span.dmsf-uploader').has('input:file').each(function() { $(this).on({ dragover: dmsfDragOverHandler, dragleave: dmsfDragOutHandler, drop: dmsfHandleFileDropEvent - }); + }).addClass('dmsffiledroplistner'); }); } } From 6565467468da23074f54f301aa5015b0346ef2fb Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Wed, 10 Feb 2021 12:09:30 +0100 Subject: [PATCH 62/67] #1206 Support for .xlsm --- assets/images/filetypes/docx.png | Bin 0 -> 671 bytes assets/images/filetypes/xlsm.png | Bin 0 -> 744 bytes assets/images/filetypes/xlsx.png | Bin 0 -> 744 bytes 3 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 assets/images/filetypes/docx.png create mode 100644 assets/images/filetypes/xlsm.png create mode 100644 assets/images/filetypes/xlsx.png diff --git a/assets/images/filetypes/docx.png b/assets/images/filetypes/docx.png new file mode 100644 index 0000000000000000000000000000000000000000..8cca68cd195aefc21978dbc5798f6c7c23feb424 GIT binary patch literal 671 zcmV;Q0$}}#P)Px$EKp2TMgIW*0Wx?fK5Ymuiv>1<2t0@eLYoOovLQ^GI$D@ATed1V+0I%&8~ zYNtSEv_xvTRc)kQb*pE7vqEmfNp#Focgj_J&R>1QSbouWikxnazjBbja*@Awlf8PC zyL*+qewVscfXG>a##n;IU4+D5gv4Nh&0&bcVu{0Lio$1$!D)=aY>vQZiq&_K)qI!O zf||UAoxX#d+JK(sh@ilWqQZ=#!i%Kck*CI&tjUnB)}67! zyx*$6@vp$xv%}iA$n?q5;?~^i(&GBmipsC z{NwHX+=2W^ZoDi{qXYo@b>=l_x|+w{`L9(_xk?%`~Uy{|8ts| zXaE2J0d!JMQvg8b*k%9#00Cl4M??UK1szBL000SaNLh0L01FcU01FcV0GgZ_00007 zbV*G`2ipY`6C4vl$S~&s007@fL_t&-(>;#YRsul`K!Xf36v4#;Dn$lVte|uqSqmt2 zfd$sCAo>4)U<2xX%f06$0RVWsyS=%-D&?evCH2|Qbn^Z6A(4!(R|^-JozSN5T_PDB ze-UrCuuZj=PdC#>up(Y10RYdSG+u1y?QYxJ)GCvB=rU(ZPN)IS1}vG!Q*g!jAv|002ovPDHLk FV1mP)Px$bWluGMgIW*HAxyYO&K*!7&KBBG*cHeSQRv06Et2FHC`GsX%91P4m52JG-DAo zWD+)G8#`zoI&U5`a1A+d9y)g!Ja->Hdmb`qC_8Z?I(;WUeIa0eTta{)MuaR!g)Ksf zHAjd$O^h~AjyXt@KU0%HQkO_rm`7TgNm!mzUYJ#1p;KF;Sa6$dVWL!Fpjc(6TW6|Y zWT;?itzv4dWo@u$bfs`^j=yq{zjBekc9Xq&mAiYDyndIuRe;D@fyP*Z#a)ENUWCM9 zh{Ixu!)1!XXN$pUjKOSKO{OIug>hb;S^8M}e{qOYs@b>=l z_x|+w{`L9(_xk?%`~Uy{|6sFZxBvhE0d!JMQvg8b*k%9#00Cl4M??UK1szBL000Sa zNLh0L01FcU01FcV0GgZ_00007bV*G`2ipY`6CDmX)op(O007`gL_t&-(_>&@V2B9| z4G9YL_q4HLfPm<#%8K%`(h{3$kcf$qzLvU*qMVFau}w8d#H1Pugo=OyKoOI0L)Gdy zO-&!}LK_fZFvyB9mN(T?NZ=~S&&$oRVbHCPkJ6SDkFDkf@w06h)T+HTBDE!S5;^jM zgR?WO7?iw41^K;|1$^0n@|hWy46+~_yo5QWS#pAdGt$i&q+r%E1Lf1x+!;iKc)0l3 z*;ttvGlPTEQe8n#4*;7Fl21)>1_}7(P)Px$bWluGMgIW*HAxyYO&K*!7&KBBG*cHeSQRv06Et2FHC`GsX%91P4m52JG-DAo zWD+)G8#`zoI&U5`a1A+d9y)g!Ja->Hdmb`qC_8Z?I(;WUeIa0eTta{)MuaR!g)Ksf zHAjd$O^h~AjyXt@KU0%HQkO_rm`7TgNm!mzUYJ#1p;KF;Sa6$dVWL!Fpjc(6TW6|Y zWT;?itzv4dWo@u$bfs`^j=yq{zjBekc9Xq&mAiYDyndIuRe;D@fyP*Z#a)ENUWCM9 zh{Ixu!)1!XXN$pUjKOSKO{OIug>hb;S^8M}e{qOYs@b>=l z_x|+w{`L9(_xk?%`~Uy{|6sFZxBvhE0d!JMQvg8b*k%9#00Cl4M??UK1szBL000Sa zNLh0L01FcU01FcV0GgZ_00007bV*G`2ipY`6CDmX)op(O007`gL_t&-(_>&@V2B9| z4G9YL_q4HLfPm<#%8K%`(h{3$kcf$qzLvU*qMVFau}w8d#H1Pugo=OyKoOI0L)Gdy zO-&!}LK_fZFvyB9mN(T?NZ=~S&&$oRVbHCPkJ6SDkFDkf@w06h)T+HTBDE!S5;^jM zgR?WO7?iw41^K;|1$^0n@|hWy46+~_yo5QWS#pAdGt$i&q+r%E1Lf1x+!;iKc)0l3 z*;ttvGlPTEQe8n#4*;7Fl21)>1_}7( Date: Wed, 10 Feb 2021 12:38:14 +0100 Subject: [PATCH 63/67] #1206 Support for .xlsm --- app/models/dmsf_file_revision.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/dmsf_file_revision.rb b/app/models/dmsf_file_revision.rb index 66f01560..8c087c89 100644 --- a/app/models/dmsf_file_revision.rb +++ b/app/models/dmsf_file_revision.rb @@ -49,7 +49,7 @@ class DmsfFileRevision < ActiveRecord::Base 'application/vnd.oasis.opendocument.spreadsheet' => 'ms-excel', 'application/vnd.oasis.opendocument.text' => 'ms-word', 'application/vnd.oasis.opendocument.presentation' => 'ms-powerpoint', - 'application/vnd.ms-excel.sheet.macroEnabled.12' => 'ms-exel' + 'application/vnd.ms-excel.sheet.macroEnabled.12' => 'ms-excel' }.freeze scope :visible, -> { where(deleted: STATUS_ACTIVE) } From 85f04a7585cfa1a907ffb2255c08e8de78b41b83 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Wed, 10 Feb 2021 16:26:51 +0100 Subject: [PATCH 64/67] Wrap the extra sources in a block --- Gemfile | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/Gemfile b/Gemfile index ce719de8..d5a2660b 100644 --- a/Gemfile +++ b/Gemfile @@ -20,21 +20,23 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -gem 'zip-zip' -gem 'simple_enum' -gem 'uuidtools' -gem 'dalli' -gem 'active_record_union' +source 'https://rubygems.org' do + gem 'zip-zip' + gem 'simple_enum' + gem 'uuidtools' + gem 'dalli' + gem 'active_record_union' -# Redmine extensions -unless %w(easyproject easy_gantt).any? { |plugin| Dir.exist?(File.expand_path("../../#{plugin}", __FILE__)) } - gem 'redmine_extensions', '~> 0.3.9' - gem 'rubyzip', '>= 1.1.3' + # Redmine extensions + unless %w(easyproject easy_gantt).any? { |plugin| Dir.exist?(File.expand_path("../../#{plugin}", __FILE__)) } + gem 'redmine_extensions', '~> 0.3.9' + gem 'rubyzip', '>= 1.1.3' + end + + # Dav4Rack + gem 'ox' + + group :test do + gem 'rails-controller-testing' + end end - -# Dav4Rack -gem 'ox' - -group :test do - gem 'rails-controller-testing' -end \ No newline at end of file From b214520c769e9160893c4c28caf38b4169bf6736 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Thu, 11 Feb 2021 12:19:47 +0100 Subject: [PATCH 65/67] Wrap the extra sources in a block --- Gemfile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Gemfile b/Gemfile index d5a2660b..ef682c58 100644 --- a/Gemfile +++ b/Gemfile @@ -35,8 +35,4 @@ source 'https://rubygems.org' do # Dav4Rack gem 'ox' - - group :test do - gem 'rails-controller-testing' - end end From 33860cea4db7c9f971c7be9c96516a84e6fb851f Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Thu, 11 Feb 2021 14:34:53 +0100 Subject: [PATCH 66/67] dav4rack library upgraded to v1.1.1 --- lib/dav4rack/controller.rb | 4 +++- lib/dav4rack/file_resource_lock.rb | 4 ++-- lib/dav4rack/handler.rb | 6 +++--- lib/dav4rack/interceptor_resource.rb | 6 +++--- lib/dav4rack/lock.rb | 6 +++--- lib/dav4rack/remote_file.rb | 2 +- lib/dav4rack/request.rb | 24 ++++++++++++++---------- lib/dav4rack/resource.rb | 6 +++--- lib/dav4rack/resources/file_resource.rb | 12 ++++++------ lib/dav4rack/version.rb | 2 +- 10 files changed, 39 insertions(+), 33 deletions(-) diff --git a/lib/dav4rack/controller.rb b/lib/dav4rack/controller.rb index a042ec3a..2c352c3c 100644 --- a/lib/dav4rack/controller.rb +++ b/lib/dav4rack/controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'uri' require 'dav4rack/destination_header' require 'dav4rack/request' @@ -240,6 +242,7 @@ module DAV4Rack return MultiStatus end + properties = if propfind.nil? or propfind.empty? or propfind.xpath("//#{ns}allprop").first @@ -274,7 +277,6 @@ module DAV4Rack r.multistatus do |xml| xml << r.raw(prop_xml) end - MultiStatus end diff --git a/lib/dav4rack/file_resource_lock.rb b/lib/dav4rack/file_resource_lock.rb index 4cf65475..0421089a 100644 --- a/lib/dav4rack/file_resource_lock.rb +++ b/lib/dav4rack/file_resource_lock.rb @@ -106,7 +106,7 @@ module DAV4Rack end def remaining_timeout - t = timeout.to_i - (Time.current.to_i - created_at.to_i) + t = timeout.to_i - (Time.now.to_i - created_at.to_i) t < 0 ? 0 : t end @@ -116,7 +116,7 @@ module DAV4Rack :token => token, :timeout => timeout, :depth => depth, - :created_at => Time.current, + :created_at => Time.now, :owner => owner } @store.transaction do diff --git a/lib/dav4rack/handler.rb b/lib/dav4rack/handler.rb index d741bf50..ce67589a 100644 --- a/lib/dav4rack/handler.rb +++ b/lib/dav4rack/handler.rb @@ -24,11 +24,11 @@ module DAV4Rack end def call(env) - start = Time.current + start = Time.now request = setup_request env response = Rack::Response.new - Logger.info "Processing WebDAV request: #{request.path} (for #{request.ip} at #{Time.current}) [#{request.request_method}]" + Logger.info "Processing WebDAV request: #{request.path} (for #{request.ip} at #{Time.now}) [#{request.request_method}]" controller = setup_controller request, response controller.process @@ -41,7 +41,7 @@ module DAV4Rack if Logger.debug? and response.body.is_a?(String) Logger.debug "Response String:\n#{response.body}" end - Logger.info "Completed in: #{((Time.current.to_f - start.to_f) * 1000).to_i} ms | #{response.status} [#{request.url}]" + Logger.info "Completed in: #{((Time.now.to_f - start.to_f) * 1000).to_i} ms | #{response.status} [#{request.url}]" response.finish diff --git a/lib/dav4rack/interceptor_resource.rb b/lib/dav4rack/interceptor_resource.rb index a23b8e0b..00e502d3 100644 --- a/lib/dav4rack/interceptor_resource.rb +++ b/lib/dav4rack/interceptor_resource.rb @@ -25,15 +25,15 @@ module DAV4Rack end def creation_date - Time.current + Time.now end def last_modified - Time.current + Time.now end def last_modified=(time) - Time.current + Time.now end def etag diff --git a/lib/dav4rack/lock.rb b/lib/dav4rack/lock.rb index 58f2619f..e37c0d06 100644 --- a/lib/dav4rack/lock.rb +++ b/lib/dav4rack/lock.rb @@ -4,8 +4,8 @@ module DAV4Rack def initialize(args={}) @args = args @store = nil - @args[:created_at] = Time.current - @args[:updated_at] = Time.current + @args[:created_at] = Time.now + @args[:updated_at] = Time.now end def store @@ -24,7 +24,7 @@ module DAV4Rack end def remaining_timeout - @args[:timeout].to_i - (Time.current.to_i - @args[:created_at].to_i) + @args[:timeout].to_i - (Time.now.to_i - @args[:created_at].to_i) end def method_missing(*args) diff --git a/lib/dav4rack/remote_file.rb b/lib/dav4rack/remote_file.rb index d412c1ae..8bcbde7f 100644 --- a/lib/dav4rack/remote_file.rb +++ b/lib/dav4rack/remote_file.rb @@ -107,7 +107,7 @@ module DAV4Rack # Last modified type based on provided, remote headers or current time def last_modified - @heads['last-modified'] || @modified || Time.current.httpdate + @heads['last-modified'] || @modified || Time.now.httpdate end # Builds the path for the cached file diff --git a/lib/dav4rack/request.rb b/lib/dav4rack/request.rb index 3a867db7..709dee54 100644 --- a/lib/dav4rack/request.rb +++ b/lib/dav4rack/request.rb @@ -19,12 +19,16 @@ module DAV4Rack def initialize(env, options = {}) super env @options = { recursive_propfind_allowed: true }.merge options - sanitize_path_info + self.path_info = expand_path path_info end def authorization? - !!env['HTTP_AUTHORIZATION'] + !!authorization + end + + def authorization + get_header 'HTTP_AUTHORIZATION' end # path relative to root uri @@ -131,11 +135,15 @@ module DAV4Rack return uri.path_info end - # expands '/foo/../bar' to '/bar' + # expands '/foo/../bar' to '/bar', peserving trailing slash and normalizing + # consecutive slashes. adds a leading slash if missing def expand_path(path) - path.squeeze! '/' - path = Addressable::URI.normalize_component path, Addressable::URI::CharacterClasses::PATH - URI("http://example.com/").merge(path).path + path = path.squeeze '/' + path.prepend '/' unless path[0] == '/' + collection = path.end_with?('/') + path = ::File.expand_path path + path << '/' if collection and !path.end_with?('/') + path end @@ -181,10 +189,6 @@ module DAV4Rack request_method != 'PROPFIND' or @options[:recursive_propfind_allowed] end - def sanitize_path_info - self.path_info.force_encoding 'UTF-8' - self.path_info = expand_path path_info - end def parse_request_body return Nokogiri.XML(body.read){ |config| diff --git a/lib/dav4rack/resource.rb b/lib/dav4rack/resource.rb index 22e2bb65..58031d57 100644 --- a/lib/dav4rack/resource.rb +++ b/lib/dav4rack/resource.rb @@ -79,11 +79,11 @@ module DAV4Rack @namespaces = (options[:namespaces] || {}).merge({DAV_NAMESPACE => DAV_NAMESPACE_NAME}) @request = request @response = response - if (options.has_key?(:lock_class)) + unless(options.has_key?(:lock_class)) + @lock_class = LockStore + else @lock_class = options[:lock_class] raise NameError.new("Unknown lock type constant provided: #{@lock_class}") unless @lock_class.nil? || defined?(@lock_class) - else - @lock_class = LockStore end @options = options @max_timeout = options[:max_timeout] || 86400 diff --git a/lib/dav4rack/resources/file_resource.rb b/lib/dav4rack/resources/file_resource.rb index e20cb8d6..c48a26c8 100644 --- a/lib/dav4rack/resources/file_resource.rb +++ b/lib/dav4rack/resources/file_resource.rb @@ -42,7 +42,7 @@ module DAV4Rack # Set the time of last modification. def last_modified=(time) - ::File.utime(Time.current, time, file_path) + ::File.utime(Time.now, time, file_path) end # Return an Etag, an unique hash value for this resource. @@ -227,17 +227,19 @@ module DAV4Rack end def lock(args) - if (parent_exists?) + unless(parent_exists?) + Conflict + else lock_check(args[:type]) lock = FileResourceLock.explicit_locks(@path, root, :scope => args[:scope], :kind => args[:type], :user => @user) - unless (lock) + unless(lock) token = UUIDTools::UUID.random_create.to_s lock = FileResourceLock.generate(@path, @user, token, root) lock.scope = args[:scope] lock.kind = args[:type] lock.owner = args[:owner] lock.depth = args[:depth] - if (args[:timeout]) + if(args[:timeout]) lock.timeout = args[:timeout] <= @max_timeout && args[:timeout] > 0 ? args[:timeout] : @max_timeout else lock.timeout = @default_timeout @@ -253,8 +255,6 @@ module DAV4Rack status end [lock.remaining_timeout, lock.token] - else - Conflict end end diff --git a/lib/dav4rack/version.rb b/lib/dav4rack/version.rb index d386f6c5..9f4df790 100644 --- a/lib/dav4rack/version.rb +++ b/lib/dav4rack/version.rb @@ -13,5 +13,5 @@ module DAV4Rack end end - VERSION = Version.new('1.1.0') + VERSION = Version.new('1.1.1') end From 82b361c5c3e14860b3bdc3fb63d6dfc2694f6d65 Mon Sep 17 00:00:00 2001 From: "karel.picman@lbcfree.net" Date: Thu, 11 Feb 2021 17:54:03 +0100 Subject: [PATCH 67/67] Wrap the extra sources in a block --- Gemfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Gemfile b/Gemfile index ef682c58..422f5c49 100644 --- a/Gemfile +++ b/Gemfile @@ -31,6 +31,10 @@ source 'https://rubygems.org' do unless %w(easyproject easy_gantt).any? { |plugin| Dir.exist?(File.expand_path("../../#{plugin}", __FILE__)) } gem 'redmine_extensions', '~> 0.3.9' gem 'rubyzip', '>= 1.1.3' + + group :test do + gem 'rails-controller-testing' + end end # Dav4Rack