#1080 EasyExtensions compatibility

This commit is contained in:
Karel Pičman 2020-03-26 13:16:14 +01:00
parent 78975cedd4
commit 5356406710
27 changed files with 274 additions and 114 deletions

View File

@ -27,13 +27,18 @@
<%= hidden_field_tag 'back_url', url_for(params: request.query_parameters), id: nil %> <%= hidden_field_tag 'back_url', url_for(params: request.query_parameters), id: nil %>
<%= query_columns_hidden_tags(query) %> <%= query_columns_hidden_tags(query) %>
<div class="autoscroll"> <div class="autoscroll">
<table class="list dmsf odd-even <%= query.css_classes %>"> <table class="list dmsf odd-even <%= query.css_classes %> context_menu-container" data-hascontextmenu="true">
<thead> <thead>
<tr> <tr>
<th class="checkbox hide-when-print"> <% if defined?(EasyExtensions) %>
<%= check_box_tag 'check_all', '', false, class: 'toggle-selection', <%# Easy checkbox %>
title: "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %> <%= content_tag :th, link_to_function('', 'EASY.contextMenu.toggleIssuesSelection($(this))',
</th> title: "#{l(:button_check_all)}/#{l(:button_uncheck_all)}", class: 'icon icon-checked') %>
<% else %>
<th class="checkbox hide-when-print">
<%= check_box_tag 'check_all', '', false, class: 'toggle-selection', title: "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %>
</th>
<% end %>
<% query.inline_columns.each do |column| %> <% query.inline_columns.each do |column| %>
<%= column_header(query, column, query_options) %> <%= column_header(query, column, query_options) %>
<% end %> <% end %>

View File

@ -36,7 +36,13 @@
<%= content_tag 'td', column_content(column, node), class: column.css_classes %> <%= content_tag 'td', column_content(column, node), class: column.css_classes %>
<% end %> <% end %>
<td class="buttons"> <td class="buttons">
<%= 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 %>
</td> </td>
</tr> </tr>
<% end %> <% end %>

View File

@ -28,57 +28,25 @@
<%= link_to l(:label_attachment_new), multi_dmsf_upload_path(id: @project, dmsf_folder_id: @folder), <%= link_to l(:label_attachment_new), multi_dmsf_upload_path(id: @project, dmsf_folder_id: @folder),
class: 'icon icon-add' %> class: 'icon icon-add' %>
<% end %> <% 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 %> <%= actions_dropdown do %>
<% if @folder_manipulation_allowed && !@system_folder %> <%= render partial: 'dmsf_context_menus/main', locals: {
<% if @folder.nil? %> folder_manipulation_allowed: @folder_manipulation_allowed,
<%= link_to l(:button_edit), edit_root_dmsf_path(id: @project), system_folder: @system_folder,
title: l(:link_edit, title: l(:link_documents)), folder: @folder,
class: 'icon icon-edit' %> project: @project,
<% elsif !@locked_for_user %> locked_for_user: @locked_for_user,
<%= link_to l(:button_edit), file_manipulation_allowed: @file_manipulation_allowed,
edit_dmsf_path(id: @project, folder_id: @folder, redirect_to_folder_id: @folder.id), trash_enabled: @trash_enabled } %>
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 %>
<span class="icon icon-del">
<%= l(:link_trash_bin) %>
</span>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>

View File

@ -0,0 +1,73 @@
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
#
# 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 %>
<span class="icon icon-del">
<%= l(:link_trash_bin) %>
</span>
<% end %>

View File

@ -0,0 +1,38 @@
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
#
# 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) %>

View File

@ -0,0 +1,40 @@
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
#
# 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 %>

View File

@ -24,7 +24,7 @@
<% query_options = nil unless defined?(query_options) %> <% query_options = nil unless defined?(query_options) %>
<% query_options ||= {} %> <% query_options ||= {} %>
<div class="autoscroll"> <div class="autoscroll dmsf-revision-access">
<table class="list dmsf odd-even <%= query.css_classes %>"> <table class="list dmsf odd-even <%= query.css_classes %>">
<thead> <thead>
<tr> <tr>

View File

@ -39,31 +39,20 @@
<%= link_to l(:button_lock), lock_dmsf_files_path(id: @file), <%= link_to l(:button_lock), lock_dmsf_files_path(id: @file),
title: l(:title_lock_file), class: 'icon icon-lock' %> title: l(:title_lock_file), class: 'icon icon-lock' %>
<% end %> <% end %>
<%= actions_dropdown do %> <% if defined?(EasyExtensions) %>
<% if @file.notification %> <%= render partial: 'dmsf_context_menus/revisions',
<%= link_to l(:label_notifications_off), locals: { project: @project, file: @file, file_delete_allowed: @file_delete_allowed } %>
notify_deactivate_dmsf_files_path(id: @file), <% else %>
title: l(:title_notifications_active_deactivate), <%= actions_dropdown do %>
class: 'icon icon-email' %> <%= render partial: 'dmsf_context_menus/revisions',
<% else %> locals: { project: @project, file: @file, file_delete_allowed: @file_delete_allowed } %>
<%= 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 %> <% 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 %> <% end %>
<% end %> <% end %>
</div> </div>
<%= 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? %> <% if @file_manipulation_allowed && !@file.locked_for_user? %>
<%= error_messages_for('file') %> <%= error_messages_for('file') %>
@ -81,23 +70,16 @@
<div class="dmsf-revision-box"> <div class="dmsf-revision-box">
<div class="dmsf-widget-header fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix"> <div class="dmsf-widget-header fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix">
<div class="dmsf-controls contextual"> <div class="dmsf-controls contextual">
<%= actions_dropdown do %> <% if defined?(EasyExtensions) %>
<%= link_to_function l(:title_download_entries), <%= render partial: 'dmsf_context_menus/revision_actions',
"$('#revision_access-#{revision.id}').toggle()", locals: { project: @project, file: @file, file_delete_allowed: @file_delete_allowed,
class: 'icon icon-group' %> file_manipulation_allowed: @file_manipulation_allowed, revision: @revision } %>
<%= link_to l(:title_download), <% else %>
view_dmsf_file_path(@file, download: revision), <%= actions_dropdown do %>
title: l(:title_title_version_version_download, title: h(revision.title), version: revision.version), <%= render partial: 'dmsf_context_menus/revision_actions',
class: 'icon icon-download' %> locals: { project: @project, file: @file, file_delete_allowed: @file_delete_allowed,
<%= link_to l(:title_obsolete_revision), file_manipulation_allowed: @file_manipulation_allowed, revision: @revision } %>
obsolete_revision_path(revision), <% end %>
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) %>
<% end %> <% end %>
</div> </div>
<div class="dmsf-widget-header-text"> <div class="dmsf-widget-header-text">

View File

@ -111,6 +111,15 @@ div.dmsf-revision-inner-box .attribute .label {
padding: 5px 0 0 0; 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 */ /* Command icons */
.icon-link { background-image: url(../../../images/link.png); } .icon-link { background-image: url(../../../images/link.png); }
.icon-approvalworkflows { background-image: url(../../../images/ticket_go.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%; background: url(../../../images/arrow_right.png) no-repeat 0 50%;
padding-left: 16px; padding-left: 16px;
} }
.dmsf-tree.idnt-1 .dmsf-title { padding-left: 1.5em; } .dmsf-tree.idnt-1 td.dmsf-title { padding-left: 2.5em; }
.dmsf-tree.idnt-2 .dmsf-title { padding-left: 2em; } .dmsf-tree.idnt-2 td.dmsf-title { padding-left: 3em; }
.dmsf-tree.idnt-3 .dmsf-title { padding-left: 2.5em; } .dmsf-tree.idnt-3 td.dmsf-title { padding-left: 3.5em; }
.dmsf-tree.idnt-4 .dmsf-title { padding-left: 3em; } .dmsf-tree.idnt-4 td.dmsf-title { padding-left: 4em; }
.dmsf-tree.idnt-5 .dmsf-title { padding-left: 3.5em; } .dmsf-tree.idnt-5 td.dmsf-title { padding-left: 4.5em; }
.dmsf-tree.idnt-6 .dmsf-title { padding-left: 4em; } .dmsf-tree.idnt-6 td.dmsf-title { padding-left: 5em; }
.dmsf-tree.idnt-7 .dmsf-title { padding-left: 4.5em; } .dmsf-tree.idnt-7 td.dmsf-title { padding-left: 5.5em; }
.dmsf-tree.idnt-8 .dmsf-title { padding-left: 5em; } .dmsf-tree.idnt-8 td.dmsf-title { padding-left: 6em; }
.dmsf-tree.idnt-9 .dmsf-title { padding-left: 5.5em; } .dmsf-tree.idnt-9 td.dmsf-title { padding-left: 6.5em; }
.dmsf-select-version { .dmsf-select-version {
max-width: 50px; max-width: 50px;
@ -314,3 +323,13 @@ div.dmsf-revision-inner-box .attribute .label {
#dmsf_csv_export_options { #dmsf_csv_export_options {
display: none; display: none;
} }
/* EasyExtensions - font icons */
.icon-actions::before {
content: "\F1D8" !important;
}
/*.icon-only {
overflow: hidden;
display: inline-block;
}*/

View File

@ -403,6 +403,7 @@ cs:
button_edit_content: Upravit obsah button_edit_content: Upravit obsah
field_workflow: Workflow field_workflow: Workflow
field_modified: Datum field_modified: Datum
field_updated: Datum
field_count: Stažení field_count: Stažení
field_first_at: První field_first_at: První
field_last_at: Poslední field_last_at: Poslední

View File

@ -404,6 +404,7 @@ de:
button_edit_content: Bearbeiten den Inhalt button_edit_content: Bearbeiten den Inhalt
field_workflow: Workflow field_workflow: Workflow
field_modified: Datum field_modified: Datum
field_updated: Datum
field_count: Speicherung field_count: Speicherung
field_first_at: Erste field_first_at: Erste
field_last_at: Letzte field_last_at: Letzte

View File

@ -403,6 +403,7 @@ en:
button_edit_content: Edit content button_edit_content: Edit content
field_workflow: Workflow field_workflow: Workflow
field_modified: Date field_modified: Date
field_updated: Date
field_count: D/L field_count: D/L
field_first_at: First field_first_at: First
field_last_at: Last field_last_at: Last

View File

@ -403,6 +403,7 @@ es:
button_edit_content: Edit content button_edit_content: Edit content
field_workflow: Workflow field_workflow: Workflow
field_modified: Date field_modified: Date
field_updated: Date
field_count: D/L field_count: D/L
field_first_at: First field_first_at: First
field_last_at: Last field_last_at: Last

View File

@ -403,6 +403,7 @@ fr:
button_edit_content: Edit content button_edit_content: Edit content
field_workflow: Workflow field_workflow: Workflow
field_modified: Date field_modified: Date
field_updated: Date
field_count: D/L field_count: D/L
field_first_at: First field_first_at: First
field_last_at: Last field_last_at: Last

View File

@ -402,6 +402,7 @@ hu:
button_edit_content: Edit content button_edit_content: Edit content
field_workflow: Workflow field_workflow: Workflow
field_modified: Date field_modified: Date
field_updated: Date
field_count: D/L field_count: D/L
field_first_at: First field_first_at: First
field_last_at: Last field_last_at: Last

View File

@ -403,6 +403,7 @@ it: # Italian strings thx 2 Matteo Arceci!
button_edit_content: Edit content button_edit_content: Edit content
field_workflow: Workflow field_workflow: Workflow
field_modified: Date field_modified: Date
field_updated: Date
field_count: D/L field_count: D/L
field_first_at: First field_first_at: First
field_last_at: Last field_last_at: Last

View File

@ -403,6 +403,7 @@ ja:
button_edit_content: Edit content button_edit_content: Edit content
field_workflow: Workflow field_workflow: Workflow
field_modified: Date field_modified: Date
field_updated: Date
field_count: D/L field_count: D/L
field_first_at: First field_first_at: First
field_last_at: Last field_last_at: Last

View File

@ -402,6 +402,7 @@ ko:
button_edit_content: 내용 편집 button_edit_content: 내용 편집
field_workflow: 작업 흐름 field_workflow: 작업 흐름
field_modified: 수정 날짜 field_modified: 수정 날짜
field_updated: 수정 날짜
field_count: 다운로드 field_count: 다운로드
field_first_at: 처음 field_first_at: 처음
field_last_at: 마지막 field_last_at: 마지막

View File

@ -403,6 +403,7 @@ nl:
button_edit_content: Edit content button_edit_content: Edit content
field_workflow: Workflow field_workflow: Workflow
field_modified: Date field_modified: Date
field_updated: Date
field_count: D/L field_count: D/L
field_first_at: First field_first_at: First
field_last_at: Last field_last_at: Last

View File

@ -403,6 +403,7 @@ pl:
button_edit_content: Edit content button_edit_content: Edit content
field_workflow: Workflow field_workflow: Workflow
field_modified: Date field_modified: Date
field_updated: Date
field_count: D/L field_count: D/L
field_first_at: First field_first_at: First
field_last_at: Last field_last_at: Last

View File

@ -403,6 +403,7 @@ pt-BR:
button_edit_content: Edit content button_edit_content: Edit content
field_workflow: Workflow field_workflow: Workflow
field_modified: Date field_modified: Date
field_updated: Date
field_count: D/L field_count: D/L
field_first_at: First field_first_at: First
field_last_at: Last field_last_at: Last

View File

@ -403,6 +403,7 @@ ru:
button_edit_content: Edit content button_edit_content: Edit content
field_workflow: Workflow field_workflow: Workflow
field_modified: Date field_modified: Date
field_updated: Date
field_count: D/L field_count: D/L
field_first_at: First field_first_at: First
field_last_at: Last field_last_at: Last

View File

@ -403,6 +403,7 @@ sl:
button_edit_content: Edit content button_edit_content: Edit content
field_workflow: Workflow field_workflow: Workflow
field_modified: Date field_modified: Date
field_updated: Date
field_count: D/L field_count: D/L
field_first_at: First field_first_at: First
field_last_at: Last field_last_at: Last

View File

@ -403,6 +403,7 @@ zh-TW:
button_edit_content: Edit content button_edit_content: Edit content
field_workflow: Workflow field_workflow: Workflow
field_modified: Date field_modified: Date
field_updated: Date
field_count: D/L field_count: D/L
field_first_at: First field_first_at: First
field_last_at: Last field_last_at: Last

View File

@ -403,6 +403,7 @@ zh:
button_edit_content: Edit content button_edit_content: Edit content
field_workflow: Workflow field_workflow: Workflow
field_modified: Date field_modified: Date
field_updated: Date
field_count: D/L field_count: D/L
field_first_at: First field_first_at: First
field_last_at: Last field_last_at: Last

View File

@ -24,25 +24,34 @@ module RedmineDmsf
class DmsfViewListener < Redmine::Hook::ViewListener class DmsfViewListener < Redmine::Hook::ViewListener
# TODO: *.css are twice there
def view_layouts_base_html_head(context={}) def view_layouts_base_html_head(context={})
return if defined?(EasyExtensions) #return if defined?(EasyExtensions)
"\n".html_safe + stylesheet_link_tag('redmine_dmsf.css', plugin: :redmine_dmsf) + 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 + 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('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('redmine_dmsf.js', plugin: :redmine_dmsf, defer: true) +
"\n".html_safe + javascript_include_tag('attachments_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 end
def easy_extensions_javascripts_hook(context={}) # def easy_extensions_javascripts_hook(context={})
context[:template].require_asset('select2.min.js') # context[:template].require_asset('select2.min.js')
context[:template].require_asset('redmine_dmsf.js') # context[:template].require_asset('redmine_dmsf.js')
context[:template].require_asset('attachments_dmsf.js') # context[:template].require_asset('attachments_dmsf.js')
end # end
#
def easy_extensions_stylesheets_hook(context={}) # def easy_extensions_stylesheets_hook(context={})
context[:template].require_asset('redmine_dmsf.css') # context[:template].require_asset('redmine_dmsf.css')
context[:template].require_asset('select2.min.css') # context[:template].require_asset('select2.min.css')
end # end
end end
end end

View File

@ -65,6 +65,10 @@ module RedmineDmsf
return super column, item, value return super column, item, value
end end
when :title when :title
if defined?(EasyExtensions)
# In case of font icons there is no space
value = '&nbsp'.html_safe + value
end
case item.type case item.type
when 'folder' when 'folder'
if item.deleted && (item.deleted > 0) if item.deleted && (item.deleted > 0)