From 29b33edad48bc828326cda5b41554675c6b187c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Karel=20Pi=C4=8Dman?=
Date: Thu, 19 Mar 2020 14:08:29 +0100
Subject: [PATCH] CCS revision
---
app/controllers/dmsf_links_controller.rb | 2 +-
app/controllers/dmsf_upload_controller.rb | 2 +-
app/helpers/dmsf_workflows_helper.rb | 2 +-
app/models/dmsf_file_revision.rb | 2 +-
app/models/dmsf_folder.rb | 10 +-
app/models/dmsf_title_query_column.rb | 2 +-
app/views/dmsf/show.html.erb | 2 +-
.../dmsf_files/_file_new_revision.html.erb | 4 +-
app/views/dmsf_files/_link.html.erb | 2 +-
app/views/dmsf_files/_links.html.erb | 4 +-
app/views/dmsf_files/show.html.erb | 12 +-
app/views/dmsf_public_urls/_new.html.erb | 3 +-
app/views/dmsf_upload/_form.html.erb | 2 +-
app/views/dmsf_upload/_upload_file.html.erb | 4 +-
app/views/dmsf_upload/multi_upload.html.erb | 2 +-
app/views/dmsf_workflows/_log.html.erb | 4 +-
app/views/dmsf_workflows/_main.html.erb | 2 +-
app/views/dmsf_workflows/_steps.html.erb | 6 +-
app/views/my/blocks/_open_approvals.html.erb | 2 +-
assets/images/folder_system_closed.png | Bin 393 -> 0 bytes
assets/javascripts/attachments_dmsf.js | 60 +++---
assets/javascripts/redmine_dmsf.js | 44 ++---
assets/stylesheets/redmine_dmsf.css | 178 +++++++-----------
extra/xapian_indexer.rb | 2 +-
.../hooks/views/issue_view_hooks.rb | 12 +-
.../patches/easy_crm_case_patch.rb | 1 -
lib/redmine_dmsf/patches/issue_patch.rb | 1 -
.../patches/queries_helper_patch.rb | 10 +-
test/ci/redmine_install.sh | 14 +-
test/functional/dmsf_controller_test.rb | 2 +-
test/unit/dmsf_lock_test.rb | 4 +-
31 files changed, 180 insertions(+), 217 deletions(-)
delete mode 100644 assets/images/folder_system_closed.png
diff --git a/app/controllers/dmsf_links_controller.rb b/app/controllers/dmsf_links_controller.rb
index 344f02f9..cfb6c406 100644
--- a/app/controllers/dmsf_links_controller.rb
+++ b/app/controllers/dmsf_links_controller.rb
@@ -171,7 +171,7 @@ class DmsfLinksController < ApplicationController
if @dmsf_link.delete(commit)
flash[:notice] = l(:notice_successful_delete)
else
- @dmsf_link.errors.each do |e, msg|
+ @dmsf_link.errors.each do |_, msg|
flash[:error] = msg
end
end
diff --git a/app/controllers/dmsf_upload_controller.rb b/app/controllers/dmsf_upload_controller.rb
index 6049f554..1de2d0a3 100644
--- a/app/controllers/dmsf_upload_controller.rb
+++ b/app/controllers/dmsf_upload_controller.rb
@@ -114,7 +114,7 @@ class DmsfUploadController < ApplicationController
if attachments
@folder = DmsfFolder.visible.find_by(id: attachments[:folder_id]) if attachments[:folder_id].present?
# standard file input uploads
- uploaded_files = attachments.select { |key, value| key == 'uploaded_file'}
+ uploaded_files = attachments.select { |key, _| key == 'uploaded_file'}
uploaded_files.each do |_, uploaded_file|
upload = DmsfUpload.create_from_uploaded_attachment(@project, @folder, uploaded_file)
if upload
diff --git a/app/helpers/dmsf_workflows_helper.rb b/app/helpers/dmsf_workflows_helper.rb
index 4221ea18..fdd134b6 100644
--- a/app/helpers/dmsf_workflows_helper.rb
+++ b/app/helpers/dmsf_workflows_helper.rb
@@ -39,7 +39,7 @@ module DmsfWorkflowsHelper
class: 'objects-selection')
end
- links = pagination_links_full(principal_pages, principal_count, per_page_links: false) do |text, parameters, options|
+ links = pagination_links_full(principal_pages, principal_count, per_page_links: false) do |text, parameters, _|
link_to text,
autocomplete_for_user_dmsf_workflow_path(workflow, parameters.merge(q: params[:q], format: 'js')),
remote: true
diff --git a/app/models/dmsf_file_revision.rb b/app/models/dmsf_file_revision.rb
index 941f4b86..2915f575 100644
--- a/app/models/dmsf_file_revision.rb
+++ b/app/models/dmsf_file_revision.rb
@@ -92,7 +92,7 @@ class DmsfFileRevision < ActiveRecord::Base
remove_extension(filename).gsub(/_+/, ' ');
end
- def self.easy_activity_custom_project_scope(scope, options, event_type)
+ def self.easy_activity_custom_project_scope(scope, options, _)
scope.where(dmsf_files: { project_id: options[:project_ids] })
end
diff --git a/app/models/dmsf_folder.rb b/app/models/dmsf_folder.rb
index 5a552f74..2a60d2f3 100644
--- a/app/models/dmsf_folder.rb
+++ b/app/models/dmsf_folder.rb
@@ -534,15 +534,15 @@ class DmsfFolder < ActiveRecord::Base
classes = []
if trash
if title =~ /^\./
- classes << 'dmsf_system'
+ classes << 'dmsf-system'
else
classes << 'hascontextmenu'
if type =~ /link$/
- classes << 'dmsf_gray'
+ classes << 'dmsf-gray'
end
end
else
- classes << 'dmsf_tree'
+ classes << 'dmsf-tree'
if type == 'folder'
classes << 'dmsf_collapsed'
classes << 'dmsf-not-loaded'
@@ -550,7 +550,7 @@ class DmsfFolder < ActiveRecord::Base
classes << 'dmsf_child'
end
if title =~ /^\./
- classes << 'dmsf_system'
+ classes << 'dmsf-system'
else
classes << 'hascontextmenu'
classes << 'dmsf-draggable'
@@ -558,7 +558,7 @@ class DmsfFolder < ActiveRecord::Base
classes << 'dmsf-droppable'
end
if type =~ /link$/
- classes << 'dmsf_gray'
+ classes << 'dmsf-gray'
end
end
end
diff --git a/app/models/dmsf_title_query_column.rb b/app/models/dmsf_title_query_column.rb
index 876fa9f1..ce67700d 100644
--- a/app/models/dmsf_title_query_column.rb
+++ b/app/models/dmsf_title_query_column.rb
@@ -23,7 +23,7 @@
class DmsfTitleQueryColumn < QueryColumn
def css_classes
- 'dmsf_title'
+ 'dmsf-title'
end
end
diff --git a/app/views/dmsf/show.html.erb b/app/views/dmsf/show.html.erb
index 337ed80d..9e43a190 100644
--- a/app/views/dmsf/show.html.erb
+++ b/app/views/dmsf/show.html.erb
@@ -99,7 +99,7 @@
<%= context_menu %>
-<% unless (@folder && @folder.system) %>
+<% unless @folder && @folder.system %>
<% other_formats_links do |f| %>
<%= f.link_to 'CSV', url: { action: :show, id: @project, dmsf_folder_id: @folder } %>
<% end %>
diff --git a/app/views/dmsf_files/_file_new_revision.html.erb b/app/views/dmsf_files/_file_new_revision.html.erb
index 69e2d8ac..8d90305f 100644
--- a/app/views/dmsf_files/_file_new_revision.html.erb
+++ b/app/views/dmsf_files/_file_new_revision.html.erb
@@ -69,10 +69,10 @@
<%= radio_button_tag('version', 3) %>
<%= select_tag 'custom_version_major', options_for_select(DmsfUploadHelper::major_version_select_options,
DmsfUploadHelper::gui_version(DmsfUploadHelper::increase_version(@file.last_revision.major_version, 2))),
- onchange: '$("#version_3").prop("checked", true)', class: 'dmsf_select_version' %>.
+ onchange: '$("#version_3").prop("checked", true)', class: 'dmsf-select-version' %>.
<%= select_tag 'custom_version_minor', options_for_select(DmsfUploadHelper::minor_version_select_options,
DmsfUploadHelper::gui_version(DmsfUploadHelper.increase_version(@file.last_revision.minor_version, 1))),
- onchange: '$("#version_3").prop("checked", true)', class: 'dmsf_select_version' %>
+ onchange: '$("#version_3").prop("checked", true)', class: 'dmsf-select-version' %>
<%= l(:option_version_custom) %>
diff --git a/app/views/dmsf_files/_link.html.erb b/app/views/dmsf_files/_link.html.erb
index c704b37a..1d6c9ae7 100644
--- a/app/views/dmsf_files/_link.html.erb
+++ b/app/views/dmsf_files/_link.html.erb
@@ -20,7 +20,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<% if link %>
-
+
<% else %>
<% end %>
diff --git a/app/views/dmsf_files/_links.html.erb b/app/views/dmsf_files/_links.html.erb
index 5351f655..6ad43106 100644
--- a/app/views/dmsf_files/_links.html.erb
+++ b/app/views/dmsf_files/_links.html.erb
@@ -23,9 +23,9 @@
<% if links.present? %>
<%= l(:menu_dmsf) %>
-
+
<% # DMS documents & links %>
- <% links.each do |dmsf_file, link, create_at| %>
+ <% links.each do |dmsf_file, link, _| %>
<%= render partial: 'dmsf_files/link', locals: { dmsf_file: dmsf_file, link: link } %>
<% end %>
<%= render partial: 'dmsf_files/thumbnails', locals: { links: links, thumbnails: thumbnails, link_to: true } %>
diff --git a/app/views/dmsf_files/show.html.erb b/app/views/dmsf_files/show.html.erb
index a05dea53..03ecaee1 100644
--- a/app/views/dmsf_files/show.html.erb
+++ b/app/views/dmsf_files/show.html.erb
@@ -71,16 +71,16 @@
<%= render(partial: 'file_new_revision') %>
<% end %>
-
+
<%= label_tag('', l(:label_document)) %>
#<%= "#{@file.id}" %>
<%= l(:heading_revisions) %>
<% @file.dmsf_file_revisions.visible[@revision_pages.offset, @revision_pages.per_page].each do |revision| %>
-
-