Merge branch 'devel-2.4.6' into patch-1

This commit is contained in:
Karel Picman 2021-02-15 13:07:20 +01:00 committed by GitHub
commit 24868041b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
324 changed files with 1364 additions and 816 deletions

View File

@ -3,7 +3,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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
@ -23,13 +23,18 @@ language: ruby
sudo: true
dist: xenial
dist: bionic
rvm:
- 2.6
before_install:
- mysql -e 'CREATE DATABASE IF NOT EXISTS test CHARACTER SET utf8mb4;'
- sudo apt-get -y install litmus curl
before_script:
- sudo mysql -e 'CREATE DATABASE IF NOT EXISTS test CHARACTER SET utf8mb4;'
- 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
- export PATH_TO_DMSF=`pwd`
@ -40,8 +45,6 @@ before_install:
- bash -x ./test/ci/redmine_install.sh -c
- bash -x ./test/ci/redmine_install.sh -i
install:
script:
- bash -x ./test/ci/redmine_install.sh -t
@ -49,6 +52,7 @@ after_script:
- bash -x ./test/ci/redmine_install.sh -u
env:
global:
- DB=sqlite REDMINE_GIT_TAG=4.0-stable
- DB=mysql REDMINE_GIT_TAG=4.0-stable
- DB=postgres REDMINE_GIT_TAG=4.0-stable
@ -63,4 +67,6 @@ services:
- postgresql
addons:
mariadb: '10.3'
mariadb: '10.4'
apt:
update: true

36
Gemfile
View File

@ -4,7 +4,7 @@
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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
@ -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'
group :test do
gem 'rails-controller-testing'
end
end
# Dav4Rack
gem 'ox'
end
# Dav4Rack
gem 'ox'
group :test do
gem 'rails-controller-testing'
end

View File

@ -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)}}`

View File

@ -5,7 +5,7 @@
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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
@ -74,7 +74,7 @@ def dmsf_init
dmsf_files_copy: [:new, :copy, :move],
dmsf_context_menus: [:dmsf]}
pmap.permission :file_delete,
{ dmsf: [:trash, :delete_entries],
{ dmsf: [:trash, :delete_entries, :empty_trash],
dmsf_files: [:delete],
dmsf_trash_context_menus: [:trash] }
pmap.permission :force_file_unlock, {}

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -5,7 +5,7 @@
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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
@ -32,7 +32,8 @@ class DmsfController < ApplicationController
before_action :permissions
# 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_query, only: [:expand_folder, :show, :trash, :empty_trash]
before_action :get_project_roles, only: [:new, :edit, :create]
accept_api_auth :show, :create, :save, :delete
@ -435,6 +436,24 @@ class DmsfController < ApplicationController
end
end
def empty_trash
@query.deleted = true
@query.dmsf_nodes.each do |node|
case node.type
when 'folder'
folder = DmsfFolder.find_by(id: node.id)
folder&.delete true
when 'file'
file = DmsfFile.find_by(id: node.id)
file&.delete true
when /link$/
link = DmsfLink.find_by(id: node.id)
link&.delete true
end
end
redirect_back_or_default trash_dmsf_path(id: @project.id)
end
private
def users_for_new_users
@ -657,4 +676,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

View File

@ -4,7 +4,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -4,7 +4,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -4,7 +4,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -4,7 +4,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -4,7 +4,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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
@ -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)

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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
@ -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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -4,7 +4,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -4,7 +4,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@lbcfree.net>
# Copyright © 2011-21 Karel Pičman <karel.picman@lbcfree.net>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -5,7 +5,7 @@
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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
@ -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)
@ -84,48 +84,52 @@ module DmsfQueriesHelper
super column, item, value
end
when :title
if defined?(EasyExtensions)
# In case of font icons there is no space
value = '&nbsp'.html_safe + value
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 = "<span class=\"dmsf_expander\" onclick=\"dmsfToggle(this, '#{item.id}','#{escape_javascript(expand_folder_dmsf_path)}')\"></span>".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 = "<span class=\"dmsf_expander\" onclick=\"dmsfToggle(this, '#{item.id}','#{escape_javascript(expand_folder_dmsf_path)}')\"></span>".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 = "<span class=\"dmsf_expander\"></span>".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 = "<span class=\"dmsf_expander\"></span>".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 = "<span class=\"dmsf_expander\"></span>".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 = "<span class=\"dmsf_expander\"></span>".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 = "<span class=\"dmsf_expander\"></span>".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 = "<span class=\"dmsf_expander\"></span>".html_safe + tag
end
end
tag + content_tag('div', item.filename, class: 'dmsf-filename', title: l(:field_url))
else
@ -135,7 +139,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 +177,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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@lbcfree.net>
# Copyright © 2011-21 Karel Pičman <karel.picman@lbcfree.net>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -4,7 +4,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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
@ -273,6 +273,15 @@ class DmsfFile < ActiveRecord::Base
file = DmsfFile.new
file.dmsf_folder_id = folder.id if folder
file.project_id = project.id
if DmsfFile.where(project_id: file.project_id, dmsf_folder_id: file.dmsf_folder_id, name: filename).exists?
1.step do |i|
gen_filename = " #{filename} #{l(:dmsf_copy, n: i)}"
unless DmsfFile.where(project_id: file.project_id, dmsf_folder_id: file.dmsf_folder_id, name: gen_filename).exists?
filename = gen_filename
break
end
end
end
file.name = filename
file.notification = Setting.plugin_redmine_dmsf['dmsf_default_notifications'].present?
if file.save && last_revision
@ -464,8 +473,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)

View File

@ -4,7 +4,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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
@ -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-excel'
}.freeze
scope :visible, -> { where(deleted: STATUS_ACTIVE) }

View File

@ -4,7 +4,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -4,7 +4,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -4,7 +4,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2011-20 Karel Pičman <karel.picman@konton.com>
# Copyright © 2011-21 Karel Pičman <karel.picman@konton.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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)

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@konton.com>
# Copyright © 2011-21 Karel Pičman <karel.picman@konton.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -5,7 +5,7 @@
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontorn.com>
# Copyright © 2011-21 Karel Pičman <karel.picman@kontorn.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -4,7 +4,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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
@ -108,13 +108,15 @@ 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)
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).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, step_name)
if user && workflow && revision
if revision.dmsf_file && revision.dmsf_file.project
@project = revision.dmsf_file.project
@ -125,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)
@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 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)} #{step_name}"
end
end

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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
@ -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')
]
@ -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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -5,7 +5,7 @@
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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
@ -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(', ')

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -4,7 +4,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -4,7 +4,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -4,7 +4,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -4,7 +4,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -5,7 +5,7 @@
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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
@ -39,7 +39,7 @@
<td class="buttons">
<% 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 %>

View File

@ -5,7 +5,7 @@
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -5,7 +5,7 @@
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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
@ -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 %>
@ -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 %>
<label class="inline">
@ -95,7 +95,7 @@
<% end %>
<% end %>
<%= label_tag '', l(:label_dmsf_permissions) %>
<% Role.givable.each do |role| %>
<% @project_roles.each do |role| %>
<% checked = @folder.permission_for_role(role) %>
<label class="inline">
<%= check_box_tag 'permissions[role_ids][]', role.id, checked, id: nil %>

View File

@ -5,7 +5,7 @@
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -5,7 +5,7 @@
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -5,7 +5,7 @@
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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
@ -30,8 +30,7 @@
class: 'icon icon-add' %>
<% end %>
<% if @folder_manipulation_allowed %>
<%= link_to l(:link_create_folder), new_dmsf_path(id: @project, parent_id: @folder),
title: l(:link_create_folder), class: 'icon icon-add' %>
<%= link_to l(:link_create_folder), new_dmsf_path(id: @project, parent_id: @folder), class: 'icon icon-add' %>
<% end %>
<% end %>
<% if defined?(EasyExtensions) %>
@ -61,7 +60,7 @@
<div class="dmsf-header">
<div class="wiki">
<%= textilizable(@folder ? @folder.description : @project.dmsf_description) %>
<%= textilizable @folder ? @folder.description : @project.dmsf_description %>
</div>
</div>

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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
@ -22,14 +22,14 @@
<% html_title l(:dmsf) %>
<h2><%= l(:link_trash_bin) %></h2>
<div class="dmsf-header">
<div class="wiki">
<%= textilizable @project.dmsf_description %>
</div>
<div class="contextual">
<% if @file_delete_allowed %>
<%= link_to l(:label_empty_trash_bin), empty_trash_path(id: @project), class: 'icon icon-del' %>
<% end %>
</div>
<h2><%= l(:link_trash_bin) %></h2>
<%= form_tag(trash_dmsf_path(id: @project), method: :get, id: 'query_form', class: 'dmsf-query-form') do %>
<%= render partial: 'queries/query_form' %>
<% end %>

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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
@ -24,11 +24,11 @@
<%= context_menu_link l(:button_edit), dmsf_file_path(id: dmsf_file), class: 'icon icon-edit',
disabled: !allowed || (locked && !unlockable) %>
</li>
<li>
<%= 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? %>
</li>
<% unless dmsf_link %>
<li>
<%= link_to "#{l(:button_copy)}/#{l(:button_move)}", copy_file_path(id: dmsf_file),
title: l(:title_copy), class: 'icon icon-copy' %>
</li>
<li>
<%= link_to l(:label_link_to),
new_dmsf_link_path(project_id: project.id, dmsf_folder_id: dmsf_file.dmsf_folder&.id,
@ -82,5 +82,5 @@
<%= context_menu_link l(:button_delete),
dmsf_link ? dmsf_link_path(id: dmsf_link, folder_id: folder) : dmsf_file_path(id: dmsf_file, folder_id: folder),
method: :delete, class: 'icon icon-del', data: { confirm: l(:text_are_you_sure) }, id: 'dmsf-cm-delete',
disabled: !allowed || locked %>
disabled: !allowed || (locked && !dmsf_link) %>
</li>

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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
@ -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 %>
</li>
<li>
<%= context_menu_link "#{l(:button_copy)}/#{l(:button_move)}", copy_folder_path(id: dmsf_folder),
class: 'icon icon-copy', disabled: !allowed || locked %>
</li>
<% unless dmsf_link %>
<li>
<%= context_menu_link "#{l(:button_copy)}/#{l(:button_move)}", copy_folder_path(id: dmsf_folder),
class: 'icon icon-copy', disabled: !allowed || locked %>
</li>
<li>
<%= context_menu_link l(:label_link_to),
new_dmsf_link_path(project_id: project.id, dmsf_folder_id: dmsf_folder.id, type: 'link_to'),
@ -66,7 +66,8 @@
</li>
<li>
<%= 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_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) %>
</li>

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -5,7 +5,7 @@
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -5,7 +5,7 @@
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -5,7 +5,7 @@
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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
@ -99,7 +99,7 @@
<% if revision.description.present? %>
<div class="status attribute">
<%= 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' %>
</div>
<% end %>

View File

@ -5,7 +5,7 @@
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -5,7 +5,7 @@
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -3,7 +3,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -2,7 +2,7 @@
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -5,7 +5,7 @@
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -2,7 +2,7 @@
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -5,7 +5,7 @@
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

View File

@ -5,7 +5,7 @@
#
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
# Copyright © 2011-21 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

Some files were not shown because too many files have changed in this diff Show More