diff --git a/app/views/dmsf/_query_list.html.erb b/app/views/dmsf/_query_list.html.erb index e98e960f..18cf89cb 100644 --- a/app/views/dmsf/_query_list.html.erb +++ b/app/views/dmsf/_query_list.html.erb @@ -27,13 +27,18 @@ <%= hidden_field_tag 'back_url', url_for(params: request.query_parameters), id: nil %> <%= query_columns_hidden_tags(query) %>
- +
- + <% if defined?(EasyExtensions) %> + <%# Easy checkbox %> + <%= content_tag :th, link_to_function('', 'EASY.contextMenu.toggleIssuesSelection($(this))', + title: "#{l(:button_check_all)}/#{l(:button_uncheck_all)}", class: 'icon icon-checked') %> + <% else %> + + <% end %> <% query.inline_columns.each do |column| %> <%= column_header(query, column, query_options) %> <% end %> diff --git a/app/views/dmsf/_query_rows.erb b/app/views/dmsf/_query_rows.erb index 4b156b06..3fb2a00d 100644 --- a/app/views/dmsf/_query_rows.erb +++ b/app/views/dmsf/_query_rows.erb @@ -36,7 +36,13 @@ <%= content_tag 'td', column_content(column, node), class: column.css_classes %> <% end %> <% end %> diff --git a/app/views/dmsf/show.html.erb b/app/views/dmsf/show.html.erb index 9e43a190..af97ffff 100644 --- a/app/views/dmsf/show.html.erb +++ b/app/views/dmsf/show.html.erb @@ -28,57 +28,25 @@ <%= link_to l(:label_attachment_new), multi_dmsf_upload_path(id: @project, dmsf_folder_id: @folder), class: 'icon icon-add' %> <% end %> + <% if defined?(EasyExtensions) %> + <%= render partial: 'dmsf_context_menus/main', locals: { + folder_manipulation_allowed: @folder_manipulation_allowed, + system_folder: @system_folder, + folder: @folder, + project: @project, + locked_for_user: @locked_for_user, + file_manipulation_allowed: @file_manipulation_allowed, + trash_enabled: @trash_enabled } %> + <% else %> <%= actions_dropdown do %> - <% if @folder_manipulation_allowed && !@system_folder %> - <% if @folder.nil? %> - <%= link_to l(:button_edit), edit_root_dmsf_path(id: @project), - title: l(:link_edit, title: l(:link_documents)), - class: 'icon icon-edit' %> - <% elsif !@locked_for_user %> - <%= link_to l(:button_edit), - edit_dmsf_path(id: @project, folder_id: @folder, redirect_to_folder_id: @folder.id), - title: l(:link_edit, title: h(@folder.title)), - class: 'icon icon-edit' %> - <% end %> - <% if @folder && (!@locked_for_user || User.current.allowed_to?(:force_file_unlock, @project)) %> - <% if @folder.locked? %> - <%= link_to_if @folder.unlockable?, l(:button_unlock), - unlock_dmsf_path(id: @project, folder_id: @folder, current: request.url), - title: l(:title_unlock_folder), class: 'icon icon-unlock' %> - <% else %> - <%= link_to(l(:button_lock), - lock_dmsf_path(id: @project, folder_id: @folder, current: request.url), - title: l(:title_lock_folder), class: 'icon icon-lock') %> - <% end %> - <% end %> - <% if !@locked_for_user && ((@folder && @folder.notification) || (!@folder && @project.dmsf_notification)) %> - <%= link_to l(:label_notifications_off), - notify_deactivate_dmsf_path(id: @project, folder_id: @folder), - title: l(:title_notifications_active_deactivate), - class: 'icon icon-email' %> - <% else %> - <%= link_to l(:label_notifications_on), - notify_activate_dmsf_path(id: @project, folder_id: @folder), - title: l(:title_notifications_not_active_activate), - class: 'icon icon-email-add' %> - <% end %> - <% if @file_manipulation_allowed && !@locked_for_user %> - <%= link_to l(:label_link_from), - new_dmsf_link_path(project_id: @project.id, dmsf_folder_id: @folder ? @folder.id : @folder, - type: 'link_from'), title: l(:title_create_link), - class: 'icon icon-link' %> - <% end %> - <%= link_to(l(:link_create_folder), - new_dmsf_path(id: @project, parent_id: @folder), - title: l(:link_create_folder), - class: 'icon icon-add') unless @locked_for_user %> - <% end %> - <% if @trash_enabled %> - <%= link_to l(:link_trash_bin), trash_dmsf_path(@project), title: l(:link_trash_bin), class: 'icon icon-del' %> - <% else %> - - <%= l(:link_trash_bin) %> - + <%= render partial: 'dmsf_context_menus/main', locals: { + folder_manipulation_allowed: @folder_manipulation_allowed, + system_folder: @system_folder, + folder: @folder, + project: @project, + locked_for_user: @locked_for_user, + file_manipulation_allowed: @file_manipulation_allowed, + trash_enabled: @trash_enabled } %> <% end %> <% end %> diff --git a/app/views/dmsf_context_menus/_main.html.erb b/app/views/dmsf_context_menus/_main.html.erb new file mode 100644 index 00000000..38bbda07 --- /dev/null +++ b/app/views/dmsf_context_menus/_main.html.erb @@ -0,0 +1,73 @@ +<% + # encoding: utf-8 + # + # Redmine plugin for Document Management System "Features" + # + # Copyright © 2011-20 Karel Pičman + # + # This program is free software; you can redistribute it and/or + # modify it under the terms of the GNU General Public License + # as published by the Free Software Foundation; either version 2 + # of the License, or (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +%> + +<% if folder_manipulation_allowed && !system_folder %> + <% if folder.nil? %> + <%= link_to l(:button_edit), edit_root_dmsf_path(id: project), + title: l(:link_edit, title: l(:link_documents)), + class: 'icon icon-edit' %> + <% elsif !locked_for_user %> + <%= link_to l(:button_edit), + edit_dmsf_path(id: project, folder_id: folder, redirect_to_folder_id: folder.id), + title: l(:link_edit, title: h(folder.title)), + class: 'icon icon-edit' %> + <% end %> + <% if folder && (!locked_for_user || User.current.allowed_to?(:force_file_unlock, project)) %> + <% if folder.locked? %> + <%= link_to_if folder.unlockable?, l(:button_unlock), + unlock_dmsf_path(id: project, folder_id: folder, current: request.url), + title: l(:title_unlock_folder), class: 'icon icon-unlock' %> + <% else %> + <%= link_to(l(:button_lock), + lock_dmsf_path(id: project, folder_id: folder, current: request.url), + title: l(:title_lock_folder), class: 'icon icon-lock') %> + <% end %> + <% end %> + <% if !locked_for_user && ((folder && folder.notification) || (!folder && project.dmsf_notification)) %> + <%= link_to l(:label_notifications_off), + notify_deactivate_dmsf_path(id: project, folder_id: folder), + title: l(:title_notifications_active_deactivate), + class: 'icon icon-email' %> + <% else %> + <%= link_to l(:label_notifications_on), + notify_activate_dmsf_path(id: project, folder_id: folder), + title: l(:title_notifications_not_active_activate), + class: 'icon icon-email-add' %> + <% end %> + <% if file_manipulation_allowed && !locked_for_user %> + <%= link_to l(:label_link_from), + new_dmsf_link_path(project_id: project.id, dmsf_folder_id: folder ? folder.id : folder, + type: 'link_from'), title: l(:title_create_link), + class: 'icon icon-link' %> + <% end %> + <%= link_to(l(:link_create_folder), + new_dmsf_path(id: project, parent_id: folder), + title: l(:link_create_folder), + class: 'icon icon-add') unless locked_for_user %> +<% end %> +<% if trash_enabled %> + <%= link_to l(:link_trash_bin), trash_dmsf_path(project), title: l(:link_trash_bin), class: 'icon icon-del' %> +<% else %> + + <%= l(:link_trash_bin) %> + +<% end %> diff --git a/app/views/dmsf_context_menus/_revision_actions.html.erb b/app/views/dmsf_context_menus/_revision_actions.html.erb new file mode 100644 index 00000000..6235c3b9 --- /dev/null +++ b/app/views/dmsf_context_menus/_revision_actions.html.erb @@ -0,0 +1,38 @@ +<% + # encoding: utf-8 + # + # Redmine plugin for Document Management System "Features" + # + # Copyright © 2011-20 Karel Pičman + # + # This program is free software; you can redistribute it and/or + # modify it under the terms of the GNU General Public License + # as published by the Free Software Foundation; either version 2 + # of the License, or (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +%> + +<%= link_to_function l(:title_download_entries), + "$('#revision_access-#{revision.id}').toggle()", + class: 'icon icon-group dmsf-revision-action-button' %> +<%= link_to l(:title_download), + view_dmsf_file_path(file, download: revision), + title: l(:title_title_version_version_download, title: h(revision.title), version: revision.version), + class: 'icon icon-download dmsf-revision-action-button' %> +<%= link_to l(:title_obsolete_revision), + obsolete_revision_path(revision), + data: { confirm: l(:text_are_you_sure) }, + class: 'icon icon-close dmsf-revision-action-button' if file_manipulation_allowed && (revision.workflow == DmsfWorkflow::STATE_APPROVED) %> +<%= link_to l(:button_delete), + delete_revision_path(revision), + data: { confirm: l(:text_are_you_sure) }, + title: l(:title_delete_revision), + class: 'icon icon-del dmsf-revision-action-button' if file_delete_allowed && (file.dmsf_file_revisions.visible.count > 1) %> \ No newline at end of file diff --git a/app/views/dmsf_context_menus/_revisions.html.erb b/app/views/dmsf_context_menus/_revisions.html.erb new file mode 100644 index 00000000..a1e04694 --- /dev/null +++ b/app/views/dmsf_context_menus/_revisions.html.erb @@ -0,0 +1,40 @@ +<% + # encoding: utf-8 + # + # Redmine plugin for Document Management System "Features" + # + # Copyright © 2011-20 Karel Pičman + # + # This program is free software; you can redistribute it and/or + # modify it under the terms of the GNU General Public License + # as published by the Free Software Foundation; either version 2 + # of the License, or (at your option) any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +%> + +<% if file.notification %> + <%= link_to l(:label_notifications_off), + notify_deactivate_dmsf_files_path(id: file), + title: l(:title_notifications_active_deactivate), + class: 'icon icon-email' %> +<% else %> + <%= link_to l(:label_notifications_on), + notify_activate_dmsf_files_path(id: file), + title: l(:title_notifications_not_active_activate), + class: 'icon icon-email-add' %> +<% end %> +<%= link_to l(:label_link_to), + new_dmsf_link_path(project_id: project.id, dmsf_folder_id: file.dmsf_folder ? file.dmsf_folder.id : nil, dmsf_file_id: file.id, type: 'link_to'), + title: l(:title_create_link), + class: 'icon icon-link' %> +<%= link_to "#{l(:button_copy)}/#{l(:button_move)}", copy_file_path(id: file), + title: l(:title_copy), class: 'icon icon-copy' %> +<%= delete_link(dmsf_file_path(id: file, details: true)) if file_delete_allowed %> diff --git a/app/views/dmsf_files/_revision_access.html.erb b/app/views/dmsf_files/_revision_access.html.erb index a87d44bd..937297cf 100644 --- a/app/views/dmsf_files/_revision_access.html.erb +++ b/app/views/dmsf_files/_revision_access.html.erb @@ -24,7 +24,7 @@ <% query_options = nil unless defined?(query_options) %> <% query_options ||= {} %> -
+
- <%= check_box_tag 'check_all', '', false, class: 'toggle-selection', - title: "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %> - + <%= check_box_tag 'check_all', '', false, class: 'toggle-selection', title: "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %> + - <%= link_to_context_menu %> + <% unless system %> + <% if defined?(EasyExtensions) %> + <%= link_to '', '#', title: l(:button_actions), class: 'icon-only icon-actions js-contextmenu' %> + <% else %> + <%= link_to_context_menu %> + <% end %> + <% end %>
diff --git a/app/views/dmsf_files/show.html.erb b/app/views/dmsf_files/show.html.erb index 03ecaee1..29eb38c0 100644 --- a/app/views/dmsf_files/show.html.erb +++ b/app/views/dmsf_files/show.html.erb @@ -39,31 +39,20 @@ <%= link_to l(:button_lock), lock_dmsf_files_path(id: @file), title: l(:title_lock_file), class: 'icon icon-lock' %> <% end %> - <%= actions_dropdown do %> - <% if @file.notification %> - <%= link_to l(:label_notifications_off), - notify_deactivate_dmsf_files_path(id: @file), - title: l(:title_notifications_active_deactivate), - class: 'icon icon-email' %> - <% else %> - <%= link_to l(:label_notifications_on), - notify_activate_dmsf_files_path(id: @file), - title: l(:title_notifications_not_active_activate), - class: 'icon icon-email-add' %> + <% if defined?(EasyExtensions) %> + <%= render partial: 'dmsf_context_menus/revisions', + locals: { project: @project, file: @file, file_delete_allowed: @file_delete_allowed } %> + <% else %> + <%= actions_dropdown do %> + <%= render partial: 'dmsf_context_menus/revisions', + locals: { project: @project, file: @file, file_delete_allowed: @file_delete_allowed } %> <% end %> - <%= link_to l(:label_link_to), - new_dmsf_link_path(project_id: @project.id, dmsf_folder_id: @file.dmsf_folder ? @file.dmsf_folder.id : nil, dmsf_file_id: @file.id, type: 'link_to'), - title: l(:title_create_link), - class: 'icon icon-link' %> - <%= link_to "#{l(:button_copy)}/#{l(:button_move)}", copy_file_path(id: @file), - title: l(:title_copy), class: 'icon icon-copy' %> - <%= delete_link(dmsf_file_path(id: @file, details: true)) if @file_delete_allowed %> <% end %> <% end %> <% end %> -<%= render partial: '/dmsf/path', locals: { folder: @file.dmsf_folder, filename: @file.title, title: nil} %> +<%= render partial: '/dmsf/path', locals: { folder: @file.dmsf_folder, filename: @file.title, title: nil } %> <% if @file_manipulation_allowed && !@file.locked_for_user? %> <%= error_messages_for('file') %> @@ -81,23 +70,16 @@
- <%= actions_dropdown do %> - <%= link_to_function l(:title_download_entries), - "$('#revision_access-#{revision.id}').toggle()", - class: 'icon icon-group' %> - <%= link_to l(:title_download), - view_dmsf_file_path(@file, download: revision), - title: l(:title_title_version_version_download, title: h(revision.title), version: revision.version), - class: 'icon icon-download' %> - <%= link_to l(:title_obsolete_revision), - obsolete_revision_path(revision), - data: { confirm: l(:text_are_you_sure) }, - class: 'icon icon-close' if @file_manipulation_allowed && (revision.workflow == DmsfWorkflow::STATE_APPROVED) %> - <%= link_to l(:button_delete), - delete_revision_path(revision), - data: { confirm: l(:text_are_you_sure) }, - title: l(:title_delete_revision), - class: 'icon icon-del' if @file_delete_allowed && (@file.dmsf_file_revisions.visible.count > 1) %> + <% if defined?(EasyExtensions) %> + <%= render partial: 'dmsf_context_menus/revision_actions', + locals: { project: @project, file: @file, file_delete_allowed: @file_delete_allowed, + file_manipulation_allowed: @file_manipulation_allowed, revision: @revision } %> + <% else %> + <%= actions_dropdown do %> + <%= render partial: 'dmsf_context_menus/revision_actions', + locals: { project: @project, file: @file, file_delete_allowed: @file_delete_allowed, + file_manipulation_allowed: @file_manipulation_allowed, revision: @revision } %> + <% end %> <% end %>
diff --git a/assets/stylesheets/redmine_dmsf.css b/assets/stylesheets/redmine_dmsf.css index 298da6f1..4c846b74 100644 --- a/assets/stylesheets/redmine_dmsf.css +++ b/assets/stylesheets/redmine_dmsf.css @@ -111,6 +111,15 @@ div.dmsf-revision-inner-box .attribute .label { padding: 5px 0 0 0; } +.dmsf-revision-access { /* EasyExtension */ + margin-left: 0; + margin-right: 0; +} + +div.dmsf-controls .dmsf-revision-action-button { /* EasyExtension */ + border-style: none; +} + /* Command icons */ .icon-link { background-image: url(../../../images/link.png); } .icon-approvalworkflows { background-image: url(../../../images/ticket_go.png); } @@ -203,15 +212,15 @@ div.dmsf-revision-inner-box .attribute .label { background: url(../../../images/arrow_right.png) no-repeat 0 50%; padding-left: 16px; } -.dmsf-tree.idnt-1 .dmsf-title { padding-left: 1.5em; } -.dmsf-tree.idnt-2 .dmsf-title { padding-left: 2em; } -.dmsf-tree.idnt-3 .dmsf-title { padding-left: 2.5em; } -.dmsf-tree.idnt-4 .dmsf-title { padding-left: 3em; } -.dmsf-tree.idnt-5 .dmsf-title { padding-left: 3.5em; } -.dmsf-tree.idnt-6 .dmsf-title { padding-left: 4em; } -.dmsf-tree.idnt-7 .dmsf-title { padding-left: 4.5em; } -.dmsf-tree.idnt-8 .dmsf-title { padding-left: 5em; } -.dmsf-tree.idnt-9 .dmsf-title { padding-left: 5.5em; } +.dmsf-tree.idnt-1 td.dmsf-title { padding-left: 2.5em; } +.dmsf-tree.idnt-2 td.dmsf-title { padding-left: 3em; } +.dmsf-tree.idnt-3 td.dmsf-title { padding-left: 3.5em; } +.dmsf-tree.idnt-4 td.dmsf-title { padding-left: 4em; } +.dmsf-tree.idnt-5 td.dmsf-title { padding-left: 4.5em; } +.dmsf-tree.idnt-6 td.dmsf-title { padding-left: 5em; } +.dmsf-tree.idnt-7 td.dmsf-title { padding-left: 5.5em; } +.dmsf-tree.idnt-8 td.dmsf-title { padding-left: 6em; } +.dmsf-tree.idnt-9 td.dmsf-title { padding-left: 6.5em; } .dmsf-select-version { max-width: 50px; @@ -314,3 +323,13 @@ div.dmsf-revision-inner-box .attribute .label { #dmsf_csv_export_options { display: none; } + +/* EasyExtensions - font icons */ +.icon-actions::before { + content: "\F1D8" !important; +} + +/*.icon-only { + overflow: hidden; + display: inline-block; +}*/ \ No newline at end of file diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 1bf8ec14..a7a00bba 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -403,6 +403,7 @@ cs: button_edit_content: Upravit obsah field_workflow: Workflow field_modified: Datum + field_updated: Datum field_count: Stažení field_first_at: První field_last_at: Poslední diff --git a/config/locales/de.yml b/config/locales/de.yml index 4ac5632c..bd32ef31 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -404,6 +404,7 @@ de: button_edit_content: Bearbeiten den Inhalt field_workflow: Workflow field_modified: Datum + field_updated: Datum field_count: Speicherung field_first_at: Erste field_last_at: Letzte diff --git a/config/locales/en.yml b/config/locales/en.yml index e8dab2a7..30131ddf 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -403,6 +403,7 @@ en: 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 diff --git a/config/locales/es.yml b/config/locales/es.yml index e84b0d7e..cfaa8a2f 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -403,6 +403,7 @@ es: 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 diff --git a/config/locales/fr.yml b/config/locales/fr.yml index d1bd4bc8..b6a1c700 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -403,6 +403,7 @@ fr: 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 diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 7779d2ac..e20ccc47 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -402,6 +402,7 @@ hu: 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 diff --git a/config/locales/it.yml b/config/locales/it.yml index 0fbb4342..3d7b3a1e 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -403,6 +403,7 @@ it: # Italian strings thx 2 Matteo Arceci! 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 diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 92a019c3..31872ddb 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -403,6 +403,7 @@ ja: 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 diff --git a/config/locales/ko.yml b/config/locales/ko.yml index af321528..738cfcf2 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -402,6 +402,7 @@ ko: button_edit_content: 내용 편집 field_workflow: 작업 흐름 field_modified: 수정 날짜 + field_updated: 수정 날짜 field_count: 다운로드 field_first_at: 처음 field_last_at: 마지막 diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 7aa32fa1..156922ee 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -403,6 +403,7 @@ nl: 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 diff --git a/config/locales/pl.yml b/config/locales/pl.yml index c48d92dc..64b3f90e 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -403,6 +403,7 @@ pl: 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 diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index 236a2084..d3619f02 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -403,6 +403,7 @@ pt-BR: 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 diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 0e0534a7..52628a3f 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -403,6 +403,7 @@ ru: 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 diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 3e776461..5662c380 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -403,6 +403,7 @@ sl: 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 diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index bc11b01c..d86c0c1b 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -403,6 +403,7 @@ zh-TW: 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 diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 5b8952d4..254a9aef 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -403,6 +403,7 @@ zh: 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 diff --git a/lib/redmine_dmsf/hooks/views/base_view_hooks.rb b/lib/redmine_dmsf/hooks/views/base_view_hooks.rb index 6044456e..c78e1d6c 100644 --- a/lib/redmine_dmsf/hooks/views/base_view_hooks.rb +++ b/lib/redmine_dmsf/hooks/views/base_view_hooks.rb @@ -24,25 +24,34 @@ module RedmineDmsf class DmsfViewListener < Redmine::Hook::ViewListener + # TODO: *.css are twice there def view_layouts_base_html_head(context={}) - return if defined?(EasyExtensions) - "\n".html_safe + stylesheet_link_tag('redmine_dmsf.css', plugin: :redmine_dmsf) + + #return if defined?(EasyExtensions) + return unless context[:controller].class.name.match?(/^Dmsf/) + 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) + "\n".html_safe + javascript_include_tag('redmine_dmsf.js', plugin: :redmine_dmsf, defer: true) + "\n".html_safe + javascript_include_tag('attachments_dmsf.js', plugin: :redmine_dmsf, defer: true) + # TODO: Why it's not included by EasyExtensions? + if defined?(EasyExtensions) + meta << "\n".html_safe + javascript_include_tag('jquery-2.2.4-ui-1.11.0-ujs-5.2.3', 'application') + meta << "\n".html_safe + javascript_include_tag('context_menu', 'application') + #meta << "\n".html_safe + javascript_include_tag('responsive', 'application') + end + meta end - def easy_extensions_javascripts_hook(context={}) - context[:template].require_asset('select2.min.js') - context[:template].require_asset('redmine_dmsf.js') - context[:template].require_asset('attachments_dmsf.js') - end - - def easy_extensions_stylesheets_hook(context={}) - context[:template].require_asset('redmine_dmsf.css') - context[:template].require_asset('select2.min.css') - end + # def easy_extensions_javascripts_hook(context={}) + # context[:template].require_asset('select2.min.js') + # context[:template].require_asset('redmine_dmsf.js') + # context[:template].require_asset('attachments_dmsf.js') + # end + # + # def easy_extensions_stylesheets_hook(context={}) + # context[:template].require_asset('redmine_dmsf.css') + # context[:template].require_asset('select2.min.css') + # end end end diff --git a/lib/redmine_dmsf/patches/queries_helper_patch.rb b/lib/redmine_dmsf/patches/queries_helper_patch.rb index 5f5b7c16..2b4b6998 100644 --- a/lib/redmine_dmsf/patches/queries_helper_patch.rb +++ b/lib/redmine_dmsf/patches/queries_helper_patch.rb @@ -65,6 +65,10 @@ module RedmineDmsf return 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 && (item.deleted > 0)