diff --git a/.github/workflows/rubyonrails.yml b/.github/workflows/rubyonrails.yml index 4e30c89f..b7fc0fa6 100644 --- a/.github/workflows/rubyonrails.yml +++ b/.github/workflows/rubyonrails.yml @@ -2,20 +2,19 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . + # GitHub CI script name: "GitHub CI" diff --git a/.rubocop.yml b/.rubocop.yml index cd06be9f..82abac08 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,19 +2,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . AllCops: TargetRubyVersion: 3.2 @@ -85,7 +84,7 @@ Naming/AccessorMethodName: Naming/PredicateName: Exclude: - - patches/attachable_patch.rb # Easy tests + - patches/attachable_patch.rb Style/HashSyntax: EnforcedShorthandSyntax: either @@ -96,7 +95,7 @@ Style/ZeroLengthPredicate: Rails/BulkChangeTable: Exclude: - - db/migrate/20170217141601_add_dmsf_not_inheritable_to_custom_fields.rb # Easy tests + - db/migrate/20170217141601_add_dmsf_not_inheritable_to_custom_fields.rb Rails/DangerousColumnNames: Exclude: @@ -111,8 +110,8 @@ Rails/SkipsModelValidations: Exclude: - app/helpers/dmsf_upload_helper.rb # touch is Okay - app/models/dmsf_workflow.rb # update doesn't work here - - patches/user_patch.rb - - patches/role_patch.rb + - lib/redmine_dmsf/patches/user_patch.rb + - lib/redmine_dmsf/patches/role_patch.rb - db/migrate/20170526144701_dmsf_attachable.rb - db/migrate/20170421101901_dmsf_file_container_rollback.rb - db/migrate/20170118142001_dmsf_file_container.rb @@ -124,8 +123,8 @@ Rails/SkipsModelValidations: Rails/ThreeStateBooleanColumn: Exclude: - - db/migrate/04_dmsf_0_9_0.rb # Easy tests - - db/migrate/20170217141601_add_dmsf_not_inheritable_to_custom_fields.rb # Easy tests + - db/migrate/04_dmsf_0_9_0.rb + - db/migrate/20170217141601_add_dmsf_not_inheritable_to_custom_fields.rb Rails/UniqueValidationWithoutIndex: Exclude: diff --git a/CHANGELOG.md b/CHANGELOG.md index 39fbb765..9e914f02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,25 @@ Changelog for Redmine DMSF ========================== +4.2.0 *2025-07-04* +------------------ + + SQL server compatibility + Change of the license from GNU GPL v2 to v3 + PDF thumbnails + +NOTE: These issues are still from the original danmunn's repository + +* Bug: #1601 - Serialization of attached documents is wrong +* Bug: #1600 - Different versions for different types of uploading +* Bug: #1599 - Empty Trash => Error 500 +* New: #1597 - GNU GPL v2 -> v3 +* New: #1596 - Add a warning about searching in sub-folders +* Bug: #1595 - DMSF WebDAV Configuration Fails on Redmine 6.0.5 + 4.1.3 *2025-05-09* ------------------ - + SQL server compatibility * Bug: #1595 - DMSF WebDAV Configuration Fails on Redmine 6.0.5 @@ -82,7 +98,7 @@ Changelog for Redmine DMSF 3.2.3 *2024-10-18* ------------------ - + Uploaded file size fix * Bug: 1556 - Wrong file size when uploading documents @@ -132,7 +148,7 @@ Changelog for Redmine DMSF Several bugs fixed * Bug: #1533 - Mysql2::Error::TimeoutError -* Bug: #1532 - Target folder and project are the same as current +* Bug: #1532 - Target folder and project are the same as current * Bug: #1531 - Fixing NoMethodError in DmsfFileRevisionFormat * New: #1529 - Maintenance/update german translation @@ -141,7 +157,7 @@ Changelog for Redmine DMSF Maintenance release -* Bug: #1528 - WebDAV / LDAP-User errors +* Bug: #1528 - WebDAV / LDAP-User errors 3.1.6 *2024-06-04* ------------------ @@ -191,7 +207,7 @@ Changelog for Redmine DMSF IMPORTANT: REST API for copying/moving has changed. Check *extra/api/api_client.sh*. * Bug: #1490 - Latest plugin version on windows: problematic dependency 'xapian-ruby' -* Bug: #1486 - Some context menu improvements +* Bug: #1486 - Some context menu improvements * Bug: #1485 - Renames locales/ua.yml * Bug: #1484 - Author should be kept when moving a folder type * Bug: #1483 - Setting.plugin_redmine_dmsf['dmsf_index_database']: undefined method 'strip' for nil:NilClass @@ -201,7 +217,7 @@ IMPORTANT: REST API for copying/moving has changed. Check *extra/api/api_client. * Bug: #1473 - Edited documents cannot be unlocked * Bug: #1472 - Failed upgrade up to version 3.1.1 from version 3.0.12 * New: #1248 - Make DMS document available as Type of a custom field -* New: #1132 - Please provide a simple file operation menu +* New: #1132 - Please provide a simple file operation menu 3.1.2 *2023-08-23* ------------------ @@ -215,7 +231,7 @@ IMPORTANT: REST API for copying/moving has changed. Check *extra/api/api_client. Bug fixing -* Bug #1466 - Wrong number of arguments in dmsf links new +* Bug #1466 - Wrong number of arguments in dmsf links new 3.1.0 *2023-08-10* ------------------ @@ -242,7 +258,7 @@ IMPORTANT: REST API for copying/moving has changed. Check *extra/api/api_client. * Bug: #1449 - Lost attachment on bulk edit * Bug: #1448 - Convert documents fails * New: #1445 - To support OCR feature -* Bug: #1444 - Feature/add notification labels +* Bug: #1444 - Feature/add notification labels * New: #1443 - Updates german translations * Bug: #1439 - Error when opening Setting page * Bug: #1438 - Error while de-installing the plugin "Validation failed: Name contains invalid character(s)" @@ -287,7 +303,7 @@ IMPORTANT: REST API for copying/moving has changed. Check *extra/api/api_client. * Bug: #1413 - Vim edit through webdav causes lose of all file versions besides last. * Bug: #1408 - Lost attachment 2 * New: #513 - Email Notification when someone downloads a file -* New: #239 - Easy Document link macro creation +* New: #239 - Easy Document link macro creation 3.0.7 *2022-11-01* ------------------ @@ -395,7 +411,7 @@ IMPORTANT: REST API for copying/moving has changed. Check *extra/api/api_client. * New: #1348 - Custom Fields not shown on folder level * Bug: #1345 - Conflict with RedmineUP invoice plugin * New: #1227 - Check if a document contains a signature -* New: #1203 - Suggest to add document preview +* New: #1203 - Suggest to add document preview 3.0.0 *2022-04-28* ------------------- @@ -436,7 +452,7 @@ IMPORTANT: REST API for copying/moving has changed. Check *extra/api/api_client. * New: #1309 - Gitlab CI * Bug: #1306 - Mysql2::Error: Operand should contain 1 column(s) * Bug: #1304 - SQL error with postgresql on top menu -* New: #1301 - REST API for documents movement +* New: #1301 - REST API for documents movement 2.4.10 *2021-10-20* ------------------- @@ -457,7 +473,7 @@ IMPORTANT: REST API for copying/moving has changed. Check *extra/api/api_client. 2.4.8 *2021-10-08* ------------------ - REST API + REST API Create a revision, updating custom fields Bug fixes @@ -559,10 +575,10 @@ IMPORTANT: REST API for copying/moving has changed. Check *extra/api/api_client. 2.4.3 *2020-06-12* ------------------ - Redmine's look&feel + Redmine's look&feel Implementation of folders movement between projects (WebDAV) Korean localization updated - + * New: #1129 - New UI: Optimize Actions Menu * New: #1128 - New German translations @@ -588,7 +604,7 @@ IMPORTANT: REST API for copying/moving has changed. Check *extra/api/api_client. Compatibility with Redmine 4.1 Chinese localisation updated - + * New: #1072 - Bug deprecation multiple gemfile sources * New: #1069 - Minor version is limited to 99 max - I recommend to change the limit to 999 * New: #1068 - [travis] test redmine 4.1.0 @@ -615,17 +631,17 @@ IMPORTANT: REST API for copying/moving has changed. Check *extra/api/api_client. Compatibility with Redmine 4.0.4 Japanese localization updated Plupload & DataTables libraries upgraded - + * Bug: #1033 - Bitnami Redmine 4.0.4 * New: #1032 - Deprecate silverlight support? -* New: #1023 - Project menu is not displayed in Redmine 4.0.3 +* New: #1023 - Project menu is not displayed in Redmine 4.0.3 * Bug: #1019 - Internal Erro 500 when enable "Act as attachable" and access Activity page * Bug: #1017 - Multiple zip files are filling the tmp folder * Bug: #1015 - WebDAV client error * Bug: #1013 - Approval workflow notifications are sent to locked users * Bug: #1010 - Installing Redmine in a sub URI * Bug: #1008 - Description field trunkates on blank line -* Bug: #1004 - Wrong revision order after upgrading to DMSF 1.6.2 +* Bug: #1004 - Wrong revision order after upgrading to DMSF 1.6.2 * Bug: #1003 - Wrong file structure on migrate * Bug: #1002 - New folder with empty titlle => Error 500 * Bug: #1001 - User Permission problem (can't choose user) @@ -645,7 +661,7 @@ IMPORTANT: REST API for copying/moving has changed. Check *extra/api/api_client. Compatibility with Redmine 4.0 Russian localization updated - + * Bug: #976 - Can't link document to issue with column in subject * Bug: #969 - About the DMSF folder search logic * Bug: #966 - folder_manipulation permission @@ -697,22 +713,22 @@ IMPORTANT: REST API for copying/moving has changed. Check *extra/api/api_client. 1.6.1 *2018-04-03* ------------------ - + Javascript on pages is loaded asynchronously - Obsolete Dav4Rack gem replaced with an up to date fork by Planio (Consequently WebDAV caching has been removed, sorry...) - Cloned from gem https://github.com/planio-gmbh/dav4rack.git + Obsolete Dav4Rack gem replaced with an up to date fork by Planio (Consequently WebDAV caching has been removed, sorry...) + Cloned from gem https://github.com/planio-gmbh/dav4rack.git Project members can be chosen as recipients when sending documents by email Responsive view (optimized for mobile devices) Direct editing of document in MS Office Korean & Dutch localisation Move folder feature Document versions can contain letters - + IMPORTANT 1. `alias_method_chain` has been replaced with `prepend`. Not directly but using `RedmineExtensions::PatchManager`. - Consequently, there might occure conficts with plugins which overwrite the same methods. - + Consequently, there might occure conficts with plugins which overwrite the same methods. + * Bug: #839 - Webdav not working * New: #838 - Rake task for regenerating document's digests * Bug: #831 - ActionView::Template::Error, when i am creating issue from the list of all projects @@ -748,23 +764,23 @@ IMPORTANT 1.6.0 *2017-09-12* ------------------ - Folder permissions + Folder permissions Documents attachable to issues Hungarian localization Full-text search in *.eml and *.msg IMPORTANT -1. Files in the filesystem are re-organized by a new system based on dates. So, documents are not stored in folders named - by the project's identifier but by the data of uploading, e.g. 2017/09. It's the same system used by Redmine for +1. Files in the filesystem are re-organized by a new system based on dates. So, documents are not stored in folders named + by the project's identifier but by the data of uploading, e.g. 2017/09. It's the same system used by Redmine for attachments. 2. DMS storage directory plugin option is related to the rails root directory. 3. The plugin is independent of the gem xapian-full-alaveteli which has been replaced with ruby-xapian package. Therefore is recommended to uninstall xapian-full-alaveteli gem and install ruby-xapian package in order the full-text search - is working. - + is working. + * Bug: #758 - Error in template when retrieving details of a file in a subfolder -* New: #755 - Ability to retrieve the MD5 value of a Document type +* New: #755 - Ability to retrieve the MD5 value of a Document type * Bug: #749 - REST API - List of documents in folder fails when using folder_title * Bug: #747 - Background icon repeating in admin panel (Redmine 3.4.2) * Bug: #746 - Thumbnail macro: size paramter not respected @@ -796,7 +812,7 @@ IMPORTANT * Bug: #683 - Approval reminder problem * New: #667 - A better navigation in found results * New: #651 - Incomplete copy of a file to another project -* Bug: #623 - Option "Navigate folders in a tree" seems not to be saved +* Bug: #623 - Option "Navigate folders in a tree" seems not to be saved * New: #543 - Feature Request: Document Location - Folder Structure * New: #170 - Document and Folder Access Control. This issue may be duplicated as I saw it on google code some time ago. * New: #48 - Linking Issues and DMSF Documents @@ -804,9 +820,9 @@ IMPORTANT 1.5.9 *2016-03-01* ------------------ - WebDAV - Documents editing in MS Office - Support for rsync and cp commands + WebDAV + Documents editing in MS Office + Support for rsync and cp commands Disable verioning for certain file names pattern by PUT request Ignoring certain file names pattern by PUT request Caching of PROPSTATS and PROPFIND requests @@ -817,7 +833,7 @@ IMPORTANT Editing of approval workflow steps Approval workflow step name DMSF - Document export + Document export Public URLs option in email entries Global title format for downloading New columns in the main DMSF view; columns are configurable from the plugin settings @@ -846,7 +862,7 @@ IMPORTANT * Bug: #593 - Modern upload file type doesn't work * Bug: #592 - reset_column_information is missing in DB migration * Bug: #591 - rsync doesn't work for WebDAV mounted folder -* Bug: #587 - Working with MS Office documents directly in mounted WebDAV share +* Bug: #587 - Working with MS Office documents directly in mounted WebDAV share * New: #584 - A lot of warnings in WebDAV unit tests * Bug: #582 - FATAL -- : ActionController::RoutingError (No route matches [GET] "/plugin_assets/redmine_dmsf/javascripts/jquery.dataTables/zh.json") * Bug: #581 - Webdav always shows the create date @@ -855,7 +871,7 @@ IMPORTANT * New: #555 - Documents ID easy access * New: #551 - Default action for files viewing * New: #547 - Setting Title format should be global setting, but released as local setting -* New: #499 - Add column "type/extension" in folder content view +* New: #499 - Add column "type/extension" in folder content view 1.5.8 *2016-10-21* ------------------ @@ -864,10 +880,10 @@ IMPORTANT Tree view optimization for speed Wiki macros revision: dmsfd X dmsfdesc Support for deleting users - + * Bug: #578 - A wrong title when uploading documents * Bug: #574 - Macro {{dmsfd(xx)}} produce blank value -* Bug: #566 - HTML tags in the document description breaks UI +* Bug: #566 - HTML tags in the document description breaks UI * Bug: #565 - Error 500 when a link to another folder is in the folder/project * New: #562 - New step button text * Bug: #561 - Wrong path in the document's details form @@ -877,7 +893,7 @@ IMPORTANT 1.5.7 *2016-08-12* ------------------ - + SQLite compatibility Lock/Unlock feature for global approval workflows Document ID in the document's details @@ -1007,7 +1023,7 @@ IMPORTANT External links * New: #307 - Filter mail receivers for approval workflow with file managing permission -* New: #308 - Rails 4 +* New: #308 - Rails 4 * Bug: #321 - My open approvals * Bug: #322 - Approval workflow notifications * New: #325 - Approval workflow permission @@ -1026,7 +1042,7 @@ IMPORTANT * New: #357 - Redmine 3.0.0 released! Compatibility with DMSF? * Bug: #361 - incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string) * Bug: #366 - unable to properly uninstall under Redmine 3.0.1 -* Bug: #367 - Unable to create a folder +* Bug: #367 - Unable to create a folder * Bug: #368 - Cannot create a document workflow * Bug: #369 - Update document revision under Redmine 3.0.1 * Bug: #371 - Unable to properly uninstall the plugin @@ -1039,7 +1055,7 @@ IMPORTANT Standard Redmine's upload form with progress bar for files > 100 MB WebDAV library upgrade -* New: #130 - redmine_dmsf: last update of the folders +* New: #130 - redmine_dmsf: last update of the folders * Bug: #131 - Wiki link shows filename for all users type * New: #136 - `File Manipulation` permissions * New: #218 - Feature request: Recycle bin @@ -1047,12 +1063,12 @@ IMPORTANT * New: #238 - DMSF document update shows up in issue referred to in comment * New: #249 - Storage path for DMSF files ignores global storage path for attachments * New: #255 - Debian - Readme install procedure update -* Bug: #258 - Jquery conflict with Redmine -* Bug: #267 - Custom fields tabs not work with last custom_fields_helper_patch.rb -* Bug: #269 - Workflow OR not working for second reviewer -* Bug: #270 - 500 Internal Server Error, redmine 2.5.1, MS SQL Server 2012, dmsf 1.4.8-master, dmsf_link.rb +* Bug: #258 - Jquery conflict with Redmine +* Bug: #267 - Custom fields tabs not work with last custom_fields_helper_patch.rb +* Bug: #269 - Workflow OR not working for second reviewer +* Bug: #270 - 500 Internal Server Error, redmine 2.5.1, MS SQL Server 2012, dmsf 1.4.8-master, dmsf_link.rb * Bug: #275 - Typo in readme file type -* Bug: #288 - ubuntu migrate failed +* Bug: #288 - ubuntu migrate failed * Bug: #290 - error installing plugin * Bug: #293 - Locking of inexistent files fails * Bug: #298 - The same approver in one approval step @@ -1084,7 +1100,7 @@ IMPORTANT * New: #236 - Documents tagging * Bug: #240 - Internal server error, redmine 2.5.1-devel.13064, PostgreSQL, dmsf 1.4.8-devel * Bug: #242 - dsmf 1.4.8 minor ... "link form" tab -* Bug: #246 - "File storage directory" does not default properly when setting is empty +* Bug: #246 - "File storage directory" does not default properly when setting is empty 1.4.7: *2014-01-02* ------------------- @@ -1095,7 +1111,7 @@ IMPORTANT Code revision * New: #38 - A few questions about the plugin (possible improvements) -* New: #49 - Make the 100 MB ajax upload limit an option +* New: #49 - Make the 100 MB ajax upload limit an option * Bug: #52 - Error : undefined method `size' for nil:NilClass * Bug: #90 - Missing redmine_dmsf / assets / javascripts / plupload / i18n /en.js file? * Bug: #94 - Files not deleted with project @@ -1104,22 +1120,22 @@ IMPORTANT * Bug: #141 - Error 500 uploading file with DMSF custom fields * Bug: #159 - Broken links caused by plugin_asset_path implementation * New: #173 - Open approvals in My page -* Bug: #174 - Workflow error when more than one approver +* Bug: #174 - Workflow error when more than one approver * Bug: #175 - Error 500 on performing search * Bug: #176 - 500 internal error when approving workflow - dmsf_workflows/4/new_action -* Bug: #177 - 1.4.7-devel unable to upload files +* Bug: #177 - 1.4.7-devel unable to upload files * Bug: #178 - Error 500 cannot access Administration -> Custom Fields page * New: #179 - Workflow Log History in Detailed View -* Bug: #187 - Approval workflow permissions +* Bug: #187 - Approval workflow permissions * New: #190 - Very slow in directories containing many files -* Bug: #191 - Move/Copy gives undefined method for File:Class -* New: #193 - French translation -* Bug: #194 - Workflow name link in workflow log window -* Bug: #195 - Workflow log not displaying all the steps +* Bug: #191 - Move/Copy gives undefined method for File:Class +* New: #193 - French translation +* Bug: #194 - Workflow name link in workflow log window +* Bug: #195 - Workflow log not displaying all the steps * New: #196 - Update French Language * Bug: #197 - Multi upload not loading the translation * New: #198 - When editing a workflow, only show current project's users -* Bug: #199 - Small error in plugin_asset_path function +* Bug: #199 - Small error in plugin_asset_path function * New: #200 - Update the french translation for the multi upload module * Bug: #202 - unable to create Custom Field when DMSF plugin installed * Bug: #203 - Little typing error in french translation @@ -1184,7 +1200,7 @@ IMPORTANT * New: Locks store a timestamp based UUID string enabling better interaction with webservices * Bug: #16 - unable to add new project when plugin enabled due to bug in UI * Bug: #17 - dav4rack not installable on some systems - it is now vendored -* Bug: #18 - Warnings thrown due to space between function and parentheses +* Bug: #18 - Warnings thrown due to space between function and parentheses 1.4.3: *2012-06-26* ------------------- @@ -1217,4 +1233,4 @@ IMPORTANT 1.4.0: *2012-06-06* ------------------- -* New: Redmine 2.0 or higher is required \ No newline at end of file +* New: Redmine 2.0 or higher is required diff --git a/Gemfile b/Gemfile index 813755cf..f795a06a 100644 --- a/Gemfile +++ b/Gemfile @@ -2,21 +2,20 @@ # Redmine plugin for Document Management System "Features" # -# Vít Jonáš , Daniel Munn , Karel Pičman +# Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . source 'https://rubygems.org' do gem 'ox' # Dav4Rack @@ -25,14 +24,12 @@ source 'https://rubygems.org' do gem 'zip-zip' unless Dir.exist?(File.expand_path('../../vault', __FILE__)) # Redmine extensions - unless Dir.exist?(File.expand_path('../../easyproject', __FILE__)) - gem 'active_record_union' - gem 'simple_enum' - group :xapian do - gem 'xapian-ruby' - end + gem 'active_record_union' + gem 'simple_enum' + group :xapian do + gem 'xapian-ruby' end - unless %w[easyproject easy_gantt custom_tables] + unless %w[easy_gantt custom_tables] .any? { |plugin| Dir.exist?(File.expand_path("../../#{plugin}", __FILE__)) } group :test do gem 'rails-controller-testing' diff --git a/LICENSE.md b/LICENSE.md index d159169d..e21a50be 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,339 +1,617 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 +# GNU GENERAL PUBLIC LICENSE - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. +Version 3, 29 June 2007 - Preamble +Copyright (C) 2007 Free Software Foundation, Inc. + - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you +## Preamble + +The GNU General Public License is a free, copyleft license for +software and other kinds of works. + +The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom +to share and change all versions of a program--to make sure it remains +free software for all its users. We, the Free Software Foundation, use +the GNU General Public License for most of our software; it applies +also to any other work released this way by its authors. You can apply +it to your programs, too. + +When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. +To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you +have certain responsibilities if you distribute copies of the +software, or if you modify it: responsibilities to respect the freedom +of others. - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. +For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. +Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. +For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. +Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the +manufacturer can do so. This is fundamentally incompatible with the +aim of protecting users' freedom to change the software. The +systematic pattern of such abuse occurs in the area of products for +individuals to use, which is precisely where it is most unacceptable. +Therefore, we have designed this version of the GPL to prohibit the +practice for those products. If such problems arise substantially in +other domains, we stand ready to extend this provision to those +domains in future versions of the GPL, as needed to protect the +freedom of users. - The precise terms and conditions for copying, distribution and +Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish +to avoid the special danger that patents applied to a free program +could make it effectively proprietary. To prevent this, the GPL +assures that patents cannot be used to render the program non-free. + +The precise terms and conditions for copying, distribution and modification follow. - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION +## TERMS AND CONDITIONS - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". +### 0. Definitions. -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. +"This License" refers to version 3 of the GNU General Public License. - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. +"Copyright" also means copyright-like laws that apply to other kinds +of works, such as semiconductor masks. -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. +"The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: +To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of +an exact copy. The resulting work is called a "modified version" of +the earlier work or a work "based on" the earlier work. - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. +A "covered work" means either the unmodified Program or a work based +on the Program. - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. +To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) +To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user +through a computer network, with no transfer of a copy, is not +conveying. -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. +An interactive user interface displays "Appropriate Legal Notices" to +the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. +### 1. Source Code. -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. +The "source code" for a work means the preferred form of the work for +making modifications to it. "Object code" means any non-source form of +a work. - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: +A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, +The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, +The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) +The Corresponding Source need not include anything that users can +regenerate automatically from other parts of the Corresponding Source. -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. +The Corresponding Source for a work in source code form is that same +work. -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. +### 2. Basic Permissions. - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. +All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. +You may make, run and propagate covered works that you do not convey, +without conditions so long as your license otherwise remains in force. +You may convey covered works to others for the sole purpose of having +them make modifications exclusively for you, or provide you with +facilities for running those works, provided that you comply with the +terms of this License in conveying all material for which you do not +control copyright. Those thus making or running the covered works for +you must do so exclusively on your behalf, under your direction and +control, on terms that prohibit them from making any copies of your +copyrighted material outside their relationship with you. - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to +Conveying under any other circumstances is permitted solely under the +conditions stated below. Sublicensing is not allowed; section 10 makes +it unnecessary. + +### 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + +No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + +When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such +circumvention is effected by exercising rights under this License with +respect to the covered work, and you disclaim any intention to limit +operation or modification of the work as a means of enforcing, against +the work's users, your or third parties' legal rights to forbid +circumvention of technological measures. + +### 4. Conveying Verbatim Copies. + +You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + +### 5. Conveying Modified Source Versions. + +You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these +conditions: + +- a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- b) The work must carry prominent notices stating that it is + released under this License and any conditions added under + section 7. This requirement modifies the requirement in section 4 + to "keep intact all notices". +- c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + +A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + +### 6. Conveying Non-Source Forms. + +You may convey a covered work in object code form under the terms of +sections 4 and 5, provided that you also convey the machine-readable +Corresponding Source under the terms of this License, in one of these +ways: + +- a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the Corresponding + Source from a network server at no charge. +- c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- e) Convey the object code using peer-to-peer transmission, + provided you inform other peers where the object code and + Corresponding Source of the work are being offered to the general + public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + +A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, +family, or household purposes, or (2) anything designed or sold for +incorporation into a dwelling. In determining whether a product is a +consumer product, doubtful cases shall be resolved in favor of +coverage. For a particular product received by a particular user, +"normally used" refers to a typical or common use of that class of +product, regardless of the status of the particular user or of the way +in which the particular user actually uses, or expects or is expected +to use, the product. A product is a consumer product regardless of +whether the product has substantial commercial, industrial or +non-consumer uses, unless such uses represent the only significant +mode of use of the product. + +"Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to +install and execute modified versions of a covered work in that User +Product from a modified version of its Corresponding Source. The +information must suffice to ensure that the continued functioning of +the modified object code is in no case prevented or interfered with +solely because modification has been made. + +If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + +The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or +updates for a work that has been modified or installed by the +recipient, or for the User Product in which it has been modified or +installed. Access to a network may be denied when the modification +itself materially and adversely affects the operation of the network +or violates the rules and protocols for communication across the +network. + +Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + +### 7. Additional Terms. + +"Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders +of that material) supplement the terms of this License with terms: + +- a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- c) Prohibiting misrepresentation of the origin of that material, + or requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- d) Limiting the use for publicity purposes of names of licensors + or authors of the material; or +- e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions + of it) with contractual assumptions of liability to the recipient, + for any liability that these contractual assumptions directly + impose on those licensors and authors. + +All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; the +above requirements apply either way. + +### 8. Termination. + +You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + +However, if you cease all violation of this License, then your license +from a particular copyright holder is reinstated (a) provisionally, +unless and until the copyright holder explicitly and finally +terminates your license, and (b) permanently, if the copyright holder +fails to notify you of the violation by some reasonable means prior to +60 days after the cessation. + +Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + +### 9. Acceptance Not Required for Having Copies. + +You are not required to accept this License in order to receive or run +a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + +### 10. Automatic Licensing of Downstream Recipients. + +Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + +An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + +### 11. Patents. + +A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + +A contributor's "essential patent claims" are all patent claims owned +or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of this License. - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or +Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + +In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + +If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + +A patent license is "discriminatory" if it does not include within the +scope of its coverage, prohibits the exercise of, or is conditioned on +the non-exercise of one or more of the rights that are specifically +granted under this License. You may not convey a covered work if you +are a party to an arrangement with a third party that is in the +business of distributing software, under which you make payment to the +third party based on the extent of your activity of conveying the +work, and under which the third party grants, to any of the parties +who would receive the covered work from you, a discriminatory patent +license (a) in connection with copies of the covered work conveyed by +you (or copies made from those copies), or (b) primarily for and in +connection with specific products or compilations that contain the +covered work, unless you entered into that arrangement, or that patent +license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + +### 12. No Surrender of Others' Freedom. + +If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under +this License and any other pertinent obligations, then as a +consequence you may not convey it at all. For example, if you agree to +terms that obligate you to collect a royalty for further conveying +from those to whom you convey the Program, the only way you could +satisfy both those terms and this License would be to refrain entirely +from conveying the Program. -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. +### 13. Use with the GNU Affero General Public License. -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. +Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. +### 14. Revised Versions of this License. - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. +The Free Software Foundation may publish revised and/or new versions +of the GNU General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in +detail to address new problems or concerns. - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. +Each version is given a distinguishing version number. If the Program +specifies that a certain numbered version of the GNU General Public +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that numbered version or +of any later version published by the Free Software Foundation. If the +Program does not specify a version number of the GNU General Public +License, you may choose any version ever published by the Free +Software Foundation. -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. +If the Program specifies that a proxy can decide which future versions +of the GNU General Public License can be used, that proxy's public +statement of acceptance of a version permanently authorizes you to +choose that version for the Program. - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. +Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. - NO WARRANTY +### 15. Disclaimer of Warranty. - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT +WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE +DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR +CORRECTION. - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. +### 16. Limitation of Liability. - END OF TERMS AND CONDITIONS +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR +CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT +NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR +LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM +TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER +PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - How to Apply These Terms to Your New Programs +### 17. Interpretation of Sections 15 and 16. - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - 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. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. +If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. \ No newline at end of file diff --git a/README.md b/README.md index 89228cba..57c71b65 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Redmine DMSF Plugin 4.1.3 +# Redmine DMSF Plugin 4.2.0 -[![GitHub CI](https://github.com/danmunn/redmine_dmsf/actions/workflows/rubyonrails.yml/badge.svg?branch=master)](https://github.com/danmunn/redmine_dmsf/actions/workflows/rubyonrails.yml) +[![GitHub CI](https://github.com/picman/redmine_dmsf/actions/workflows/rubyonrails.yml/badge.svg?branch=master)](https://github.com/picman/redmine_dmsf/actions/workflows/rubyonrails.yml) [![Support Ukraine Badge](https://bit.ly/support-ukraine-now)](https://github.com/support-ukraine/support-ukraine) Redmine DMSF is Document Management System Features plugin for Redmine issue tracking system; It is aimed to replace current Redmine's Documents module. @@ -9,21 +9,21 @@ Redmine DMSF now comes bundled with WebDAV functionality: if switched on within WebDAV functionality is provided through Dav4Rack library. -The development has been supported by [Kontron](https://www.kontron.com) and has been released as open source thanks to their generosity. -Project home: +The development has been supported by [Kontron](https://www.kontron.com) and has been released as open source thanks to their generosity. +Project home: -Redmine Document Management System "Features" plugin is distributed under GNU General Public License v2 (GPL). -Redmine is a flexible project management web application, released under the terms of the GNU General Public License v2 (GPL) at +Redmine Document Management System "Features" plugin is distributed under GNU General Public License v3 (GPL). +33Redmine is a flexible project management web application, released under the terms of the GNU General Public License v2 (GPL) at Further information about the GPL license can be found at - + ## Features * Directory structure - * Document versioning / revision history + * Document versioning / revision history * Document locking - * Multi (drag/drop depending on browser) upload/download + * Multi (drag/drop depending on browser) upload/download * Direct document or document link sending via email * Configurable document approval workflow * Document access auditing @@ -31,7 +31,7 @@ Further information about the GPL license can be found at * Wiki macros for a quick content linking * Full read/write WebDAV functionality * Optional document content full-text search - * Documents and folders' symbolic links + * Documents and folders' symbolic links * Trash bin * Documents attachable to issues * Office documents are displayed inline @@ -41,7 +41,7 @@ Further information about the GPL license can be found at * Compatible with Redmine 6 ## Dependencies - + * Redmine 6.0 or higher ### Full-text search (optional) @@ -66,9 +66,9 @@ See redmine_dmsf/extra/xapian_indexer.rb for help. #### Searching -If you want to use fulltext search abilities, install xapian packages. In case of using of Bitnami +If you want to use fulltext search abilities, install xapian packages. In case of using of Bitnami stack or Ruby installed via RVM it might be necessary to install Xapian bindings from sources. See https://xapian.org - for details. + for details. To index some files with omega you may have to install some other packages like xpdf, antiword, ... @@ -108,8 +108,8 @@ From Omega documentation: * MHTML (.mhtml, .mht) if perl with MIME::Tools is available * MIME email messages (.eml) and USENET articles if perl with MIME::Tools and HTML::Parser is available * vCard files (.vcf, .vcard) if perl with Text::vCard is available - -You can use following commands to install some of the required indexing tools: + +You can use following commands to install some of the required indexing tools: On Debian use: @@ -142,7 +142,7 @@ The command must be runable by the web app's user. Test it in advance, e.g: ``` sudo apt install libreoffice liblibreoffice-java -``` +``` ## Usage @@ -152,7 +152,7 @@ Search will now automatically search DMSF content when a Redmine search is perfo ## Linking DMSF object from Wiki entries (macros) -You can link DMSF object from Wikis using a macro tag `{{ }}`. List of available macros with their description is +You can link DMSF object from Wikis using a macro tag `{{ }}`. List of available macros with their description is available from the wiki's toolbar. ## Hooks @@ -163,7 +163,7 @@ E.g. class DmsfUploadControllerHooks < Redmine::Hook::Listener - def dmsf_upload_controller_after_commit(context={}) + def dmsf_upload_controller_after_commit(context={}) context[:controller].flash[:info] = 'Okay' end @@ -189,28 +189,28 @@ parameters: *revision*, *step_action* **dmsf_files_controller_before_view** -Allows a preview of the file by an external plugin. If the hook returns true, the file is not sent by DMSF. It is +Allows a preview of the file by an external plugin. If the hook returns true, the file is not sent by DMSF. It is expected that the file is sent by the hook. parameters: *file* ## Setup / Upgrade -You can either clone the master branch or download the latest zipped version. Before installing ensure that the Redmine +You can either clone the master branch or download the latest zipped version. Before installing ensure that the Redmine instance is stopped. - git clone git@github.com:danmunn/redmine_dmsf.git - - wget https://github.com/danmunn/redmine_dmsf/archive/master.zip + git clone git@github.com:picman/redmine_dmsf.git + + wget https://github.com/picman/redmine_dmsf/archive/master.zip 1. In case of upgrade **BACKUP YOUR DATABASE, ORIGINAL PLUGIN AND THE FOLDER WITH DOCUMENTS** first!!! 2. Put redmine_dmsf plugin directory into plugins. The plugins sub-directory must be named just **redmine_dmsf**. In case of need rename _redmine_dmsf-x.y.z_ to *redmine_dmsf*. -3. **Go to the redmine directory** +3. **Go to the redmine directory** `cd redmine` -4. Install dependencies: +4. Install dependencies: `bundle install` @@ -232,11 +232,11 @@ instance is stopped. `RAILS_ENV="production" bundle exec rake assets:precompile` -7. The access rights must be set for web server, e.g.: +7. The access rights must be set for web server, e.g.: `chown -R www-data:www-data plugins/redmine_dmsf` -8. Restart the web server, e.g.: +8. Restart the web server, e.g.: `systemctl restart apache2` @@ -254,7 +254,7 @@ instance is stopped. * issues - Convert also files attached to issues Example: - + rake redmine:dmsf_convert_documents project=test RAILS_ENV="production" (If you don't run the rake task as the web server user, don't forget to change the ownership of the imported files, e.g. @@ -264,33 +264,33 @@ instance is stopped. II) To alert all users who are expected to do an approval in the current approval steps Example: - - rake redmine:dmsf_alert_approvals RAILS_ENV="production" - + + rake redmine:dmsf_alert_approvals RAILS_ENV="production" + III) To create missing checksums for all document revisions - + Available options: - - * dry_run - test, no changes to the database + + * dry_run - test, no changes to the database * forceSHA256 - replace old MD5 with SHA256 - + Example: - + bundle exec rake redmine:dmsf_create_digests RAILS_ENV="production" bundle exec rake redmine:dmsf_create_digests forceSHA256=1 RAILS_ENV="production" bundle exec rake redmine:dmsf_create_digests dry_run=1 RAILS_ENV="production" - + IV) To maintain DMSF - + * Remove all files with no database record from the document directory * Remove all links project_id = -1 (added links to an issue which hasn't been created) - + Available options: - + * dry_run - No physical deletion but to list of all unused files only - + Example: - + rake redmine:dmsf_maintenance RAILS_ENV="production" rake redmine:dmsf_maintenance dry_run=1 RAILS_ENV="production" @@ -306,7 +306,7 @@ config.middleware.insert_before ActionDispatch::Cookies, RedmineDmsf::Webdav::Cu ### Installation in a sub-uri -In order to documents and folders are available via WebDAV in case that the Redmine is configured to be run in a sub-uri +In order to documents and folders are available via WebDAV in case that the Redmine is configured to be run in a sub-uri it's necessary to add the following configuration option into your `config/additional_environment.rb`: ```ruby @@ -325,7 +325,7 @@ After these steps re-start your instance of Redmine. ## Contributing -If you've added something, why not share it. Fork the repository (github.com/danmunn/redmine_dmsf), +If you've added something, why not share it. Fork the repository (github.com/picman/redmine_dmsf), make the changes and send a pull request to the maintainers. Changes with tests, and full documentation are preferred. diff --git a/after_init.rb b/after_init.rb deleted file mode 100644 index 88d6a3b9..00000000 --- a/after_init.rb +++ /dev/null @@ -1,156 +0,0 @@ -# frozen_string_literal: true - -# Redmine plugin for Document Management System "Features" -# -# Vít Jonáš , Daniel Munn , 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. - -require 'redmine' -require 'zip' -require "#{File.dirname(__FILE__)}/lib/redmine_dmsf" - -def dmsf_init - # Administration menu extension - Redmine::MenuManager.map :admin_menu do |menu| - menu.push :dmsf_approvalworkflows, :dmsf_workflows_path, - caption: :label_dmsf_workflow_plural, - icon: 'workflows', - html: { class: 'icon icon-workflows' }, - if: proc { |_| User.current.admin? } - end - # Project menu extension - Redmine::MenuManager.map :project_menu do |menu| - menu.push :dmsf, { controller: 'dmsf', action: 'show' }, - caption: :menu_dmsf, - before: :documents, - param: :id, - html: { class: 'icon icon-dmsf' } - # New menu extension - next if defined?(EasyExtensions) - - menu.push :dmsf_file, { controller: 'dmsf_upload', action: 'multi_upload' }, - caption: :label_dmsf_new_top_level_document, parent: :new_object - menu.push :dmsf_folder, { controller: 'dmsf', action: 'new' }, - caption: :label_dmsf_new_top_level_folder, - parent: :new_object - end - # Main menu extension - Redmine::MenuManager.map :top_menu do |menu| - menu.push :dmsf, { controller: 'dmsf', action: 'index' }, - caption: :menu_dmsf, - html: { class: 'icon-dmsf', category: :rest_extension_modules }, - if: proc { - User.current.allowed_to?(:view_dmsf_folders, nil, global: true) && - ActiveRecord::Base.connection.data_source_exists?('settings') && - !RedmineDmsf.dmsf_global_menu_disabled? - } - end - - Redmine::AccessControl.map do |map| - map.project_module :dmsf do |pmap| - pmap.permission :view_dmsf_file_revision_accesses, {}, read: true - pmap.permission :view_dmsf_file_revisions, {}, read: true - pmap.permission :view_dmsf_folders, { dmsf: %i[show index] }, read: true - pmap.permission :user_preferences, { dmsf_state: [:user_pref_save] }, require: :member - pmap.permission(:view_dmsf_files, - { dmsf: %i[entries_operation entries_email download_email_entries add_email append_email - autocomplete_for_user], - dmsf_files: %i[show view thumbnail], - dmsf_workflows: [:log] }, - read: true) - pmap.permission :email_documents, - { dmsf_public_urls: [:create] } - pmap.permission :folder_manipulation, - { dmsf: %i[new create delete edit save edit_root save_root lock unlock notify_activate - notify_deactivate restore drop copymove], - dmsf_folder_permissions: %i[new append autocomplete_for_user], - dmsf_context_menus: [:dmsf] } - pmap.permission :file_manipulation, - { dmsf_files: %i[create_revision lock unlock delete_revision obsolete_revision - notify_activate notify_deactivate restore], - dmsf_upload: %i[upload_files upload commit_files commit delete_dmsf_attachment - delete_dmsf_link_attachment multi_upload], - dmsf_links: %i[new create destroy restore autocomplete_for_project autocomplete_for_folder], - dmsf_context_menus: [:dmsf] } - pmap.permission :file_delete, - { dmsf: %i[trash delete_entries empty_trash], - dmsf_files: [:delete], - dmsf_trash_context_menus: [:trash] } - pmap.permission :force_file_unlock, {} - pmap.permission :file_approval, - { dmsf_workflows: %i[action new_action autocomplete_for_user start assign assignment] } - pmap.permission :manage_workflows, - { dmsf_workflows: %i[index new create destroy show new_step add_step remove_step - reorder_steps update update_step delete_step edit] } - pmap.permission :display_system_folders, {}, read: true - # Watchers - pmap.permission :view_dmsf_file_watchers, {}, read: true - pmap.permission :add_dmsf_file_watchers, { watchers: %i[new create append autocomplete_for_user] } - pmap.permission :delete_dmsf_file_watchers, { watchers: :destroy } - pmap.permission :view_dmsf_folder_watchers, {}, read: true - pmap.permission :add_dmsf_folder_watchers, { watchers: %i[new create append autocomplete_for_user] } - pmap.permission :delete_dmsf_folder_watchers, { watchers: :destroy } - pmap.permission :view_project_watchers, {}, read: true - pmap.permission :add_project_watchers, { watchers: %i[new create append autocomplete_for_user] } - pmap.permission :delete_project_watchers, { watchers: :destroy } - end - end - # DMSF WebDAV digest token - Token.add_action :dmsf_webdav_digest, max_instances: 1, validity_time: nil -end - -if defined?(EasyExtensions) - Rails.application.config.after_initialize do - dmsf_init - - # Register panels for My page - EpmDmsfLockedDocuments.register_to_scope :user, plugin: :redmine_dmsf - EpmDmsfOpenApprovals.register_to_scope :user, plugin: :redmine_dmsf - EpmDmsfWatchedDocuments.register_to_scope :user, plugin: :redmine_dmsf - end -else - dmsf_init -end - -Rails.application.configure do - # Rubyzip configuration - Zip.unicode_names = true - - # DMS custom fields - after_easy_init do - CustomFieldsHelper::CUSTOM_FIELDS_TABS << { name: 'DmsfFileRevisionCustomField', partial: 'custom_fields/index', - label: :dmsf } - end - - # Searchable modules - after_easy_init do - Redmine::Search.map do |search| - search.register :dmsf_files - search.register :dmsf_folders - end - end - - # Activities - after_easy_init do - Redmine::Activity.register :dmsf_file_revision_accesses, default: false - Redmine::Activity.register :dmsf_file_revisions - end - - if defined?(EasyExtensions) - require "#{File.dirname(__FILE__)}/lib/redmine_dmsf/webdav/custom_middleware" - config.middleware.insert_before ActionDispatch::Cookies, RedmineDmsf::Webdav::CustomMiddleware - end -end diff --git a/app/controllers/dmsf_context_menus_controller.rb b/app/controllers/dmsf_context_menus_controller.rb index 8c2be6e3..0b76886c 100644 --- a/app/controllers/dmsf_context_menus_controller.rb +++ b/app/controllers/dmsf_context_menus_controller.rb @@ -4,19 +4,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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . + +require "#{File.dirname(__FILE__)}/../../lib/redmine_dmsf/preview" # Context menu controller class DmsfContextMenusController < ApplicationController diff --git a/app/controllers/dmsf_controller.rb b/app/controllers/dmsf_controller.rb index 17e6b4ad..d519770d 100644 --- a/app/controllers/dmsf_controller.rb +++ b/app/controllers/dmsf_controller.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require "#{File.dirname(__FILE__)}/../../lib/redmine_dmsf/dmsf_zip" @@ -31,7 +30,7 @@ class DmsfController < ApplicationController except: %i[new create edit_root save_root add_email append_email autocomplete_for_user digest reset_digest] before_action :find_parent, only: %i[new create delete] - before_action :permissions + 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 :query, only: %i[expand_folder show trash empty_trash index] @@ -51,7 +50,7 @@ class DmsfController < ApplicationController helper :context_menus helper :watchers - def permissions + def permissions? if !DmsfFolder.permissions?(@folder, allow_system: false) render_403 elsif @folder && @project && (@folder.project != @project) @@ -83,7 +82,7 @@ class DmsfController < ApplicationController @file_manipulation_allowed = User.current.allowed_to?(:file_manipulation, @project) @trash_enabled = @folder_manipulation_allowed && @file_manipulation_allowed @notifications = Setting.notified_events.include?('dmsf_legacy_notifications') - @query.dmsf_folder_id = @folder ? @folder.id : nil + @query.dmsf_folder_id = @folder&.id @query.deleted = false @query.sub_projects |= RedmineDmsf.dmsf_projects_as_subfolders? if @folder&.deleted? || (params[:folder_title].present? && !@folder) @@ -93,6 +92,10 @@ class DmsfController < ApplicationController if @query.valid? respond_to do |format| format.html do + # Warn about searching in sub-folders + if @folder && params['set_filter'].present? && params['f'].present? + flash.now[:warning] = l(:notice_search_in_subfolders) + end @dmsf_count = @query.dmsf_count @dmsf_pages = Paginator.new @dmsf_count, per_page_option, params['page'] render layout: !request.xhr? @@ -360,7 +363,7 @@ class DmsfController < ApplicationController def lock if @folder.nil? - flash[:warning] = l(:warning_foler_unlockable) + flash[:warning] = l(:warning_folder_unlockable) elsif @folder.locked? flash[:warning] = l(:warning_folder_already_locked) else @@ -372,7 +375,7 @@ class DmsfController < ApplicationController def unlock if @folder.nil? - flash[:warning] = l(:warning_foler_unlockable) + flash[:warning] = l(:warning_folder_unlockable) elsif !@folder.locked? flash[:warning] = l(:warning_folder_not_locked) elsif @folder.locks[0].user == User.current || User.current.allowed_to?(:force_file_unlock, @project) @@ -756,11 +759,7 @@ class DmsfController < ApplicationController def query retrieve_default_query true - @query = if defined?(EasyExtensions) - retrieve_query_without_easy_extensions DmsfQuery, true - else - retrieve_query DmsfQuery, true - end + @query = retrieve_query DmsfQuery, true end def retrieve_default_query(use_session) diff --git a/app/controllers/dmsf_files_controller.rb b/app/controllers/dmsf_files_controller.rb index e2727472..49d9d766 100644 --- a/app/controllers/dmsf_files_controller.rb +++ b/app/controllers/dmsf_files_controller.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Files controller class DmsfFilesController < ApplicationController @@ -26,7 +25,7 @@ class DmsfFilesController < ApplicationController before_action :find_revision, only: %i[delete_revision obsolete_revision] before_action :find_folder, only: %i[delete create_revision] before_action :authorize - before_action :permissions + before_action :permissions? accept_api_auth :show, :view, :delete, :create_revision @@ -39,7 +38,7 @@ class DmsfFilesController < ApplicationController include QueriesHelper - def permissions + def permissions? render_403 if @file && !DmsfFolder.permissions?(@file.dmsf_folder, allow_system: true, file: true) true end @@ -335,17 +334,13 @@ class DmsfFilesController < ApplicationController end def thumbnail - if @file.image? - tbnail = @file.thumbnail(size: params[:size]) - if tbnail - if stale?(etag: tbnail) - send_file tbnail, - filename: filename_for_content_disposition(@file.last_revision.disk_file), - type: @file.last_revision.detect_content_type, - disposition: 'inline' - end - else - head :not_found + tbnail = @file.thumbnail(size: params[:size]) + if tbnail + if stale?(etag: tbnail) + send_file tbnail, + filename: filename_for_content_disposition(@file.last_revision.disk_file), + type: @file.last_revision.detect_content_type, + disposition: 'inline' end else head :not_found diff --git a/app/controllers/dmsf_folder_permissions_controller.rb b/app/controllers/dmsf_folder_permissions_controller.rb index 0716490b..fe50c537 100644 --- a/app/controllers/dmsf_folder_permissions_controller.rb +++ b/app/controllers/dmsf_folder_permissions_controller.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Folder permissions controller class DmsfFolderPermissionsController < ApplicationController @@ -25,11 +24,11 @@ class DmsfFolderPermissionsController < ApplicationController if: -> { params[:dmsf_folder_id].present? } before_action :find_project before_action :authorize - before_action :permissions + before_action :permissions? helper :dmsf - def permissions + def permissions? render_403 unless DmsfFolder.permissions?(@dmsf_folder) true end diff --git a/app/controllers/dmsf_help_controller.rb b/app/controllers/dmsf_help_controller.rb index d24cfc10..14e415b9 100644 --- a/app/controllers/dmsf_help_controller.rb +++ b/app/controllers/dmsf_help_controller.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Help controller class DmsfHelpController < ApplicationController diff --git a/app/controllers/dmsf_links_controller.rb b/app/controllers/dmsf_links_controller.rb index 6cebd699..54f849a5 100644 --- a/app/controllers/dmsf_links_controller.rb +++ b/app/controllers/dmsf_links_controller.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Links controller class DmsfLinksController < ApplicationController @@ -26,7 +25,7 @@ class DmsfLinksController < ApplicationController before_action :find_link_project before_action :find_folder, only: [:destroy] before_action :authorize - before_action :permissions + before_action :permissions? protect_from_forgery except: :new @@ -34,7 +33,7 @@ class DmsfLinksController < ApplicationController helper :dmsf - def permissions + def permissions? render_403 if @dmsf_link && !DmsfFolder.permissions?(@dmsf_link.dmsf_folder) true end diff --git a/app/controllers/dmsf_public_urls_controller.rb b/app/controllers/dmsf_public_urls_controller.rb index 6879a712..38b1faaf 100644 --- a/app/controllers/dmsf_public_urls_controller.rb +++ b/app/controllers/dmsf_public_urls_controller.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Public URL controller class DmsfPublicUrlsController < ApplicationController diff --git a/app/controllers/dmsf_state_controller.rb b/app/controllers/dmsf_state_controller.rb index dbffd015..a168773c 100644 --- a/app/controllers/dmsf_state_controller.rb +++ b/app/controllers/dmsf_state_controller.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # State controller class DmsfStateController < ApplicationController diff --git a/app/controllers/dmsf_upload_controller.rb b/app/controllers/dmsf_upload_controller.rb index 5a515789..97159471 100644 --- a/app/controllers/dmsf_upload_controller.rb +++ b/app/controllers/dmsf_upload_controller.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Upload controller class DmsfUploadController < ApplicationController @@ -26,7 +25,7 @@ class DmsfUploadController < ApplicationController before_action :authorize, except: %i[upload delete_dmsf_attachment delete_dmsf_link_attachment] before_action :authorize_global, only: %i[upload delete_dmsf_attachment delete_dmsf_link_attachment] before_action :find_folder, except: %i[upload commit delete_dmsf_attachment delete_dmsf_link_attachment] - before_action :permissions, except: %i[upload commit delete_dmsf_attachment delete_dmsf_link_attachment] + before_action :permissions?, except: %i[upload commit delete_dmsf_attachment delete_dmsf_link_attachment] helper :custom_fields helper :dmsf_workflows @@ -34,7 +33,7 @@ class DmsfUploadController < ApplicationController accept_api_auth :upload, :commit - def permissions + def permissions? render_403 unless DmsfFolder.permissions?(@folder) true end @@ -76,7 +75,6 @@ class DmsfUploadController < ApplicationController @attachment.author = User.current @attachment.filename = params[:filename].presence || Redmine::Utils.random_hex(16) @attachment.content_type = params[:content_type].presence - @attachment.skip_description_required = true if defined?(EasyExtensions) begin Attachment.skip_callback(:commit, :after, :reuse_existing_file_if_possible, raise: false) saved = @attachment.save @@ -108,7 +106,7 @@ class DmsfUploadController < ApplicationController @folder = DmsfFolder.visible.find_by(id: attachments[:folder_id]) if attachments[:folder_id].present? # standard file input uploads - uploaded_files = attachments.select { |key, _| key == 'uploaded_file' } + uploaded_files = attachments.slice('uploaded_file') uploaded_files.each_value do |uploaded_file| upload = DmsfUpload.create_from_uploaded_attachment(@project, @folder, uploaded_file) next unless upload diff --git a/app/controllers/dmsf_workflows_controller.rb b/app/controllers/dmsf_workflows_controller.rb index 1cc32e8e..59003aad 100644 --- a/app/controllers/dmsf_workflows_controller.rb +++ b/app/controllers/dmsf_workflows_controller.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # WorkflowsController class DmsfWorkflowsController < ApplicationController @@ -27,7 +26,7 @@ class DmsfWorkflowsController < ApplicationController before_action :find_model_object, except: %i[create new index assign assignment] before_action :find_project before_action :authorize_custom - before_action :permissions, only: %i[new_action assignment start] + before_action :permissions?, only: %i[new_action assignment start] before_action :approver_candidates, only: %i[remove_step show reorder_steps add_step] before_action :prevent_from_editing, only: %i[destroy remove_step update add_step update_step reorder_steps] @@ -35,7 +34,7 @@ class DmsfWorkflowsController < ApplicationController helper :dmsf - def permissions + def permissions? revision = DmsfFileRevision.find_by(id: params[:dmsf_file_revision_id]) if params[:dmsf_file_revision_id].present? render_403 unless revision&.dmsf_file || DmsfFolder.permissions?(revision&.dmsf_file&.dmsf_folder) true @@ -77,7 +76,7 @@ class DmsfWorkflowsController < ApplicationController { dmsf_file_revision: revision, step_action: params[:step_action] }) if (result.blank? || result.first) && action.save if revision - if @dmsf_workflow.try_finish revision, action, (params[:step_action].to_i / 10) + if @dmsf_workflow.try_finish? revision, action, (params[:step_action].to_i / 10) if revision.dmsf_file begin revision.dmsf_file.unlock!(force_file_unlock_allowed: true) unless RedmineDmsf.dmsf_keep_documents_locked? @@ -217,6 +216,7 @@ class DmsfWorkflowsController < ApplicationController revision = DmsfFileRevision.find_by(id: params[:dmsf_file_revision_id]) begin if revision + @project ||= revision.dmsf_file.project revision.set_workflow(params[:dmsf_workflow_id], params[:action]) revision.assign_workflow(params[:dmsf_workflow_id]) if request.post? @@ -414,8 +414,8 @@ class DmsfWorkflowsController < ApplicationController if request.put? if @assigned flash[:error] = l(:error_dmsf_workflow_assigned) - elsif !@dmsf_workflow.reorder_steps(params[:step].to_i, params[:dmsf_workflow][:position].to_i) - flash[:error] = l(:notice_cannot_renumber_steps) + else + @dmsf_workflow.reorder_steps params[:step].to_i, params[:dmsf_workflow][:position].to_i end end respond_to do |format| diff --git a/app/errors/dmsf_access_error.rb b/app/errors/dmsf_access_error.rb index 388ff2f6..9dba39da 100644 --- a/app/errors/dmsf_access_error.rb +++ b/app/errors/dmsf_access_error.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Access error class DmsfAccessError < StandardError diff --git a/app/errors/dmsf_email_max_file_size_error.rb b/app/errors/dmsf_email_max_file_size_error.rb index fd37c4bd..ec324544 100644 --- a/app/errors/dmsf_email_max_file_size_error.rb +++ b/app/errors/dmsf_email_max_file_size_error.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Max file size error class DmsfEmailMaxFileSizeError < StandardError diff --git a/app/errors/dmsf_file_not_found_error.rb b/app/errors/dmsf_file_not_found_error.rb index 53acd4d3..002b83b9 100644 --- a/app/errors/dmsf_file_not_found_error.rb +++ b/app/errors/dmsf_file_not_found_error.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Not found error class DmsfFileNotFoundError < StandardError diff --git a/app/errors/dmsf_lock_error.rb b/app/errors/dmsf_lock_error.rb index d9d893f0..7fc2ad2c 100644 --- a/app/errors/dmsf_lock_error.rb +++ b/app/errors/dmsf_lock_error.rb @@ -4,19 +4,18 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Lock error class DmsfLockError < StandardError diff --git a/app/errors/dmsf_parent_error.rb b/app/errors/dmsf_parent_error.rb index 00a766e0..8b13542f 100644 --- a/app/errors/dmsf_parent_error.rb +++ b/app/errors/dmsf_parent_error.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Parent error class DmsfParentError < StandardError diff --git a/app/errors/dmsf_zip_max_files_error.rb b/app/errors/dmsf_zip_max_files_error.rb index 35ae5810..6851e251 100644 --- a/app/errors/dmsf_zip_max_files_error.rb +++ b/app/errors/dmsf_zip_max_files_error.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # File count exceeded class DmsfZipMaxFilesError < StandardError diff --git a/app/helpers/dmsf_files_helper.rb b/app/helpers/dmsf_files_helper.rb index 6775b332..2d663d4b 100644 --- a/app/helpers/dmsf_files_helper.rb +++ b/app/helpers/dmsf_files_helper.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Files helper module DmsfFilesHelper diff --git a/app/helpers/dmsf_folder_permissions_helper.rb b/app/helpers/dmsf_folder_permissions_helper.rb index b708df09..b58db0a8 100644 --- a/app/helpers/dmsf_folder_permissions_helper.rb +++ b/app/helpers/dmsf_folder_permissions_helper.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Folders permissions helper module DmsfFolderPermissionsHelper diff --git a/app/helpers/dmsf_helper.rb b/app/helpers/dmsf_helper.rb index b9414bcc..bd306c62 100644 --- a/app/helpers/dmsf_helper.rb +++ b/app/helpers/dmsf_helper.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require 'tmpdir' require 'csv' @@ -25,14 +24,6 @@ require 'csv' module DmsfHelper include Redmine::I18n - unless defined?(EasyExtensions) - - def late_javascript_tag(content_or_options_with_block = nil, html_options = {}, &block) - javascript_tag content_or_options_with_block, html_options, &block - end - - end - def self.temp_filename(filename) filename = sanitize_filename(filename) timestamp = DateTime.current.strftime('%y%m%d%H%M%S') @@ -87,9 +78,7 @@ module DmsfHelper def email_entry_tmp_file_path(entry) sanitized_entry = DmsfHelper.sanitize_filename(entry) file_name = "#{RedmineDmsf::DmsfZip::FILE_PREFIX}#{sanitized_entry}.zip" - # rubocop:disable Rails/FilePath - File.join(Rails.root.to_s, 'tmp', file_name) - # rubocop:enable Rails/FilePath + Rails.root.join 'tmp', file_name end # Extracts the variable part of the temp file name to be used as identifier in the @@ -97,6 +86,6 @@ module DmsfHelper def tmp_entry_identifier(zipped_content) path = Pathname.new(zipped_content) zipped_file = path.basename(path.extname).to_s - zipped_file.delete_prefix(RedmineDmsf::DmsfZip::FILE_PREFIX) + zipped_file.delete_prefix RedmineDmsf::DmsfZip::FILE_PREFIX end end diff --git a/app/helpers/dmsf_links_helper.rb b/app/helpers/dmsf_links_helper.rb index 032669e6..34cd25ac 100644 --- a/app/helpers/dmsf_links_helper.rb +++ b/app/helpers/dmsf_links_helper.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Links helper module DmsfLinksHelper diff --git a/app/helpers/dmsf_queries_helper.rb b/app/helpers/dmsf_queries_helper.rb index b50457a6..5332f3da 100644 --- a/app/helpers/dmsf_queries_helper.rb +++ b/app/helpers/dmsf_queries_helper.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Queries helper module DmsfQueriesHelper @@ -31,17 +30,24 @@ module DmsfQueriesHelper case item.type when 'file' file = DmsfFile.find_by(id: item.id) - if file&.locked? + if !item.deleted && file&.locked? return content_tag(:span, val) + - content_tag('span', sprite_icon('unlock', nil, icon_only: true, size: '12'), - title: l(:title_locked_by_user, user: file.locked_by)) + link_to(sprite_icon('unlock', nil, icon_only: true, size: '12'), + unlock_dmsf_files_path(id: file, + back_url: dmsf_folder_path(id: file.project, + folder_id: file.dmsf_folder)), + title: l(:title_locked_by_user, user: file.locked_by), class: 'icon icon-unlock') end when 'folder' folder = DmsfFolder.find_by(id: item.id) - if folder&.locked? + if !item.deleted && folder&.locked? return content_tag(:span, val) + - content_tag('span', sprite_icon('unlock', nil, icon_only: true, size: '12'), - title: l(:title_locked_by_user, user: folder.locked_by)) + link_to(sprite_icon('unlock', nil, icon_only: true, size: '12'), + unlock_dmsf_path(id: folder.project, + folder_id: folder.id, + back_url: dmsf_folder_path(id: folder.project, + folder_id: folder.dmsf_folder)), + title: l(:title_locked_by_user, user: folder.locked_by), class: 'icon icon-unlock') end end content_tag(:span, val) + content_tag(:span, '', class: 'icon icon-none') @@ -104,7 +110,8 @@ module DmsfQueriesHelper when 'project' tag = h("[#{value}]") tag = if item.project.module_enabled?(:dmsf) - link_to(sprite_icon('folder', nil, icon_only: true), dmsf_folder_path(id: item.project)) + + link_to(sprite_icon('folder', nil, icon_only: true), dmsf_folder_path(id: item.project), + class: 'icon icon-folder') + link_to(tag, dmsf_folder_path(id: item.project), class: 'dmsf-label') else sprite_icon 'folder', tag @@ -124,7 +131,7 @@ module DmsfQueriesHelper ) + tag tag = content_tag('div', tag, class: 'row-control dmsf-row-control') end - tag += content_tag('div', item.filename, class: 'dmsf-filename', title: l(:title_filename_for_download)) + tag += content_tag('div', item.filename, class: 'dmsf-filename') if item.project.watched_by?(User.current) tag += link_to(sprite_icon('fav', nil, icon_only: true, size: '12'), watch_path(object_type: 'project', object_id: item.project.id), @@ -135,12 +142,12 @@ module DmsfQueriesHelper tag when 'folder' if item&.deleted? - tag = sprite_icon('folder', h(value)) + tag = content_tag(:span, sprite_icon('folder', h(value)), class: 'icon icon-folder') else tag = link_to(sprite_icon('folder', nil, icon_only: true, css_class: item.system ? 'dmsf-system' : ''), - dmsf_folder_path(id: item.project, folder_id: item.id)) + 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: 'dmsf-label') unless filter_any? path = expand_folder_dmsf_path @@ -169,19 +176,20 @@ module DmsfQueriesHelper tag when 'folder-link' if item&.deleted? - tag = sprite_icon('folder', h(value)) + tag = content_tag(:span, sprite_icon('folder', h(value)), class: 'icon icon-folder') else # For links, we use revision_id containing dmsf_folder.id in fact tag = link_to(sprite_icon('folder', nil, icon_only: true, css_class: 'dmsf-gray'), - dmsf_folder_path(id: item.project, folder_id: item.revision_id)) + 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: 'dmsf-label') tag = content_tag('span', '', class: 'dmsf-expander') + tag unless filter_any? end tag + content_tag('div', item.filename, class: 'dmsf-filename', title: l(:label_target_folder)) when 'file', 'file-link' icon_name = icon_for_mime_type(Redmine::MimeType.css_class_of(item.filename)) + icon_class = icon_class_for_mime_type(item.filename) if item&.deleted? - tag = sprite_icon(icon_name, h(value)) + tag = content_tag(:span, sprite_icon(icon_name, h(value)), class: "icon #{icon_class}") else # For links, we use revision_id containing dmsf_file.id in fact file_view_url = url_for( @@ -189,7 +197,8 @@ module DmsfQueriesHelper ) content_type = Redmine::MimeType.of(item.filename) content_type = 'application/octet-stream' if content_type.blank? - options = { class: 'dmsf-label', 'data-downloadurl': "#{content_type}:#{h(value)}:#{file_view_url}" } + options = { class: "dmsf-label icon #{icon_class}", + 'data-downloadurl': "#{content_type}:#{h(value)}:#{file_view_url}" } unless previewable?(item.filename, content_type) options[:target] = '_blank' options[:rel] = 'noopener' @@ -200,6 +209,7 @@ module DmsfQueriesHelper css_class: item.type == 'file-link' ? 'dmsf-gray' : ''), file_view_url, options) + options[:class] = 'dmsf-label' tag += link_to(h(value), file_view_url, options) tag = content_tag('span', '', class: 'dmsf-expander') + tag unless filter_any? end @@ -217,12 +227,13 @@ module DmsfQueriesHelper tag when 'url-link' if item&.deleted? - tag = sprite_icon('link', h(value)) + tag = content_tag(:span, sprite_icon('link', h(value)), class: 'icon icon-link') else tag = link_to(sprite_icon('link', nil, icon_only: true, css_class: 'dmsf-gray'), item.filename, target: '_blank', - rel: 'noopener') + rel: 'noopener', + class: 'icon icon-link') tag += link_to(h(value), item.filename, target: '_blank', rel: 'noopener') tag = content_tag('span', '', class: 'dmsf-expander') + tag unless filter_any? end @@ -301,4 +312,15 @@ module DmsfQueriesHelper Redmine::MimeType.is_type?('text', filename) || Redmine::SyntaxHighlighting.filename_supported?(filename) end end + + def icon_class_for_mime_type(mime) + case Redmine::MimeType.of(mime) + when 'application/pdf' + 'icon-pdf' + when 'text/plain' + 'icon-txt' + else + 'icon-file' + end + end end diff --git a/app/helpers/dmsf_upload_helper.rb b/app/helpers/dmsf_upload_helper.rb index 1d6a7b86..818aa42c 100644 --- a/app/helpers/dmsf_upload_helper.rb +++ b/app/helpers/dmsf_upload_helper.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Upload helper module DmsfUploadHelper @@ -99,10 +98,6 @@ module DmsfUploadHelper end FileUtils.mv committed_file[:tempfile_path], new_revision.disk_file(search_if_not_exists: false) FileUtils.chmod 'u=wr,g=r', new_revision.disk_file(search_if_not_exists: false) - if defined?(EasyExtensions) - # We need to trigger Xapian indexing after the file is moved to its target destination - file.touch - end file.last_revision = new_revision files.push file container.dmsf_file_added file if container && !new_object diff --git a/app/helpers/dmsf_workflows_helper.rb b/app/helpers/dmsf_workflows_helper.rb index f4830a46..82ec20e2 100644 --- a/app/helpers/dmsf_workflows_helper.rb +++ b/app/helpers/dmsf_workflows_helper.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Workflows helper module DmsfWorkflowsHelper @@ -62,7 +61,7 @@ module DmsfWorkflowsHelper def dmsf_workflows_for_select(project, dmsf_workflow_id) options = [['', -1]] - DmsfWorkflow.active.sorted.where(['project_id = ? OR project_id IS NULL', project.id]).find_each do |wf| + DmsfWorkflow.active.sorted.where(['project_id = ? OR project_id IS NULL', project&.id]).find_each do |wf| options << if wf.project_id [wf.name, wf.id] else diff --git a/app/models/dmsf_file.rb b/app/models/dmsf_file.rb index b433a98b..1aa83990 100644 --- a/app/models/dmsf_file.rb +++ b/app/models/dmsf_file.rb @@ -4,20 +4,21 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . + require "#{File.dirname(__FILE__)}/../../lib/redmine_dmsf/lockable" +require "#{File.dirname(__FILE__)}/../../lib/redmine_dmsf/plugin" require 'English' # File @@ -498,7 +499,7 @@ class DmsfFile < ApplicationRecord end def thumbnailable? - image? && Redmine::Thumbnail.convert_available? + Redmine::Thumbnail.convert_available? && (image? || (pdf? && Redmine::Thumbnail.gs_available?)) end def previewable? @@ -569,15 +570,17 @@ class DmsfFile < ApplicationRecord end def assigned?(user) - if last_revision&.dmsf_workflow - last_revision.dmsf_workflow.next_assignments(last_revision.id).each do |assignment| - return true if assignment.user == user - end + return false unless last_revision&.dmsf_workflow + + last_revision.dmsf_workflow.next_assignments(last_revision.id).each do |assignment| + return true if assignment.user == user end false end def custom_value(custom_field) + return nill unless last_revision + last_revision.custom_field_values.each do |cv| return cv if cv.custom_field == custom_field end @@ -589,8 +592,6 @@ class DmsfFile < ApplicationRecord end def thumbnail(options = {}) - return unless image? - size = options[:size].to_i if size.positive? # Limit the number of thumbnails per image @@ -603,7 +604,7 @@ class DmsfFile < ApplicationRecord size = 100 unless size.positive? target = File.join(Attachment.thumbnails_storage_path, "#{id}_#{last_revision.digest}_#{size}.thumb") begin - Redmine::Thumbnail.generate last_revision.disk_file.to_s, target, size + Redmine::Thumbnail.generate last_revision.disk_file.to_s, target, size, pdf? rescue StandardError => e Rails.logger.error do %(An error occured while generating thumbnail for #{last_revision.disk_file} to #{target}\n @@ -625,61 +626,10 @@ class DmsfFile < ApplicationRecord def container return unless dmsf_folder&.system && dmsf_folder.title&.match(/(^\d+)/) - issue_id = Regexp.last_match(1) - parent = dmsf_folder.dmsf_folder - Regexp.last_match(1).constantize.visible.find_by(id: issue_id) if parent&.title&.match(/^\.(.+)s/) - end - - if defined?(EasyExtensions) - include Redmine::Utils::Shell - - def sheet? - case File.extname(last_revision&.disk_filename) - when '.ods', # LibreOffice - '.xls', '.xlsx', '.xlsm' # MS Office - true - else - false - end - end - - def content - if File.exist?(last_revision.disk_file) - if File.size?(last_revision.disk_file) < 5.megabytes - tmp = Rails.root.join('tmp') - if sheet? - cmd = "#{shell_quote(RedmineDmsf::Preview::OFFICE_BIN)} --convert-to 'csv' \ - --outdir #{shell_quote(tmp.to_s)} #{shell_quote(last_revision.disk_file)}" - text_file = tmp.join(last_revision.disk_filename).sub_ext('.csv') - elsif office_doc? - cmd = "#{shell_quote(RedmineDmsf::Preview::OFFICE_BIN)} --convert-to 'txt:Text (encoded):UTF8' \ - --outdir #{shell_quote(tmp.to_s)} #{shell_quote(last_revision.disk_file)}" - text_file = tmp.join(last_revision.disk_filename).sub_ext('.txt') - elsif pdf? - text_file = tmp.join(last_revision.disk_filename).sub_ext('.txt') - cmd = "pdftotext -q #{shell_quote(last_revision.disk_file)} #{shell_quote(text_file.to_s)}" - elsif text? - return File.read(last_revision.disk_file) - end - if cmd - if system(cmd) && File.exist?(text_file) - text = File.read(text_file) - FileUtils.rm_f text_file - return text - else - Rails.logger.error "Conversion to text failed (#{$CHILD_STATUS}):\nCommand: #{cmd}" - end - end - else - Rails.logger.warn "File #{last_revision.disk_file} is to big to be indexed (>5MB)" - end - end - description - rescue StandardError => e - Rails.logger.warn e.message - '' - ensure - FileUtils.rm_f(text_file) if text_file.present? + id = Regexp.last_match(1).to_i + case dmsf_folder.dmsf_folder&.title + when '.Issues' + Issue.visible.find_by id: id end end diff --git a/app/models/dmsf_file_revision.rb b/app/models/dmsf_file_revision.rb index 978fe004..7002f454 100644 --- a/app/models/dmsf_file_revision.rb +++ b/app/models/dmsf_file_revision.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # File revision class DmsfFileRevision < ApplicationRecord @@ -119,16 +118,12 @@ class DmsfFileRevision < ApplicationRecord remove_extension(filename).gsub(/_+/, ' ') end - def self.easy_activity_custom_project_scope(scope, options, _) - scope.where(dmsf_files: { project_id: options[:project_ids] }) - end - def delete(commit: false, force: true) if dmsf_file.locked_for_user? errors.add :base, l(:error_file_is_locked) return false end - if !commit && (!force && (dmsf_file.dmsf_file_revisions.length <= 1)) + if !commit && !force && (dmsf_file.dmsf_file_revisions.length <= 1) errors.add :base, l(:error_at_least_one_revision_must_be_present) return false end diff --git a/app/models/dmsf_file_revision_access.rb b/app/models/dmsf_file_revision_access.rb index 50c3d103..877f2f73 100644 --- a/app/models/dmsf_file_revision_access.rb +++ b/app/models/dmsf_file_revision_access.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # File revision access class DmsfFileRevisionAccess < ApplicationRecord diff --git a/app/models/dmsf_file_revision_access_query.rb b/app/models/dmsf_file_revision_access_query.rb index 93d59de2..9b297a71 100644 --- a/app/models/dmsf_file_revision_access_query.rb +++ b/app/models/dmsf_file_revision_access_query.rb @@ -5,20 +5,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # File revision access query class DmsfFileRevisionAccessQuery < Query diff --git a/app/models/dmsf_file_revision_custom_field.rb b/app/models/dmsf_file_revision_custom_field.rb index 325ba5b1..69683ea8 100644 --- a/app/models/dmsf_file_revision_custom_field.rb +++ b/app/models/dmsf_file_revision_custom_field.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Custom field class DmsfFileRevisionCustomField < CustomField diff --git a/app/models/dmsf_folder.rb b/app/models/dmsf_folder.rb index ebbb868e..eb6fdeee 100644 --- a/app/models/dmsf_folder.rb +++ b/app/models/dmsf_folder.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require "#{File.dirname(__FILE__)}/../../lib/redmine_dmsf/lockable" @@ -118,31 +117,19 @@ class DmsfFolder < ApplicationRecord if folder&.system return false unless allow_system || User.current.allowed_to?(:display_system_folders, folder.project) - if ['.Issues', '.CRM cases'].exclude?(folder.title) && - !folder.issue&.visible?(User.current) && - !folder.easy_crm_case&.visible?(User.current) - return false - end + return false if (folder.title != '.Issues') && !folder.issue&.visible?(User.current) end # Permissions to the folder? if folder.dmsf_folder_permissions.any? role_ids = User.current.roles_for_project(folder.project).map(&:id) role_permission_ids = folder.dmsf_folder_permissions.roles.map(&:object_id) - if RUBY_VERSION < '3.1' # intersect? method added in Ruby 3.1, though we support 2.7 too - return true if role_ids.intersection(role_permission_ids).any? - elsif role_ids.intersect?(role_permission_ids) - return true - end + return true if role_ids.intersect?(role_permission_ids) principal_ids = folder.dmsf_folder_permissions.users.map(&:object_id) return true if principal_ids.include?(User.current.id) user_group_ids = User.current.groups.map(&:id) - if RUBY_VERSION < '3.1' # intersect? method added in Ruby 3.1, though we support 2.7 too - principal_ids.intersection(user_group_ids).any? - else - principal_ids.intersect?(user_group_ids) - end + principal_ids.intersect? user_group_ids else DmsfFolder.permissions? folder.dmsf_folder, allow_system: allow_system, file: file end @@ -486,19 +473,6 @@ class DmsfFolder < ApplicationRecord @issue end - def easy_crm_case - if @easy_crm_case.nil? && system - case_id = title.to_i - begin - ecc = 'EasyCrmCase'.constantize - rescue NameError => _e - ecc = nil - end - @easy_crm_case = EasyCrmCase.find_by(id: case_id) if ecc && case_id.positive? - end - @easy_crm_case - end - def update_from_params(params) # Attributes self.title = params[:dmsf_folder][:title].scrub.strip diff --git a/app/models/dmsf_folder_permission.rb b/app/models/dmsf_folder_permission.rb index f821047a..51986871 100644 --- a/app/models/dmsf_folder_permission.rb +++ b/app/models/dmsf_folder_permission.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Folder permission class DmsfFolderPermission < ApplicationRecord diff --git a/app/models/dmsf_link.rb b/app/models/dmsf_link.rb index 33b3b797..3ed1789b 100644 --- a/app/models/dmsf_link.rb +++ b/app/models/dmsf_link.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Link class class DmsfLink < ApplicationRecord @@ -111,7 +110,7 @@ class DmsfLink < ApplicationRecord link.name = name link.external_url = external_url link.project_id = project.id - link.dmsf_folder_id = folder ? folder.id : nil + link.dmsf_folder_id = folder&.id link.user = User.current link.save! link diff --git a/app/models/dmsf_lock.rb b/app/models/dmsf_lock.rb index e1a149bc..f1c51a87 100644 --- a/app/models/dmsf_lock.rb +++ b/app/models/dmsf_lock.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require 'simple_enum' diff --git a/app/models/dmsf_mailer.rb b/app/models/dmsf_mailer.rb index 252559f4..0884fe95 100644 --- a/app/models/dmsf_mailer.rb +++ b/app/models/dmsf_mailer.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require 'mailer' diff --git a/app/models/dmsf_public_url.rb b/app/models/dmsf_public_url.rb index 0e693ab2..4b6bbbdb 100644 --- a/app/models/dmsf_public_url.rb +++ b/app/models/dmsf_public_url.rb @@ -5,19 +5,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Public URL class DmsfPublicUrl < ApplicationRecord diff --git a/app/models/dmsf_query.rb b/app/models/dmsf_query.rb index c11ab4a8..972e2142 100644 --- a/app/models/dmsf_query.rb +++ b/app/models/dmsf_query.rb @@ -4,20 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Query class DmsfQuery < Query diff --git a/app/models/dmsf_query_modified_column.rb b/app/models/dmsf_query_modified_column.rb index f713f85f..7294256e 100644 --- a/app/models/dmsf_query_modified_column.rb +++ b/app/models/dmsf_query_modified_column.rb @@ -4,20 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require 'query' diff --git a/app/models/dmsf_query_title_column.rb b/app/models/dmsf_query_title_column.rb index a027db3a..b1c71e6c 100644 --- a/app/models/dmsf_query_title_column.rb +++ b/app/models/dmsf_query_title_column.rb @@ -4,20 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require 'query' diff --git a/app/models/dmsf_query_version_column.rb b/app/models/dmsf_query_version_column.rb index 4c040f85..f5215ce1 100644 --- a/app/models/dmsf_query_version_column.rb +++ b/app/models/dmsf_query_version_column.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require 'query' diff --git a/app/models/dmsf_upload.rb b/app/models/dmsf_upload.rb index e2f5fdfd..f1818340 100644 --- a/app/models/dmsf_upload.rb +++ b/app/models/dmsf_upload.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Upload class DmsfUpload diff --git a/app/models/dmsf_workflow.rb b/app/models/dmsf_workflow.rb index f192ee86..95e70238 100644 --- a/app/models/dmsf_workflow.rb +++ b/app/models/dmsf_workflow.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Workflow class DmsfWorkflow < ApplicationRecord @@ -110,7 +109,6 @@ class DmsfWorkflow < ApplicationRecord end end end - true end def delegates(query, dmsf_workflow_step_assignment_id, dmsf_file_revision_id) @@ -187,7 +185,7 @@ class DmsfWorkflow < ApplicationRecord end end - def try_finish(revision, action, user_id) + def try_finish?(revision, action, user_id) case action.action when DmsfWorkflowStepAction::ACTION_APPROVE assignments = next_assignments(revision.id) @@ -217,7 +215,7 @@ class DmsfWorkflow < ApplicationRecord def copy_to(project, name = nil) new_wf = dup new_wf.name = name if name - new_wf.project_id = project ? project.id : nil + new_wf.project_id = project&.id new_wf.author = User.current if new_wf.save dmsf_workflow_steps.each do |step| diff --git a/app/models/dmsf_workflow_step.rb b/app/models/dmsf_workflow_step.rb index 6c4572a9..23e71110 100644 --- a/app/models/dmsf_workflow_step.rb +++ b/app/models/dmsf_workflow_step.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Workflow step class DmsfWorkflowStep < ApplicationRecord diff --git a/app/models/dmsf_workflow_step_action.rb b/app/models/dmsf_workflow_step_action.rb index c50c7a92..d091945c 100644 --- a/app/models/dmsf_workflow_step_action.rb +++ b/app/models/dmsf_workflow_step_action.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Workflow step action class DmsfWorkflowStepAction < ApplicationRecord diff --git a/app/models/dmsf_workflow_step_assignment.rb b/app/models/dmsf_workflow_step_assignment.rb index 8f9547f6..4add64f1 100644 --- a/app/models/dmsf_workflow_step_assignment.rb +++ b/app/models/dmsf_workflow_step_assignment.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Workflow step assignment class DmsfWorkflowStepAssignment < ApplicationRecord diff --git a/app/models/epm_dmsf_locked_documents.rb b/app/models/epm_dmsf_locked_documents.rb deleted file mode 100644 index c12de86d..00000000 --- a/app/models/epm_dmsf_locked_documents.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Redmine plugin for Document Management System "Features" -# -# 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. - -# My locked documents - My page panel -class EpmDmsfLockedDocuments < EasyPageModule - def category_name - @category_name ||= 'easy_dms' - end - - def get_show_data(_settings, _user, _page_context = {}) - {} - end - - def get_edit_data(_settings, _user, _page_context = {}) - {} - end - - def registered_in_plugin - 'redmine_dmsf' - end -end diff --git a/app/models/epm_dmsf_open_approvals.rb b/app/models/epm_dmsf_open_approvals.rb deleted file mode 100644 index 2a8e2402..00000000 --- a/app/models/epm_dmsf_open_approvals.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Redmine plugin for Document Management System "Features" -# -# 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. - -# My open approvals - My page panel -class EpmDmsfOpenApprovals < EasyPageModule - def category_name - @category_name ||= 'easy_dms' - end - - def get_show_data(_settings, _user, _page_context = {}) - {} - end - - def get_edit_data(_settings, _user, _page_context = {}) - {} - end - - def registered_in_plugin - 'redmine_dmsf' - end -end diff --git a/app/models/epm_dmsf_watched_documents.rb b/app/models/epm_dmsf_watched_documents.rb deleted file mode 100644 index 28dd85fb..00000000 --- a/app/models/epm_dmsf_watched_documents.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Redmine plugin for Document Management System "Features" -# -# 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. - -# My open approvals - My page panel -class EpmDmsfWatchedDocuments < EasyPageModule - def category_name - @category_name ||= 'easy_dms' - end - - def get_show_data(_settings, _user, _page_context = {}) - {} - end - - def get_edit_data(_settings, _user, _page_context = {}) - {} - end - - def registered_in_plugin - 'redmine_dmsf' - end -end diff --git a/app/validators/dmsf_file_extension_validator.rb b/app/validators/dmsf_file_extension_validator.rb index df8a7b7f..898fb14e 100644 --- a/app/validators/dmsf_file_extension_validator.rb +++ b/app/validators/dmsf_file_extension_validator.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # File extension validator according to the Redmine whitelist and blacklist for file upload. class DmsfFileExtensionValidator < ActiveModel::EachValidator diff --git a/app/validators/dmsf_file_name_validator.rb b/app/validators/dmsf_file_name_validator.rb index 25b9a49b..0e826998 100644 --- a/app/validators/dmsf_file_name_validator.rb +++ b/app/validators/dmsf_file_name_validator.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # File name validator class DmsfFileNameValidator < ActiveModel::EachValidator diff --git a/app/validators/dmsf_folder_parent_validator.rb b/app/validators/dmsf_folder_parent_validator.rb index d1ce128e..7056325f 100644 --- a/app/validators/dmsf_folder_parent_validator.rb +++ b/app/validators/dmsf_folder_parent_validator.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Folder parent validator class DmsfFolderParentValidator < ActiveModel::EachValidator diff --git a/app/validators/dmsf_max_file_size_validator.rb b/app/validators/dmsf_max_file_size_validator.rb index d1ed1eea..6fc64372 100644 --- a/app/validators/dmsf_max_file_size_validator.rb +++ b/app/validators/dmsf_max_file_size_validator.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Max file size validator class DmsfMaxFileSizeValidator < ActiveModel::EachValidator diff --git a/app/validators/dmsf_url_validator.rb b/app/validators/dmsf_url_validator.rb index c2e87c30..dce6cf9e 100644 --- a/app/validators/dmsf_url_validator.rb +++ b/app/validators/dmsf_url_validator.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # URL validator class DmsfUrlValidator < ActiveModel::EachValidator diff --git a/app/validators/dmsf_workflow_name_validator.rb b/app/validators/dmsf_workflow_name_validator.rb index 6063ea15..3737aa2f 100644 --- a/app/validators/dmsf_workflow_name_validator.rb +++ b/app/validators/dmsf_workflow_name_validator.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Workflow name validator class DmsfWorkflowNameValidator < ActiveModel::EachValidator diff --git a/app/views/dmsf/_add_email.html.erb b/app/views/dmsf/_add_email.html.erb index 1b697449..9151550d 100644 --- a/app/views/dmsf/_add_email.html.erb +++ b/app/views/dmsf/_add_email.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %>

<%= l(:label_email_address_add) %>

@@ -23,7 +22,7 @@ <%= form_tag(append_email_dmsf_path(id: @project), remote: true, method: :post, id: 'new-user-form') do %> <%= hidden_field_tag :project_id, @project.id %>

<%= label_tag 'user_search', l(:label_user_search) %><%= text_field_tag 'user_search', nil %>

- <%= late_javascript_tag "observeSearchfield('user_search', 'users_for_users', '#{ escape_javascript url_for( + <%= javascript_tag "observeSearchfield('user_search', 'users_for_users', '#{ escape_javascript url_for( controller: 'dmsf', action: 'autocomplete_for_user') }')" %>
<%= render_principals_for_new_email @principals %> diff --git a/app/views/dmsf/_custom_fields.html.erb b/app/views/dmsf/_custom_fields.html.erb index 06e17da2..5ba49b4e 100644 --- a/app/views/dmsf/_custom_fields.html.erb +++ b/app/views/dmsf/_custom_fields.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% if object %> diff --git a/app/views/dmsf/_description.html.erb b/app/views/dmsf/_description.html.erb index 78325531..a1829256 100644 --- a/app/views/dmsf/_description.html.erb +++ b/app/views/dmsf/_description.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% if @project %> diff --git a/app/views/dmsf/_digest.html.erb b/app/views/dmsf/_digest.html.erb index 0278f9a3..1e5e1c8c 100644 --- a/app/views/dmsf/_digest.html.erb +++ b/app/views/dmsf/_digest.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %>

diff --git a/app/views/dmsf/_main.html.erb b/app/views/dmsf/_main.html.erb index 066c3e0f..4f1fb387 100644 --- a/app/views/dmsf/_main.html.erb +++ b/app/views/dmsf/_main.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% html_title l(:dmsf) %> @@ -32,7 +31,7 @@ class: 'icon icon-add', data: { cy: 'button__create-folder--dmsf' } %> <% end %> <% end %> - <% if defined?(EasyExtensions) %> + <%= actions_dropdown do %> <%= render partial: 'dmsf_context_menus/main', locals: { folder_manipulation_allowed: @folder_manipulation_allowed, system_folder: @system_folder, @@ -41,19 +40,7 @@ locked: @locked, file_manipulation_allowed: @file_manipulation_allowed, trash_enabled: @trash_enabled, - notifications: @notifications } %> - <% else %> - <%= actions_dropdown do %> - <%= render partial: 'dmsf_context_menus/main', locals: { - folder_manipulation_allowed: @folder_manipulation_allowed, - system_folder: @system_folder, - folder: @folder, - project: @project, - locked: @locked, - file_manipulation_allowed: @file_manipulation_allowed, - trash_enabled: @trash_enabled, - notifications: @notifications} %> - <% end %> + notifications: @notifications} %> <% end %>

<% end %> @@ -104,24 +91,6 @@ <% end %> <% end %> -<% if defined?(EasyExtensions) %> - <%= late_javascript_tag do %> - $(function() { - $("p.buttons").addClass("filter-buttons form-actions"); - let buttonApply = $("p.filter-buttons > a.icon-checked"); - buttonApply.addClass("button-positive"); - buttonApply.text("<%= l('easy_query.button_apply.issue') %>"); - let buttonClear = $("p.filter-buttons > a.icon-reload"); - buttonClear.addClass("button-negative"); - buttonClear.text("<%= l('easy_query.label.default_filters') %>"); - $("p.filter-buttons > a.icon-save").addClass("button"); - $("p.filter-buttons > a.icon-edit").addClass("button"); - $("p.filter-buttons > a.icon-del").addClass("button"); - $("#query_form_with_buttons > p.buttons").show(); - }); - <% end %> -<% end %> - -<% late_javascript_tag do %> +<% javascript_tag do %> "$('#ajax-indicator').hide();" <% end %> \ No newline at end of file diff --git a/app/views/dmsf/_path.html.erb b/app/views/dmsf/_path.html.erb index 73e4b0a2..bf30da80 100644 --- a/app/views/dmsf/_path.html.erb +++ b/app/views/dmsf/_path.html.erb @@ -3,29 +3,28 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> -

- <% if folder %> +

+ <% if folder %> <%= link_to l(:link_documents), dmsf_folder_path(id: @project) %> <% folder.dmsf_path.each do |path_element| %> - / + / <% if filename.blank? && (path_element == folder.dmsf_path.last) %> <%= h(path_element.title) %> - <% else %> + <% else %> <%= link_to h(path_element.title), dmsf_folder_path(id: @project, folder_id: path_element) %> <% end %> <% end %> @@ -47,4 +46,4 @@ <% if title %> » <%= title %> <% end %> -

\ No newline at end of file + diff --git a/app/views/dmsf/_query_list.html.erb b/app/views/dmsf/_query_list.html.erb index 94def65a..0b5da808 100644 --- a/app/views/dmsf/_query_list.html.erb +++ b/app/views/dmsf/_query_list.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% query_options = nil unless defined?(query_options) %> @@ -28,15 +27,9 @@ - <% 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 f1d16f2f..3ccc2ff4 100644 --- a/app/views/dmsf/_query_rows.erb +++ b/app/views/dmsf/_query_rows.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% options = {} %> @@ -40,24 +39,21 @@ <%= check_box_tag('ids[]', "#{node.type}-#{node.id}", false, id: nil) unless node.system %> <% query.inline_columns.each do |column| %> - <%= content_tag 'td', column_content(column, node), class: column.css_classes %> + <% classes = column.css_classes.to_s.dup %> + <% classes << ' dmsf-gray' if node.type.match?(/link$/) %> + <% classes << ' dmsf-system' if node.system %> + <%= content_tag 'td', column_content(column, node), class: classes %> <% end %> <% end %> <% unless query.deleted || query&.project.nil? %> - <%= late_javascript_tag do %> + <%= javascript_tag do %> $(function() { $("table.dmsf tr").removeClass("ui-draggable-dragging ui-droppable-active ui-droppable-hover ui-draggable-handle"); $(".dmsf-draggable").draggable({ @@ -111,4 +107,4 @@ }); }); <% end %> -<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/dmsf/_sidebar.html.erb b/app/views/dmsf/_sidebar.html.erb index b9524537..332ddbea 100644 --- a/app/views/dmsf/_sidebar.html.erb +++ b/app/views/dmsf/_sidebar.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= render_sidebar_queries DmsfQuery, @project %> diff --git a/app/views/dmsf/add_email.js.erb b/app/views/dmsf/add_email.js.erb index 3b271286..1a1e2fa4 100644 --- a/app/views/dmsf/add_email.js.erb +++ b/app/views/dmsf/add_email.js.erb @@ -3,19 +3,18 @@ # # 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. + # This file is part of Redmine DMSF plugin. +# +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. +# +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . %> var modal = $('#ajax-modal'); diff --git a/app/views/dmsf/append_email.js.erb b/app/views/dmsf/append_email.js.erb index 25c2e194..d5418d90 100644 --- a/app/views/dmsf/append_email.js.erb +++ b/app/views/dmsf/append_email.js.erb @@ -3,19 +3,18 @@ # # 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. + # This file is part of Redmine DMSF plugin. +# +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. +# +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . %> let to = $('#email_to'); diff --git a/app/views/dmsf/autocomplete_for_user.js.erb b/app/views/dmsf/autocomplete_for_user.js.erb index 510c021c..c2de8c80 100644 --- a/app/views/dmsf/autocomplete_for_user.js.erb +++ b/app/views/dmsf/autocomplete_for_user.js.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> $('#users_for_watcher').html('<%= escape_javascript(render_principals_for_new_email(@principals)) %>'); diff --git a/app/views/dmsf/copymove.html.erb b/app/views/dmsf/copymove.html.erb index 962e1c0e..35da3fe1 100644 --- a/app/views/dmsf/copymove.html.erb +++ b/app/views/dmsf/copymove.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= render partial: '/dmsf/path', locals: { folder: @folder, filename: nil, title: nil } %> @@ -57,7 +56,7 @@ <% end %> <% end %> -<%= late_javascript_tag do %> +<%= javascript_tag do %> $('#move_button').click(function(event) { $('input#copy_entries').remove() }); diff --git a/app/views/dmsf/digest.js.erb b/app/views/dmsf/digest.js.erb index f8b45663..825876b0 100644 --- a/app/views/dmsf/digest.js.erb +++ b/app/views/dmsf/digest.js.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> $('#ajax-modal').html('<%= escape_javascript render partial: 'digest' %>'); diff --git a/app/views/dmsf/drop.js.erb b/app/views/dmsf/drop.js.erb index ed3b3c0a..ffbe121b 100644 --- a/app/views/dmsf/drop.js.erb +++ b/app/views/dmsf/drop.js.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> throw new Error("<%= j flash[:error] %>"); diff --git a/app/views/dmsf/edit.html.erb b/app/views/dmsf/edit.html.erb index 08855288..f822f36a 100644 --- a/app/views/dmsf/edit.html.erb +++ b/app/views/dmsf/edit.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% html_title l(:dmsf) %> @@ -34,7 +33,7 @@ back_url: edit_dmsf_url(id: @project, folder_id: @folder)), title: l(:title_lock_file), class: 'icon icon-lock' %> <% end %> - <% if defined?(EasyExtensions) %> + <%= actions_dropdown do %> <%= render partial: 'dmsf_context_menus/folder', locals: { dmsf_folder: @folder, locked: @folder.locked?, @@ -48,22 +47,6 @@ notifications: @notifications, back_url: edit_dmsf_url(id: @project, folder_id: @folder) } %> - <% else %> - <%= actions_dropdown do %> - <%= render partial: 'dmsf_context_menus/folder', - locals: { dmsf_folder: @folder, - locked: @folder.locked?, - allowed: true, - dmsf_link: nil, - project: @project, - folder: @folder.dmsf_folder, - edit: true, - unlockable: @folder.unlockable? && (!@folder.locked_for_user? || User.current.allowed_to?(:force_file_unlock, @project)), - email_allowed: User.current.allowed_to?(:email_documents, @project), - notifications: @notifications, - back_url: edit_dmsf_url(id: @project, folder_id: @folder) - } %> - <% end %> <% end %> <% end %> diff --git a/app/views/dmsf/edit_root.html.erb b/app/views/dmsf/edit_root.html.erb index 26069df6..a3e93f62 100644 --- a/app/views/dmsf/edit_root.html.erb +++ b/app/views/dmsf/edit_root.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% html_title(l(:dmsf)) %> diff --git a/app/views/dmsf/email_entries.html.erb b/app/views/dmsf/email_entries.html.erb index 2214068c..1736b757 100644 --- a/app/views/dmsf/email_entries.html.erb +++ b/app/views/dmsf/email_entries.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% html_title l(:dmsf) %> diff --git a/app/views/dmsf/index.html.erb b/app/views/dmsf/index.html.erb index bc836711..d3e11fc9 100644 --- a/app/views/dmsf/index.html.erb +++ b/app/views/dmsf/index.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= render partial: 'main', locals: {} %> diff --git a/app/views/dmsf/query_rows.js.erb b/app/views/dmsf/query_rows.js.erb index 4dc8e675..23076528 100644 --- a/app/views/dmsf/query_rows.js.erb +++ b/app/views/dmsf/query_rows.js.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> // Add rows diff --git a/app/views/dmsf/show.html.erb b/app/views/dmsf/show.html.erb index bc836711..d3e11fc9 100644 --- a/app/views/dmsf/show.html.erb +++ b/app/views/dmsf/show.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= render partial: 'main', locals: {} %> diff --git a/app/views/dmsf/trash.html.erb b/app/views/dmsf/trash.html.erb index 5b523762..1521afd5 100644 --- a/app/views/dmsf/trash.html.erb +++ b/app/views/dmsf/trash.html.erb @@ -3,26 +3,25 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% html_title l(:dmsf) %>
<% if @file_delete_allowed %> - <%= delete_link empty_trash_path(id: @project), {}, l(:label_empty_trash_bin) %> + <%= link_to sprite_icon('del', l(:label_empty_trash_bin)), empty_trash_path(id: @project), method: :delete %> <% end %>
@@ -41,21 +40,3 @@ <% content_for :sidebar do %> <%= render partial: 'dmsf/sidebar' %> <% end %> - -<% if defined?(EasyExtensions) %> - <%= late_javascript_tag do %> - $(function() { - $("p.buttons").addClass("filter-buttons form-actions"); - let buttonApply = $("p.filter-buttons > a.icon-checked"); - buttonApply.addClass("button-positive"); - buttonApply.text("<%= l('easy_query.button_apply.issue') %>"); - let buttonClear = $("p.filter-buttons > a.icon-reload"); - buttonClear.addClass("button-negative"); - buttonClear.text("<%= l('easy_query.label.default_filters') %>"); - $("p.filter-buttons > a.icon-save").addClass("button"); - $("p.filter-buttons > a.icon-edit").addClass("button"); - $("p.filter-buttons > a.icon-del").addClass("button"); - $("#query_form_with_buttons > p.buttons").show(); - }); - <% end %> -<% end %> diff --git a/app/views/dmsf_context_menus/_approval_workflow.html.erb b/app/views/dmsf_context_menus/_approval_workflow.html.erb index bb0015e2..513881ff 100644 --- a/app/views/dmsf_context_menus/_approval_workflow.html.erb +++ b/app/views/dmsf_context_menus/_approval_workflow.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% workflows_available = DmsfWorkflow.where(['project_id = ? OR project_id IS NULL', project&.id]).exists? %> diff --git a/app/views/dmsf_context_menus/_file.html.erb b/app/views/dmsf_context_menus/_file.html.erb index 853a0a01..e0295785 100644 --- a/app/views/dmsf_context_menus/_file.html.erb +++ b/app/views/dmsf_context_menus/_file.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %>
  • diff --git a/app/views/dmsf_context_menus/_file_trash.html.erb b/app/views/dmsf_context_menus/_file_trash.html.erb index 338156fa..5f3110c4 100644 --- a/app/views/dmsf_context_menus/_file_trash.html.erb +++ b/app/views/dmsf_context_menus/_file_trash.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %>
  • diff --git a/app/views/dmsf_context_menus/_folder.html.erb b/app/views/dmsf_context_menus/_folder.html.erb index b1e3ce77..f1effbb3 100644 --- a/app/views/dmsf_context_menus/_folder.html.erb +++ b/app/views/dmsf_context_menus/_folder.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% unless edit %> diff --git a/app/views/dmsf_context_menus/_folder_trash.html.erb b/app/views/dmsf_context_menus/_folder_trash.html.erb index a29c399f..1f6e2697 100644 --- a/app/views/dmsf_context_menus/_folder_trash.html.erb +++ b/app/views/dmsf_context_menus/_folder_trash.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %>
  • diff --git a/app/views/dmsf_context_menus/_main.html.erb b/app/views/dmsf_context_menus/_main.html.erb index 32e5019d..c1ba311e 100644 --- a/app/views/dmsf_context_menus/_main.html.erb +++ b/app/views/dmsf_context_menus/_main.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% if folder_manipulation_allowed && !system_folder %> diff --git a/app/views/dmsf_context_menus/_multiple.html.erb b/app/views/dmsf_context_menus/_multiple.html.erb index 4a911721..00a20b7e 100644 --- a/app/views/dmsf_context_menus/_multiple.html.erb +++ b/app/views/dmsf_context_menus/_multiple.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %>
  • diff --git a/app/views/dmsf_context_menus/_multiple_trash.html.erb b/app/views/dmsf_context_menus/_multiple_trash.html.erb index e961b789..1bbc9e93 100644 --- a/app/views/dmsf_context_menus/_multiple_trash.html.erb +++ b/app/views/dmsf_context_menus/_multiple_trash.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %>
  • diff --git a/app/views/dmsf_context_menus/_project.html.erb b/app/views/dmsf_context_menus/_project.html.erb index f16df7b9..a563837d 100644 --- a/app/views/dmsf_context_menus/_project.html.erb +++ b/app/views/dmsf_context_menus/_project.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %>
  • diff --git a/app/views/dmsf_context_menus/_revision_actions.html.erb b/app/views/dmsf_context_menus/_revision_actions.html.erb index 012c7912..130e8737 100644 --- a/app/views/dmsf_context_menus/_revision_actions.html.erb +++ b/app/views/dmsf_context_menus/_revision_actions.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= link_to_function sprite_icon('group', l(:title_download_entries)), diff --git a/app/views/dmsf_context_menus/_revisions.html.erb b/app/views/dmsf_context_menus/_revisions.html.erb index 622fdff0..add5ddc6 100644 --- a/app/views/dmsf_context_menus/_revisions.html.erb +++ b/app/views/dmsf_context_menus/_revisions.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% if notifications %> diff --git a/app/views/dmsf_context_menus/_url.html.erb b/app/views/dmsf_context_menus/_url.html.erb index 68d3f85c..c3f4941e 100644 --- a/app/views/dmsf_context_menus/_url.html.erb +++ b/app/views/dmsf_context_menus/_url.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %>
  • diff --git a/app/views/dmsf_context_menus/_watch.html.erb b/app/views/dmsf_context_menus/_watch.html.erb index 2a53c967..8cf5cbb5 100644 --- a/app/views/dmsf_context_menus/_watch.html.erb +++ b/app/views/dmsf_context_menus/_watch.html.erb @@ -3,21 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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. # - # Watch/unwatch menu's item + # You should have received a copy of the GNU General Public License along with Redmine DMSF plugin. If not, see + # . %> <% watched = object.watched_by?(User.current) %> diff --git a/app/views/dmsf_context_menus/dmsf.html.erb b/app/views/dmsf_context_menus/dmsf.html.erb index 1cc77768..ba74aba8 100644 --- a/app/views/dmsf_context_menus/dmsf.html.erb +++ b/app/views/dmsf_context_menus/dmsf.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %>
      @@ -39,7 +38,7 @@ <% end %>
    -<%= late_javascript_tag do %> +<%= javascript_tag do %> $('#dmsf-cm-delete').click(function (event) { $('#context-menu').hide(); }); diff --git a/app/views/dmsf_context_menus/trash.html.erb b/app/views/dmsf_context_menus/trash.html.erb index 920e0ffb..dd894cc6 100644 --- a/app/views/dmsf_context_menus/trash.html.erb +++ b/app/views/dmsf_context_menus/trash.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %>
      @@ -32,7 +31,7 @@ allowed_restore: @allowed_restore }) %> <% end %>
    -<%= late_javascript_tag do %> +<%= javascript_tag do %> $('#dmsf-cm-delete').click(function (event) { $('#context-menu').hide(); }); diff --git a/app/views/dmsf_files/_file_new_revision.html.erb b/app/views/dmsf_files/_file_new_revision.html.erb index 4c703fbf..92b2f891 100644 --- a/app/views/dmsf_files/_file_new_revision.html.erb +++ b/app/views/dmsf_files/_file_new_revision.html.erb @@ -3,22 +3,21 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> -
    +
    <%= l(:heading_new_revision) %> [+] @@ -68,7 +67,7 @@ <%= label_tag 'file_upload', l(:label_new_content) %> <%= render partial: 'dmsf_upload/form', - locals: { multiple: false, container: nil, description: false, awf: false } %> + locals: { multiple: false, container: nil, awf: false } %>

    @@ -78,8 +77,8 @@ <%= f.submit l(:button_create), class: 'button-positive', data: { cy: "button__submit--file_dmsf"} %>

    <% end %> - <% end %> -
    + <% end %> + <%= wikitoolbar_for 'dmsf_file_revision_description' %> diff --git a/app/views/dmsf_files/_link.html.erb b/app/views/dmsf_files/_link.html.erb index 8b739801..7ae88222 100644 --- a/app/views/dmsf_files/_link.html.erb +++ b/app/views/dmsf_files/_link.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% cls = link ? 'dmsf-gray' : '' %> @@ -27,7 +26,6 @@ file_view_url, target: '_blank', rel: 'noopener', - class: 'icon icon-file', title: h(dmsf_file.last_revision.try(:tooltip)), 'data-downloadurl' => "#{dmsf_file.last_revision.detect_content_type}:#{h(dmsf_file.name)}:#{file_view_url}" %> @@ -93,7 +91,7 @@ else dmsf_file_path(id: dmsf_file, commit: 'yes', back_url: issue_path(@issue)) end %> - <%= delete_link url %> + <%= delete_link url, {}, '' %> <% end %> <% # Approval workflow %> <% wf = DmsfWorkflow.find_by(id: dmsf_file.last_revision.dmsf_workflow_id) if dmsf_file.last_revision.dmsf_workflow_id %> diff --git a/app/views/dmsf_files/_links.html.erb b/app/views/dmsf_files/_links.html.erb index e25cab88..065348b2 100644 --- a/app/views/dmsf_files/_links.html.erb +++ b/app/views/dmsf_files/_links.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% if links.present? %> diff --git a/app/views/dmsf_files/_revision_access.html.erb b/app/views/dmsf_files/_revision_access.html.erb index 99bb7ede..47dab1ac 100644 --- a/app/views/dmsf_files/_revision_access.html.erb +++ b/app/views/dmsf_files/_revision_access.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% query_options = nil unless defined?(query_options) %> diff --git a/app/views/dmsf_files/_thumbnails.html.erb b/app/views/dmsf_files/_thumbnails.html.erb index b94680fb..3ffb90c9 100644 --- a/app/views/dmsf_files/_thumbnails.html.erb +++ b/app/views/dmsf_files/_thumbnails.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% # Thumbnails %> diff --git a/app/views/dmsf_files/_version_selector.html.erb b/app/views/dmsf_files/_version_selector.html.erb index 940afdf2..90531107 100644 --- a/app/views/dmsf_files/_version_selector.html.erb +++ b/app/views/dmsf_files/_version_selector.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= label_tag(label_tag_name, l(:label_dmsf_version)) %> diff --git a/app/views/dmsf_files/document.html.erb b/app/views/dmsf_files/document.html.erb index 281cb8f9..92ac8844 100644 --- a/app/views/dmsf_files/document.html.erb +++ b/app/views/dmsf_files/document.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= render layout: 'layouts/document' do %>  diff --git a/app/views/dmsf_files/show.html.erb b/app/views/dmsf_files/show.html.erb index 4e56bdac..f8138ba2 100644 --- a/app/views/dmsf_files/show.html.erb +++ b/app/views/dmsf_files/show.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% html_title l(:dmsf) %> @@ -38,16 +37,10 @@ lock_dmsf_files_path(id: @file, back_url: dmsf_file_path(id: @file)), title: l(:title_lock_file), class: 'icon icon-lock' %> <% end %> - <% if defined?(EasyExtensions) %> + <%= actions_dropdown do %> <%= render partial: 'dmsf_context_menus/revisions', locals: { project: @project, file: @file, file_delete_allowed: @file_delete_allowed, - notifications: @notifications, back_url: dmsf_file_path(id: @file)} %> - <% else %> - <%= actions_dropdown do %> - <%= render partial: 'dmsf_context_menus/revisions', - locals: { project: @project, file: @file, file_delete_allowed: @file_delete_allowed, - notifications: @notifications, back_url: dmsf_file_path(id: @file) } %> - <% end %> + notifications: @notifications, back_url: dmsf_file_path(id: @file) } %> <% end %> <% end %> <% end %> @@ -61,9 +54,11 @@ <%= render partial: 'file_new_revision' %> <% end %> -
    - <%= label_tag '', l(:label_document) %> - #<%= @file.id %> +
    +
    + <%= label_tag '', l(:label_document) %> + #<%= @file.id %> +

    <%= l(:heading_revisions) %>

    @@ -71,16 +66,10 @@
    - <% if defined?(EasyExtensions) %> + <%= 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 } %> - <% 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 %>
    @@ -164,7 +153,6 @@
    -
    <% end %> <%= pagination_links_full @revision_pages, @revision_count %> @@ -176,7 +164,7 @@ <% end %> <% end %> -<%= late_javascript_tag do %> +<%= javascript_tag do %> $('a.delete-revision').click(function(event) { if(!window.confirm('<%= l(:text_are_you_sure) %>')) { event.preventDefault(); diff --git a/app/views/dmsf_folder_permissions/_new.html.erb b/app/views/dmsf_folder_permissions/_new.html.erb index 65b05942..7c5b6721 100644 --- a/app/views/dmsf_folder_permissions/_new.html.erb +++ b/app/views/dmsf_folder_permissions/_new.html.erb @@ -3,26 +3,25 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %>

    <%= l(:label_dmsf_permissions) %>

    <%= form_tag(append_dmsf_folder_permissions_path, remote: true, method: :post, id: 'new-user-form') do %> <%= hidden_field_tag :project_id, @project.id %>

    <%= label_tag 'user_search', l(:label_user_search) %><%= text_field_tag 'user_search', nil %>

    - <%= late_javascript_tag "observeSearchfield('user_search', 'users_for_users', '#{ escape_javascript url_for( + <%= javascript_tag "observeSearchfield('user_search', 'users_for_users', '#{ escape_javascript url_for( controller: 'dmsf_folder_permissions', action: 'autocomplete_for_user', project_id: @project, dmsf_folder_id: @dmsf_folder) }')" %>
    diff --git a/app/views/dmsf_folder_permissions/append.js.erb b/app/views/dmsf_folder_permissions/append.js.erb index a5c0b1aa..ce4f04f8 100644 --- a/app/views/dmsf_folder_permissions/append.js.erb +++ b/app/views/dmsf_folder_permissions/append.js.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> $('#users_for_watcher').html('<%= escape_javascript(render_principals_for_new_folder_permissions(@principals)) %>'); diff --git a/app/views/dmsf_folder_permissions/autocomplete_for_user.js.erb b/app/views/dmsf_folder_permissions/autocomplete_for_user.js.erb index 39af92e0..29dc6e60 100644 --- a/app/views/dmsf_folder_permissions/autocomplete_for_user.js.erb +++ b/app/views/dmsf_folder_permissions/autocomplete_for_user.js.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> $('#users_for_watcher').html('<%= escape_javascript(render_principals_for_new_folder_permissions(@principals)) %>'); diff --git a/app/views/dmsf_folder_permissions/new.js.erb b/app/views/dmsf_folder_permissions/new.js.erb index f912454f..27c7b8a3 100644 --- a/app/views/dmsf_folder_permissions/new.js.erb +++ b/app/views/dmsf_folder_permissions/new.js.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> var modal = $('#ajax-modal'); diff --git a/app/views/dmsf_help/en/dmsf_help.html.erb b/app/views/dmsf_help/en/dmsf_help.html.erb index 03b0daac..754e2846 100644 --- a/app/views/dmsf_help/en/dmsf_help.html.erb +++ b/app/views/dmsf_help/en/dmsf_help.html.erb @@ -771,8 +771,8 @@ update, delete) for documents and folders. The API supports both XML and JSON formats.

    - Detailed description can be found here - togeather with a + Detailed description can be found here + togeather with a sample shell scrit.

    @@ -789,4 +789,4 @@
    - \ No newline at end of file + diff --git a/app/views/dmsf_links/_form.html.erb b/app/views/dmsf_links/_form.html.erb index 9f3e3427..a9001146 100644 --- a/app/views/dmsf_links/_form.html.erb +++ b/app/views/dmsf_links/_form.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %>

    <%= l(:title_create_link) %>

    @@ -46,7 +45,7 @@ <%= select_tag 'dmsf_link[target_project_id]', project_tree_options_for_select(DmsfFile.allowed_target_projects_on_copy, selected: @dmsf_link.target_project) %> - <%= late_javascript_tag do %> + <%= javascript_tag do %> $('#dmsf_link_target_project_id').change(function(){ $.ajax({ url: '<%= escape_javascript autocomplete_for_project_dmsf_link_path(@project, format: 'js') %>', @@ -72,7 +71,7 @@ <% if !@fast_links || (@type != 'link_to') %> <%= select_tag 'dmsf_link[target_folder_id]', folder_tree_options_for_select(DmsfFolder.directory_tree(@dmsf_link.target_project)) %> - <%= late_javascript_tag do %> + <%= javascript_tag do %> $('#dmsf_link_target_folder_id').change(function(){ $.ajax({ url: '<%= escape_javascript autocomplete_for_folder_dmsf_link_path(@project, format: 'js') %>', @@ -110,7 +109,7 @@ <% end %> -<%= late_javascript_tag do %> +<%= javascript_tag do %> $(document).ready(function(){ <%# Select2 extension, TODO: in case of a modal window, select2 makes problems %> <% unless modal || @fast_links %> diff --git a/app/views/dmsf_links/autocomplete_for_folder.js.erb b/app/views/dmsf_links/autocomplete_for_folder.js.erb index 7ed5bf25..0de36010 100644 --- a/app/views/dmsf_links/autocomplete_for_folder.js.erb +++ b/app/views/dmsf_links/autocomplete_for_folder.js.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> $('#dmsf_link_target_file_id').empty().append('<%= escape_javascript( diff --git a/app/views/dmsf_links/autocomplete_for_project.js.erb b/app/views/dmsf_links/autocomplete_for_project.js.erb index cd163e60..ffd7e067 100644 --- a/app/views/dmsf_links/autocomplete_for_project.js.erb +++ b/app/views/dmsf_links/autocomplete_for_project.js.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> var link = $('#dmsf_link_target_folder_id'); diff --git a/app/views/dmsf_links/create.js.erb b/app/views/dmsf_links/create.js.erb index 22ae25f1..0fb92259 100644 --- a/app/views/dmsf_links/create.js.erb +++ b/app/views/dmsf_links/create.js.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> var linksSpan = $("#dmsf_links_attachments_fields"); @@ -28,9 +27,9 @@ var awf = false; <% file = @dmsf_link.target_file %> <% if file && !file.locked? && User.current.allowed_to?(:file_approval, file.project) %> <% revision = file.last_revision %> - <% if revision && revision.workflow.nil? %> + <% if revision&.workflow.nil? %> awf = true; <% end %> <% end %> -dmsfAddLink(linksSpan, linkId, linkName, title, project, awf, <%= !defined?(EasyExtensions) %>); +dmsfAddLink(linksSpan, linkId, linkName, title, project, awf); diff --git a/app/views/dmsf_links/new.html.erb b/app/views/dmsf_links/new.html.erb index 617acb13..93964b24 100644 --- a/app/views/dmsf_links/new.html.erb +++ b/app/views/dmsf_links/new.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= render partial: 'form', locals: { modal: false } %> \ No newline at end of file diff --git a/app/views/dmsf_links/new.js.erb b/app/views/dmsf_links/new.js.erb index 1b30d124..4a146930 100644 --- a/app/views/dmsf_links/new.js.erb +++ b/app/views/dmsf_links/new.js.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> $('#ajax-modal').html('<%= escape_javascript(render partial: 'form', locals: { modal: true }) %>'); diff --git a/app/views/dmsf_mailer/files_deleted.html.erb b/app/views/dmsf_mailer/files_deleted.html.erb index 4f0e1124..08bc25a5 100644 --- a/app/views/dmsf_mailer/files_deleted.html.erb +++ b/app/views/dmsf_mailer/files_deleted.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= link_to @author, user_url(@author) %> <%= l(:text_email_doc_deleted) %> diff --git a/app/views/dmsf_mailer/files_deleted.text.erb b/app/views/dmsf_mailer/files_deleted.text.erb index 1d9d1e5c..5cc280c9 100644 --- a/app/views/dmsf_mailer/files_deleted.text.erb +++ b/app/views/dmsf_mailer/files_deleted.text.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= @author.name %> <%= l(:text_email_doc_deleted) %> <%= @project.name %> <%= l(:text_email_doc_follows) %> diff --git a/app/views/dmsf_mailer/files_downloaded.html.erb b/app/views/dmsf_mailer/files_downloaded.html.erb index c62a6ea1..c7b2b525 100644 --- a/app/views/dmsf_mailer/files_downloaded.html.erb +++ b/app/views/dmsf_mailer/files_downloaded.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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.% + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= link_to @author, user_url(@author) %> <%= l(:text_email_doc_downloaded) %> diff --git a/app/views/dmsf_mailer/files_downloaded.text.erb b/app/views/dmsf_mailer/files_downloaded.text.erb index 994c4478..2377bbe2 100644 --- a/app/views/dmsf_mailer/files_downloaded.text.erb +++ b/app/views/dmsf_mailer/files_downloaded.text.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= @author.name %> <%= l(:text_email_doc_downloaded) %> <%= @project.name %> <%= l(:text_email_doc_follows) %> diff --git a/app/views/dmsf_mailer/files_updated.html.erb b/app/views/dmsf_mailer/files_updated.html.erb index 89a2bbbd..c8a03843 100644 --- a/app/views/dmsf_mailer/files_updated.html.erb +++ b/app/views/dmsf_mailer/files_updated.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= link_to @author, user_url(@author) %> <%= l(:text_email_doc_updated) %> diff --git a/app/views/dmsf_mailer/files_updated.text.erb b/app/views/dmsf_mailer/files_updated.text.erb index 21ce12a1..0b55fb2d 100644 --- a/app/views/dmsf_mailer/files_updated.text.erb +++ b/app/views/dmsf_mailer/files_updated.text.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= @author.name %> <%= l(:text_email_doc_updated) %> diff --git a/app/views/dmsf_mailer/send_documents.html.erb b/app/views/dmsf_mailer/send_documents.html.erb index 8995cede..8819d25b 100644 --- a/app/views/dmsf_mailer/send_documents.html.erb +++ b/app/views/dmsf_mailer/send_documents.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= textilizable(@body) %> diff --git a/app/views/dmsf_mailer/send_documents.text.erb b/app/views/dmsf_mailer/send_documents.text.erb index c413a697..4157c7c7 100644 --- a/app/views/dmsf_mailer/send_documents.text.erb +++ b/app/views/dmsf_mailer/send_documents.text.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= @body %> diff --git a/app/views/dmsf_mailer/workflow_notification.html.erb b/app/views/dmsf_mailer/workflow_notification.html.erb index f3ad6bb6..8e131109 100644 --- a/app/views/dmsf_mailer/workflow_notification.html.erb +++ b/app/views/dmsf_mailer/workflow_notification.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %>

    <%= @user.name %>,

    diff --git a/app/views/dmsf_mailer/workflow_notification.text.erb b/app/views/dmsf_mailer/workflow_notification.text.erb index f397a86f..840c85b7 100644 --- a/app/views/dmsf_mailer/workflow_notification.text.erb +++ b/app/views/dmsf_mailer/workflow_notification.text.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= @user.name %>, diff --git a/app/views/dmsf_public_urls/_new.html.erb b/app/views/dmsf_public_urls/_new.html.erb index 142b98f5..2d0e95b1 100644 --- a/app/views/dmsf_public_urls/_new.html.erb +++ b/app/views/dmsf_public_urls/_new.html.erb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% classes = 'hol' unless RedmineDmsf.dmsf_documents_email_links_only? %> diff --git a/app/views/dmsf_state/_user_pref.html.erb b/app/views/dmsf_state/_user_pref.html.erb index 09018daa..81b54215 100644 --- a/app/views/dmsf_state/_user_pref.html.erb +++ b/app/views/dmsf_state/_user_pref.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% member = Member.find_by(project_id: @project.id, user_id: User.current.id) %> @@ -67,6 +66,7 @@ options_for_select(options, selected: @project.default_dmsf_query_id) %> <%= l('text_allowed_queries_to_select') %>

    + <%= call_hook(:view_dmsf_state_user_pref, { project: @project }) %>
    diff --git a/app/views/dmsf_upload/_form.html.erb b/app/views/dmsf_upload/_form.html.erb index 6d66f195..60eb4de5 100644 --- a/app/views/dmsf_upload/_form.html.erb +++ b/app/views/dmsf_upload/_form.html.erb @@ -3,57 +3,68 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> - + + <% if defined?(container) && container && container.saved_dmsf_attachments.present? %> <% container.saved_dmsf_attachments.each_with_index do |attachment, i| %> + <% i += 1 %> - <%= hidden_field_tag "dmsf_attachments[p#{i}][token]", "#{attachment.token}" %> - <%= text_field_tag("dmsf_attachments[p#{i}][filename]", attachment.filename, class: 'filename') %> - <%= text_field_tag("dmsf_attachments[p#{i}][description]", attachment.description, maxlength: 255, - placeholder: l(:label_optional_description), class: 'description') if description %> - <%= link_to '', dmsf_attachment_path(attachment, attachment_id: "p#{i}", format: 'js'), - method: 'delete', remote: true, class: 'remove-upload icon-only icon-del' %> - <% wf = container.saved_dmsf_attachments_wfs[attachment.id] %> - <% if wf %> - - <%= hidden_field_tag("dmsf_attachments_wfs[p#{i}]", wf.id) if wf %> - <% else %> - <%= link_to '', assign_dmsf_workflow_path(id: container.project.id, project_id: container.project.id, - attachment_id: i + 1), title: l(:label_dmsf_wokflow_action_assign), - remote: true, class: 'modify-upload icon-only icon-ok' %> - <% end %> + <%= hidden_field_tag "dmsf_attachments[p#{i}][token]", "#{attachment.token}" %> + <%= sprite_icon('attachment', icon_only: true, size: 16, css_class: 'svg-attachment') %> + <%= text_field_tag("dmsf_attachments[p#{i}][filename]", attachment.filename, + class: 'filename icon icon-attachment readonly') %> + <%= link_to sprite_icon('del', l(:button_delete), icon_only: true), + dmsf_attachment_path(attachment, attachment_id: "p#{i}", format: 'js'), + method: 'delete', remote: true, title: l(:button_delete), + class: 'remove-upload icon-only icon-del' %> + <% wf = container.saved_dmsf_attachments_wfs[attachment.id] %> + <% if wf %> + <%= link_to sprite_icon('checked', l(:title_assigned), icon_only: true), '#', remote: true, + title: l(:title_assigned), class: 'modify-upload icon-only icon-ok' %> + <%= hidden_field_tag("dmsf_attachments_wfs[p#{i}]", wf.id) %> + <% else %> + <%= link_to sprite_icon('checked', l(:title_assignment), icon_only: true), + assign_dmsf_workflow_path(id: i, project_id: container.project&.id, + attachment_id: i), title: l(:label_dmsf_wokflow_action_assign), + remote: true, class: 'modify-upload icon-only icon-ok' %> + <% end %> <% end %> <% end %> - -<% if defined?(container) && container && container.saved_dmsf_links.present? %> - <% container.saved_dmsf_links.each_with_index do |dmsf_link, index| %> - - - - <%= link_to '', dmsf_link_attachment_path(dmsf_link, link_id: "#{index}", :format => 'js'), - method: 'delete', remote: true, class: 'remove-upload icon-only icon-del' %> + + <% if defined?(container) && container && container.saved_dmsf_links.present? %> + <% container.saved_dmsf_links.each_with_index do |dmsf_link, index| %> + + + + <%= link_to '', dmsf_link_attachment_path(dmsf_link, link_id: "#{index}", format: 'js'), + method: 'delete', remote: true, class: 'remove-upload icon-only icon-del' %> <% wf = container.saved_dmsf_links_wfs[dmsf_link.id] %> <% if wf %> - - <%= hidden_field_tag("dmsf_links_wfs[#{dmsf_link.id}]", wf.id) if wf %> + <%= link_to sprite_icon('checked', l(:title_assigned), icon_only: true), '#', remote: true, + class: 'modify-upload icon-only icon-ok' %> + <%= hidden_field_tag("dmsf_links_wfs[#{dmsf_link.id}]", wf.id) %> <% else %> <%= render partial: 'dmsf_workflows/approval_workflow_button', locals: { file: dmsf_link.target_file, @@ -62,9 +73,9 @@ ['project_id = ? OR project_id IS NULL', dmsf_link.target_file.project_id]).exists?, project: dmsf_link.target_file.project, wf: wf, dmsf_link_id: dmsf_link.id } %> <% end %> - - <% end %> -<% end %> + + <% end %> + <% end %> @@ -78,10 +89,12 @@ end project_or_folder = folder ? folder : project files = [] - project_or_folder.dmsf_files.visible.each do |dmsf_file| - rev = dmsf_file.last_revision - if rev - files << [dmsf_file.name, rev.major_version, rev.minor_version, rev.patch_version, dmsf_file.locked_for_user? ] + if project_or_folder + project_or_folder.dmsf_files.visible.each do |dmsf_file| + rev = dmsf_file.last_revision + if rev + files << [dmsf_file.name, rev.major_version, rev.minor_version, rev.patch_version, dmsf_file.locked_for_user? ] + end end end %> @@ -98,8 +111,7 @@ max_size: number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)), max_concurrent_uploads: Redmine::Configuration['max_concurrent_ajax_uploads'].to_i, upload_path: dmsf_uploads_path(format: 'js'), - description_placeholder: l(:label_optional_description), - project: project.identifier, + project: project&.identifier, awf: awf, dmsf_file_details_form: controller.send(:render_to_string, { partial: 'dmsf_upload/upload_file', @@ -114,7 +126,7 @@ <% if defined?(container) && container %> <%= link_to sprite_icon('add', l(:label_link_from)), - new_dmsf_link_path(project_id: project.id, type: 'link_from', container: container.class.name), + new_dmsf_link_path(project_id: project&.id, type: 'link_from', container: container.class.name), title: l(:title_create_link), class: 'icon icon-add file_selector', remote: true %> <% end %> diff --git a/app/views/dmsf_upload/_upload_file.html.erb b/app/views/dmsf_upload/_upload_file.html.erb index 2d12f148..4ed818e9 100644 --- a/app/views/dmsf_upload/_upload_file.html.erb +++ b/app/views/dmsf_upload/_upload_file.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %>
    diff --git a/app/views/dmsf_upload/_upload_file_locked.html.erb b/app/views/dmsf_upload/_upload_file_locked.html.erb index abd01f67..c2956516 100644 --- a/app/views/dmsf_upload/_upload_file_locked.html.erb +++ b/app/views/dmsf_upload/_upload_file_locked.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %>
    diff --git a/app/views/dmsf_upload/delete_dmsf_attachment.js.erb b/app/views/dmsf_upload/delete_dmsf_attachment.js.erb index df723165..959cea40 100644 --- a/app/views/dmsf_upload/delete_dmsf_attachment.js.erb +++ b/app/views/dmsf_upload/delete_dmsf_attachment.js.erb @@ -3,19 +3,18 @@ # # 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. + # This file is part of Redmine DMSF plugin. +# +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. +# +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . %> $('#dmsf_attachments_<%= j params[:attachment_id] %>').remove(); diff --git a/app/views/dmsf_upload/delete_dmsf_link_attachment.js.erb b/app/views/dmsf_upload/delete_dmsf_link_attachment.js.erb index 25433010..6073e464 100644 --- a/app/views/dmsf_upload/delete_dmsf_link_attachment.js.erb +++ b/app/views/dmsf_upload/delete_dmsf_link_attachment.js.erb @@ -3,18 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. %> diff --git a/app/views/dmsf_upload/multi_upload.html.erb b/app/views/dmsf_upload/multi_upload.html.erb index d5990e1e..3161e6c7 100644 --- a/app/views/dmsf_upload/multi_upload.html.erb +++ b/app/views/dmsf_upload/multi_upload.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% heads_for_wiki_formatter %> diff --git a/app/views/dmsf_upload/upload.js.erb b/app/views/dmsf_upload/upload.js.erb index 4617904c..9c89ed70 100644 --- a/app/views/dmsf_upload/upload.js.erb +++ b/app/views/dmsf_upload/upload.js.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> var fileSpan = $('#dmsf_attachments_<%= j params[:attachment_id] %>'); diff --git a/app/views/dmsf_upload/upload_file.html.erb b/app/views/dmsf_upload/upload_file.html.erb index 750f766a..54673ff2 100644 --- a/app/views/dmsf_upload/upload_file.html.erb +++ b/app/views/dmsf_upload/upload_file.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> { diff --git a/app/views/dmsf_upload/upload_files.html.erb b/app/views/dmsf_upload/upload_files.html.erb index f9940a74..ac6d6cde 100644 --- a/app/views/dmsf_upload/upload_files.html.erb +++ b/app/views/dmsf_upload/upload_files.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% html_title l(:dmsf) %> @@ -49,7 +48,7 @@ <% end %> <% end %> -<%= late_javascript_tag do %> +<%= javascript_tag do %> // When the user scrolls the page, execute scrollFunction window.onscroll = function() { scrollFunction(); diff --git a/app/views/dmsf_workflows/_action.html.erb b/app/views/dmsf_workflows/_action.html.erb index 7a13f36f..dfadb347 100644 --- a/app/views/dmsf_workflows/_action.html.erb +++ b/app/views/dmsf_workflows/_action.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %>

    <%= l(:field_label_dmsf_workflow) %>

    @@ -42,7 +41,7 @@
    <%= label_tag 'delegate', l(:label_dmsf_wokflow_action_delegate) %>
    <%= text_field_tag 'user_search', nil %> - <%= late_javascript_tag "observeSearchfield('user_search', null, '#{escape_javascript autocomplete_for_user_dmsf_workflow_path(@dmsf_workflow, dmsf_workflow_step_assignment_id: params[:dmsf_workflow_step_assignment_id], dmsf_file_revision_id: params[:dmsf_file_revision_id])}')" %> + <%= javascript_tag "observeSearchfield('user_search', null, '#{escape_javascript autocomplete_for_user_dmsf_workflow_path(@dmsf_workflow, dmsf_workflow_step_assignment_id: params[:dmsf_workflow_step_assignment_id], dmsf_file_revision_id: params[:dmsf_file_revision_id])}')" %>
    <%= render_principals_for_new_dmsf_workflow_users( @dmsf_workflow, params[:dmsf_workflow_step_assignment_id], params[:dmsf_file_revision_id]) %> diff --git a/app/views/dmsf_workflows/_approval_workflow_button.html.erb b/app/views/dmsf_workflows/_approval_workflow_button.html.erb index 92c76931..a0db169f 100644 --- a/app/views/dmsf_workflows/_approval_workflow_button.html.erb +++ b/app/views/dmsf_workflows/_approval_workflow_button.html.erb @@ -4,19 +4,18 @@ # # 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. + # This file is part of Redmine DMSF plugin. + # + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. + # + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% if file_approval_allowed %> diff --git a/app/views/dmsf_workflows/_assign.html.erb b/app/views/dmsf_workflows/_assign.html.erb index 83d8fd2f..1d37f949 100644 --- a/app/views/dmsf_workflows/_assign.html.erb +++ b/app/views/dmsf_workflows/_assign.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %>

    <%= l(:field_label_dmsf_workflow) %>

    diff --git a/app/views/dmsf_workflows/_log.html.erb b/app/views/dmsf_workflows/_log.html.erb index 6f5399a1..6a6a9d22 100644 --- a/app/views/dmsf_workflows/_log.html.erb +++ b/app/views/dmsf_workflows/_log.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %>

    <%= l(:title_dmsf_workflow_log) %>

    diff --git a/app/views/dmsf_workflows/_main.html.erb b/app/views/dmsf_workflows/_main.html.erb index 50eb8579..68faf8a6 100644 --- a/app/views/dmsf_workflows/_main.html.erb +++ b/app/views/dmsf_workflows/_main.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% if @project %> diff --git a/app/views/dmsf_workflows/_new_step_modal.html.erb b/app/views/dmsf_workflows/_new_step_modal.html.erb index 9eae6c55..eb629aee 100644 --- a/app/views/dmsf_workflows/_new_step_modal.html.erb +++ b/app/views/dmsf_workflows/_new_step_modal.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %>

    <%= l(:dmsf_new_step) %>

    @@ -25,7 +24,7 @@
    <%= l(:label_dmsf_workflow_add_approver) %>

    <%= label_tag 'user_search', l(:label_user_search) %><%= text_field_tag 'user_search', nil %>

    - <%= late_javascript_tag "observeSearchfield('user_search', null, '#{ escape_javascript autocomplete_for_user_dmsf_workflow_path(@dmsf_workflow, dmsf_workflow_step_assignment_id: nil, dmsf_file_revision_id: nil, project_id: @project ? @project.id : nil) }')" %> + <%= javascript_tag "observeSearchfield('user_search', null, '#{ escape_javascript autocomplete_for_user_dmsf_workflow_path(@dmsf_workflow, dmsf_workflow_step_assignment_id: nil, dmsf_file_revision_id: nil, project_id: @project ? @project.id : nil) }')" %>
    <%= render_principals_for_new_dmsf_workflow_users @dmsf_workflow %>
    diff --git a/app/views/dmsf_workflows/_steps.html.erb b/app/views/dmsf_workflows/_steps.html.erb index e9236d53..4b0b9b11 100644 --- a/app/views/dmsf_workflows/_steps.html.erb +++ b/app/views/dmsf_workflows/_steps.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% path = @dmsf_workflow.project ? settings_project_path(@project, tab: 'dmsf_workflow') : dmsf_workflows_path %> @@ -134,6 +133,6 @@ <% end %>
    -<%= late_javascript_tag do %> +<%= javascript_tag do %> $(function() { $("table.steps tbody").positionedItems(); }); <% end %> diff --git a/app/views/dmsf_workflows/action.js.erb b/app/views/dmsf_workflows/action.js.erb index aa805b0e..47b2b042 100644 --- a/app/views/dmsf_workflows/action.js.erb +++ b/app/views/dmsf_workflows/action.js.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> var modal = $('#ajax-modal'); diff --git a/app/views/dmsf_workflows/add_step.html.erb b/app/views/dmsf_workflows/add_step.html.erb index 17d08642..83d20cea 100644 --- a/app/views/dmsf_workflows/add_step.html.erb +++ b/app/views/dmsf_workflows/add_step.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= render 'steps' %> diff --git a/app/views/dmsf_workflows/assign.js.erb b/app/views/dmsf_workflows/assign.js.erb index 2b8ed2c1..db81832d 100644 --- a/app/views/dmsf_workflows/assign.js.erb +++ b/app/views/dmsf_workflows/assign.js.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> var modal = $('#ajax-modal'); diff --git a/app/views/dmsf_workflows/assignment.js.erb b/app/views/dmsf_workflows/assignment.js.erb index fa5c8386..f938e46f 100644 --- a/app/views/dmsf_workflows/assignment.js.erb +++ b/app/views/dmsf_workflows/assignment.js.erb @@ -3,30 +3,27 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> -let input; - <% if @dmsf_link_id %> - input = $('input[value="<%= @dmsf_link_id %>"]'); + var input = $('input[value="<%= @dmsf_link_id %>"]'); <% else %> - input = $('input[name="dmsf_attachments[<%= @attachment_id %>][token]"]'); + var input = $('input[name="dmsf_attachments[<%= @attachment_id %>][token]"]'); <% end %> -let span = input.parent(); +var span = input.parent(); <% if @dmsf_link_id %> span.append( @@ -36,7 +33,7 @@ let span = input.parent(); ""); <% end %> -let a = span.children("a.icon-ok"); +var icon = span.children("a.icon-ok"); -a.attr("href", "javascript:void(0);"); -a.attr("title", "<%= l(:title_assigned) %>"); +icon.attr("href", "#"); +icon.attr("title", "<%= l(:title_assigned) %>"); diff --git a/app/views/dmsf_workflows/autocomplete_for_user.js.erb b/app/views/dmsf_workflows/autocomplete_for_user.js.erb index 5a30443f..2de2ea23 100644 --- a/app/views/dmsf_workflows/autocomplete_for_user.js.erb +++ b/app/views/dmsf_workflows/autocomplete_for_user.js.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> /* Get all checked users */ diff --git a/app/views/dmsf_workflows/index.html.erb b/app/views/dmsf_workflows/index.html.erb index d70ff932..5346eba3 100644 --- a/app/views/dmsf_workflows/index.html.erb +++ b/app/views/dmsf_workflows/index.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= render 'main' %> diff --git a/app/views/dmsf_workflows/log.html.erb b/app/views/dmsf_workflows/log.html.erb index fbd10096..32708b63 100644 --- a/app/views/dmsf_workflows/log.html.erb +++ b/app/views/dmsf_workflows/log.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= render partial: 'log', locals: { workflow: @dmsf_workflow, revision: @revision } %> diff --git a/app/views/dmsf_workflows/log.js.erb b/app/views/dmsf_workflows/log.js.erb index df368dcb..abe65d62 100644 --- a/app/views/dmsf_workflows/log.js.erb +++ b/app/views/dmsf_workflows/log.js.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> var modal = $('#ajax-modal'); diff --git a/app/views/dmsf_workflows/new.html.erb b/app/views/dmsf_workflows/new.html.erb index e01d728f..b6d98dbe 100644 --- a/app/views/dmsf_workflows/new.html.erb +++ b/app/views/dmsf_workflows/new.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% if !@project && params[:dmsf_workflow] && params[:dmsf_workflow][:project_id].present? %> @@ -46,7 +45,7 @@
    <% end %> -<%= late_javascript_tag do %> +<%= javascript_tag do %> $('#dmsf_workflow_id').change(function () { $('#content').load("<%= @project ? url_for(action: 'new', project_id: @project.id) : url_for(action: 'new') %>", $('#new_dmsf_workflow').serialize()); }); diff --git a/app/views/dmsf_workflows/new_step.js.erb b/app/views/dmsf_workflows/new_step.js.erb index 99f7a879..1eceaac7 100644 --- a/app/views/dmsf_workflows/new_step.js.erb +++ b/app/views/dmsf_workflows/new_step.js.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> $('#ajax-modal').html('<%= escape_javascript(render partial: 'new_step_modal') %>'); diff --git a/app/views/dmsf_workflows/remove_step.html.erb b/app/views/dmsf_workflows/remove_step.html.erb index 17d08642..83d20cea 100644 --- a/app/views/dmsf_workflows/remove_step.html.erb +++ b/app/views/dmsf_workflows/remove_step.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= render 'steps' %> diff --git a/app/views/dmsf_workflows/reorder_steps.html.erb b/app/views/dmsf_workflows/reorder_steps.html.erb index 17d08642..83d20cea 100644 --- a/app/views/dmsf_workflows/reorder_steps.html.erb +++ b/app/views/dmsf_workflows/reorder_steps.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= render 'steps' %> diff --git a/app/views/dmsf_workflows/reorder_steps.js.erb b/app/views/dmsf_workflows/reorder_steps.js.erb index 214509c1..6fdcb6a9 100644 --- a/app/views/dmsf_workflows/reorder_steps.js.erb +++ b/app/views/dmsf_workflows/reorder_steps.js.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> location.replace('<%= dmsf_workflow_path(@dmsf_workflow) %>'); diff --git a/app/views/dmsf_workflows/show.html.erb b/app/views/dmsf_workflows/show.html.erb index 17d08642..83d20cea 100644 --- a/app/views/dmsf_workflows/show.html.erb +++ b/app/views/dmsf_workflows/show.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= render 'steps' %> diff --git a/app/views/easy_page_modules/easy_dms/_dmsf_locked_documents_edit.html.erb b/app/views/easy_page_modules/easy_dms/_dmsf_locked_documents_edit.html.erb deleted file mode 100644 index ec5ffd94..00000000 --- a/app/views/easy_page_modules/easy_dms/_dmsf_locked_documents_edit.html.erb +++ /dev/null @@ -1,23 +0,0 @@ -<% - # encoding: utf-8 - # - # Redmine plugin for Document Management System "Features" - # - # 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. -%> - -<% 'Nothing to show' %> diff --git a/app/views/easy_page_modules/easy_dms/_dmsf_locked_documents_show.html.erb b/app/views/easy_page_modules/easy_dms/_dmsf_locked_documents_show.html.erb deleted file mode 100644 index b45bb261..00000000 --- a/app/views/easy_page_modules/easy_dms/_dmsf_locked_documents_show.html.erb +++ /dev/null @@ -1,23 +0,0 @@ -<% - # encoding: utf-8 - # - # Redmine plugin for Document Management System "Features" - # - # 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. -%> - -<%= render partial: 'my/blocks/locked_documents' %> diff --git a/app/views/easy_page_modules/easy_dms/_dmsf_open_approvals_edit.html.erb b/app/views/easy_page_modules/easy_dms/_dmsf_open_approvals_edit.html.erb deleted file mode 100644 index ec5ffd94..00000000 --- a/app/views/easy_page_modules/easy_dms/_dmsf_open_approvals_edit.html.erb +++ /dev/null @@ -1,23 +0,0 @@ -<% - # encoding: utf-8 - # - # Redmine plugin for Document Management System "Features" - # - # 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. -%> - -<% 'Nothing to show' %> diff --git a/app/views/easy_page_modules/easy_dms/_dmsf_open_approvals_show.html.erb b/app/views/easy_page_modules/easy_dms/_dmsf_open_approvals_show.html.erb deleted file mode 100644 index 75d5f002..00000000 --- a/app/views/easy_page_modules/easy_dms/_dmsf_open_approvals_show.html.erb +++ /dev/null @@ -1,23 +0,0 @@ -<% - # encoding: utf-8 - # - # Redmine plugin for Document Management System "Features" - # - # 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. -%> - -<%= render partial: 'my/blocks/open_approvals' %> diff --git a/app/views/easy_page_modules/easy_dms/_dmsf_watched_documents_edit.html.erb b/app/views/easy_page_modules/easy_dms/_dmsf_watched_documents_edit.html.erb deleted file mode 100644 index ec5ffd94..00000000 --- a/app/views/easy_page_modules/easy_dms/_dmsf_watched_documents_edit.html.erb +++ /dev/null @@ -1,23 +0,0 @@ -<% - # encoding: utf-8 - # - # Redmine plugin for Document Management System "Features" - # - # 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. -%> - -<% 'Nothing to show' %> diff --git a/app/views/easy_page_modules/easy_dms/_dmsf_watched_documents_show.html.erb b/app/views/easy_page_modules/easy_dms/_dmsf_watched_documents_show.html.erb deleted file mode 100644 index 8858f33e..00000000 --- a/app/views/easy_page_modules/easy_dms/_dmsf_watched_documents_show.html.erb +++ /dev/null @@ -1,23 +0,0 @@ -<% - # encoding: utf-8 - # - # Redmine plugin for Document Management System "Features" - # - # 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. -%> - -<%= render partial: 'my/blocks/watched_documents' %> diff --git a/app/views/hooks/redmine_dmsf/_view_layouts_base_html_head.html.erb b/app/views/hooks/redmine_dmsf/_view_layouts_base_html_head.html.erb new file mode 100644 index 00000000..768921aa --- /dev/null +++ b/app/views/hooks/redmine_dmsf/_view_layouts_base_html_head.html.erb @@ -0,0 +1,26 @@ +<% + # encoding: utf-8 + # + # Redmine plugin for Document Management System "Features" + # + # Karel Pičman + # + # This file is part of Redmine DMSF plugin. + # + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. + # + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . +%> + +<%= stylesheet_link_tag('redmine_dmsf', plugin: :redmine_dmsf) %> +<%= stylesheet_link_tag('select2.min', plugin: :redmine_dmsf) %> +<%= javascript_include_tag('select2.min', plugin: :redmine_dmsf, defer: true) %> +<%= javascript_include_tag('redmine_dmsf', plugin: :redmine_dmsf, defer: true) %> +<%= javascript_include_tag('attachments_dmsf', plugin: :redmine_dmsf, defer: true) %> diff --git a/app/views/hooks/redmine_dmsf/_view_mailer_issue.html.erb b/app/views/hooks/redmine_dmsf/_view_mailer_issue.html.erb index a37b0eb6..44168786 100644 --- a/app/views/hooks/redmine_dmsf/_view_mailer_issue.html.erb +++ b/app/views/hooks/redmine_dmsf/_view_mailer_issue.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% if issue.dmsf_files.any? %> diff --git a/app/views/hooks/redmine_dmsf/_view_mailer_issue.text.erb b/app/views/hooks/redmine_dmsf/_view_mailer_issue.text.erb index b3b5d8cc..ddb9ba88 100644 --- a/app/views/hooks/redmine_dmsf/_view_mailer_issue.text.erb +++ b/app/views/hooks/redmine_dmsf/_view_mailer_issue.text.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% if issue.dmsf_files.any? %> diff --git a/app/views/hooks/redmine_dmsf/_view_my_account.html.erb b/app/views/hooks/redmine_dmsf/_view_my_account.html.erb index a11ac9d4..f4f88e42 100644 --- a/app/views/hooks/redmine_dmsf/_view_my_account.html.erb +++ b/app/views/hooks/redmine_dmsf/_view_my_account.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%= labelled_fields_for :pref, @user.pref do |pref_fields| %> diff --git a/app/views/hooks/redmine_dmsf/_view_projects_form.html.erb b/app/views/hooks/redmine_dmsf/_view_projects_form.html.erb index 39b97fc1..986f358d 100644 --- a/app/views/hooks/redmine_dmsf/_view_projects_form.html.erb +++ b/app/views/hooks/redmine_dmsf/_view_projects_form.html.erb @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% if @project.new_record? && @source_project %> diff --git a/app/views/layouts/_document.html.erb b/app/views/layouts/_document.html.erb index c2062a86..8dc26804 100644 --- a/app/views/layouts/_document.html.erb +++ b/app/views/layouts/_document.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %>
    diff --git a/app/views/mailer/_issue.html.erb b/app/views/mailer/_issue.html.erb index 1d3eae33..497fc3f8 100644 --- a/app/views/mailer/_issue.html.erb +++ b/app/views/mailer/_issue.html.erb @@ -5,19 +5,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%# The original Redmine code %> diff --git a/app/views/mailer/_issue.text.erb b/app/views/mailer/_issue.text.erb index 42ceb415..9a3ed22b 100644 --- a/app/views/mailer/_issue.text.erb +++ b/app/views/mailer/_issue.text.erb @@ -5,19 +5,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <%# The original Redmine code %> diff --git a/app/views/my/blocks/_locked_documents.html.erb b/app/views/my/blocks/_locked_documents.html.erb index ba1695b9..5288d5f7 100644 --- a/app/views/my/blocks/_locked_documents.html.erb +++ b/app/views/my/blocks/_locked_documents.html.erb @@ -1,23 +1,22 @@ <% -# encoding: utf-8 -# -# Redmine plugin for Document Management System "Features" -# -# 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. + # encoding: utf-8 + # + # Redmine plugin for Document Management System "Features" + # + # Karel Pičman + # + # This file is part of Redmine DMSF plugin. + # + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. + # + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% folders = DmsfFolder.visible.joins( @@ -28,46 +27,37 @@ 'JOIN dmsf_locks ON dmsf_files.id = dmsf_locks.entity_id').where( ['dmsf_locks.entity_type = ? AND dmsf_locks.user_id = ? AND (dmsf_locks.expires_at IS NULL OR dmsf_locks.expires_at > ?)', 0, @user&.id, Time.current]) %> -<% easy_extension = defined?(EasyExtensions) %> -<% unless easy_extension %> -

    - <%= l(:locked_documents)%> (<%= "#{folders.all.size} #{l(:label_number_of_folders).downcase}" %> / <%= "#{files.all.size} #{l(:label_number_of_documents).downcase}" %>) -

    -<% end %> +

    + <%= l(:locked_documents)%> (<%= "#{folders.all.size} #{l(:label_number_of_folders).downcase}" %> / <%= "#{files.all.size} #{l(:label_number_of_documents).downcase}" %>) +

    <% if folders.any? || files.any?%> <%= form_tag({}, data: { cm_url: dmsf_context_menu_path }) do %> <%= hidden_field_tag 'back_url', my_page_path, id: nil %>
  • - <%= 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)}" %> + <% unless node.system %> - <% if defined?(EasyExtensions) %> - <%= link_to '', '#', title: l(:button_actions), - class: 'icon-only icon-actions js-contextmenu icon-more-horiz', - data: { cy: "icon__more_horiz--#{node.type}_#{node.id}" } %> - <% else %> - <%= link_to_context_menu %> - <% end %> + <%= link_to_context_menu %> <% end %>
    - <% unless easy_extension %> - - <% end %> + - <% unless easy_extension %> - - <% end %> + <% folders.each do |folder| %> - <% unless easy_extension %> - - <% end %> + - <% unless easy_extension %> - - <% end %> + <% end %> <% files.each do |file| %> - <% unless easy_extension %> - - <% end %> + @@ -105,17 +91,15 @@ <%= link_to_if file.project, l(:link_documents), dmsf_folder_path(id: file.project) %> <% end %> - <% unless easy_extension %> - - <% end %> + <% end %>
    - <%= 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)}" %> + <%= l(:field_project) %> <%= l(:label_document) %>/<%= l(:field_folder) %> <%= l(:field_folder) %>
    - <%= check_box_tag 'ids[]', "folder-#{folder.id}", false, id: nil %> - + <%= check_box_tag 'ids[]', "folder-#{folder.id}", false, id: nil %> + <%= link_to_project folder.project %> - <%= link_to h(folder.title), dmsf_folder_path(id: folder.project, folder_id: folder), - class: 'icon icon-folder' %> + <%= link_to sprite_icon('folder', h(folder.title)), + dmsf_folder_path(id: folder.project, folder_id: folder), class: 'icon icon-folder' %> <% if folder.dmsf_folder %> @@ -77,20 +67,16 @@ <%= link_to l(:link_documents), dmsf_folder_path(id: folder.project) %> <% end %> - <%= link_to_context_menu %> - + <%= link_to_context_menu %> +
    - <%= check_box_tag 'ids[]', "file-#{file.id}", false, id: nil %> - + <%= check_box_tag 'ids[]', "file-#{file.id}", false, id: nil %> + <%= link_to_project file.project %> - <%= link_to_context_menu %> - + <%= link_to_context_menu %> +
    <% end %> - <%= context_menu unless easy_extension %> + <%= context_menu %> <% else %>

    <%= l(:label_no_data) %>

    <% end %> diff --git a/app/views/my/blocks/_open_approvals.html.erb b/app/views/my/blocks/_open_approvals.html.erb index f7336189..d52e6d2a 100644 --- a/app/views/my/blocks/_open_approvals.html.erb +++ b/app/views/my/blocks/_open_approvals.html.erb @@ -1,23 +1,22 @@ <% -# encoding: utf-8 -# -# Redmine plugin for Document Management System "Features" -# -# 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. + # encoding: utf-8 + # + # Redmine plugin for Document Management System "Features" + # + # Karel Pičman + # + # This file is part of Redmine DMSF plugin. + # + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. + # + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% all_assignments = DmsfWorkflowStepAssignment. @@ -31,40 +30,31 @@ order('dmsf_workflow_step_assignments.dmsf_file_revision_id, dmsf_workflow_steps.step').to_a %> <% assignments = all_assignments.delete_if { |a| (a.dmsf_file_revision != a.dmsf_file_revision.dmsf_file.last_revision) } %> <% assignments.uniq! { |a| a.dmsf_file_revision } %> -<% easy_extension = defined?(EasyExtensions) %> -<% unless easy_extension %> -

    <%= l(:open_approvals)%> (<%= assignments.size %>)

    -<% end %> +

    <%= l(:open_approvals)%> (<%= assignments.size %>)

    <% if assignments.any? %> <%= form_tag({}, data: { cm_url: dmsf_context_menu_path }) do %> <%= hidden_field_tag 'back_url', my_page_path, id: nil %> - <% unless easy_extension %> - - <% end %> + - <% unless easy_extension %> - - <% end %> + <% assignments.each do |assignment| %> - <% unless easy_extension %> - - <% end %> + - <% unless easy_extension %> - - <% end %> + <% end %>
    - <%= 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)}" %> + <%= l(:field_project) %> <%= l(:field_label_dmsf_workflow) %> <%= l(:field_status) %> <%= l(:label_document) %> <%= l(:field_folder) %>
    - <%= check_box_tag 'ids[]', "file-#{assignment.dmsf_file_revision.dmsf_file.id}", false, id: nil %> - + <%= check_box_tag 'ids[]', "file-#{assignment.dmsf_file_revision.dmsf_file.id}", false, id: nil %> + <% if assignment.dmsf_file_revision.dmsf_file.project %> <%= link_to_project assignment.dmsf_file_revision.dmsf_file.project %> @@ -106,17 +96,15 @@ <% end %> <% end %> - <%= link_to_context_menu %> - + <%= link_to_context_menu %> +
    <% end %> - <%= context_menu unless easy_extension %> + <%= context_menu %> <% else %>

    <%= l(:label_no_data) %>

    <% end %> diff --git a/app/views/my/blocks/_watched_documents.html.erb b/app/views/my/blocks/_watched_documents.html.erb index cdccdcad..2bb9c4da 100644 --- a/app/views/my/blocks/_watched_documents.html.erb +++ b/app/views/my/blocks/_watched_documents.html.erb @@ -1,24 +1,23 @@ <% -# encoding: utf-8 -# -# Redmine plugin for Document Management System "Features" -# -# 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. -%> + # encoding: utf-8 + # + # Redmine plugin for Document Management System "Features" + # + # Karel Pičman + # + # This file is part of Redmine DMSF plugin. + # + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. + # + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . + %> <% projects = Project.visible.has_module(:dmsf).joins(:watchers).where( :watchers => { watchable_type: 'Project', user_id: @user&.id }) %> @@ -26,38 +25,29 @@ :watchers => { watchable_type: 'DmsfFolder', user_id: @user&.id }) %> <% files = DmsfFile.visible.joins(:watchers).where( :watchers => { watchable_type: 'DmsfFile', user_id: @user&.id }) %> -<% easy_extension = defined?(EasyExtensions) %> -<% unless easy_extension %> -

    <%= l(:label_dmsf_watched)%> (<%= projects.all.size + folders.all.size %>/<%= files.all.size %>)

    -<% end %> +

    <%= l(:label_dmsf_watched)%> (<%= projects.all.size + folders.all.size %>/<%= files.all.size %>)

    <% if projects.any? || folders.any? || files.any? %> <%= form_tag({}, data: { cm_url: dmsf_context_menu_path }) do %> <%= hidden_field_tag 'back_url', my_page_path, id: nil %> - <% unless easy_extension %> - - <% end %> + - <% unless easy_extension %> - - <% end %> + <% projects.each do |project| %> - <% unless easy_extension %> - - <% end %> + @@ -72,17 +62,15 @@ <% end %> <% folders.each do |folder| %> - <% unless easy_extension %> - - <% end %> + - <% unless easy_extension %> - - <% end %> + @@ -118,17 +104,15 @@ <%= link_to l(:link_documents), dmsf_folder_path(id: file.project) %> <% end %> - <% unless easy_extension %> - - <% end %> + <% end %>
    - <%= 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)}" %> + <%= l(:field_project) %> <%= l(:label_document) %>/<%= l(:field_folder) %> <%= l(:field_folder) %>
    - <%= check_box_tag 'ids[]', "project-#{project.id}", false, id: nil %> - + <%= check_box_tag 'ids[]', "project-#{project.id}", false, id: nil %> + <%= link_to_project project %>
    - <%= check_box_tag 'ids[]', "folder-#{folder.id}", false, id: nil %> - + <%= check_box_tag 'ids[]', "folder-#{folder.id}", false, id: nil %> + <%= link_to_project folder.project %> - <%= link_to h(folder.title), dmsf_folder_path(id: folder.project, folder_id: folder), - class: 'icon icon-folder' %> + <%= link_to sprite_icon('folder', h(folder.title)), + dmsf_folder_path(id: folder.project, folder_id: folder), class: 'icon icon-folder' %> <% if folder.dmsf_folder %> @@ -99,11 +87,9 @@ <% end %> <% files.each do |file| %>
    - <%= check_box_tag 'ids[]', "file-#{file.id}", false, id: nil %> - + <%= check_box_tag 'ids[]', "file-#{file.id}", false, id: nil %> + <%= link_to_project(file.project) if file.project %> - <%= link_to_context_menu %> - + <%= link_to_context_menu %> +
    <% end %> - <%= context_menu unless easy_extension %> + <%= context_menu %> <% else %>

    <%= l(:label_no_data) %>

    <% end %> diff --git a/app/views/search/_container.html.erb b/app/views/search/_container.html.erb index 5f6d741d..987bf0c9 100644 --- a/app/views/search/_container.html.erb +++ b/app/views/search/_container.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> <% dmsf_file_or_folder = object %> diff --git a/app/views/settings/_dmsf_columns.html.erb b/app/views/settings/_dmsf_columns.html.erb index eacc61d8..591dddc0 100644 --- a/app/views/settings/_dmsf_columns.html.erb +++ b/app/views/settings/_dmsf_columns.html.erb @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %>

    diff --git a/app/views/settings/_dmsf_settings.html.erb b/app/views/settings/_dmsf_settings.html.erb index 5c93b670..c3164b50 100644 --- a/app/views/settings/_dmsf_settings.html.erb +++ b/app/views/settings/_dmsf_settings.html.erb @@ -3,39 +3,28 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # - # 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. + # Redmine DMSF plugin 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 3 of the License, or (at your option) any + # later version. # - # 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. + # Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + # . %> -<% - if defined?(EasyExtensions) - klass = 'small dmsf-info' - title_klass = 'small dmsf-info dmsf-info-title' - else - klass = 'info'; - title_klass = 'info' - end -%> - - + <%= l(:label_general) %>

    <%= content_tag :label, l(:label_maximum_files_download) %> <%= text_field_tag 'settings[dmsf_max_file_download]', RedmineDmsf.dmsf_max_file_download, size: 10 %> - + <%= l(:note_maximum_number_of_files_downloaded) %>
    <%= l(:label_default) %>: 0
    @@ -45,7 +34,7 @@ <%= content_tag :label, l(:label_dmsf_max_notification_receivers_info) %> <%= text_field_tag 'settings[dmsf_max_notification_receivers_info]', RedmineDmsf.dmsf_max_notification_receivers_info, size: 10 %> - + <%= l(:note_dmsf_max_notification_receivers_info) %>
    <%= l(:label_default) %>: 10
    @@ -54,7 +43,7 @@

    <%= content_tag :label, l(:label_maximum_email_filesize) %> <%= text_field_tag 'settings[dmsf_max_email_filesize]', RedmineDmsf.dmsf_max_email_filesize, size: 10 %> - + <%= l(:note_maximum_email_filesize) %>
    <%= l(:label_default) %>: 0
    @@ -63,7 +52,7 @@

    <%= content_tag :label, l(:label_file_storage_directory) %> <%= text_field_tag 'settings[dmsf_storage_directory]', RedmineDmsf.dmsf_storage_directory, size: 256 %> - + <%= l(:label_default) %>: files/dmsf

    @@ -93,7 +82,7 @@ <%= l(:note_dmsf_office_bin_not_available, RedmineDmsf.office_bin ||= 'libreoffice') %> <% end %> - + <%= l(:note_dmsf_office_bin) %>
    <%= l(:label_default) %>: 'libreoffice'
    @@ -102,7 +91,7 @@

    <%= content_tag :label, l(:label_physical_file_delete) %> <%= check_box_tag 'settings[dmsf_really_delete_files]', '1', RedmineDmsf.physical_file_delete? %> - + <%= l(:label_default)%>: <%= l(:general_text_No)%>

    @@ -114,7 +103,7 @@ [l(:select_option_deactivated), '0'], [l(:select_option_activated), '1']], selected: RedmineDmsf.dmsf_default_notifications? ? '1' : '0') %> - + <%= l(:label_default) %>: <%= l(:select_option_deactivated) %>

    @@ -126,7 +115,7 @@ [l(:select_option_deactivated), '0'], [l(:select_option_activated), '1']], selected: RedmineDmsf.dmsf_display_notified_recipients? ? '1' : '0') %> - + <%= l(:note_display_notified_recipients) %>
    <%= l(:label_default) %>: <%= l(:select_option_deactivated) %>
    @@ -135,7 +124,7 @@

    <%= content_tag :label, l(:label_title_format) %> <%= text_field_tag 'settings[dmsf_global_title_format]', RedmineDmsf.dmsf_global_title_format, size: 10 %> - + <%= l(:text_title_format) %>

    @@ -143,7 +132,7 @@

    <%= content_tag :label, l(:label_act_as_attachable) %> <%= check_box_tag 'settings[dmsf_act_as_attachable]', '1', RedmineDmsf.dmsf_act_as_attachable? %> - + <%= l(:note_dmsf_act_as_attachable) %>
    <%= l(:label_default) %>: <%= l(:general_text_No) %>
    @@ -152,7 +141,7 @@

    <%= content_tag :label, l(:label_dmsf_projects_as_subfolders) %> <%= check_box_tag 'settings[dmsf_projects_as_subfolders]', '1', RedmineDmsf.dmsf_projects_as_subfolders? %> - + <%= l(:note_dmsf_projects_as_subfolders) %>
    <%= l(:label_default) %>: <%= l(:general_text_No) %>
    @@ -161,7 +150,7 @@

    <%= content_tag :label, l(:label_dmsf_global_menu_disabled) %> <%= check_box_tag 'settings[dmsf_global_menu_disabled]', '1', RedmineDmsf.dmsf_global_menu_disabled? %> - + <%= l(:note_dmsf_global_menu_disabled) %>
    <%= l(:label_default) %>: <%= l(:general_text_No) %>
    @@ -170,7 +159,7 @@

    <%= content_tag :label, l(:label_empty_minor_version_by_default) %> <%= check_box_tag 'settings[empty_minor_version_by_default]', '1', RedmineDmsf.empty_minor_version_by_default? %> - + <%= l(:label_default) %>: <%= l(:general_text_No) %>

    @@ -178,13 +167,13 @@

    <%= content_tag :label, l(:label_remove_original_documents_module) %> <%= check_box_tag 'settings[remove_original_documents_module]', '1', RedmineDmsf.remove_original_documents_module? %> - + <%= l(:label_default) %>: <%= l(:general_text_No) %>


    - + <%= l(:label_dmsf_columns) %> @@ -199,14 +188,14 @@


    - + <%= l(:heading_send_documents_by_email) %>

    <%= content_tag :label, l(:label_email_from_override) %> <%= text_field_tag 'settings[dmsf_documents_email_from]', RedmineDmsf.dmsf_documents_email_from, size: 128 %> - + <%= l(:label_default) %>: <%= l(:text_email_from_override) %>

    @@ -214,7 +203,7 @@

    <%= content_tag :label, l(:label_email_reply_to) %> <%= text_field_tag 'settings[dmsf_documents_email_reply_to]', RedmineDmsf.dmsf_documents_email_reply_to, size: 128 %> - + <%= l(:label_default) %>: <%= "''" %>

    @@ -222,20 +211,20 @@

    <%= content_tag :label, l(:label_links_only).capitalize %> <%= check_box_tag 'settings[dmsf_documents_email_links_only]', '1', RedmineDmsf.dmsf_documents_email_links_only? %> - + <%= l(:label_default) %>: <%= l(:general_text_No) %>


    - + <%= l(:field_label_dmsf_workflow) %>

    <%= content_tag :label, l(:label_dmsf_keep_documents_locked) %> <%= check_box_tag 'settings[dmsf_keep_documents_locked]', '1', RedmineDmsf.dmsf_keep_documents_locked? %> - + <%= l(:note_dmsf_keep_documents_locked) %>
    <%= l(:label_default)%>: <%= l(:general_text_No)%>
    @@ -244,35 +233,27 @@

    <%= content_tag(:label, l(:only_approval_zero_minor_version)) %> <%= check_box_tag 'settings[only_approval_zero_minor_version]', '1', RedmineDmsf.only_approval_zero_minor_version? %> - + <%= l(:only_approval_zero_minor_version) %>
    <%= l(:label_default) %>: <%= l(:general_text_No)%>


    - + <%= l(:label_webdav) %>

    <%= content_tag :label, l(:label_webdav) %> - <% disabled = defined?(EasyExtensions) && !(Redmine::Plugin.installed?('easy_hosting_services') && - EasyHostingServices::EasyMultiTenancy.activated?) %> <%= select_tag 'settings[dmsf_webdav]', options_for_select([ [l(:select_option_deactivated), '0'], [l(:select_option_activated), '1']], selected: RedmineDmsf.dmsf_webdav? ? '1' : '0'), - disabled: disabled, onchange: "$('#dmsf_webdav_block').toggle()" %> - - <% if disabled %> - <% @settings['dmsf_webdav'] = '0' %> - <%= l(:note_webdav_disabled) %> - <% else %> - <%= l(:note_webdav, protocol: Setting.protocol, domain: Setting.host_name) %>
    - <%= l(:label_default) %>: <%= l(:select_option_deactivated) %> - <% end %> + + <%= l(:note_webdav, protocol: Setting.protocol, domain: Setting.host_name) %>
    + <%= l(:label_default) %>: <%= l(:select_option_deactivated) %>

    @@ -284,7 +265,7 @@ <% auth_types = [%w[Basic Basic], %w[Digest Digest]] %> <%= select_tag 'settings[dmsf_webdav_authentication]', options_for_select(auth_types, RedmineDmsf.dmsf_webdav_authentication) %> - + <%= l(:note_webdav_authentication) %>
    <%= l(:label_default)%>: <%= auth_types[1][0] %>
    @@ -297,7 +278,7 @@ [l(:select_option_webdav_readwrite), 'WEBDAV_READ_WRITE']], selected: RedmineDmsf.dmsf_webdav_strategy), onchange: "$('#dmsf_webdav_ro_block').toggle()" %>
    - + <%= l(:note_webdav_strategy) %>
    <%= l(:label_default) %>: <%= l(:select_option_webdav_readonly) %>
    @@ -309,7 +290,7 @@

    <%= content_tag(:label, l(:label_webdav_ignore)) %> <%= text_field_tag 'settings[dmsf_webdav_ignore]', RedmineDmsf.dmsf_webdav_ignore, size: 50 %> - + <%= l(:note_webdav_ignore) %> <%= l(:label_default) %>: ^(\._|\.DS_Store$|Thumbs.db$)

    @@ -317,7 +298,7 @@ <%= content_tag(:label, l(:dmsf_webdav_ignore_1b_file_for_authentication)) %> <%= check_box_tag 'settings[dmsf_webdav_ignore_1b_file_for_authentication]', '1', RedmineDmsf.dmsf_webdav_ignore_1b_file_for_authentication? %> - + <%= l(:dmsf_webdav_ignore_1b_file_for_authentication_info) %>
    <%= l(:label_default) %>: <%= l(:general_text_Yes) %>
    @@ -326,7 +307,7 @@ <%= content_tag :label, l(:label_webdav_disable_versioning) %> <%= text_field_tag 'settings[dmsf_webdav_disable_versioning]', RedmineDmsf.dmsf_webdav_disable_versioning, size: 50 %> - + <%= l(:note_webdav_disable_versioning) %>
    <%= l(:label_default) %>: ^\~\$|\.tmp$
    @@ -334,7 +315,7 @@

    <%= content_tag :label, l(:label_webdav_use_project_names) %> <%= check_box_tag 'settings[dmsf_webdav_use_project_names]', '1', RedmineDmsf.dmsf_webdav_use_project_names? %> - + <%= l(:note_webdav_use_project_names) %>
    <%= l(:label_default)%>: <%= l(:general_text_No) %>
    @@ -344,63 +325,56 @@


    - - <%= l(:label_full_text) %> +

    + + <%= l(:text_fulltext_search, cmd1: 'libreoffice', cmd2: 'pdftotext') %> - -<% if defined?(EasyExtensions) %> +

    +<% if RedmineDmsf::Plugin.lib_available?('xapian') %>

    - - <%= l(:text_fulltext_search, cmd1: 'libreoffice', cmd2: 'pdftotext') %> + <%= content_tag :label, l(:label_index_database) %> + <%= text_field_tag 'settings[dmsf_index_database]', RedmineDmsf.dmsf_index_database, size: 50 %> + + <%= l(:label_default) %>: <%= File.expand_path('dmsf_index', Rails.root) %> + +

    + + <% stem_langs = %w(danish dutch english finnish french german hungarian italian norwegian portuguese romanian russian + spanish swedish turkish) %> + +

    + <%= content_tag :label, l(:label_stemming_language) %> + <%= select_tag 'settings[dmsf_stemming_lang]', options_for_select(stem_langs, RedmineDmsf.dmsf_stemming_lang) %> + + <%= l(:note_possible_values) %>: <%= stem_langs.join(', ') %>.
    + <%= "#{l(:label_default)}: #{stem_langs[2]}" %> +
    +

    + +

    + <%= content_tag :label, l(:label_stem_strategy) %> + <%= radio_button_tag 'settings[dmsf_stemming_strategy]', 'STEM_NONE', + RedmineDmsf.dmsf_stemming_strategy == 'STEM_NONE' %> <%= l(:option_stem_none) %> +
    + <%= radio_button_tag 'settings[dmsf_stemming_strategy]', 'STEM_SOME', + RedmineDmsf.dmsf_stemming_strategy == 'STEM_SOME' %> <%= l(:option_stem_some) %> +
    + <%= radio_button_tag 'settings[dmsf_stemming_strategy]', 'STEM_ALL', + RedmineDmsf.dmsf_stemming_strategy == 'STEM_ALL' %> <%= l(:option_stem_all) %> +
    + + <%= l(:text_stemming_info) %> + +

    + +

    + <%= content_tag :label, l(:label_enable_cjk_ngrams) %> + <%= check_box_tag 'settings[dmsf_enable_cjk_ngrams]', '1', RedmineDmsf.dmsf_enable_cjk_ngrams? %> + + <%= l(:text_enable_cjk_ngrams) %>
    + <%= l(:label_default)%>: <%= l(:general_text_No) %>

    <% else %> - <% if RedmineDmsf::Plugin.lib_available?('xapian') %> -

    - <%= content_tag :label, l(:label_index_database) %> - <%= text_field_tag 'settings[dmsf_index_database]', RedmineDmsf.dmsf_index_database, size: 50 %> - - <%= l(:label_default) %>: <%= File.expand_path('dmsf_index', Rails.root) %> - -

    - - <% stem_langs = %w(danish dutch english finnish french german hungarian italian norwegian portuguese romanian russian - spanish swedish turkish) %> - -

    - <%= content_tag :label, l(:label_stemming_language) %> - <%= select_tag 'settings[dmsf_stemming_lang]', options_for_select(stem_langs, RedmineDmsf.dmsf_stemming_lang) %> - - <%= l(:note_possible_values) %>: <%= stem_langs.join(', ') %>.
    - <%= "#{l(:label_default)}: #{stem_langs[2]}" %> -
    -

    - -

    - <%= content_tag :label, l(:label_stem_strategy) %> - <%= radio_button_tag 'settings[dmsf_stemming_strategy]', 'STEM_NONE', - RedmineDmsf.dmsf_stemming_strategy == 'STEM_NONE' %> <%= l(:option_stem_none) %> -
    - <%= radio_button_tag 'settings[dmsf_stemming_strategy]', 'STEM_SOME', - RedmineDmsf.dmsf_stemming_strategy == 'STEM_SOME' %> <%= l(:option_stem_some) %> -
    - <%= radio_button_tag 'settings[dmsf_stemming_strategy]', 'STEM_ALL', - RedmineDmsf.dmsf_stemming_strategy == 'STEM_ALL' %> <%= l(:option_stem_all) %> -
    - - <%= l(:text_stemming_info) %> - -

    - -

    - <%= content_tag :label, l(:label_enable_cjk_ngrams) %> - <%= check_box_tag 'settings[dmsf_enable_cjk_ngrams]', '1', RedmineDmsf.dmsf_enable_cjk_ngrams? %> - - <%= l(:text_enable_cjk_ngrams) %>
    - <%= l(:label_default)%>: <%= l(:general_text_No) %> -
    -

    - <% else %> -

    <%= l(:warning_xapian_not_available) %>

    - <% end %> +

    <%= l(:warning_xapian_not_available) %>

    <% end %> diff --git a/assets/javascripts/attachments_dmsf.js b/assets/javascripts/attachments_dmsf.js index 6a674c03..0e3fe97a 100644 --- a/assets/javascripts/attachments_dmsf.js +++ b/assets/javascripts/attachments_dmsf.js @@ -1,34 +1,42 @@ -/* Redmine plugin for Document Management System "Features" - * - * 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. +/* + Redmine plugin for Document Management System "Features" + + Karel Pičman + + This file is part of Redmine DMSF plugin. + + Redmine DMSF plugin 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 3 of the License, or (at your option) any + later version. + + Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + . */ function dmsfAddLink(linksSpan, linkId, linkName, title, project, awf) { + let attachmentsForm = linksSpan.closest('.dmsf-uploader') + let attachmentsIcons = attachmentsForm.find('.dmsf-attachments-icons'); + let delIcon = attachmentsIcons.find('svg.svg-del').clone(); + let linkIcon = attachmentsIcons.find('svg.svg-dmsf-link').clone(); + let assignmentIcon = attachmentsIcons.find('svg.svg-dmsf-assignment').clone(); let nextLinkId = dmsfAddLink.nextLinkId++; let linkSpan = $('', { id: 'dmsf_links_attachments_' + nextLinkId, 'class': 'attachment' }); - let iconDel = $('').attr({href: '#', 'class': 'remove-upload icon-only icon-del'}); + let iconDel = $('') + .attr({href: '#', class: 'remove-upload icon-only icon-del', title: 'Delete'}) + .append(delIcon); let inputId = $('', {type: 'hidden', name: 'dmsf_links[' + nextLinkId + ']'}).val(linkId); - let inputName = $('', {type: 'text', class: 'filename readonly'}).val(linkName); + let inputName = $('', {type: 'text', class: 'filename icon icon-link readonly'}).val(linkName); linkSpan.append(inputId); + linkSpan.append(linkIcon); linkSpan.append(inputName); linkSpan.append(iconDel.click(dmsfRemoveFileLbl)); if(awf) { - let iconWf = $('').attr({href: "/dmsf-workflows/" + project + "/assign?dmsf_link_id=" + linkId, - 'class': 'modify-upload icon-only icon-ok', 'data-remote': 'true', 'title': title}); + let iconWf = $('').attr({href: "/dmsf_workflows/" + project + "/assign?dmsf_link_id=" + linkId, + 'class': 'modify-upload icon-only icon-ok', 'data-remote': 'true', 'title': title}).append(assignmentIcon); linkSpan.append(iconWf); } linksSpan.append(linkSpan); @@ -130,49 +138,57 @@ function replaceVersion(detailsForm, attachmentId, name, version) { str = str.replace('', ''); } else { - let c = String.fromCharCode(160); //   - str = str.replace('', ''); + str = str.replace('', ''); } detailsForm = detailsForm.substring(0, index) + str; } return detailsForm; } +function dmsfRevisionDetails(elem, attachmentId) { + let newRevisionForm = $('#dmsf_attachments_details_' + attachmentId); + newRevisionForm.toggle(); + elem.text("[" + (newRevisionForm.is(':visible') ? "-" : "+") + "]"); +} + function dmsfAddFile(inputEl, file, eagerUpload) { let attachments = $('#dmsf_attachments_fields'); let max = ($(inputEl).attr('multiple') == 'multiple') ? 10 : 1 + let attachmentsForm = $(inputEl).closest('.dmsf-uploader') + let attachmentsIcons = attachmentsForm.find('.dmsf-attachments-icons'); + let delIcon = attachmentsIcons.find('svg.svg-del').clone(); + let attachmentIcon = attachmentsIcons.find('svg.svg-attachment').clone(); + let assignmentIcon = attachmentsIcons.find('svg.svg-dmsf-assignment').clone(); if (attachments.children('.attachment').length < max) { let attachmentId = dmsfAddFile.nextAttachmentId++; let fileSpan = $('', { id: 'dmsf_attachments_' + attachmentId, 'class': 'attachment' }); - let iconDel = $('').attr({href: '#', 'class': 'remove-upload icon-only icon-del'}).toggle(!eagerUpload); - let fileName = $('', {type: 'text', 'class': 'filename readonly', + let iconDel = $('') + .attr({href: '#', class: 'remove-upload icon-only icon-del', title: 'Delete'}) + .append(delIcon) + .toggle(!eagerUpload); + let fileName = $('', {type: 'text', 'class': 'filename icon icon-attachment readonly', name: 'dmsf_attachments[' + attachmentId + '][filename]', readonly: 'readonly'}).val(file.name); + fileSpan.append(attachmentIcon); fileSpan.append(fileName); if($(inputEl).attr('multiple') == 'multiple') { fileSpan.append(iconDel.click(dmsfRemoveFileLbl)); if ($(inputEl).data('awf')) { let iconWf = $('').attr({ - href: '/dmsf-workflows/' + $(inputEl).attr( + href: '/dmsf_workflows/' + $(inputEl).attr( 'data-project') + "/assign?attachment_id=" + attachmentId, - 'class': 'modify-upload icon-only icon-ok', - 'data-remote': 'true' - }); + class: 'modify-upload icon-only icon-ok', + 'data-remote': 'true', + title: 'Assign an approval workflow' + }).append(assignmentIcon); fileSpan.append(iconWf); } // Details let detailsDiv = $('
    ').attr({id: 'dmsf_attachments_details_' + attachmentId}); let detailsArrow = $(''); detailsArrow.text('[+]'); - detailsArrow.attr({href: "#", 'data-cy': 'toggle__new_revision_from_content--dmsf', title: 'Details'}); - detailsArrow.attr( - { - onclick: "let newRevisionForm = $('#dmsf_attachments_details_" + attachmentId + "');" + - "let operator = newRevisionForm.is(':visible') ? '+' : '-';" + - "newRevisionForm.toggle();" + - "$(this).text('[' + operator + ']');" + - "$('#dmsf-upload-button').hide();" + - "return false;" - }); + detailsArrow.attr({href: "#", 'data-cy': 'toggle__new_revision_from_content--dmsf', title: 'Details', + class: 'dmsf-plus-button'}); + detailsArrow.attr('onclick', "dmsfRevisionDetails($(this), " + attachmentId + "); return false;"); let files = $(inputEl).data('files'); let locked = isFileLocked(file.name, files); let detailsForm = $(inputEl).data(locked ? 'dmsf-file-details-form-locked' : 'dmsf-file-details-form'); @@ -208,14 +224,13 @@ function dmsfAddFile(inputEl, file, eagerUpload) { detailsDiv.append(detailsForm); detailsDiv.hide(); fileSpan.append(detailsArrow) + fileSpan.append(detailsDiv); attachments.append(fileSpan); - attachments.append(detailsDiv); } else { fileSpan.append(iconDel.click(dmsfRemoveFileLbl)); attachments.append(fileSpan); $('#dmsf_file_revision_name').val(file.name); } - attachments.append('
    '); if(eagerUpload) { dmsfAjaxUpload(file, attachmentId, fileSpan, inputEl); } @@ -389,12 +404,4 @@ function dmsfSetupFileDrop() { } } -if(typeof EASY == "undefined"){ - $(document).ready(dmsfSetupFileDrop); -} -else { - EASY.schedule.late(function () { - dmsfSetupFileDrop(); - $(document).on("erui_new_dom", dmsfSetupFileDrop); - }); -} +$(document).ready(dmsfSetupFileDrop); diff --git a/assets/javascripts/dmsf_button.js b/assets/javascripts/dmsf_button.js index cbc70c5c..5f4ac527 100644 --- a/assets/javascripts/dmsf_button.js +++ b/assets/javascripts/dmsf_button.js @@ -1,21 +1,21 @@ -/* Redmine plugin for Document Management System "Features" - * - * 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. - */ +/* + Redmine plugin for Document Management System "Features" + + Karel Pičman + + This file is part of Redmine DMSF plugin. + + Redmine DMSF plugin 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 3 of the License, or (at your option) any + later version. + + Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + . +*/ /* Global jsToolBar */ @@ -52,10 +52,7 @@ jsToolBar.prototype.dmsfMenu = function(fn){ } else { $('
  • ').html('
    ').appendTo(menu); - const a = item.split(';'); - let lang = a[0]; - let help = a[1]; - let macroItem = $('
    ').text(help); + let macroItem = $('
    ').text(item.split(';')[1]); $('
  • ').html(macroItem).appendTo(menu).mousedown(function () { window.open('/dmsf/help/wiki_syntax','_blank', 'width=480,height=480'); }); diff --git a/assets/javascripts/lang/dmsf_button-en.js b/assets/javascripts/lang/dmsf_button-en.js index 6b8c18c7..ea0c5f19 100644 --- a/assets/javascripts/lang/dmsf_button-en.js +++ b/assets/javascripts/lang/dmsf_button-en.js @@ -1,21 +1,21 @@ -/* Redmine plugin for Document Management System "Features" - * - * 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. - */ +/* + Redmine plugin for Document Management System "Features" + + Karel Pičman + + This file is part of Redmine DMSF plugin. + + Redmine DMSF plugin 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 3 of the License, or (at your option) any + later version. + + Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + . +*/ jsToolBar.strings = jsToolBar.strings || {}; jsToolBar.strings['DMS'] = 'DMS'; diff --git a/assets/javascripts/redmine_dmsf.js b/assets/javascripts/redmine_dmsf.js index ae56f62d..36a1dd56 100644 --- a/assets/javascripts/redmine_dmsf.js +++ b/assets/javascripts/redmine_dmsf.js @@ -1,20 +1,20 @@ -/* Redmine plugin for Document Management System "Features" -* -* 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. +/* + Redmine plugin for Document Management System "Features" + + Karel Pičman + + This file is part of Redmine DMSF plugin. + + Redmine DMSF plugin 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 3 of the License, or (at your option) any + later version. + + Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + . */ /* Function to allow the projects to show up as a tree */ diff --git a/assets/stylesheets/dmsf_help.css b/assets/stylesheets/dmsf_help.css index d62a9d4e..94ac05e9 100644 --- a/assets/stylesheets/dmsf_help.css +++ b/assets/stylesheets/dmsf_help.css @@ -1,22 +1,20 @@ - /* -* Redmine plugin for Document Management System "Features" -* -* Vit Jonas , 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. + Redmine plugin for Document Management System "Features" + + Vit Jonas , Karel Pičman + + This file is part of Redmine DMSF plugin. + + Redmine DMSF plugin 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 3 of the License, or (at your option) any + later version. + + Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + . */ div#contents { diff --git a/assets/stylesheets/img/loading.gif b/assets/stylesheets/img/loading.gif deleted file mode 100644 index f0109d17..00000000 Binary files a/assets/stylesheets/img/loading.gif and /dev/null differ diff --git a/assets/stylesheets/img/plupload.png b/assets/stylesheets/img/plupload.png deleted file mode 100644 index 6b629d01..00000000 Binary files a/assets/stylesheets/img/plupload.png and /dev/null differ diff --git a/assets/stylesheets/redmine_dmsf.css b/assets/stylesheets/redmine_dmsf.css index 90e36f57..051201d2 100644 --- a/assets/stylesheets/redmine_dmsf.css +++ b/assets/stylesheets/redmine_dmsf.css @@ -1,21 +1,20 @@ /* -* Redmine plugin for Document Management System "Features" -* -* Vit Jonas , 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. + Redmine plugin for Document Management System "Features" + + Vit Jonas , Karel Pičman + + This file is part of Redmine DMSF plugin. + + Redmine DMSF plugin 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 3 of the License, or (at your option) any + later version. + + Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see + . */ /* Main view */ @@ -32,13 +31,6 @@ a.dmsf-label { margin-left: 4px; } -/* Query form */ -.query-columns > span { /* EasyExtension */ - display: inline-block; - height: 100%; - vertical-align: middle; -} - /* Revision's downloads box */ #dmsf_buttons.dmsf-controls { float: left @@ -76,23 +68,39 @@ div[id^="step-index-"] { } /* DMSF revision box */ +h2.dmsf-header { + border: none !important; +} + #new_revision_form_content { display: none; } +form#new_revision_form { + margin: 0; +} + .dmsf-revision-box { background-color: #f6f6f6; + margin-bottom: 16px; } .dmsf-revision-inner-box { border: 1px solid #e4e4e4; padding: 10px; + border-radius: 3px; + box-shadow: 0 1px 2px rgba(0,0,0,0.05); } div.dmsf-revision-inner-box .attribute { - padding-left: 180px; + padding: 0; clear: left; min-height: 1.8em; + border: none; +} + +div.dmsf-revision-inner-box .attribute .label { + margin-left: 0 !important; } div.dmsf-revision-inner-box .attribute .label { @@ -111,6 +119,18 @@ div.dmsf-id-box { padding-left: 10px; } +div#dmsf_new_revision { + padding: 8px; + margin: 0px 0px 12px 0px; + background-color: rgb(249.3, 251.9, 255); + color: #505050; + line-height: 1.5em; + border: 1px solid #d0d7de; + word-wrap: break-word; + border-radius: 3px; + box-shadow: 0 1px 2px rgba(0,0,0,0.05); +} + .dmsf-log-header-box{ padding: 6px; margin-bottom: 10px; @@ -130,21 +150,13 @@ div.dmsf-id-box { .dmsf-widget-header { font-weight: normal; padding: 0 10px 0 10px; + background: #e9e9e9; } .dmsf-widget-header-text { 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; -} - div[id*="revision_access_"] { display: none; } @@ -153,67 +165,6 @@ div[id*="revision_access_"] { max-width: 100%; } -/* Command icons */ -.dmsf-icon-link:not(:has(svg)) { background-image: url("../../../images/link.png"); } - -/* File types */ -.dmsf-icon-file{ - display: inline-block; - height: 16px; -} - -.dmsf-gray .icon-folder { background-image: url("../images/folder_gray.png"); } -.dmsf-system .icon-folder { background-image: url("../images/folder_system.png"); } - -.icon-file.filetype-doc, .icon-file.filetype-docx { background-image: url("../images/filetypes/doc.png"); } -.icon-file.filetype-xls, -.icon-file.filetype-xlsx, -.icon-file.filetype-xlsm { background-image: url("../images/filetypes/xls.png"); } -.icon-file.filetype-ppt, .icon-file.filetype-pptx { background-image: url("../images/filetypes/ppt.png"); } -.icon-file.filetype-vsd, .icon-file.filetype-vsdx { background-image: url("../images/filetypes/vsd.png"); } -.icon-file.filetype-mpp { background-image: url("../images/filetypes/mpp.png"); } -.icon-file.filetype-odt { background-image: url("../images/filetypes/odt.png"); } -.icon-file.filetype-ods { background-image: url("../images/filetypes/ods.png"); } -.icon-file.filetype-ott { background-image: url("../images/filetypes/ott.png"); } -.icon-file.filetype-odp { background-image: url("../images/filetypes/odp.png"); } -.icon-file.filetype-odg { background-image: url("../images/filetypes/odg.png"); } - -.dmsf-gray .icon-file.filetype-doc { background-image: url("../images/filetypes/doc_gray.png"); } -.dmsf-gray .icon-file.filetype-docx { background-image: url("../images/filetypes/doc_gray.png"); } -.dmsf-gray .icon-file.filetype-xls { background-image: url("../images/filetypes/xls_gray.png"); } -.dmsf-gray .icon-file.filetype-xlsx { background-image: url("../images/filetypes/xls_gray.png"); } -.dmsf-gray .icon-file.filetype-xlsm { background-image: url("../images/filetypes/xls_gray.png"); } -.dmsf-gray .icon-file.filetype-ppt { background-image: url("../images/filetypes/ppt_gray.png"); } -.dmsf-gray .icon-file.filetype-pptx { background-image: url("../images/filetypes/ppt_gray.png"); } -.dmsf-gray .icon-file.filetype-vsd { background-image: url("../images/filetypes/vsd_gray.png"); } -.dmsf-gray .icon-file.filetype-vsdx { background-image: url("../images/filetypes/vsd_gray.png"); } -.dmsf-gray .icon-file.filetype-mpp { background-image: url("../images/filetypes/mpp_gray.png"); } -.dmsf-gray .icon-file.filetype-odt { background-image: url("../images/filetypes/odt_gray.png"); } -.dmsf-gray .icon-file.filetype-ott { background-image: url("../images/filetypes/ott_gray.png"); } -.dmsf-gray .icon-file.filetype-ods { background-image: url("../images/filetypes/ods_gray.png"); } -.dmsf-gray .icon-file.filetype-odp { background-image: url("../images/filetypes/odp_gray.png"); } -.dmsf-gray .icon-file.filetype-odg { background-image: url("../images/filetypes/odg_gray.png"); } - -.dmsf-gray .icon-file.text-x-c { background-image: url("../images/filetypes/c_gray.png"); } -.dmsf-gray .icon-file.text-x-csharp { background-image: url("../images/filetypes/csharp_gray.png"); } -.dmsf-gray .icon-file.text-x-java { background-image: url("../images/filetypes/java_gray.png"); } -.dmsf-gray .icon-file.text-x-javascript { background-image: url("../images/filetypes/js_gray.png"); } -.dmsf-gray .icon-file.text-x-php { background-image: url("../images/filetypes/php_gray.png"); } -.dmsf-gray .icon-file.text-x-ruby { background-image: url("../images/filetypes/ruby_gray.png"); } -.dmsf-gray .icon-file.text-xml { background-image: url("../images/filetypes/xml_gray.png"); } -.dmsf-gray .icon-file.text-css { background-image: url("../images/filetypes/css_gray.png"); } -.dmsf-gray .icon-file.text-html { background-image: url("../images/filetypes/html_gray.png"); } -.dmsf-gray .icon-file.image-gif { background-image: url("../images/filetypes/image_gray.png"); } -.dmsf-gray .icon-file.image-jpeg { background-image: url("../images/filetypes/image_gray.png"); } -.dmsf-gray .icon-file.image-png { background-image: url("../images/filetypes/image_gray.png"); } -.dmsf-gray .icon-file.image-tiff { background-image: url("../images/filetypes/image_gray.png"); } -.dmsf-gray .icon-file.application-pdf { background-image: url("../images/filetypes/pdf_gray.png"); } -.dmsf-gray .icon-file.application-zip { background-image: url("../images/filetypes/zip_gray.png"); } -.dmsf-gray .icon-file.application-x-gzip { background-image: url("../images/filetypes/zip_gray.png"); } - -/* Activities */ -.icon-dmsf-file-revision { background-image: url("../../../images/document.png"); } - /* Links */ .dmsf-gray, .dmsf-gray a, @@ -222,6 +173,10 @@ div[id*="revision_access_"] { color: gray; } +.dmsf-gray svg { + stroke: grey; +} + svg.dmsf-gray { stroke: grey; } @@ -238,9 +193,6 @@ svg.dmsf-system { stroke: darkviolet; } -/* Search results */ -.icon-dmsf-file { background-image: url("../../../images/document.png"); } - /* DMSF tree view */ .dmsf-hidden { display: none; } .dmsf-tree:not(.dmsf-child) span.dmsf-expander { cursor: pointer; } @@ -322,16 +274,10 @@ span.fileover { width: 250px; color: #555; background-color: inherit; - background: url("../../../images/attachment.png") no-repeat 1px 50%; - padding-left: 18px; } -#dmsf_attachments_fields .ajax-waiting input.filename { - background: url("../../../images/hourglass.png") no-repeat 0 50%; -} - -#dmsf_attachments_fields .ajax-loading input.filename { - background: url("../../../images/loading.gif") no-repeat 0 50%; +.dmsf-plus-button { + vertical-align: middle; } #dmsf_attachments_fields div.ui-progressbar { @@ -352,8 +298,11 @@ span.fileover { width: 250px; color: #555; background-color: inherit; - background: url("../../../images/link.png") no-repeat 1px 50%; - padding-left: 18px; +} + +.attachments_fields .icon-link { + background-image: none; + padding-left: 0; } .dmfs-box-tabular { @@ -361,7 +310,6 @@ span.fileover { } a.dmsf-scroll-down { - background: url("../../../images/arrow_down.png") no-repeat 5px 50%; background-color: #759FCF; text-decoration: none; color: #FFFFFF; @@ -411,4 +359,4 @@ div.dmsf-scroll { /* Wiki toolbar */ .jstb_dmsf { background-image: url("/document.png"); -} \ No newline at end of file +} diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 1bf3f834..e6c0603a 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -4,19 +4,18 @@ # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . cs: dmsf: DMS # Custom fields tab title @@ -155,7 +154,7 @@ cs: permission_force_file_unlock: Vynucené odemknutí souboru permission_manage_workflows: Spravovat schvalovací procesy permission_file_delete: Mazat dokumenty - permission_display_system_folders: Zobrazit systémové adresáře + permission_display_system_folders: Zobrazit systémové složky permission_file_approval: File approval permission_email_documents: Email documents label_file: Soubor @@ -366,7 +365,7 @@ cs: field_dmsf_not_inheritable: Není dědičné label_webdav_use_project_names: Použít názvy projektů - note_webdav_use_project_names: Použít názvy projektů místo identifikátorů pro názvy adresářů. + note_webdav_use_project_names: Použít názvy projektů místo identifikátorů pro názvy složek. label_last_approver: Poslední schvalovatel @@ -389,8 +388,8 @@ cs: např.: XAPIAN_CJK_NGRAM=true ruby plugins/redmine_dmsf/extra/xapian_indexer.rb -fv" label_dmsf_fast_links: Rychlé odkazy - text_dmsf_fast_links_info: Při vytváření odkazů budete moci zadat přímo ID cílového adresáře za účelem zrychlení - procesu vytváření odkazů nebo kopírování dokumentů a adresářů. + text_dmsf_fast_links_info: Při vytváření odkazů budete moci zadat přímo ID cílové složky za účelem zrychlení + procesu vytváření odkazů nebo kopírování dokumentů a složek. label_dmsf_permissions: Povolený přístup pro label_inherited_permissions: Zděděný přístup pro @@ -410,14 +409,14 @@ cs: dmsf_webdav_ignore_1b_file_for_authentication: Ignorovat 1b soubor poslaný kvůli autentizaci dmsf_webdav_ignore_1b_file_for_authentication_info: Total Commander WebDAV plugin - text_not_empty: Adresář není prázdný. + text_not_empty: Složka není prázdná. label_scroll_down: Posunout se dolů note_webdav_disabled: WebDAV je zablokovaný. Kontaktujte administrátora. dmsf_copy: "Kopie (%{n})" label_empty_trash_bin: Vysypat koš label_dmsf_projects_as_subfolders: Podprojekty jako podaresáře - note_dmsf_projects_as_subfolders: Přidá podprojekty jako podadresáře do pohledu DMS + note_dmsf_projects_as_subfolders: Přidá podprojekty jako podsložky do pohledu DMS only_approval_zero_minor_version: Schvalovat pouze hlavní verze title_assignment_minor: Přiřazení není dovoleno, podružná verze musí být nula title_start_minor: Zahájení není dovoleno, podružná verze musí být nula @@ -492,13 +491,9 @@ cs: label_dmsf_commit: Potvrdit label_dmsf_upload_commit: Nahrát a potvrdit - easy_pages: - modules: - dmsf_locked_documents: My locked documents - dmsf_open_approvals: My open approvals - dmsf_watched_documents: My watched documents - module_category: - easy_dms: Easy DMS + notice_search_in_subfolders: Vyhledávání v podsložkách není rekurzivní. Pro rekurzivní vyhledávání běžte do nejvyšší úrovně. + warning_folder_unlockable: Složku nelze odemknout + redmine_dmsf: Redmine DMSF activerecord: errors: diff --git a/config/locales/de.yml b/config/locales/de.yml index 38fbd0b9..4c6fc8b4 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -3,19 +3,18 @@ # # Terrence Miller, Christian Wetting , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . de: dmsf: DMS # Custom fields tab title @@ -487,13 +486,10 @@ de: label_dmsf_commit: Commit label_dmsf_upload_commit: Hochladen und Commit - easy_pages: - modules: - dmsf_locked_documents: Von mir gesperrte Dokumente - dmsf_open_approvals: Offene Genehmigungen - dmsf_watched_documents: Meine beobachteten Dokumente - module_category: - easy_dms: Easy DMS + notice_search_in_subfolders: Die Suche in Unterordnern ist nicht rekursiv. Für eine rekursive Suche gehen Sie auf die + oberste Ebene. + warning_folder_unlockable: Der Ordner kann nicht entsperrt werden + redmine_dmsf: Redmine DMSF activerecord: errors: diff --git a/config/locales/en.yml b/config/locales/en.yml index af56a3dd..0a3b8f12 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . en: dmsf: DMS # Custom fields tab title @@ -491,13 +490,9 @@ en: label_dmsf_commit: Commit label_dmsf_upload_commit: Upload and commit - easy_pages: - modules: - dmsf_locked_documents: My locked documents - dmsf_open_approvals: My open approvals - dmsf_watched_documents: My watched documents - module_category: - easy_dms: Easy DMS + notice_search_in_subfolders: Searching in sub-folders is not recursive. For a recursive search go to the top level. + warning_folder_unlockable: The folder can't be unlocked + redmine_dmsf: Redmine DMSF activerecord: errors: diff --git a/config/locales/es.yml b/config/locales/es.yml index b607123b..85757eed 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -3,19 +3,18 @@ # # Vít Jonáš , Agustin Ivorra , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . es: dmsf: DMS # Custom fields tab title @@ -488,17 +487,13 @@ es: text_dmsf_webdav_digest_reset: You are supposed to enter your password to generate a new DMS WebDAV digest. notice_webdav_digest_reset: Your DMS WebDAV digest was reset. + notice_search_in_subfolders: Searching in sub-folders is not recursive. For a recursive search go to the top level. + warning_folder_unlockable: The folder can't be unlocked + redmine_dmsf: Redmine DMSF + label_dmsf_commit: Commit label_dmsf_upload_commit: Upload and commit - easy_pages: - modules: - dmsf_locked_documents: My locked documents - dmsf_open_approvals: My open approvals - dmsf_watched_documents: My watched documents - module_category: - easy_dms: Easy DMS - activerecord: errors: messages: diff --git a/config/locales/fa.yml b/config/locales/fa.yml index bea3276a..77e67a05 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . fa: dmsf: اسناد پیش‌رفته # Custom fields tab title @@ -470,13 +469,9 @@ fa: label_dmsf_commit: Commit label_dmsf_upload_commit: Upload and commit - easy_pages: - modules: - dmsf_locked_documents: اسناد قفل شده‌ی من - dmsf_open_approvals: تاییدهای باز من - dmsf_watched_documents: My watched documents - module_category: - easy_dms: مدیریت اسناد آسان + notice_search_in_subfolders: Searching in sub-folders is not recursive. For a recursive search go to the top level. + warning_folder_unlockable: The folder can't be unlocked + redmine_dmsf: Redmine DMSF activerecord: errors: diff --git a/config/locales/fr.yml b/config/locales/fr.yml index d0a5aaf7..ea99646a 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -3,20 +3,18 @@ # # Vít Jonáš , Daniel Munn , Atmis # -# 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . fr: dmsf: DMS # Custom fields t title @@ -492,13 +490,9 @@ fr: label_dmsf_commit: Commit label_dmsf_upload_commit: Upload and commit - easy_pages: - modules: - dmsf_locked_documents: My locked documents - dmsf_open_approvals: My open approvals - dmsf_watched_documents: My watched documents - module_category: - easy_dms: Easy DMS + notice_search_in_subfolders: Searching in sub-folders is not recursive. For a recursive search go to the top level. + warning_folder_unlockable: The folder can't be unlocked + redmine_dmsf: Redmine DMSF activerecord: errors: diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 6f16435e..b02b0401 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -3,21 +3,18 @@ # # Karel Pičman # +# This file is part of Redmine DMSF plugin. # +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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. # -# 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. +# You should have received a copy of the GNU General Public License along with Redmine DMSF plugin. If not, see +# . hu: dmsf: DMS # Custom fields tab title @@ -85,7 +82,7 @@ hu: title_lock_file: Zárolás, hogy más felhasználók nem tudjank változtatni rajt title_download_checked: Ellenőrzött letöltése a Zip archívumba title_send_checked_by_email: Kijelöltek küldése email-ben - link_user_preferences: Easy DMS projekt preferenciák + link_user_preferences: DMS projekt preferenciák heading_send_documents_by_email: Dokumentumok küldése emailen label_email_from: Valakitől label_email_to: Valakinek @@ -492,13 +489,9 @@ hu: label_dmsf_commit: Commit label_dmsf_upload_commit: Upload and commit - easy_pages: - modules: - dmsf_locked_documents: My locked documents - dmsf_open_approvals: My open approvals - dmsf_watched_documents: My watched documents - module_category: - easy_dms: Easy DMS + notice_search_in_subfolders: Searching in sub-folders is not recursive. For a recursive search go to the top level. + warning_folder_unlockable: The folder can't be unlocked + redmine_dmsf: Redmine DMSF activerecord: errors: diff --git a/config/locales/it.yml b/config/locales/it.yml index d84b9840..d4ef24a0 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . it: # Italian strings thx 2 Matteo Arceci! dmsf: DMS # Custom fields tab title @@ -491,13 +490,9 @@ it: # Italian strings thx 2 Matteo Arceci! label_dmsf_commit: Commit label_dmsf_upload_commit: Upload and commit - easy_pages: - modules: - dmsf_locked_documents: My locked documents - dmsf_open_approvals: My open approvals - dmsf_watched_documents: My watched documents - module_category: - easy_dms: Easy DMS + notice_search_in_subfolders: Searching in sub-folders is not recursive. For a recursive search go to the top level. + warning_folder_unlockable: The folder can't be unlocked + redmine_dmsf: Redmine DMSF activerecord: errors: diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 5a6a82bd..f9087d21 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -3,20 +3,18 @@ # # Vít Jonáš , Karel Pičman # +# This file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 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. +# Redmine DMSF plugin 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. +# You should have received a copy of the GNU General Public License along with Redmine DMSF plugin. If not, see +# . ja: dmsf: DMS # Custom fields tab title @@ -493,13 +491,9 @@ ja: label_dmsf_commit: Commit label_dmsf_upload_commit: Upload and commit - easy_pages: - modules: - dmsf_locked_documents: 自分がロック中の文書 - dmsf_open_approvals: 自分が未承認の文書 - dmsf_watched_documents: My watched documents - module_category: - easy_dms: Easy DMS + notice_search_in_subfolders: Searching in sub-folders is not recursive. For a recursive search go to the top level. + warning_folder_unlockable: The folder can't be unlocked + redmine_dmsf: Redmine DMSF activerecord: errors: diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 61cf2e2b..68aa478a 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . ko: dmsf: DMS @@ -491,13 +490,9 @@ ko: label_dmsf_commit: Commit label_dmsf_upload_commit: Upload and commit - easy_pages: - modules: - dmsf_locked_documents: 내 잠긴 파일 - dmsf_open_approvals: 내 열린 승인 - dmsf_watched_documents: My watched documents - module_category: - easy_dms: DMS + notice_search_in_subfolders: Searching in sub-folders is not recursive. For a recursive search go to the top level. + warning_folder_unlockable: The folder can't be unlocked + redmine_dmsf: Redmine DMSF activerecord: errors: diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 75d29914..1ed00e21 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -3,19 +3,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . nl: dmsf: DMS @@ -83,7 +82,7 @@ nl: title_lock_file: Vergrendel om wijzigingen door andere leden te voorkomen title_download_checked: Download aangevinkt in Zip archief title_send_checked_by_email: Verzending aangevinkt door e-mail - link_user_preferences: Easy DMS project voorkeuren + link_user_preferences: DMS project voorkeuren heading_send_documents_by_email: Verstuur documenten per e-mail label_email_from: Van label_email_to: Aan @@ -179,7 +178,7 @@ nl: error_file_can_not_be_created: Bestand kan niet aangemaakt worden in opslag directory error_wrong_zip_encoding: Onjuiste Zip encoding warning_xapian_not_available: Xapian niet beschikbaar - menu_dmsf: Easy DMS + menu_dmsf: DMS label_physical_file_delete: Fysiek bestand verwijderen user_is_not_project_member: U bent geen lid van het project heading_access_downloads_emails: Downloads/E-mails @@ -188,7 +187,7 @@ nl: label_dmsf_updated: Bijgewerkt label_dmsf_downloaded: Gedownload title_total_size_of_all_files: Totale grootte van alle bestanden onder deze map - project_module_dmsf: Easy DMS + project_module_dmsf: DMS warning_no_project_to_copy_file_to: Geen project om bestand naar te kopiëren comment_copied_from: "Gekopieerd van %{source}" field_target_project: Doelproject @@ -491,13 +490,9 @@ nl: label_dmsf_commit: Commit label_dmsf_upload_commit: Upload and commit - easy_pages: - modules: - dmsf_locked_documents: My locked documents - dmsf_open_approvals: My open approvals - dmsf_watched_documents: My watched documents - module_category: - easy_dms: Easy DMS + notice_search_in_subfolders: Searching in sub-folders is not recursive. For a recursive search go to the top level. + warning_folder_unlockable: The folder can't be unlocked + redmine_dmsf: Redmine DMSF activerecord: errors: diff --git a/config/locales/pl.yml b/config/locales/pl.yml index ccbb5554..618e1ff2 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -3,19 +3,19 @@ # # Vít Jonáš , Daniel Munn , Karel Pičman # Polish translation created by Sebastian Białas www.bs-it.pl -# 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. +# This file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. +# +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . pl: dmsf: DMS # Custom fields tab title @@ -490,13 +490,9 @@ pl: label_dmsf_commit: Commit label_dmsf_upload_commit: Upload and commit - easy_pages: - modules: - dmsf_locked_documents: My locked documents - dmsf_open_approvals: My open approvals - dmsf_watched_documents: My watched documents - module_category: - easy_dms: Easy DMS + notice_search_in_subfolders: Searching in sub-folders is not recursive. For a recursive search go to the top level. + warning_folder_unlockable: The folder can't be unlocked + redmine_dmsf: Redmine DMSF activerecord: errors: diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index af264e82..b00355ef 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -1,21 +1,20 @@ # # Redmine plugin for Document Management System "Features" # -# Vít Jonáš , Daniel Munn , Karel Pičman +# Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . pt-BR: dmsf: DMS # Custom fields tab title @@ -491,13 +490,9 @@ pt-BR: label_dmsf_commit: Commit label_dmsf_upload_commit: Upload and commit - easy_pages: - modules: - dmsf_locked_documents: My locked documents - dmsf_open_approvals: My open approvals - dmsf_watched_documents: My watched documents - module_category: - easy_dms: Easy DMS + notice_search_in_subfolders: Searching in sub-folders is not recursive. For a recursive search go to the top level. + warning_folder_unlockable: The folder can't be unlocked + redmine_dmsf: Redmine DMSF activerecord: errors: diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 3225f8fe..e26aca4a 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -3,20 +3,18 @@ # # Zdravko Balorda , Karel Pičman # +# This file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 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. +# Redmine DMSF plugin 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. +# You should have received a copy of the GNU General Public License along with Redmine DMSF plugin. If not, see +# . sl: dmsf: Arhiv # Custom fields tab title @@ -492,13 +490,9 @@ sl: label_dmsf_commit: Commit label_dmsf_upload_commit: Upload and commit - easy_pages: - modules: - dmsf_locked_documents: My locked documents - dmsf_open_approvals: My open approvals - dmsf_watched_documents: My watched documents - module_category: - easy_dms: Easy DMS + notice_search_in_subfolders: Searching in sub-folders is not recursive. For a recursive search go to the top level. + warning_folder_unlockable: The folder can't be unlocked + redmine_dmsf: Redmine DMSF activerecord: errors: diff --git a/config/locales/uk.yml b/config/locales/uk.yml index bab0df4f..efe5b810 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -3,19 +3,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . uk: dmsf: ЕДО # Custom fields tab title - Заголовок таблиці спеціальних полів @@ -493,13 +492,9 @@ uk: label_dmsf_commit: Commit label_dmsf_upload_commit: Upload and commit - easy_pages: - modules: - dmsf_locked_documents: Мої заблоковані документи - dmsf_open_approvals: Мої відкриті дозволи - dmsf_watched_documents: Мої переглянуті документи - module_category: - easy_dms: Легкий DMS + notice_search_in_subfolders: Searching in sub-folders is not recursive. For a recursive search go to the top level. + warning_folder_unlockable: The folder can't be unlocked + redmine_dmsf: Redmine DMSF activerecord: errors: diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index ae78ea36..8a612d20 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -3,19 +3,18 @@ # # Vít Jonáš , Karel Pičman , Aecho Liu # -# 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . zh-TW: dmsf: 文件總管 # Custom fields tab title @@ -490,13 +489,9 @@ zh-TW: label_dmsf_commit: Commit label_dmsf_upload_commit: Upload and commit - easy_pages: - modules: - dmsf_locked_documents: My locked documents - dmsf_open_approvals: My open approvals - dmsf_watched_documents: My watched documents - module_category: - easy_dms: Easy DMS + notice_search_in_subfolders: Searching in sub-folders is not recursive. For a recursive search go to the top level. + warning_folder_unlockable: The folder can't be unlocked + redmine_dmsf: Redmine DMSF activerecord: errors: diff --git a/config/locales/zh.yml b/config/locales/zh.yml index b205ce1d..43b3e4f4 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -3,20 +3,18 @@ # # Vít Jonáš , Karel Pičman # +# This file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 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. +# Redmine DMSF plugin 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. +# You should have received a copy of the GNU General Public License along with Redmine DMSF plugin. If not, see +# . zh: dmsf: 文档管家 # Custom fields tab title @@ -492,13 +490,9 @@ zh: label_dmsf_commit: Commit label_dmsf_upload_commit: Upload and commit - easy_pages: - modules: - dmsf_locked_documents: My locked documents - dmsf_open_approvals: My open approvals - dmsf_watched_documents: My watched documents - module_category: - easy_dms: Easy DMS + notice_search_in_subfolders: Searching in sub-folders is not recursive. For a recursive search go to the top level. + warning_folder_unlockable: The folder can't be unlocked + redmine_dmsf: Redmine DMSF activerecord: errors: diff --git a/config/routes.rb b/config/routes.rb index fe57fba7..2b3715fc 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . if Redmine::Plugin.installed? 'redmine_dmsf' RedmineApp::Application.routes.draw do @@ -169,11 +168,9 @@ if Redmine::Plugin.installed? 'redmine_dmsf' end # WebDAV workaround for clients checking WebDAV availability in the root - unless defined?(EasyExtensions) - match '/', - to: ->(env) { [405, {}, ["#{env['REQUEST_METHOD']} method is not allowed"]] }, - via: %i[propfind options] - end + match '/', + to: ->(env) { [405, {}, ["#{env['REQUEST_METHOD']} method is not allowed"]] }, + via: %i[propfind options] match '/dmsf', to: ->(env) { [405, {}, ["#{env['REQUEST_METHOD']} method is not allowed"]] }, via: %i[propfind options] diff --git a/db/migrate/01_create_hierarchy.rb b/db/migrate/01_create_hierarchy.rb index 09708f12..c0fa102a 100644 --- a/db/migrate/01_create_hierarchy.rb +++ b/db/migrate/01_create_hierarchy.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Initial schema class CreateHierarchy < ActiveRecord::Migration[4.2] diff --git a/db/migrate/02_dmsf_normalization.rb b/db/migrate/02_dmsf_normalization.rb index d83673e7..2d9777bc 100644 --- a/db/migrate/02_dmsf_normalization.rb +++ b/db/migrate/02_dmsf_normalization.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Rename column class DmsfNormalization < ActiveRecord::Migration[4.2] diff --git a/db/migrate/03_dmsf_0_8_0.rb b/db/migrate/03_dmsf_0_8_0.rb index 8b5b01da..f3af3e19 100644 --- a/db/migrate/03_dmsf_0_8_0.rb +++ b/db/migrate/03_dmsf_0_8_0.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add column class Dmsf080 < ActiveRecord::Migration[4.2] diff --git a/db/migrate/04_dmsf_0_9_0.rb b/db/migrate/04_dmsf_0_9_0.rb index 4ded4a44..a49f9d7c 100644 --- a/db/migrate/04_dmsf_0_9_0.rb +++ b/db/migrate/04_dmsf_0_9_0.rb @@ -4,29 +4,24 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add column class Dmsf090 < ActiveRecord::Migration[4.2] def up - if defined?(EasyExtensions) - add_column :members, :dmsf_mail_notification, :boolean, default: false - else - add_column :members, :dmsf_mail_notification, :boolean, - null: false, default: false - end + add_column :members, :dmsf_mail_notification, :boolean, + null: false, default: false drop_table :dmsf_user_prefs end diff --git a/db/migrate/05_dmsf_0_9_0_1.rb b/db/migrate/05_dmsf_0_9_0_1.rb index 5f3bf094..adc1d47c 100644 --- a/db/migrate/05_dmsf_0_9_0_1.rb +++ b/db/migrate/05_dmsf_0_9_0_1.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Create table class Dmsf0901 < ActiveRecord::Migration[4.2] diff --git a/db/migrate/06_dmsf_1_2_0.rb b/db/migrate/06_dmsf_1_2_0.rb index 240f9432..6f27e43a 100644 --- a/db/migrate/06_dmsf_1_2_0.rb +++ b/db/migrate/06_dmsf_1_2_0.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add column class Dmsf120 < ActiveRecord::Migration[4.2] diff --git a/db/migrate/07_dmsf_1_4_4.rb b/db/migrate/07_dmsf_1_4_4.rb index 36c80a0c..b5ca5e26 100644 --- a/db/migrate/07_dmsf_1_4_4.rb +++ b/db/migrate/07_dmsf_1_4_4.rb @@ -4,19 +4,18 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require 'fileutils' require 'uuidtools' diff --git a/db/migrate/20120822100401_create_dmsf_workflows.rb b/db/migrate/20120822100401_create_dmsf_workflows.rb index 65087c4f..a9f70882 100644 --- a/db/migrate/20120822100401_create_dmsf_workflows.rb +++ b/db/migrate/20120822100401_create_dmsf_workflows.rb @@ -5,19 +5,18 @@ # Karel Pičman # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Create table class CreateDmsfWorkflows < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20120822100402_create_dmsf_workflow_steps.rb b/db/migrate/20120822100402_create_dmsf_workflow_steps.rb index a029ad65..1a94bc57 100644 --- a/db/migrate/20120822100402_create_dmsf_workflow_steps.rb +++ b/db/migrate/20120822100402_create_dmsf_workflow_steps.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Create table class CreateDmsfWorkflowSteps < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20120822100403_create_dmsf_workflow_step_assignments.rb b/db/migrate/20120822100403_create_dmsf_workflow_step_assignments.rb index 72c5d887..8f1b07d6 100644 --- a/db/migrate/20120822100403_create_dmsf_workflow_step_assignments.rb +++ b/db/migrate/20120822100403_create_dmsf_workflow_step_assignments.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Create table class CreateDmsfWorkflowStepAssignments < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20120822100404_create_dmsf_workflow_step_actions.rb b/db/migrate/20120822100404_create_dmsf_workflow_step_actions.rb index 9415b47d..cf2bdb01 100644 --- a/db/migrate/20120822100404_create_dmsf_workflow_step_actions.rb +++ b/db/migrate/20120822100404_create_dmsf_workflow_step_actions.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Create table class CreateDmsfWorkflowStepActions < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20130819013955_update_projects.rb b/db/migrate/20130819013955_update_projects.rb index 11270578..ddab838d 100644 --- a/db/migrate/20130819013955_update_projects.rb +++ b/db/migrate/20130819013955_update_projects.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add column class UpdateProjects < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20131108141401_add_index_to_dmsf_files.rb b/db/migrate/20131108141401_add_index_to_dmsf_files.rb index 244f7603..fb21f8bf 100644 --- a/db/migrate/20131108141401_add_index_to_dmsf_files.rb +++ b/db/migrate/20131108141401_add_index_to_dmsf_files.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add index class AddIndexToDmsfFiles < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20131108141402_add_index_to_dmsf_folders.rb b/db/migrate/20131108141402_add_index_to_dmsf_folders.rb index cfa015ac..b1b7c3bc 100644 --- a/db/migrate/20131108141402_add_index_to_dmsf_folders.rb +++ b/db/migrate/20131108141402_add_index_to_dmsf_folders.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add index class AddIndexToDmsfFolders < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20131113141401_add_index_to_dmsf_file_revision.rb b/db/migrate/20131113141401_add_index_to_dmsf_file_revision.rb index 3ac2e53c..96d0aca3 100644 --- a/db/migrate/20131113141401_add_index_to_dmsf_file_revision.rb +++ b/db/migrate/20131113141401_add_index_to_dmsf_file_revision.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add index class AddIndexToDmsfFileRevision < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20131113141402_add_index_to_dmsf_lock.rb b/db/migrate/20131113141402_add_index_to_dmsf_lock.rb index a68fc562..f5b9c8db 100644 --- a/db/migrate/20131113141402_add_index_to_dmsf_lock.rb +++ b/db/migrate/20131113141402_add_index_to_dmsf_lock.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add index class AddIndexToDmsfLock < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20131113141403_create_dmsf_links.rb b/db/migrate/20131113141403_create_dmsf_links.rb index 95a917ec..e648b698 100644 --- a/db/migrate/20131113141403_create_dmsf_links.rb +++ b/db/migrate/20131113141403_create_dmsf_links.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Create table class CreateDmsfLinks < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20140314132501_notifications_on.rb b/db/migrate/20140314132501_notifications_on.rb index f356753c..2a1e6186 100644 --- a/db/migrate/20140314132501_notifications_on.rb +++ b/db/migrate/20140314132501_notifications_on.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Modify columns class NotificationsOn < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20140519133201_trash_bin.rb b/db/migrate/20140519133201_trash_bin.rb index cd33d66b..c5708d36 100644 --- a/db/migrate/20140519133201_trash_bin.rb +++ b/db/migrate/20140519133201_trash_bin.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add columns class TrashBin < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20141013102501_remove_project_from_revision.rb b/db/migrate/20141013102501_remove_project_from_revision.rb index 6441256e..ce676c42 100644 --- a/db/migrate/20141013102501_remove_project_from_revision.rb +++ b/db/migrate/20141013102501_remove_project_from_revision.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # remove column class RemoveProjectFromRevision < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20141015132701_remove_folder_from_revision.rb b/db/migrate/20141015132701_remove_folder_from_revision.rb index fa0d3f32..6837a765 100644 --- a/db/migrate/20141015132701_remove_folder_from_revision.rb +++ b/db/migrate/20141015132701_remove_folder_from_revision.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Remove column class RemoveFolderFromRevision < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20141205143001_remove_uniqueness_from_wf.rb b/db/migrate/20141205143001_remove_uniqueness_from_wf.rb index b3819f14..2b37b45a 100644 --- a/db/migrate/20141205143001_remove_uniqueness_from_wf.rb +++ b/db/migrate/20141205143001_remove_uniqueness_from_wf.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Remove index class RemoveUniquenessFromWf < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20150120152101_notifications_nullable.rb b/db/migrate/20150120152101_notifications_nullable.rb index 4e18d384..9f65e2b8 100644 --- a/db/migrate/20150120152101_notifications_nullable.rb +++ b/db/migrate/20150120152101_notifications_nullable.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Modify columns class NotificationsNullable < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20150130052716_add_external.rb b/db/migrate/20150130052716_add_external.rb index ad234c22..9c3fa968 100644 --- a/db/migrate/20150130052716_add_external.rb +++ b/db/migrate/20150130052716_add_external.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add column class AddExternal < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20150202010301_add_user_to_links.rb b/db/migrate/20150202010301_add_user_to_links.rb index faa1d999..c13d3c21 100644 --- a/db/migrate/20150202010301_add_user_to_links.rb +++ b/db/migrate/20150202010301_add_user_to_links.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add column class AddUserToLinks < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20150910153701_title_not_null.rb b/db/migrate/20150910153701_title_not_null.rb index 0597b033..efbad5ee 100644 --- a/db/migrate/20150910153701_title_not_null.rb +++ b/db/migrate/20150910153701_title_not_null.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Modify column class TitleNotNull < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20151020141801_large_files.rb b/db/migrate/20151020141801_large_files.rb index 33a6a7eb..6d1cad2e 100644 --- a/db/migrate/20151020141801_large_files.rb +++ b/db/migrate/20151020141801_large_files.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Modify column class LargeFiles < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20151209100001_title_format.rb b/db/migrate/20151209100001_title_format.rb index 7b8fedfe..dd83446d 100644 --- a/db/migrate/20151209100001_title_format.rb +++ b/db/migrate/20151209100001_title_format.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add column class TitleFormat < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20160215125801_approval_workflow_status.rb b/db/migrate/20160215125801_approval_workflow_status.rb index 70f12a4b..a648224c 100644 --- a/db/migrate/20160215125801_approval_workflow_status.rb +++ b/db/migrate/20160215125801_approval_workflow_status.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add column class ApprovalWorkflowStatus < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20160217133001_status_deleted.rb b/db/migrate/20160217133001_status_deleted.rb index 976d331f..48a913ff 100644 --- a/db/migrate/20160217133001_status_deleted.rb +++ b/db/migrate/20160217133001_status_deleted.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Modisy columns class StatusDeleted < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20160222140401_approval_workflow_std_fields.rb b/db/migrate/20160222140401_approval_workflow_std_fields.rb index c0c67004..5de7ef82 100644 --- a/db/migrate/20160222140401_approval_workflow_std_fields.rb +++ b/db/migrate/20160222140401_approval_workflow_std_fields.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add columns class ApprovalWorkflowStdFields < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20160421150501_add_digest_to_revision.rb b/db/migrate/20160421150501_add_digest_to_revision.rb index 12d9d32c..e309720a 100644 --- a/db/migrate/20160421150501_add_digest_to_revision.rb +++ b/db/migrate/20160421150501_add_digest_to_revision.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add column class AddDigestToRevision < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20161223133200_create_dmsf_public_urls.rb b/db/migrate/20161223133200_create_dmsf_public_urls.rb index 504b836e..1027a551 100644 --- a/db/migrate/20161223133200_create_dmsf_public_urls.rb +++ b/db/migrate/20161223133200_create_dmsf_public_urls.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Create table class CreateDmsfPublicUrls < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20170103164701_add_name_to_appoval_workflow_step.rb b/db/migrate/20170103164701_add_name_to_appoval_workflow_step.rb index 954c452b..f408cc40 100644 --- a/db/migrate/20170103164701_add_name_to_appoval_workflow_step.rb +++ b/db/migrate/20170103164701_add_name_to_appoval_workflow_step.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add column class AddNameToAppovalWorkflowStep < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20170118142001_dmsf_file_container.rb b/db/migrate/20170118142001_dmsf_file_container.rb index 36c60ec5..e1a0f046 100644 --- a/db/migrate/20170118142001_dmsf_file_container.rb +++ b/db/migrate/20170118142001_dmsf_file_container.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add column class DmsfFileContainer < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20170204214753_add_revision_to_dmsf_lock.rb b/db/migrate/20170204214753_add_revision_to_dmsf_lock.rb index bd131686..bbcb17bc 100644 --- a/db/migrate/20170204214753_add_revision_to_dmsf_lock.rb +++ b/db/migrate/20170204214753_add_revision_to_dmsf_lock.rb @@ -4,19 +4,18 @@ # # Karel Pičman , carlolars # -# 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add column class AddRevisionToDmsfLock < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20170214153223_add_dmsf_file_last_revision_id_to_dmsf_lock.rb b/db/migrate/20170214153223_add_dmsf_file_last_revision_id_to_dmsf_lock.rb index ae871525..e8d5ffcd 100644 --- a/db/migrate/20170214153223_add_dmsf_file_last_revision_id_to_dmsf_lock.rb +++ b/db/migrate/20170214153223_add_dmsf_file_last_revision_id_to_dmsf_lock.rb @@ -4,19 +4,18 @@ # # Karel Pičman , carlolars # -# 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Rename column class AddDmsfFileLastRevisionIdToDmsfLock < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20170217141601_add_dmsf_not_inheritable_to_custom_fields.rb b/db/migrate/20170217141601_add_dmsf_not_inheritable_to_custom_fields.rb index 5a3ecf24..ab03fb89 100644 --- a/db/migrate/20170217141601_add_dmsf_not_inheritable_to_custom_fields.rb +++ b/db/migrate/20170217141601_add_dmsf_not_inheritable_to_custom_fields.rb @@ -4,28 +4,23 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add column class AddDmsfNotInheritableToCustomFields < ActiveRecord::Migration[4.2] def change - if defined?(EasyExtensions) - add_column :custom_fields, :dmsf_not_inheritable, :boolean, default: false - else - add_column :custom_fields, :dmsf_not_inheritable, :boolean, - null: false, default: false - end + add_column :custom_fields, :dmsf_not_inheritable, :boolean, + null: false, default: false end end diff --git a/db/migrate/20170323131231_dmsf_description_limit.rb b/db/migrate/20170323131231_dmsf_description_limit.rb index 3fb7b610..9da70eb9 100644 --- a/db/migrate/20170323131231_dmsf_description_limit.rb +++ b/db/migrate/20170323131231_dmsf_description_limit.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # modify column class DmsfDescriptionLimit < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20170330131901_create_dmsf_folder_permissions.rb b/db/migrate/20170330131901_create_dmsf_folder_permissions.rb index 017d306d..6c7dfc54 100644 --- a/db/migrate/20170330131901_create_dmsf_folder_permissions.rb +++ b/db/migrate/20170330131901_create_dmsf_folder_permissions.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Create table class CreateDmsfFolderPermissions < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20170421101901_dmsf_file_container_rollback.rb b/db/migrate/20170421101901_dmsf_file_container_rollback.rb index c27e9776..617710a3 100644 --- a/db/migrate/20170421101901_dmsf_file_container_rollback.rb +++ b/db/migrate/20170421101901_dmsf_file_container_rollback.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Rollback container class DmsfFileContainerRollback < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20170422104901_migrate_documents.rb b/db/migrate/20170422104901_migrate_documents.rb index 323cf486..9d5d4d3c 100644 --- a/db/migrate/20170422104901_migrate_documents.rb +++ b/db/migrate/20170422104901_migrate_documents.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Migrate documents in the file system class MigrateDocuments < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20170526144701_dmsf_attachable.rb b/db/migrate/20170526144701_dmsf_attachable.rb index 4cd09542..ed721f79 100644 --- a/db/migrate/20170526144701_dmsf_attachable.rb +++ b/db/migrate/20170526144701_dmsf_attachable.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add column class DmsfAttachable < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20171027124101_change_revision_digest_limit_to_64.rb b/db/migrate/20171027124101_change_revision_digest_limit_to_64.rb index c6fb4f51..4e4104c0 100644 --- a/db/migrate/20171027124101_change_revision_digest_limit_to_64.rb +++ b/db/migrate/20171027124101_change_revision_digest_limit_to_64.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Modify column class ChangeRevisionDigestLimitTo64 < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20171110155901_add_index_to_dmsf_folder.rb b/db/migrate/20171110155901_add_index_to_dmsf_folder.rb index 90ef3d37..aa69b39e 100644 --- a/db/migrate/20171110155901_add_index_to_dmsf_folder.rb +++ b/db/migrate/20171110155901_add_index_to_dmsf_folder.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add index class AddIndexToDmsfFolder < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20180216152501_rename_title_format.rb b/db/migrate/20180216152501_rename_title_format.rb index f73c5a47..db949379 100644 --- a/db/migrate/20180216152501_rename_title_format.rb +++ b/db/migrate/20180216152501_rename_title_format.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Modify column class RenameTitleFormat < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20180903132101_fast_links.rb b/db/migrate/20180903132101_fast_links.rb index d28f1871..f488b179 100644 --- a/db/migrate/20180903132101_fast_links.rb +++ b/db/migrate/20180903132101_fast_links.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add column class FastLinks < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20192703123101_workflow_started_by.rb b/db/migrate/20192703123101_workflow_started_by.rb index fdd5ed55..22309adb 100644 --- a/db/migrate/20192703123101_workflow_started_by.rb +++ b/db/migrate/20192703123101_workflow_started_by.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Modify columns class WorkflowStartedBy < ActiveRecord::Migration[5.2] diff --git a/db/migrate/20200218142414_add_index_on_dmsf_file_revision_id_to_access.rb b/db/migrate/20200218142414_add_index_on_dmsf_file_revision_id_to_access.rb index 57b225fd..51132bd5 100644 --- a/db/migrate/20200218142414_add_index_on_dmsf_file_revision_id_to_access.rb +++ b/db/migrate/20200218142414_add_index_on_dmsf_file_revision_id_to_access.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add index class AddIndexOnDmsfFileRevisionIdToAccess < ActiveRecord::Migration[5.2] diff --git a/db/migrate/20200423071301_add_indexes_on_dmsf_folder_id.rb b/db/migrate/20200423071301_add_indexes_on_dmsf_folder_id.rb index ccebfac4..93f46851 100644 --- a/db/migrate/20200423071301_add_indexes_on_dmsf_folder_id.rb +++ b/db/migrate/20200423071301_add_indexes_on_dmsf_folder_id.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add indexes class AddIndexesOnDmsfFolderId < ActiveRecord::Migration[5.2] diff --git a/db/migrate/20200813075501_change_index_in_dmsf_locks.rb b/db/migrate/20200813075501_change_index_in_dmsf_locks.rb index a37e22fe..5a3d4db6 100644 --- a/db/migrate/20200813075501_change_index_in_dmsf_locks.rb +++ b/db/migrate/20200813075501_change_index_in_dmsf_locks.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Modify index class ChangeIndexInDmsfLocks < ActiveRecord::Migration[5.2] diff --git a/db/migrate/20210115120901_add_owner_to_dmsf_lock.rb b/db/migrate/20210115120901_add_owner_to_dmsf_lock.rb index 7596c58e..a6817f19 100644 --- a/db/migrate/20210115120901_add_owner_to_dmsf_lock.rb +++ b/db/migrate/20210115120901_add_owner_to_dmsf_lock.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add column class AddOwnerToDmsfLock < ActiveRecord::Migration[5.2] diff --git a/db/migrate/20220317100901_add_patch_version.rb b/db/migrate/20220317100901_add_patch_version.rb index 1224d544..ec233f0f 100644 --- a/db/migrate/20220317100901_add_patch_version.rb +++ b/db/migrate/20220317100901_add_patch_version.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add column class AddPatchVersion < ActiveRecord::Migration[5.2] diff --git a/db/migrate/20220906151100_add_projects_default_dmsf_query_id.rb b/db/migrate/20220906151100_add_projects_default_dmsf_query_id.rb index 576379d8..df59e71a 100644 --- a/db/migrate/20220906151100_add_projects_default_dmsf_query_id.rb +++ b/db/migrate/20220906151100_add_projects_default_dmsf_query_id.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add column class AddProjectsDefaultDmsfQueryId < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20230105082201_null_minor_version.rb b/db/migrate/20230105082201_null_minor_version.rb index 36bef72f..5f69757b 100644 --- a/db/migrate/20230105082201_null_minor_version.rb +++ b/db/migrate/20230105082201_null_minor_version.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Modify column class NullMinorVersion < ActiveRecord::Migration[4.2] diff --git a/db/migrate/20230426130301_add_uniqness_to_step_assignments.rb b/db/migrate/20230426130301_add_uniqness_to_step_assignments.rb index 9de6e99b..b2e6ac97 100644 --- a/db/migrate/20230426130301_add_uniqness_to_step_assignments.rb +++ b/db/migrate/20230426130301_add_uniqness_to_step_assignments.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Add indexes class AddUniqnessToStepAssignments < ActiveRecord::Migration[5.2] diff --git a/db/migrate/20240829093801_rename_dmsf_digest_token.rb b/db/migrate/20240829093801_rename_dmsf_digest_token.rb index b5545d35..7a11844b 100644 --- a/db/migrate/20240829093801_rename_dmsf_digest_token.rb +++ b/db/migrate/20240829093801_rename_dmsf_digest_token.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Rename DMSF digest token class RenameDmsfDigestToken < ActiveRecord::Migration[6.1] diff --git a/extra/api/api_client.rb b/extra/api/api_client.rb index ce80b8b9..d5404cce 100644 --- a/extra/api/api_client.rb +++ b/extra/api/api_client.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require 'rubygems' require 'active_resource' diff --git a/extra/api/api_client.sh b/extra/api/api_client.sh index fa82a4f3..2794adc0 100644 --- a/extra/api/api_client.sh +++ b/extra/api/api_client.sh @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Authentication as input parameters either as login + password or the API key #USER_LOGIN="${1}" diff --git a/extra/xapian_indexer.rb b/extra/xapian_indexer.rb index 901a3bc5..160c9b65 100644 --- a/extra/xapian_indexer.rb +++ b/extra/xapian_indexer.rb @@ -6,19 +6,18 @@ # # Xabier Elkano, 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require 'optparse' diff --git a/init.rb b/init.rb index a9e04505..b167de33 100644 --- a/init.rb +++ b/init.rb @@ -2,21 +2,24 @@ # Redmine plugin for Document Management System "Features" # -# Vít Jonáš , Daniel Munn , Karel Pičman +# Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . + +require 'redmine' +require 'zip' +require "#{File.dirname(__FILE__)}/lib/redmine_dmsf" Redmine::Plugin.register :redmine_dmsf do name 'DMSF' @@ -24,17 +27,10 @@ Redmine::Plugin.register :redmine_dmsf do author_url 'https://github.com/picman/redmine_dmsf/graphs/contributors' author 'Vít Jonáš / Daniel Munn / Karel Pičman' description 'Document Management System Features' - version '4.1.3' + version '4.2.0' requires_redmine version_or_higher: '6.0.0' - webdav = if Redmine::Plugin.installed?('easy_hosting_services') && EasyHostingServices::EasyMultiTenancy.activated? - '1' - else - '0' - end - use_project_names = defined?(EasyExtensions) ? '1' : '0' - settings partial: 'settings/dmsf_settings', default: { 'dmsf_max_file_download' => 0, @@ -43,7 +39,7 @@ Redmine::Plugin.register :redmine_dmsf do 'dmsf_index_database' => File.expand_path('dmsf_index', Rails.root), 'dmsf_stemming_lang' => 'english', 'dmsf_stemming_strategy' => 'STEM_NONE', - 'dmsf_webdav' => webdav, + 'dmsf_webdav' => '0', 'dmsf_display_notified_recipients' => '0', 'dmsf_global_title_format' => '', 'dmsf_columns' => %w[title size modified version workflow author], @@ -55,7 +51,7 @@ Redmine::Plugin.register :redmine_dmsf do 'dmsf_documents_email_reply_to' => '', 'dmsf_documents_email_links_only' => '0', 'dmsf_enable_cjk_ngrams' => '0', - 'dmsf_webdav_use_project_names' => use_project_names, + 'dmsf_webdav_use_project_names' => '0', 'dmsf_webdav_ignore_1b_file_for_authentication' => '1', 'dmsf_projects_as_subfolders' => '0', 'only_approval_zero_minor_version' => '0', @@ -70,4 +66,118 @@ Redmine::Plugin.register :redmine_dmsf do } end -require_relative 'after_init' unless defined?(EasyExtensions) +# Administration menu extension +Redmine::MenuManager.map :admin_menu do |menu| + menu.push :dmsf_approvalworkflows, :dmsf_workflows_path, + caption: :label_dmsf_workflow_plural, + icon: 'workflows', + html: { class: 'icon icon-workflows' }, + if: proc { |_| User.current.admin? } +end +# Project menu extension +Redmine::MenuManager.map :project_menu do |menu| + menu.push :dmsf, { controller: 'dmsf', action: 'show' }, + caption: :menu_dmsf, + before: :documents, + param: :id, + html: { class: 'icon icon-dmsf' } + # New menu extension + menu.push :dmsf_file, { controller: 'dmsf_upload', action: 'multi_upload' }, + caption: :label_dmsf_new_top_level_document, parent: :new_object + menu.push :dmsf_folder, { controller: 'dmsf', action: 'new' }, + caption: :label_dmsf_new_top_level_folder, + parent: :new_object +end +# Main menu extension +Redmine::MenuManager.map :top_menu do |menu| + menu.push :dmsf, { controller: 'dmsf', action: 'index' }, + caption: :menu_dmsf, + html: { class: 'icon-dmsf', category: :rest_extension_modules }, + if: proc { + User.current.allowed_to?(:view_dmsf_folders, nil, global: true) && + ActiveRecord::Base.connection.data_source_exists?('settings') && + !RedmineDmsf.dmsf_global_menu_disabled? + } +end + +Redmine::AccessControl.map do |map| + map.project_module :dmsf do |pmap| + pmap.permission :view_dmsf_file_revision_accesses, {}, read: true + pmap.permission :view_dmsf_file_revisions, {}, read: true + pmap.permission :view_dmsf_folders, { dmsf: %i[show index] }, read: true + pmap.permission :user_preferences, { dmsf_state: [:user_pref_save] }, require: :member + pmap.permission(:view_dmsf_files, + { + dmsf: %i[entries_operation entries_email download_email_entries add_email append_email + autocomplete_for_user], + dmsf_files: %i[show view thumbnail], + dmsf_workflows: [:log] + }, + read: true) + pmap.permission :email_documents, + { dmsf_public_urls: [:create] } + pmap.permission :folder_manipulation, + { + dmsf: %i[new create delete edit save edit_root save_root lock unlock notify_activate + notify_deactivate restore drop copymove], + dmsf_folder_permissions: %i[new append autocomplete_for_user], + dmsf_context_menus: [:dmsf] + } + pmap.permission :file_manipulation, + { + dmsf_files: %i[create_revision lock unlock delete_revision obsolete_revision notify_activate + notify_deactivate restore], + dmsf_upload: %i[upload_files upload commit_files commit delete_dmsf_attachment + delete_dmsf_link_attachment multi_upload], + dmsf_links: %i[new create destroy restore autocomplete_for_project autocomplete_for_folder], + dmsf_context_menus: [:dmsf] + } + pmap.permission :file_delete, + { + dmsf: %i[trash delete_entries empty_trash], + dmsf_files: [:delete], + dmsf_trash_context_menus: [:trash] + } + pmap.permission :force_file_unlock, {} + pmap.permission :file_approval, + { dmsf_workflows: %i[action new_action autocomplete_for_user start assign assignment] } + pmap.permission :manage_workflows, + { + dmsf_workflows: %i[index new create destroy show new_step add_step remove_step reorder_steps + update update_step delete_step edit] + } + pmap.permission :display_system_folders, {}, read: true + # Watchers + pmap.permission :view_dmsf_file_watchers, {}, read: true + pmap.permission :add_dmsf_file_watchers, { watchers: %i[new create append autocomplete_for_user] } + pmap.permission :delete_dmsf_file_watchers, { watchers: :destroy } + pmap.permission :view_dmsf_folder_watchers, {}, read: true + pmap.permission :add_dmsf_folder_watchers, { watchers: %i[new create append autocomplete_for_user] } + pmap.permission :delete_dmsf_folder_watchers, { watchers: :destroy } + pmap.permission :view_project_watchers, {}, read: true + pmap.permission :add_project_watchers, { watchers: %i[new create append autocomplete_for_user] } + pmap.permission :delete_project_watchers, { watchers: :destroy } + end +end + +# DMSF WebDAV digest token +Token.add_action :dmsf_webdav_digest, max_instances: 1, validity_time: nil + +Rails.application.configure do + # Rubyzip configuration + Zip.unicode_names = true + + # DMS custom fields + CustomFieldsHelper::CUSTOM_FIELDS_TABS << { name: 'DmsfFileRevisionCustomField', partial: 'custom_fields/index', + label: :dmsf } + + # Searchable modules + Redmine::Search.map do |search| + search.register :dmsf_files + search.register :dmsf_folders + end + + # Activities + Redmine::Activity.register :dmsf_file_revision_accesses, default: false + Redmine::Activity.register :dmsf_file_revisions +end diff --git a/lib/dav4rack.rb b/lib/dav4rack.rb index 72bf193a..953a5b17 100644 --- a/lib/dav4rack.rb +++ b/lib/dav4rack.rb @@ -2,21 +2,20 @@ # Redmine plugin for Document Management System "Features" # -# Vít Jonáš , Daniel Munn , Karel Pičman +# Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require 'time' require 'uri' diff --git a/lib/dav4rack/controller.rb b/lib/dav4rack/controller.rb index 38d5a4d6..d85ab441 100644 --- a/lib/dav4rack/controller.rb +++ b/lib/dav4rack/controller.rb @@ -33,7 +33,7 @@ module Dav4rack # main entry point, called by the Handler def process - status = skip_authorization? || authenticate ? process_action || OK : HttpStatus::Unauthorized + status = skip_authorization? || authenticate? ? process_action || OK : HttpStatus::Unauthorized rescue HttpStatus::Status => e status = e ensure @@ -335,7 +335,7 @@ module Dav4rack # Perform authentication # # implement your authentication by overriding Resource#authenticate - def authenticate + def authenticate? uname = nil password = nil if request.authorization? @@ -345,7 +345,7 @@ module Dav4rack password = auth.credentials[1] end end - resource.authenticate uname, password + resource.authenticate? uname, password end def authentication_error_message diff --git a/lib/dav4rack/http_status.rb b/lib/dav4rack/http_status.rb index 5dfcf19f..1572fe08 100644 --- a/lib/dav4rack/http_status.rb +++ b/lib/dav4rack/http_status.rb @@ -5,6 +5,11 @@ module Dav4rack module HttpStatus # Status class Status < StandardError + delegate :code, to: :class + delegate :reason_phrase, to: :class + delegate :status_line, to: :class + delegate :to_i, to: :class + class << self attr_accessor :code, :reason_phrase alias to_i code @@ -13,22 +18,6 @@ module Dav4rack "#{code} #{reason_phrase}" end end - - def code - self.class.code - end - - def reason_phrase - self.class.reason_phrase - end - - def status_line - self.class.status_line - end - - def to_i - self.class.to_i - end end STATUS_MESSAGES = { diff --git a/lib/dav4rack/resource.rb b/lib/dav4rack/resource.rb index cfa4f958..eca3a2e1 100644 --- a/lib/dav4rack/resource.rb +++ b/lib/dav4rack/resource.rb @@ -102,7 +102,7 @@ module Dav4rack # override to implement custom authentication # should return true for successful authentication, false otherwise - def authenticate(_username, _password) + def authenticate?(_username, _password) true end diff --git a/lib/easy_page_module.rb b/lib/easy_page_module.rb deleted file mode 100644 index 0dad1c3a..00000000 --- a/lib/easy_page_module.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Redmine plugin for Document Management System "Features" -# -# 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. - -unless defined?(EasyExtensions) - # Foo class - class EasyPageModule - def foo; end - end -end diff --git a/lib/redmine_dmsf.rb b/lib/redmine_dmsf.rb index 3e4d49b5..07e91390 100644 --- a/lib/redmine_dmsf.rb +++ b/lib/redmine_dmsf.rb @@ -2,21 +2,20 @@ # Redmine plugin for Document Management System "Features" # -# Vít Jonáš , Daniel Munn , Karel Pičman +# Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Main module module RedmineDmsf @@ -72,12 +71,7 @@ module RedmineDmsf def dmsf_webdav? value = Setting.plugin_redmine_dmsf['dmsf_webdav'] - webdav = value.to_i.positive? || value == 'true' - if webdav && defined?(EasyExtensions) - webdav = Redmine::Plugin.installed?('easy_hosting_services') && - EasyHostingServices::EasyMultiTenancy.activated? - end - webdav + value.to_i.positive? || value == 'true' end def dmsf_display_notified_recipients? @@ -222,91 +216,59 @@ end # DMSF libraries -def after_easy_init(&block) - if defined?(EasyExtensions) - Rails.application.config.after_initialize(&block) - else - yield - end -end - # Validators -after_easy_init do - require "#{File.dirname(__FILE__)}/../app/validators/dmsf_file_name_validator" - require "#{File.dirname(__FILE__)}/../app/validators/dmsf_max_file_size_validator" - require "#{File.dirname(__FILE__)}/../app/validators/dmsf_workflow_name_validator" - require "#{File.dirname(__FILE__)}/../app/validators/dmsf_url_validator" - require "#{File.dirname(__FILE__)}/../app/validators/dmsf_folder_parent_validator" -end +require "#{File.dirname(__FILE__)}/../app/validators/dmsf_file_name_validator" +require "#{File.dirname(__FILE__)}/../app/validators/dmsf_max_file_size_validator" +require "#{File.dirname(__FILE__)}/../app/validators/dmsf_workflow_name_validator" +require "#{File.dirname(__FILE__)}/../app/validators/dmsf_url_validator" +require "#{File.dirname(__FILE__)}/../app/validators/dmsf_folder_parent_validator" # Patches -unless defined?(EasyPatchManager) - require "#{File.dirname(__FILE__)}/../patches/formatting_helper_patch" - require "#{File.dirname(__FILE__)}/../patches/projects_helper_patch" - require "#{File.dirname(__FILE__)}/../patches/project_patch" - require "#{File.dirname(__FILE__)}/../patches/user_preference_patch" - require "#{File.dirname(__FILE__)}/../patches/user_patch" - require "#{File.dirname(__FILE__)}/../patches/issue_patch" - require "#{File.dirname(__FILE__)}/../patches/role_patch" - require "#{File.dirname(__FILE__)}/../patches/queries_controller_patch" - require "#{File.dirname(__FILE__)}/../patches/pdf_patch" - require "#{File.dirname(__FILE__)}/../patches/access_control_patch" - require "#{File.dirname(__FILE__)}/../patches/search_patch" - require "#{File.dirname(__FILE__)}/../patches/custom_field_patch" - require "#{File.dirname(__FILE__)}/../patches/puma_patch" - # A workaround for obsolete 'alias_method' usage in RedmineUp's plugins - if RedmineDmsf::Plugin.an_obsolete_plugin_present? - require "#{File.dirname(__FILE__)}/../patches/notifiable_ru_patch" - else - require "#{File.dirname(__FILE__)}/../patches/notifiable_patch" - end -end - +require "#{File.dirname(__FILE__)}/redmine_dmsf/patches/formatting_helper_patch" +require "#{File.dirname(__FILE__)}/redmine_dmsf/patches/projects_helper_patch" +require "#{File.dirname(__FILE__)}/redmine_dmsf/patches/project_patch" +require "#{File.dirname(__FILE__)}/redmine_dmsf/patches/user_preference_patch" +require "#{File.dirname(__FILE__)}/redmine_dmsf/patches/user_patch" +require "#{File.dirname(__FILE__)}/redmine_dmsf/patches/issue_patch" +require "#{File.dirname(__FILE__)}/redmine_dmsf/patches/role_patch" +require "#{File.dirname(__FILE__)}/redmine_dmsf/patches/queries_controller_patch" +require "#{File.dirname(__FILE__)}/redmine_dmsf/patches/pdf_patch" +require "#{File.dirname(__FILE__)}/redmine_dmsf/patches/access_control_patch" +require "#{File.dirname(__FILE__)}/redmine_dmsf/patches/search_patch" +require "#{File.dirname(__FILE__)}/redmine_dmsf/patches/custom_field_patch" +require "#{File.dirname(__FILE__)}/redmine_dmsf/patches/puma_patch" # A workaround for obsolete 'alias_method' usage in RedmineUp's plugins -after_easy_init do - require "#{File.dirname(__FILE__)}/redmine_dmsf/plugin" +if RedmineDmsf::Plugin.an_obsolete_plugin_present? + require "#{File.dirname(__FILE__)}/redmine_dmsf/patches/notifiable_ru_patch" +else + require "#{File.dirname(__FILE__)}/redmine_dmsf/patches/notifiable_patch" end # Load up classes that make up our WebDAV solution ontop of Dav4rack -after_easy_init do - require "#{File.dirname(__FILE__)}/dav4rack" - require "#{File.dirname(__FILE__)}/redmine_dmsf/webdav/custom_middleware" - require "#{File.dirname(__FILE__)}/redmine_dmsf/webdav/base_resource" - require "#{File.dirname(__FILE__)}/redmine_dmsf/webdav/dmsf_resource" - require "#{File.dirname(__FILE__)}/redmine_dmsf/webdav/index_resource" - require "#{File.dirname(__FILE__)}/redmine_dmsf/webdav/project_resource" - require "#{File.dirname(__FILE__)}/redmine_dmsf/webdav/resource_proxy" -end +require "#{File.dirname(__FILE__)}/dav4rack" +require "#{File.dirname(__FILE__)}/redmine_dmsf/webdav/custom_middleware" +require "#{File.dirname(__FILE__)}/redmine_dmsf/webdav/base_resource" +require "#{File.dirname(__FILE__)}/redmine_dmsf/webdav/dmsf_resource" +require "#{File.dirname(__FILE__)}/redmine_dmsf/webdav/index_resource" +require "#{File.dirname(__FILE__)}/redmine_dmsf/webdav/project_resource" +require "#{File.dirname(__FILE__)}/redmine_dmsf/webdav/resource_proxy" # Hooks -def require_hooks - require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/controllers/account_controller_hooks" - require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/controllers/issues_controller_hooks" - require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/controllers/search_controller_hooks" - require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/views/view_projects_form_hook" - require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/views/base_view_hooks" - require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/views/custom_field_view_hooks" - require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/views/issue_view_hooks" - require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/views/mailer_view_hooks" - require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/views/my_account_view_hooks" - require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/views/search_view_hooks" - require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/helpers/issues_helper_hooks" - require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/helpers/search_helper_hooks" - require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/helpers/project_helper_hooks" -end - -after_easy_init do - require_hooks -end +require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/controllers/account_controller_hooks" +require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/controllers/issues_controller_hooks" +require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/controllers/search_controller_hooks" +require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/views/view_projects_form_hook" +require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/views/base_view_hooks" +require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/views/custom_field_view_hooks" +require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/views/issue_view_hooks" +require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/views/mailer_view_hooks" +require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/views/my_account_view_hooks" +require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/views/search_view_hooks" +require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/helpers/issues_helper_hooks" +require "#{File.dirname(__FILE__)}/redmine_dmsf/hooks/helpers/project_helper_hooks" # Macros -after_easy_init do - require "#{File.dirname(__FILE__)}/redmine_dmsf/macros" -end +require "#{File.dirname(__FILE__)}/redmine_dmsf/macros" # Field formats -after_easy_init do - require "#{File.dirname(__FILE__)}/redmine_dmsf/field_formats/dmsf_file_revision_format" -end - -require "#{File.dirname(__FILE__)}/easy_page_module" unless defined?(EasyExtensions) +require "#{File.dirname(__FILE__)}/redmine_dmsf/field_formats/dmsf_file_revision_format" diff --git a/lib/redmine_dmsf/dmsf_zip.rb b/lib/redmine_dmsf/dmsf_zip.rb index d122dc11..5083f5be 100644 --- a/lib/redmine_dmsf/dmsf_zip.rb +++ b/lib/redmine_dmsf/dmsf_zip.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require 'zip' @@ -28,6 +27,8 @@ module RedmineDmsf class Zip attr_reader :dmsf_files + delegate :close, to: :@zip_file + def initialize @temp_file = Tempfile.new([FILE_PREFIX, '.zip'], Rails.root.join('tmp')) @zip_file = ::Zip::OutputStream.open(@temp_file) @@ -45,10 +46,6 @@ module RedmineDmsf @temp_file.path end - def close - @zip_file.close - end - def add_dmsf_file(dmsf_file, member = nil, root_path = nil, path = nil) raise DmsfFileNotFoundError unless dmsf_file&.last_revision && File.exist?(dmsf_file.last_revision.disk_file) diff --git a/lib/redmine_dmsf/field_formats/dmsf_file_revision_format.rb b/lib/redmine_dmsf/field_formats/dmsf_file_revision_format.rb index 2682c79e..8048b024 100644 --- a/lib/redmine_dmsf/field_formats/dmsf_file_revision_format.rb +++ b/lib/redmine_dmsf/field_formats/dmsf_file_revision_format.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module FieldFormats diff --git a/lib/redmine_dmsf/hooks/controllers/account_controller_hooks.rb b/lib/redmine_dmsf/hooks/controllers/account_controller_hooks.rb index a4c12a02..05bb219f 100644 --- a/lib/redmine_dmsf/hooks/controllers/account_controller_hooks.rb +++ b/lib/redmine_dmsf/hooks/controllers/account_controller_hooks.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Hooks diff --git a/lib/redmine_dmsf/hooks/controllers/issues_controller_hooks.rb b/lib/redmine_dmsf/hooks/controllers/issues_controller_hooks.rb index 3cb49cec..c7da282c 100644 --- a/lib/redmine_dmsf/hooks/controllers/issues_controller_hooks.rb +++ b/lib/redmine_dmsf/hooks/controllers/issues_controller_hooks.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Hooks @@ -54,12 +53,7 @@ module RedmineDmsf def controller_issues_bulk_edit_before_save(context = {}) controller_issues_before_save context # Call also the after safe hook, 'cause it's missing in Redmine - controller_issues_after_save(context, edit: true) unless defined?(EasyExtensions) - end - - # Unfortunately this hook is missing in Redmine. It's called in Easy Redmine only. - def controller_issues_bulk_edit_after_save(context = {}) - controller_issues_after_save context, edit: true + controller_issues_after_save(context, edit: true) end private @@ -158,7 +152,7 @@ module RedmineDmsf # Attach DMS documents uploaded_files = params[:dmsf_attachments] details = params[:committed_files] - if uploaded_files && details + if uploaded_files system_folder = issue.system_folder(create: true) uploaded_files.each do |key, uploaded_file| upload = DmsfUpload.create_from_uploaded_attachment(issue.project, system_folder, uploaded_file) @@ -167,11 +161,16 @@ module RedmineDmsf uploaded_file[:disk_filename] = upload.disk_filename uploaded_file[:name] = upload.name uploaded_file[:title] = upload.title - uploaded_file[:description] = details[key][:description] - uploaded_file[:comment] = details[key][:comment] - uploaded_file[:version_major] = details[key][:version_major] - uploaded_file[:version_minor] = details[key][:version_minor] - uploaded_file[:version_patch] = details[key][:version_patch] + if details + uploaded_file[:description] = details[key][:description] + uploaded_file[:comment] = details[key][:comment] + uploaded_file[:version_major] = details[key][:version_major] + uploaded_file[:version_minor] = details[key][:version_minor] + uploaded_file[:version_patch] = details[key][:version_patch] + else + uploaded_file[:version_major] = 0 + uploaded_file[:version_minor] = 1 + end uploaded_file[:size] = upload.size uploaded_file[:mime_type] = upload.mime_type uploaded_file[:tempfile_path] = upload.tempfile_path @@ -179,7 +178,7 @@ module RedmineDmsf if params[:dmsf_attachments_wfs].present? && params[:dmsf_attachments_wfs][key].present? uploaded_file[:workflow_id] = params[:dmsf_attachments_wfs][key].to_i end - uploaded_file[:custom_field_values] = details[key][:custom_field_values] + uploaded_file[:custom_field_values] = details[key][:custom_field_values] if details end DmsfUploadHelper.commit_files_internal uploaded_files, issue.project, system_folder, context[:controller], issue, new_object: @new_object diff --git a/lib/redmine_dmsf/hooks/controllers/search_controller_hooks.rb b/lib/redmine_dmsf/hooks/controllers/search_controller_hooks.rb index cee64dfb..6ca5e758 100644 --- a/lib/redmine_dmsf/hooks/controllers/search_controller_hooks.rb +++ b/lib/redmine_dmsf/hooks/controllers/search_controller_hooks.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Hooks diff --git a/lib/redmine_dmsf/hooks/helpers/issues_helper_hooks.rb b/lib/redmine_dmsf/hooks/helpers/issues_helper_hooks.rb index 5deb7e15..0db35c6f 100644 --- a/lib/redmine_dmsf/hooks/helpers/issues_helper_hooks.rb +++ b/lib/redmine_dmsf/hooks/helpers/issues_helper_hooks.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Hooks diff --git a/lib/redmine_dmsf/hooks/helpers/project_helper_hooks.rb b/lib/redmine_dmsf/hooks/helpers/project_helper_hooks.rb index 63a1a778..6cfd54b8 100644 --- a/lib/redmine_dmsf/hooks/helpers/project_helper_hooks.rb +++ b/lib/redmine_dmsf/hooks/helpers/project_helper_hooks.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Hooks diff --git a/lib/redmine_dmsf/hooks/helpers/search_helper_hooks.rb b/lib/redmine_dmsf/hooks/helpers/search_helper_hooks.rb deleted file mode 100644 index 8d9221b7..00000000 --- a/lib/redmine_dmsf/hooks/helpers/search_helper_hooks.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Redmine plugin for Document Management System "Features" -# -# 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. - -module RedmineDmsf - module Hooks - module Helpers - # Search helper hooks - class SearchHelperHooks < Redmine::Hook::Listener - def helper_easy_extensions_search_helper_patch(context = {}) - case context[:entity].event_type - when 'dmsf-file', 'dmsf-folder' - str = context[:controller].send(:render_to_string, - partial: 'search/container', - locals: { object: context[:entity] }) - if str - html = +'

    ' - html << if context[:entity].dmsf_folder_id - context[:entity].class.human_attribute_name(:folder) - else - context[:entity].class.human_attribute_name(:project) - end - html << ':' - html << str - html << '

    ' - context[:additional_result] << html - end - end - end - end - end - end -end diff --git a/lib/redmine_dmsf/hooks/views/base_view_hooks.rb b/lib/redmine_dmsf/hooks/views/base_view_hooks.rb index 3cfd4d88..b442f561 100644 --- a/lib/redmine_dmsf/hooks/views/base_view_hooks.rb +++ b/lib/redmine_dmsf/hooks/views/base_view_hooks.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Hooks @@ -24,17 +23,13 @@ module RedmineDmsf # Base view hooks class BaseViewHooks < Redmine::Hook::ViewListener def view_layouts_base_html_head(context = {}) - unless /^(Dmsf|Projects|Issues|Queries|EasyCrmCases|MyController|SettingsController|WikiController)/.match?( + unless /^(Dmsf|Projects|Issues|Queries|MyController|SettingsController|WikiController)/.match?( context[:controller].class.name ) return end - "\n".html_safe + stylesheet_link_tag('redmine_dmsf', plugin: :redmine_dmsf) + - "\n".html_safe + stylesheet_link_tag('select2.min', plugin: :redmine_dmsf) + - "\n".html_safe + javascript_include_tag('select2.min', plugin: :redmine_dmsf, defer: true) + - "\n".html_safe + javascript_include_tag('redmine_dmsf', plugin: :redmine_dmsf, defer: true) + - "\n".html_safe + javascript_include_tag('attachments_dmsf', plugin: :redmine_dmsf, defer: true) + context[:controller].send :render_to_string, { partial: 'hooks/redmine_dmsf/view_layouts_base_html_head' } end end end diff --git a/lib/redmine_dmsf/hooks/views/custom_field_view_hooks.rb b/lib/redmine_dmsf/hooks/views/custom_field_view_hooks.rb index d5153ac4..23fb19cd 100644 --- a/lib/redmine_dmsf/hooks/views/custom_field_view_hooks.rb +++ b/lib/redmine_dmsf/hooks/views/custom_field_view_hooks.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Hooks diff --git a/lib/redmine_dmsf/hooks/views/issue_view_hooks.rb b/lib/redmine_dmsf/hooks/views/issue_view_hooks.rb index 3bbdd6fb..159c1ec7 100644 --- a/lib/redmine_dmsf/hooks/views/issue_view_hooks.rb +++ b/lib/redmine_dmsf/hooks/views/issue_view_hooks.rb @@ -4,28 +4,28 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Hooks module Views # Issue view hooks class IssueViewHooks < Redmine::Hook::ViewListener - def view_issues_form_details_bottom(context = {}) - return if defined?(EasyExtensions) + include DmsfQueriesHelper + include DmsfFilesHelper + def view_issues_form_details_bottom(context = {}) context[:container] = context[:issue] attach_documents_form(context) end @@ -33,10 +33,9 @@ module RedmineDmsf def view_attachments_form_top(context = {}) html = +'' container = context[:container] - description = defined?(EasyExtensions) && EasySetting.value('attachment_description') # Radio buttons - if allowed_to_attach_documents(container) && allowed_to_attach_attachments(container) - html << (description ? '

    ' : '

    ') + if allowed_to_attach_documents(container) + html << '

    ' classes = +'inline' html << "' - html << (description ? '

    ' : '
    ') + html << '

    ' if User.current.pref.dmsf_attachments_upload_choice == 'DMSF' - html << context[:hook_caller].late_javascript_tag( + html << context[:hook_caller].javascript_tag( "$('.attachments-container:not(.dmsf-uploader)').hide();" ) end end # Upload form - if allowed_to_attach_documents(container) - html << attach_documents_form(context, label: false, description: description) - end - unless allowed_to_attach_attachments(container) - html << context[:hook_caller].late_javascript_tag("$('.attachments-container:not(.dmsf-uploader)').hide();") - end + html << attach_documents_form(context, label: false) if allowed_to_attach_documents(container) html end def view_issues_show_description_bottom(context = {}) - return if defined?(EasyExtensions) - show_attached_documents context[:issue], context[:controller] end @@ -101,8 +93,8 @@ module RedmineDmsf end def view_issues_edit_notes_bottom_style(context = {}) - if ((User.current.pref.dmsf_attachments_upload_choice == 'Attachments') || - !allowed_to_attach_documents(context[:container])) && allowed_to_attach_attachments(context[:container]) + if User.current.pref.dmsf_attachments_upload_choice == 'Attachments' || + !allowed_to_attach_documents(context[:container]) '' else 'display: none' @@ -112,16 +104,13 @@ module RedmineDmsf private def allowed_to_attach_documents(container) - container.respond_to?(:saved_dmsf_attachments) && container.project && - User.current.allowed_to?(:file_manipulation, container.project) && - RedmineDmsf.dmsf_act_as_attachable? && - (container.project&.dmsf_act_as_attachable == Project::ATTACHABLE_DMS_AND_ATTACHMENTS) - end + return false unless container.respond_to?(:project) && container.respond_to?(:saved_dmsf_attachments) && + RedmineDmsf.dmsf_act_as_attachable? - def allowed_to_attach_attachments(container) - return true unless defined?(EasyExtensions) + return false if container.project && (!User.current.allowed_to?(:file_manipulation, container.project) || + (container.project&.dmsf_act_as_attachable != Project::ATTACHABLE_DMS_AND_ATTACHMENTS)) - !(allowed_to_attach_documents(container) && !container.project.module_enabled?(:documents)) + true end def get_links(container) @@ -153,18 +142,15 @@ module RedmineDmsf link_to: false } } end - def attach_documents_form(context, label: true, description: true) + def attach_documents_form(context, label: true) return unless context.is_a?(Hash) && context[:container] # Add Dmsf upload form container = context[:container] return unless allowed_to_attach_documents(container) - html = description ? +'' if label html << "" @@ -176,10 +162,9 @@ module RedmineDmsf html << context[:controller].send(:render_to_string, { partial: 'dmsf_upload/form', locals: { container: container, multiple: true, - description: description, - awf: false } }) + awf: true } }) html << '' - html << (description ? '

    ' : '
    ') + html << '

    ' html end @@ -188,122 +173,9 @@ module RedmineDmsf links = get_links(container) return if links.blank? - if defined?(EasyExtensions) - attachment_rows(links, container, controller) - else - controller.send :render_to_string, - { partial: 'dmsf_files/links', - locals: { links: links, thumbnails: Setting.thumbnails_enabled? } } - end - end - - def attachment_rows(links, issue, controller) - return unless links.any? - - html = "#{l(:label_dmsf_attachments)} (#{links.count})" - links.each do |dmsf_file, link, _created_at| - html << attachment_row(dmsf_file, link, issue, controller) - end - html << '' - html - end - - def attachment_row(dmsf_file, link, issue, controller) - html = link ? +'' : +'' - # Checkbox - html << '' - file_view_url = url_for({ controller: :dmsf_files, action: 'view', id: dmsf_file }) - # Title, size - html << '' - data = "#{dmsf_file.last_revision.detect_content_type}:#{h(dmsf_file.name)}:#{file_view_url}" - icon_name = icon_for_mime_type(Redmine::MimeType.css_class_of(item.filename)) - html << link_to(sprite_icon(icon_name, h(dmsf_file.title)), - file_view_url, - target: '_blank', - rel: 'noopener', - class: 'icon icon-file', - title: h(dmsf_file.last_revision.try(:tooltip)), - 'data-downloadurl' => data) - html << "(#{number_to_human_size(dmsf_file.last_revision.size)})" - html << " - #{h(dmsf_file.description)}" if dmsf_file.description.present? - html << '' - # Author, updated at - html << '' - author = "#{h(dmsf_file.last_revision.user)}, #{format_time(dmsf_file.last_revision.updated_at)}" - html << "#{author}" - html << '' - # Command icons - html << '' - # Details - html << if User.current.allowed_to? :file_manipulation, dmsf_file.project - link_to sprite_icon('edit', ''), dmsf_file_path(id: dmsf_file), - title: l(:link_details, title: h(dmsf_file.last_revision.title)), - class: 'icon icon-edit' - else - '' - end - # Email - html << link_to(sprite_icon('email', ''), - entries_operations_dmsf_path(id: dmsf_file.project, email_entries: 'email', - files: [dmsf_file.id]), - method: :post, title: l(:heading_send_documents_by_email), class: 'icon icon-email-disabled') - # Lock - html << if !dmsf_file.locked? - link_to sprite_icon('lock', ''), lock_dmsf_files_path(id: dmsf_file), - title: l(:title_lock_file), class: 'icon icon-lock' - elsif dmsf_file.unlockable? && (!dmsf_file.locked_for_user? || - User.current.allowed_to?(:force_file_unlock, dmsf_file.project)) - link_to sprite_icon('unlock', ''), unlock_dmsf_files_path(id: dmsf_file), - title: dmsf_file.locked_title, class: 'icon icon-unlock' - else - content_tag 'span', - sprite_icon('unlock', ''), - title: dmsf_file.locked_title, - class: 'icon icon-unlock' - end - if dmsf_file.locked? - html << ('' * 2) - else - # Notifications - html << if dmsf_file.notification - link_to sprite_icon('email', ''), notify_deactivate_dmsf_files_path(id: dmsf_file), - title: l(:title_notifications_active_deactivate), class: 'icon icon-email' - else - link_to sprite_icon('email-disabled', ''), - notify_activate_dmsf_files_path(id: dmsf_file), - title: l(:title_notifications_not_active_activate), class: 'icon icon-email-add' - end - # Delete - if issue.attributes_editable? && ((link && User.current.allowed_to?(:file_manipulation, - dmsf_file.project)) || (!link && - User.current.allowed_to?(:file_delete, dmsf_file.project))) - url = if link - dmsf_link_path link, commit: 'yes', back_url: issue_path(issue) - else - dmsf_file_path id: dmsf_file, commit: 'yes', back_url: issue_path(issue) - end - html << delete_link(url) - end - end - # Approval workflow - if dmsf_file.last_revision.dmsf_workflow_id - wf = DmsfWorkflow.find_by(id: dmsf_file.last_revision.dmsf_workflow_id) - end - html << controller.send(:render_to_string, - { partial: 'dmsf_workflows/approval_workflow_button', - locals: { - file: dmsf_file, - file_approval_allowed: User.current.allowed_to?(:file_approval, - dmsf_file.project), - workflows_available: DmsfWorkflow.exists?(['project_id = ? OR project_id IS NULL', - dmsf_file.project.id]), - project: dmsf_file.project, - wf: wf, - dmsf_link_id: nil - } }) - html << '' - html << '' - html + controller.send :render_to_string, + { partial: 'dmsf_files/links', + locals: { links: links, thumbnails: Setting.thumbnails_enabled? } } end end end diff --git a/lib/redmine_dmsf/hooks/views/mailer_view_hooks.rb b/lib/redmine_dmsf/hooks/views/mailer_view_hooks.rb index 8e5bb142..2f3e22cc 100644 --- a/lib/redmine_dmsf/hooks/views/mailer_view_hooks.rb +++ b/lib/redmine_dmsf/hooks/views/mailer_view_hooks.rb @@ -4,19 +4,19 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . + # User form view hooks module RedmineDmsf diff --git a/lib/redmine_dmsf/hooks/views/my_account_view_hooks.rb b/lib/redmine_dmsf/hooks/views/my_account_view_hooks.rb index d9bd322e..403f1110 100644 --- a/lib/redmine_dmsf/hooks/views/my_account_view_hooks.rb +++ b/lib/redmine_dmsf/hooks/views/my_account_view_hooks.rb @@ -4,19 +4,19 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . + # User form view hooks module RedmineDmsf diff --git a/lib/redmine_dmsf/hooks/views/search_view_hooks.rb b/lib/redmine_dmsf/hooks/views/search_view_hooks.rb index 9535a3ac..da3fa1d2 100644 --- a/lib/redmine_dmsf/hooks/views/search_view_hooks.rb +++ b/lib/redmine_dmsf/hooks/views/search_view_hooks.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Hooks diff --git a/lib/redmine_dmsf/hooks/views/view_projects_form_hook.rb b/lib/redmine_dmsf/hooks/views/view_projects_form_hook.rb index 407d7b39..289b27fe 100644 --- a/lib/redmine_dmsf/hooks/views/view_projects_form_hook.rb +++ b/lib/redmine_dmsf/hooks/views/view_projects_form_hook.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Hooks diff --git a/lib/redmine_dmsf/lockable.rb b/lib/redmine_dmsf/lockable.rb index 07bc5fbe..a1292c68 100644 --- a/lib/redmine_dmsf/lockable.rb +++ b/lib/redmine_dmsf/lockable.rb @@ -2,21 +2,20 @@ # Redmine plugin for Document Management System "Features" # -# Vít Jonáš , Daniel Munn , Karel Pičman +# Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf # Lockable diff --git a/lib/redmine_dmsf/macros.rb b/lib/redmine_dmsf/macros.rb index 0a35bda8..55eb8dd0 100644 --- a/lib/redmine_dmsf/macros.rb +++ b/lib/redmine_dmsf/macros.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf # Macros diff --git a/lib/redmine_dmsf/patches/access_control_patch.rb b/lib/redmine_dmsf/patches/access_control_patch.rb new file mode 100644 index 00000000..ab301974 --- /dev/null +++ b/lib/redmine_dmsf/patches/access_control_patch.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Redmine plugin for Document Management System "Features" +# +# Karel Pičman +# +# This file is part of Redmine DMSF plugin. +# +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. +# +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . + +module RedmineDmsf + module Patches + # AccessControl patch + module AccessControlPatch + ################################################################################################################## + # Overridden methods + def self.prepended(base) + base.singleton_class.prepend(ClassMethods) + end + + # Class methods + module ClassMethods + def available_project_modules + # Removes the original Documents from project's modules (replaced with DMSF) + if RedmineDmsf.remove_original_documents_module? + super.reject { |m| m == :documents } + else + super + end + end + end + end + end +end + +# Apply the patch +Redmine::AccessControl.prepend RedmineDmsf::Patches::AccessControlPatch diff --git a/lib/redmine_dmsf/patches/custom_field_patch.rb b/lib/redmine_dmsf/patches/custom_field_patch.rb new file mode 100644 index 00000000..43223219 --- /dev/null +++ b/lib/redmine_dmsf/patches/custom_field_patch.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Redmine plugin for Document Management System "Features" +# +# Karel Pičman +# +# This file is part of Redmine DMSF plugin. +# +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. +# +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . + +module RedmineDmsf + module Patches + # CustomField patch + module CustomFieldPatch + def self.included(base) + base.class_eval do + safe_attributes :dmsf_not_inheritable + end + end + end + end +end + +# Apply patch +CustomField.include RedmineDmsf::Patches::CustomFieldPatch diff --git a/patches/formatting_helper_patch.rb b/lib/redmine_dmsf/patches/formatting_helper_patch.rb similarity index 68% rename from patches/formatting_helper_patch.rb rename to lib/redmine_dmsf/patches/formatting_helper_patch.rb index 8807b33a..7b7a403b 100644 --- a/patches/formatting_helper_patch.rb +++ b/lib/redmine_dmsf/patches/formatting_helper_patch.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Patches @@ -39,8 +38,8 @@ module RedmineDmsf '..', '..', '..', 'assets', 'javascripts', 'lang', "dmsf_button-#{lang}.js") lang = 'en' unless File.exist?(path) content_for :header_tags do - javascript_include_tag("lang/dmsf_button-#{lang}", plugin: 'redmine_dmsf') + - javascript_include_tag('dmsf_button', plugin: 'redmine_dmsf') + + javascript_include_tag("lang/dmsf_button-#{lang}", plugin: :redmine_dmsf) + + javascript_include_tag('dmsf_button', plugin: :redmine_dmsf) + javascript_tag("jsToolBar.prototype.dmsfList = #{@dmsf_macro_list.to_json};") end end diff --git a/patches/issue_patch.rb b/lib/redmine_dmsf/patches/issue_patch.rb similarity index 84% rename from patches/issue_patch.rb rename to lib/redmine_dmsf/patches/issue_patch.rb index 89967aaf..86fad113 100644 --- a/patches/issue_patch.rb +++ b/lib/redmine_dmsf/patches/issue_patch.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Patches @@ -163,8 +162,4 @@ module RedmineDmsf end # Apply patch -if defined?(EasyPatchManager) - EasyPatchManager.register_model_patch 'Issue', 'RedmineDmsf::Patches::IssuePatch' -else - Issue.prepend RedmineDmsf::Patches::IssuePatch -end +Issue.prepend RedmineDmsf::Patches::IssuePatch diff --git a/patches/notifiable_patch.rb b/lib/redmine_dmsf/patches/notifiable_patch.rb similarity index 52% rename from patches/notifiable_patch.rb rename to lib/redmine_dmsf/patches/notifiable_patch.rb index fbc7fa96..b8e4bf4d 100644 --- a/patches/notifiable_patch.rb +++ b/lib/redmine_dmsf/patches/notifiable_patch.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Patches @@ -43,6 +42,4 @@ module RedmineDmsf end # Apply the patch -unless defined?(EasyPatchManager) || RedmineDmsf::Plugin.an_obsolete_plugin_present? - Redmine::Notifiable.prepend RedmineDmsf::Patches::NotifiablePatch -end +Redmine::Notifiable.prepend RedmineDmsf::Patches::NotifiablePatch unless RedmineDmsf::Plugin.an_obsolete_plugin_present? diff --git a/patches/notifiable_ru_patch.rb b/lib/redmine_dmsf/patches/notifiable_ru_patch.rb similarity index 54% rename from patches/notifiable_ru_patch.rb rename to lib/redmine_dmsf/patches/notifiable_ru_patch.rb index 9fedfd1e..63f67677 100644 --- a/patches/notifiable_ru_patch.rb +++ b/lib/redmine_dmsf/patches/notifiable_ru_patch.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Patches @@ -47,8 +46,4 @@ module RedmineDmsf end # Apply the patch -if defined?(EasyPatchManager) - EasyPatchManager.register_other_patch 'Redmine::Notifiable', 'RedmineDmsf::Patches::NotifiableRuPatch' -elsif RedmineDmsf::Plugin.an_obsolete_plugin_present? - Redmine::Notifiable.include RedmineDmsf::Patches::NotifiableRuPatch -end +Redmine::Notifiable.include RedmineDmsf::Patches::NotifiableRuPatch if RedmineDmsf::Plugin.an_obsolete_plugin_present? diff --git a/lib/redmine_dmsf/patches/pdf_patch.rb b/lib/redmine_dmsf/patches/pdf_patch.rb new file mode 100644 index 00000000..93e8084a --- /dev/null +++ b/lib/redmine_dmsf/patches/pdf_patch.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true + +# Redmine plugin for Document Management System "Features" +# +# Karel Pičman +# +# This file is part of Redmine DMSF plugin. +# +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. +# +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . + +# Redmine's PDF export patch to view DMS images + +require 'redmine/export/pdf' + +module RedmineDmsf + module Patches + # PDF + module PdfPatch + ################################################################################################################## + # Overridden methods + + def get_image_filename(attrname) + if attrname =~ %r{/dmsf/files/(\d+)/} + file = DmsfFile.find_by(id: Regexp.last_match(1)) + file&.last_revision&.disk_file + else + super + end + end + end + end +end + +# Apply the patch +Redmine::Export::PDF::ITCPDF.prepend RedmineDmsf::Patches::PdfPatch diff --git a/patches/project_patch.rb b/lib/redmine_dmsf/patches/project_patch.rb similarity index 82% rename from patches/project_patch.rb rename to lib/redmine_dmsf/patches/project_patch.rb index 60163a90..62a4d826 100644 --- a/patches/project_patch.rb +++ b/lib/redmine_dmsf/patches/project_patch.rb @@ -2,22 +2,21 @@ # Redmine plugin for Document Management System "Features" # -# Vít Jonáš , Daniel Munn , Karel Pičman +# Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Patches @@ -133,8 +132,4 @@ module RedmineDmsf end # Apply the patch -if defined?(EasyPatchManager) - EasyPatchManager.register_model_patch 'Project', 'RedmineDmsf::Patches::ProjectPatch', prepend: true -else - Project.prepend RedmineDmsf::Patches::ProjectPatch -end +Project.prepend RedmineDmsf::Patches::ProjectPatch diff --git a/patches/projects_helper_patch.rb b/lib/redmine_dmsf/patches/projects_helper_patch.rb similarity index 59% rename from patches/projects_helper_patch.rb rename to lib/redmine_dmsf/patches/projects_helper_patch.rb index 7549aa2f..7e999404 100644 --- a/patches/projects_helper_patch.rb +++ b/lib/redmine_dmsf/patches/projects_helper_patch.rb @@ -2,21 +2,20 @@ # Redmine plugin for Document Management System "Features" # -# Vít Jonáš , Daniel Munn , Karel Pičman +# Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Patches @@ -50,4 +49,4 @@ module RedmineDmsf end # Apply the patch -ProjectsController.send(:helper, RedmineDmsf::Patches::ProjectsHelperPatch) unless defined?(EasyPatchManager) +ProjectsController.send(:helper, RedmineDmsf::Patches::ProjectsHelperPatch) diff --git a/patches/puma_patch.rb b/lib/redmine_dmsf/patches/puma_patch.rb similarity index 53% rename from patches/puma_patch.rb rename to lib/redmine_dmsf/patches/puma_patch.rb index 37eaeecb..46966d56 100644 --- a/patches/puma_patch.rb +++ b/lib/redmine_dmsf/patches/puma_patch.rb @@ -4,20 +4,19 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . + # Redmine's PDF export patch to view DMS images module RedmineDmsf @@ -40,6 +39,4 @@ module RedmineDmsf end # Apply the patch -if !defined?(EasyPatchManager) && RedmineDmsf::Plugin.lib_available?('puma/const') - Puma::Const.include RedmineDmsf::Patches::PumaPatch -end +Puma::Const.include RedmineDmsf::Patches::PumaPatch if RedmineDmsf::Plugin.lib_available?('puma/const') diff --git a/lib/redmine_dmsf/patches/queries_controller_patch.rb b/lib/redmine_dmsf/patches/queries_controller_patch.rb new file mode 100644 index 00000000..3b2a3304 --- /dev/null +++ b/lib/redmine_dmsf/patches/queries_controller_patch.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Redmine plugin for Document Management System "Features" +# +# Karel Pičman +# +# This file is part of Redmine DMSF plugin. +# +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. +# +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . + +module RedmineDmsf + module Patches + # Queries controller + module QueriesControllerPatch + ################################################################################################################## + # New methods + + private + + def redirect_to_dmsf_query(options) + if @project + redirect_to dmsf_folder_path(@project, options) + else + redirect_to home_path(options) + end + end + end + end +end + +# Apply the patch +QueriesController.prepend RedmineDmsf::Patches::QueriesControllerPatch diff --git a/lib/redmine_dmsf/patches/role_patch.rb b/lib/redmine_dmsf/patches/role_patch.rb new file mode 100644 index 00000000..e9d84492 --- /dev/null +++ b/lib/redmine_dmsf/patches/role_patch.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true + +# Redmine plugin for Document Management System "Features" +# +# Karel Pičman +# +# This file is part of Redmine DMSF plugin. +# +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. +# +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . + +module RedmineDmsf + module Patches + # Role + module RolePatch + ################################################################################################################## + # New methods + + def self.included(base) + base.class_eval do + before_destroy :remove_dmsf_references, prepend: true + end + end + + def remove_dmsf_references + return unless id + + substitute = Role.anonymous + DmsfFolderPermission.where(object_id: id, object_type: 'Role').update_all object_id: substitute.id + end + end + end +end + +# Apply the patch +Role.prepend RedmineDmsf::Patches::RolePatch diff --git a/lib/redmine_dmsf/patches/search_patch.rb b/lib/redmine_dmsf/patches/search_patch.rb new file mode 100644 index 00000000..c3eb24c0 --- /dev/null +++ b/lib/redmine_dmsf/patches/search_patch.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# Redmine plugin for Document Management System "Features" +# +# Karel Pičman +# +# This file is part of Redmine DMSF plugin. +# +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. +# +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . + +module RedmineDmsf + module Patches + # Search patch + module SearchPatch + ################################################################################################################## + # Overridden methods + def self.prepended(base) + base.singleton_class.prepend(ClassMethods) + end + + # Class methods + module ClassMethods + def available_search_types + # Removes the original Documents from searching (replaced with DMSF) + if RedmineDmsf.remove_original_documents_module? + super.reject { |t| t == 'documents' } + else + super + end + end + end + end + end +end + +# Apply the patch +Redmine::Search.prepend RedmineDmsf::Patches::SearchPatch diff --git a/patches/user_patch.rb b/lib/redmine_dmsf/patches/user_patch.rb similarity index 72% rename from patches/user_patch.rb rename to lib/redmine_dmsf/patches/user_patch.rb index d8108535..e6a997c8 100644 --- a/patches/user_patch.rb +++ b/lib/redmine_dmsf/patches/user_patch.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Patches @@ -63,8 +62,4 @@ module RedmineDmsf end # Apply the patch -if defined?(EasyPatchManager) - EasyPatchManager.register_model_patch 'User', 'RedmineDmsf::Patches::UserPatch' -else - User.prepend RedmineDmsf::Patches::UserPatch -end +User.prepend RedmineDmsf::Patches::UserPatch diff --git a/patches/user_preference_patch.rb b/lib/redmine_dmsf/patches/user_preference_patch.rb similarity index 60% rename from patches/user_preference_patch.rb rename to lib/redmine_dmsf/patches/user_preference_patch.rb index 0da8924c..67332a13 100644 --- a/patches/user_preference_patch.rb +++ b/lib/redmine_dmsf/patches/user_preference_patch.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Patches @@ -59,8 +58,4 @@ module RedmineDmsf end # Apply the patch -if defined?(EasyPatchManager) - EasyPatchManager.register_model_patch 'UserPreference', 'RedmineDmsf::Patches::UserPreferencePatch' -else - UserPreference.prepend RedmineDmsf::Patches::UserPreferencePatch -end +UserPreference.prepend RedmineDmsf::Patches::UserPreferencePatch diff --git a/lib/redmine_dmsf/plugin.rb b/lib/redmine_dmsf/plugin.rb index 0c932791..ffe5f2d9 100644 --- a/lib/redmine_dmsf/plugin.rb +++ b/lib/redmine_dmsf/plugin.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf # Plugin @@ -31,8 +30,7 @@ module RedmineDmsf # present. # It is related especially to plugins made by AlphaNode and RedmineUP. def self.an_obsolete_plugin_present? - plugins = %w[easyproject/easy_plugins/easy_money redmine_questions redmine_db redmine_passwords redmine_resources - redmine_products redmine_finance] + plugins = %w[redmine_questions redmine_db redmine_passwords redmine_resources redmine_products redmine_finance] plugins.each do |plugin| return true if Plugin.present?(plugin) end diff --git a/lib/redmine_dmsf/preview.rb b/lib/redmine_dmsf/preview.rb index 4742b8ee..130762b6 100644 --- a/lib/redmine_dmsf/preview.rb +++ b/lib/redmine_dmsf/preview.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require 'English' @@ -26,18 +25,17 @@ module RedmineDmsf extend Redmine::Utils::Shell include Redmine::I18n - OFFICE_BIN = (Setting.plugin_redmine_dmsf['office_bin'].presence || 'libreoffice').freeze - def self.office_available? return @office_available if defined?(@office_available) begin - `#{shell_quote OFFICE_BIN} --version` + office_bin = RedmineDmsf.office_bin.presence || 'libreoffice' + `#{shell_quote office_bin} --version` @office_available = $CHILD_STATUS.success? rescue StandardError @office_available = false end - Rails.logger.warn l(:note_dmsf_office_bin_not_available, value: OFFICE_BIN, locale: :en) unless @office_available + Rails.logger.warn l(:note_dmsf_office_bin_not_available, value: office_bin, locale: :en) unless @office_available @office_available end @@ -45,7 +43,8 @@ module RedmineDmsf return target if File.exist?(target) dir = File.dirname(target) - cmd = "#{shell_quote(OFFICE_BIN)} --convert-to pdf --headless --outdir #{shell_quote(dir)} #{shell_quote(source)}" + office_bin = RedmineDmsf.office_bin.presence || 'libreoffice' + cmd = "#{shell_quote(office_bin)} --convert-to pdf --headless --outdir #{shell_quote(dir)} #{shell_quote(source)}" if system(cmd) target else diff --git a/lib/redmine_dmsf/webdav/base_resource.rb b/lib/redmine_dmsf/webdav/base_resource.rb index 35a9823b..e32db4c9 100644 --- a/lib/redmine_dmsf/webdav/base_resource.rb +++ b/lib/redmine_dmsf/webdav/base_resource.rb @@ -4,19 +4,18 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require 'addressable/uri' diff --git a/lib/redmine_dmsf/webdav/custom_middleware.rb b/lib/redmine_dmsf/webdav/custom_middleware.rb index 01d4944b..a1fce95b 100644 --- a/lib/redmine_dmsf/webdav/custom_middleware.rb +++ b/lib/redmine_dmsf/webdav/custom_middleware.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require "#{File.dirname(__FILE__)}/../../dav4rack" require "#{File.dirname(__FILE__)}/resource_proxy" diff --git a/lib/redmine_dmsf/webdav/dmsf_controller.rb b/lib/redmine_dmsf/webdav/dmsf_controller.rb index a7f6cb31..93b6074d 100644 --- a/lib/redmine_dmsf/webdav/dmsf_controller.rb +++ b/lib/redmine_dmsf/webdav/dmsf_controller.rb @@ -4,19 +4,20 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . + +require "#{File.dirname(__FILE__)}/dmsf_digest" module RedmineDmsf module Webdav @@ -34,7 +35,7 @@ module RedmineDmsf def process return super unless RedmineDmsf.dmsf_webdav_authentication == 'Digest' - status = skip_authorization? || authenticate ? process_action || OK : Dav4rack::HttpStatus::Unauthorized + status = skip_authorization? || authenticate? ? process_action || OK : Dav4rack::HttpStatus::Unauthorized rescue Dav4rack::HttpStatus::Status => e status = e ensure @@ -50,14 +51,14 @@ module RedmineDmsf end end - def authenticate + def authenticate? return super unless RedmineDmsf.dmsf_webdav_authentication == 'Digest' auth_header = request.authorization.to_s scheme = auth_header.split(' ', 2).first&.downcase if scheme == 'digest' Rails.logger.info 'Authentication: digest' - digest = Digest.new(request.authorization) + digest = DmsfDigest.new(request.authorization) params = digest.params username = params['username'] response = params['response'] @@ -76,19 +77,11 @@ module RedmineDmsf raise Unauthorized end token = Token.find_by(user_id: user.id, action: 'dmsf_webdav_digest') - if token.nil? && defined?(EasyExtensions) - if user.easy_digest_token_expired? - Rails.logger.error "Digest authentication: #{user} is locked" - raise Unauthorized - end - ha1 = user.easy_digest_token - else - unless token - Rails.logger.error "Digest authentication: no digest found for #{username}" - raise Unauthorized - end - ha1 = token.value + unless token + Rails.logger.error "Digest authentication: no digest found for #{username}" + raise Unauthorized end + ha1 = token.value ha2 = ActiveSupport::Digest.hexdigest("#{request.env['REQUEST_METHOD']}:#{uri}") required_response = if qop ActiveSupport::Digest.hexdigest("#{ha1}:#{nonce}:#{nc}:#{cnonce}:#{qop}:#{ha2}") @@ -106,7 +99,7 @@ module RedmineDmsf raise Unauthorized if User.current.anonymous? Rails.logger.info "Current user: #{User.current}, User-Agent: #{request.user_agent}" - User.current + User.current && !User.current.anonymous? end end end diff --git a/lib/redmine_dmsf/webdav/digest.rb b/lib/redmine_dmsf/webdav/dmsf_digest.rb similarity index 58% rename from lib/redmine_dmsf/webdav/digest.rb rename to lib/redmine_dmsf/webdav/dmsf_digest.rb index 1d5129ed..110e2cce 100644 --- a/lib/redmine_dmsf/webdav/digest.rb +++ b/lib/redmine_dmsf/webdav/dmsf_digest.rb @@ -4,24 +4,23 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Webdav # Replacement for Rack::Auth::Digest - class Digest + class DmsfDigest def initialize(authorization) @authorization = authorization end diff --git a/lib/redmine_dmsf/webdav/dmsf_resource.rb b/lib/redmine_dmsf/webdav/dmsf_resource.rb index 31f4ad7f..ec01d7cd 100644 --- a/lib/redmine_dmsf/webdav/dmsf_resource.rb +++ b/lib/redmine_dmsf/webdav/dmsf_resource.rb @@ -4,19 +4,18 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require 'uuidtools' require 'addressable/uri' @@ -265,7 +264,7 @@ module RedmineDmsf raise Locked if file.locked_for_user? if dest.exist? && !dest.collection? - if dest.resource.file.last_revision.size.zero? || reuse_version_for_locked_file(dest.resource.file) + if dest.resource.file.last_revision.size.zero? || reuse_version_for_locked_file?(dest.resource.file) # Last revision in the destination has zero size so reuse that revision new_revision = dest.resource.file.last_revision else @@ -391,7 +390,7 @@ module RedmineDmsf entity = file || folder return unless entity - refresh = args && (!args[:scope]) && (!args[:type]) + refresh = args && !args[:scope] && !args[:type] args ||= {} args[:method] = @request.request_method.downcase http_if = request.get_header('HTTP_IF') @@ -465,7 +464,7 @@ module RedmineDmsf # logically assume is that the lock is being refreshed (office loves # to do this for example, so we do a few checks, try to find the lock # and ultimately extend it, otherwise we return Conflict for any failure - refresh = args && (!args[:scope]) && (!args[:type]) # Perhaps a lock refresh + refresh = args && !args[:scope] && !args[:type] # Perhaps a lock refresh if refresh http_if = request.get_header('HTTP_IF') if http_if.blank? @@ -555,7 +554,7 @@ module RedmineDmsf Rails.logger.info "Versioning disabled for #{basename}" reuse_revision = true end - reuse_revision = true if reuse_version_for_locked_file(file) + reuse_revision = true if reuse_version_for_locked_file?(file) last_revision = file.last_revision if last_revision.size.zero? || reuse_revision new_revision = last_revision @@ -722,7 +721,7 @@ module RedmineDmsf File.new disk_file end - def reuse_version_for_locked_file(file) + def reuse_version_for_locked_file?(file) locks = file.lock locks.each do |lock| next if lock.expired? diff --git a/lib/redmine_dmsf/webdav/index_resource.rb b/lib/redmine_dmsf/webdav/index_resource.rb index 000b1e4f..b5812fdd 100644 --- a/lib/redmine_dmsf/webdav/index_resource.rb +++ b/lib/redmine_dmsf/webdav/index_resource.rb @@ -4,19 +4,18 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Webdav diff --git a/lib/redmine_dmsf/webdav/project_resource.rb b/lib/redmine_dmsf/webdav/project_resource.rb index 55e87683..a530f78d 100644 --- a/lib/redmine_dmsf/webdav/project_resource.rb +++ b/lib/redmine_dmsf/webdav/project_resource.rb @@ -4,19 +4,18 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Webdav diff --git a/lib/redmine_dmsf/webdav/resource_proxy.rb b/lib/redmine_dmsf/webdav/resource_proxy.rb index e692aaaa..57977452 100644 --- a/lib/redmine_dmsf/webdav/resource_proxy.rb +++ b/lib/redmine_dmsf/webdav/resource_proxy.rb @@ -4,19 +4,18 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Webdav @@ -28,6 +27,27 @@ module RedmineDmsf class ResourceProxy < Dav4rack::Resource attr_reader :read_only + delegate :propstats, to: :@resource_c + delegate :set_property, to: :@resource_c + delegate :options, to: :@resource_c + delegate :lockdiscovery, to: :@resource_c + delegate :lockdiscovery_xml, to: :@resource_c + delegate :children, to: :@resource_c + delegate :collection?, to: :@resource_c + delegate :exist?, to: :@resource_c + delegate :creation_date, to: :@resource_c + delegate :last_modified, to: :@resource_c + delegate :etag, to: :@resource_c + delegate :content_type, to: :@resource_c + delegate :content_length, to: :@resource_c + delegate :get, to: :@resource_c + delegate :special_type, to: :@resource_c + delegate :name, to: :@resource_c + delegate :long_name, to: :@resource_c + delegate :get_property, to: :@resource_c + delegate :remove_property, to: :@resource_c + delegate :properties, to: :@resource_c + def initialize(path, request, response, options) # Check the settings cache for each request Setting.check_cache @@ -41,63 +61,15 @@ module RedmineDmsf @read_only = RedmineDmsf.dmsf_webdav_strategy == 'WEBDAV_READ_ONLY' end - def authenticate(username, password) + def authenticate?(username, password) User.current = User.try_to_login(username, password) User.current && !User.current.anonymous? end - def options(request, response) - @resource_c.options request, response - end - def supports_locking? !@read_only end - def lockdiscovery - @resource_c.lockdiscovery - end - - def lockdiscovery_xml - @resource_c.lockdiscovery_xml - end - - def children - @resource_c.children - end - - def collection? - @resource_c.collection? - end - - def exist? - @resource_c.exist? - end - - def creation_date - @resource_c.creation_date - end - - def last_modified - @resource_c.last_modified - end - - def etag - @resource_c.etag - end - - def content_type - @resource_c.content_type - end - - def content_length - @resource_c.content_length - end - - def get(request, response) - @resource_c.get request, response - end - def put(request) raise BadGateway if @read_only @@ -128,10 +100,6 @@ module RedmineDmsf @resource_c.make_collection end - def special_type - @resource_c.special_type - end - def lock(args) raise BadGateway if @read_only @@ -148,38 +116,10 @@ module RedmineDmsf @resource_c.unlock token end - def name - @resource_c.name - end - - def long_name - @resource_c.long_name - end - def resource @resource_c end - def get_property(element) - @resource_c.get_property element - end - - def remove_property(element) - @resource_c.remove_property element - end - - def properties - @resource_c.properties - end - - def propstats(response, stats) - @resource_c.propstats response, stats - end - - def set_property(element, value) - @resource_c.set_property element, value - end - # Adds the given xml namespace to namespaces and returns the prefix def add_namespace(namespace, _prefix = '') return if namespace.blank? diff --git a/lib/tasks/dmsf_alert_approvals.rake b/lib/tasks/dmsf_alert_approvals.rake index 9ad1ba07..de7d9386 100644 --- a/lib/tasks/dmsf_alert_approvals.rake +++ b/lib/tasks/dmsf_alert_approvals.rake @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . desc <<~END_DESC Alert all users who are expected to do an approval in the current approval steps diff --git a/lib/tasks/dmsf_convert_documents.rake b/lib/tasks/dmsf_convert_documents.rake index 04fb3a40..1aec2e6f 100644 --- a/lib/tasks/dmsf_convert_documents.rake +++ b/lib/tasks/dmsf_convert_documents.rake @@ -4,19 +4,18 @@ # # Vít Jonáš , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . desc <<~END_DESC Convert projects' Documents to DMSF folder/file structure. diff --git a/lib/tasks/dmsf_create_digests.rake b/lib/tasks/dmsf_create_digests.rake index cceb55ad..12bf25ca 100644 --- a/lib/tasks/dmsf_create_digests.rake +++ b/lib/tasks/dmsf_create_digests.rake @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . desc <<~END_DESC DMSF maintenance task diff --git a/lib/tasks/dmsf_maintenance.rake b/lib/tasks/dmsf_maintenance.rake index e852da7d..b6ed4ff4 100644 --- a/lib/tasks/dmsf_maintenance.rake +++ b/lib/tasks/dmsf_maintenance.rake @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . desc <<~END_DESC DMSF maintenance task diff --git a/lib/tasks/dmsf_webdav_test.rake b/lib/tasks/dmsf_webdav_test.rake index eccc26ee..f57b533c 100644 --- a/lib/tasks/dmsf_webdav_test.rake +++ b/lib/tasks/dmsf_webdav_test.rake @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . desc <<~END_DESC DMSF WebDAV test task diff --git a/patches/access_control_patch.rb b/patches/access_control_patch.rb deleted file mode 100644 index c9c5fa64..00000000 --- a/patches/access_control_patch.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Redmine plugin for Document Management System "Features" -# -# 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. - -module RedmineDmsf - module Patches - # AccessControl patch - module AccessControlPatch - ################################################################################################################## - # Overridden methods - def self.prepended(base) - base.singleton_class.prepend(ClassMethods) - end - - # Class methods - module ClassMethods - def available_project_modules - # Removes the original Documents from project's modules (replaced with DMSF) - if RedmineDmsf.remove_original_documents_module? - super.reject { |m| m == :documents } - else - super - end - end - end - end - end -end - -# Apply the patch -if defined?(EasyPatchManager) - EasyPatchManager.register_patch_to_be_first 'Redmine::Acts::Attachable::InstanceMethods', - 'RedmineDmsf::Patches::AccessControlPatch', prepend: true, first: true -else - Redmine::AccessControl.prepend RedmineDmsf::Patches::AccessControlPatch -end diff --git a/patches/attachable_patch.rb b/patches/attachable_patch.rb deleted file mode 100644 index 2c7a2bd7..00000000 --- a/patches/attachable_patch.rb +++ /dev/null @@ -1,41 +0,0 @@ -# frozen_string_literal: true - -# Redmine plugin for Document Management System "Features" -# -# 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. - -module RedmineDmsf - module Patches - # Attachable - module AttachablePatch - ################################################################################################################## - # Overridden methods - - def has_attachments? - super || (defined?(dmsf_files) && dmsf_files.any?) || (defined?(dmsf_links) && dmsf_links.any?) - end - end - end -end - -# Apply the patch -if defined?(EasyPatchManager) - EasyPatchManager.register_patch_to_be_first 'Redmine::Acts::Attachable::InstanceMethods', - 'RedmineDmsf::Patches::AttachablePatch', prepend: true, first: true -else - Redmine::Acts::Attachable.prepend RedmineDmsf::Patches::AttachablePatch -end diff --git a/patches/custom_field_patch.rb b/patches/custom_field_patch.rb deleted file mode 100644 index d4a5d423..00000000 --- a/patches/custom_field_patch.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Redmine plugin for Document Management System "Features" -# -# 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. - -module RedmineDmsf - module Patches - # CustomField patch - module CustomFieldPatch - def self.included(base) - base.class_eval do - safe_attributes :dmsf_not_inheritable - end - end - end - end -end - -# Apply patch -if defined?(EasyPatchManager) - EasyPatchManager.register_model_patch 'CustomField', 'RedmineDmsf::Patches::CustomFieldPatch' -else - CustomField.include RedmineDmsf::Patches::CustomFieldPatch -end diff --git a/patches/easy_crm_case_patch.rb b/patches/easy_crm_case_patch.rb deleted file mode 100644 index 46215637..00000000 --- a/patches/easy_crm_case_patch.rb +++ /dev/null @@ -1,164 +0,0 @@ -# frozen_string_literal: true - -# Redmine plugin for Document Management System "Features" -# -# 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. - -module RedmineDmsf - module Patches - # Easy CRM case - module EasyCrmCasePatch - ################################################################################################################## - # New methods - - def self.included(base) - base.class_eval do - before_destroy :delete_system_folder, prepend: true - end - end - - def attributes_editable? - true - end - - def save_dmsf_attachments(dmsf_attachments) - @saved_dmsf_attachments = [] - return unless dmsf_attachments - - dmsf_attachments.each_value do |dmsf_attachment| - a = Attachment.find_by_token(dmsf_attachment[:token]) - @saved_dmsf_attachments << a if a - end - end - - def saved_dmsf_attachments - @saved_dmsf_attachments || [] - end - - def save_dmsf_links(dmsf_links) - @saved_dmsf_links = [] - return unless dmsf_links - - dmsf_links.each_value do |id| - l = DmsfLink.find_by(id: id) - @saved_dmsf_links << l if l - end - end - - def saved_dmsf_links - @saved_dmsf_links || [] - end - - def save_dmsf_attachments_wfs(dmsf_attachments_wfs, dmsf_attachments) - return unless dmsf_attachments_wfs - - @dmsf_attachments_wfs = {} - dmsf_attachments_wfs.each do |attachment_id, approval_workflow_id| - attachment = dmsf_attachments[attachment_id] - next unless attachment - - a = Attachment.find_by_token(attachment[:token]) - wf = DmsfWorkflow.find_by(id: approval_workflow_id) - @dmsf_attachments_wfs[a.id] = wf if wf && a - end - end - - def saved_dmsf_attachments_wfs - @dmsf_attachments_wfs || [] - end - - def save_dmsf_links_wfs(dmsf_links_wfs) - return unless dmsf_links_wfs - - @saved_dmsf_links_wfs = {} - dmsf_links_wfs.each do |dmsf_link_id, approval_workflow_id| - wf = DmsfWorkflow.find_by(id: approval_workflow_id) - @saved_dmsf_links_wfs[dmsf_link_id.to_i] = wf if wf - end - end - - def saved_dmsf_links_wfs - @saved_dmsf_links_wfs || {} - end - - def system_folder(create: false) - parent = DmsfFolder.issystem.find_by(project_id: project_id, title: '.CRM cases') - if create && !parent - parent = DmsfFolder.new - parent.project_id = project_id - parent.title = '.CRM cases' - parent.description = 'Documents assigned to CRM cases' - parent.user_id = User.anonymous.id - parent.system = true - parent.save - end - if parent - folder = DmsfFolder.issystem.where(["project_id = ? AND dmsf_folder_id = ? AND title LIKE '? - %'", - project_id, parent.id, id]).first - if create && !folder - folder = DmsfFolder.new - folder.dmsf_folder_id = parent.id - folder.project_id = project_id - folder.title = "#{id} - #{name}" - folder.user_id = User.anonymous.id - folder.system = true - folder.save - end - end - folder - end - - def dmsf_files - system_folder&.dmsf_files || [] - end - - def dmsf_links - system_folder&.dmsf_links || [] - end - - def delete_system_folder - system_folder&.destroy - end - - def dmsf_file_added(dmsf_file) - journalize_dmsf_file dmsf_file, :added - end - - def dmsf_file_removed(dmsf_file) - journalize_dmsf_file dmsf_file, :removed - end - - # Adds a journal detail for an attachment that was added or removed - def journalize_dmsf_file(dmsf_file, added_or_removed) - key = added_or_removed == :removed ? :old_value : :value - init_journal User.current - current_journal.details << JournalDetail.new( - property: 'dmsf_file', - prop_key: dmsf_file.id, - key => dmsf_file.title - ) - current_journal.save - end - end - end -end - -# Apply the patch -if defined?(EasyPatchManager) - EasyPatchManager.register_model_patch 'EasyCrmCase', 'RedmineDmsf::Patches::EasyCrmCasePatch', - if: -> { EasyPluginLoader.plugin_active? 'easy_crm_2_0' } -end diff --git a/patches/easy_crm_cases_controller_patch.rb b/patches/easy_crm_cases_controller_patch.rb deleted file mode 100644 index 05d9254f..00000000 --- a/patches/easy_crm_cases_controller_patch.rb +++ /dev/null @@ -1,130 +0,0 @@ -# frozen_string_literal: true - -# Redmine plugin for Document Management System "Features" -# -# 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. -# -module RedmineDmsf - module Patches - # Easy CRM cases controller - module EasyCrmCasesControllerPatch - ################################################################################################################## - # Overridden methods - - def easy_crm_after_save - super - easy_crm_cases = @easy_crm_cases - easy_crm_cases ||= [@easy_crm_case] - easy_crm_cases.each do |easy_crm_case| - # Attach DMS documents - uploaded_files = params[:dmsf_attachments] - details = params[:committed_files] - if uploaded_files && details - system_folder = easy_crm_case.system_folder(create: true) - uploaded_files.each do |key, uploaded_file| - upload = DmsfUpload.create_from_uploaded_attachment(easy_crm_case.project, system_folder, uploaded_file) - next unless upload - - uploaded_file[:disk_filename] = upload.disk_filename - uploaded_file[:name] = upload.name - uploaded_file[:title] = upload.title - uploaded_file[:description] = details[key][:description] - uploaded_file[:comment] = details[key][:comment] - uploaded_file[:version_major] = details[key][:version_major] - uploaded_file[:version_minor] = details[key][:version_minor] - uploaded_file[:version_patch] = details[key][:version_patch] - uploaded_file[:size] = upload.size - uploaded_file[:mime_type] = upload.mime_type - uploaded_file[:tempfile_path] = upload.tempfile_path - uploaded_file[:digest] = upload.digest - if params[:dmsf_attachments_wfs].present? && params[:dmsf_attachments_wfs][key].present? - uploaded_file[:workflow_id] = params[:dmsf_attachments_wfs][key].to_i - end - uploaded_file[:custom_field_values] = details[key][:custom_field_values] - end - DmsfUploadHelper.commit_files_internal uploaded_files, easy_crm_case.project, system_folder, self, - easy_crm_case, new_object: false - end - # Attach DMS links - easy_crm_case.saved_dmsf_links.each do |l| - file = l.target_file - revision = file.last_revision - system_folder = easy_crm_case.system_folder(create: true) - next unless system_folder - - l.project_id = system_folder.project_id - l.dmsf_folder_id = system_folder.id - easy_crm_case.dmsf_file_added(file) if l.save - wf = easy_crm_case.saved_dmsf_links_wfs[l.id] - next unless wf - - # Assign the workflow - revision.set_workflow wf.id, 'assign' - revision.assign_workflow wf.id - # Start the workflow - revision.set_workflow wf.id, 'start' - if revision.save - wf.notify_users easy_crm_case.project, revision, self - begin - file.lock! - rescue DmsfLockError => e - Rails.logger.warn e.message - end - else - Rails.logger.error l(:error_workflow_assign) - end - end - copied_from = EasyCrmCase.find_by(id: params[:copy_from]) if params[:copy_from].present? - # Save documents - next unless copied_from - - copied_from.dmsf_files.each do |dmsf_file| - dmsf_file.copy_to easy_crm_case.project, easy_crm_cases.system_folder(create: true) - end - end - end - - ################################################################################################################## - # New methods - - def self.prepended(base) - base.class_eval do - before_action :controller_easy_crm_cases_before_save, only: %i[create update bulk_update] - end - end - - def controller_easy_crm_cases_before_save - easy_crm_cases = @easy_crm_cases - easy_crm_cases ||= [@easy_crm_case] - easy_crm_cases.each do |easy_crm_case| - easy_crm_case.save_dmsf_attachments(params[:dmsf_attachments]) - easy_crm_case.save_dmsf_links(params[:dmsf_links]) - easy_crm_case.save_dmsf_attachments_wfs(params[:dmsf_attachments_wfs], params[:dmsf_attachments]) - easy_crm_case.save_dmsf_links_wfs(params[:dmsf_links_wfs]) - end - end - end - end -end - -# Apply the patch -if defined?(EasyPatchManager) - EasyPatchManager.register_controller_patch 'EasyCrmCasesController', - 'RedmineDmsf::Patches::EasyCrmCasesControllerPatch', - prepend: true, - if: -> { Redmine::Plugin.installed? 'easy_crm_2_0' } -end diff --git a/patches/pdf_patch.rb b/patches/pdf_patch.rb deleted file mode 100644 index 5c2ed141..00000000 --- a/patches/pdf_patch.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Redmine plugin for Document Management System "Features" -# -# 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. -# -# Redmine's PDF export patch to view DMS images - -require 'redmine/export/pdf' - -module RedmineDmsf - module Patches - # PDF - module PdfPatch - ################################################################################################################## - # Overridden methods - - def get_image_filename(attrname) - if attrname =~ %r{/dmsf/files/(\d+)/} - file = DmsfFile.find_by(id: Regexp.last_match(1)) - file&.last_revision ? file.last_revision.disk_file : nil - else - super - end - end - end - end -end - -# Apply the patch -if defined?(EasyPatchManager) - EasyPatchManager.register_patch_to_be_first 'Redmine::Export::PDF::ITCPDF', 'RedmineDmsf::Patches::PdfPatch', - prepend: true, first: true -else - Redmine::Export::PDF::ITCPDF.prepend RedmineDmsf::Patches::PdfPatch -end diff --git a/patches/queries_controller_patch.rb b/patches/queries_controller_patch.rb deleted file mode 100644 index e7905bd5..00000000 --- a/patches/queries_controller_patch.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Redmine plugin for Document Management System "Features" -# -# 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. -# -module RedmineDmsf - module Patches - # Queries controller - module QueriesControllerPatch - ################################################################################################################## - # New methods - - private - - def redirect_to_dmsf_query(options) - if @project - redirect_to dmsf_folder_path(@project, options) - else - redirect_to home_path(options) - end - end - end - end -end - -# Apply the patch -if defined?(EasyPatchManager) - EasyPatchManager.register_controller_patch 'QueriesController', 'RedmineDmsf::Patches::QueriesControllerPatch', - prepend: true -else - QueriesController.prepend RedmineDmsf::Patches::QueriesControllerPatch -end diff --git a/patches/role_patch.rb b/patches/role_patch.rb deleted file mode 100644 index e7575746..00000000 --- a/patches/role_patch.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true - -# Redmine plugin for Document Management System "Features" -# -# 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. - -module RedmineDmsf - module Patches - # Role - module RolePatch - ################################################################################################################## - # New methods - - def self.included(base) - base.class_eval do - before_destroy :remove_dmsf_references, prepend: true - end - end - - def remove_dmsf_references - return unless id - - substitute = Role.anonymous - DmsfFolderPermission.where(object_id: id, object_type: 'Role').update_all object_id: substitute.id - end - end - end -end - -# Apply the patch -if defined?(EasyPatchManager) - EasyPatchManager.register_model_patch 'Role', 'RedmineDmsf::Patches::RolePatch', prepend: true -else - Role.prepend RedmineDmsf::Patches::RolePatch -end diff --git a/patches/search_patch.rb b/patches/search_patch.rb deleted file mode 100644 index d9593da0..00000000 --- a/patches/search_patch.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Redmine plugin for Document Management System "Features" -# -# 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. - -module RedmineDmsf - module Patches - # Search patch - module SearchPatch - ################################################################################################################## - # Overridden methods - def self.prepended(base) - base.singleton_class.prepend(ClassMethods) - end - - # Class methods - module ClassMethods - def available_search_types - # Removes the original Documents from searching (replaced with DMSF) - if RedmineDmsf.remove_original_documents_module? - super.reject { |t| t == 'documents' } - else - super - end - end - end - end - end -end - -# Apply the patch -if defined?(EasyPatchManager) - EasyPatchManager.register_patch_to_be_first 'Redmine::Acts::Attachable::InstanceMethods', - 'RedmineDmsf::Patches::SearchPatch', prepend: true, first: true -else - Redmine::Search.prepend RedmineDmsf::Patches::SearchPatch -end diff --git a/test/fixtures/custom_fields.yml b/test/fixtures/custom_fields.yml index f1c3c5dc..5eaeb70c 100644 --- a/test/fixtures/custom_fields.yml +++ b/test/fixtures/custom_fields.yml @@ -1,22 +1,4 @@ -# -# Redmine plugin for Document Management System "Features" -# -# 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. ---- +--- cf_1: name: Tag min_length: 0 diff --git a/test/fixtures/custom_values.yml b/test/fixtures/custom_values.yml index 85190294..a251184e 100644 --- a/test/fixtures/custom_values.yml +++ b/test/fixtures/custom_values.yml @@ -1,22 +1,4 @@ -# -# Redmine plugin for Document Management System "Features" -# -# 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. ---- +--- cv_1: customized_type: DmsfFolder custom_field_id: 21 diff --git a/test/functional/dmsf_context_menus_controller_test.rb b/test/functional/dmsf_context_menus_controller_test.rb index 29a99a86..313dca88 100644 --- a/test/functional/dmsf_context_menus_controller_test.rb +++ b/test/functional/dmsf_context_menus_controller_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/functional/dmsf_controller_test.rb b/test/functional/dmsf_controller_test.rb index 5422665a..00ed5287 100644 --- a/test/functional/dmsf_controller_test.rb +++ b/test/functional/dmsf_controller_test.rb @@ -4,26 +4,25 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) +require File.expand_path('../../../lib/redmine_dmsf/dmsf_zip', __FILE__) # DMSF controller class DmsfControllerTest < RedmineDmsf::Test::TestCase include Redmine::I18n - include Rails.application.routes.url_helpers include DmsfHelper fixtures :custom_fields, :custom_values, :dmsf_links, :dmsf_folder_permissions, :dmsf_locks, diff --git a/test/functional/dmsf_files_controller_test.rb b/test/functional/dmsf_files_controller_test.rb index 67477417..f29ef98d 100644 --- a/test/functional/dmsf_files_controller_test.rb +++ b/test/functional/dmsf_files_controller_test.rb @@ -4,19 +4,18 @@ # # Copyright © 2011-23 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/functional/dmsf_folder_permissions_controller_test.rb b/test/functional/dmsf_folder_permissions_controller_test.rb index bec0f9fc..8206a993 100644 --- a/test/functional/dmsf_folder_permissions_controller_test.rb +++ b/test/functional/dmsf_folder_permissions_controller_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/functional/dmsf_help_controller_test.rb b/test/functional/dmsf_help_controller_test.rb index 6eeb6380..570c8fad 100644 --- a/test/functional/dmsf_help_controller_test.rb +++ b/test/functional/dmsf_help_controller_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/functional/dmsf_links_controller_test.rb b/test/functional/dmsf_links_controller_test.rb index d671b463..d94efbe6 100644 --- a/test/functional/dmsf_links_controller_test.rb +++ b/test/functional/dmsf_links_controller_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/functional/dmsf_public_urls_controller_test.rb b/test/functional/dmsf_public_urls_controller_test.rb index be8c1c56..ec88b226 100644 --- a/test/functional/dmsf_public_urls_controller_test.rb +++ b/test/functional/dmsf_public_urls_controller_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/functional/dmsf_state_controller_test.rb b/test/functional/dmsf_state_controller_test.rb index 788568e0..68d08f10 100644 --- a/test/functional/dmsf_state_controller_test.rb +++ b/test/functional/dmsf_state_controller_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/functional/dmsf_workflow_controller_test.rb b/test/functional/dmsf_workflow_controller_test.rb index c08c16b2..2ebf678f 100644 --- a/test/functional/dmsf_workflow_controller_test.rb +++ b/test/functional/dmsf_workflow_controller_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 15a59a5d..41748964 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb index 58c58d83..d5a7b222 100644 --- a/test/functional/my_controller_test.rb +++ b/test/functional/my_controller_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) @@ -34,8 +33,6 @@ class MyControllerTest < RedmineDmsf::Test::TestCase @jsmith.pref.save! get '/my/page' assert_response :success - return if defined?(EasyExtensions) - assert_select 'div#list-top' do assert_select 'h3', { text: "#{l(:open_approvals)} (1)" } end @@ -47,8 +44,6 @@ class MyControllerTest < RedmineDmsf::Test::TestCase @jsmith.pref.save! get '/my/page' assert_response :success - return if defined?(EasyExtensions) - assert_select 'div#list-top' do assert_select 'h3', { text: "#{l(:open_approvals)} (0)" } end @@ -61,8 +56,6 @@ class MyControllerTest < RedmineDmsf::Test::TestCase @admin.pref.save! get '/my/page' assert_response :success - return if defined?(EasyExtensions) - text = l(:locked_documents) text << " (0 #{l(:label_number_of_folders).downcase} / 1 #{l(:label_number_of_documents).downcase})" assert_select 'div#list-top' do @@ -78,8 +71,6 @@ class MyControllerTest < RedmineDmsf::Test::TestCase @folder1.add_watcher @jsmith @project1.add_watcher @jsmith get '/my/page' - return if defined?(EasyExtensions) - assert_response :success assert_select 'div#list-top' do assert_select 'h3', { text: "#{l(:label_dmsf_watched)} (2/1)" } diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb index 37210868..e88c391e 100644 --- a/test/functional/projects_controller_test.rb +++ b/test/functional/projects_controller_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/helper_test.rb b/test/helper_test.rb index 0f18aeef..af4c90f9 100644 --- a/test/helper_test.rb +++ b/test/helper_test.rb @@ -4,19 +4,18 @@ # # Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Test diff --git a/test/helpers/dmsf_files_helper_test.rb b/test/helpers/dmsf_files_helper_test.rb index 518d9538..0c118c1b 100644 --- a/test/helpers/dmsf_files_helper_test.rb +++ b/test/helpers/dmsf_files_helper_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/helpers/dmsf_helper_test.rb b/test/helpers/dmsf_helper_test.rb index 33344eb5..fea0e73d 100644 --- a/test/helpers/dmsf_helper_test.rb +++ b/test/helpers/dmsf_helper_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/helpers/dmsf_links_helper_test.rb b/test/helpers/dmsf_links_helper_test.rb index e111a89e..b37ab925 100644 --- a/test/helpers/dmsf_links_helper_test.rb +++ b/test/helpers/dmsf_links_helper_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/helpers/dmsf_queries_helper_test.rb b/test/helpers/dmsf_queries_helper_test.rb index 34a7b47d..4eb8ecac 100644 --- a/test/helpers/dmsf_queries_helper_test.rb +++ b/test/helpers/dmsf_queries_helper_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/integration/rest_api/dmsf_api_test.rb b/test/integration/rest_api/dmsf_api_test.rb index 9044e42c..9cda40cc 100644 --- a/test/integration/rest_api/dmsf_api_test.rb +++ b/test/integration/rest_api/dmsf_api_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../../test_helper', __FILE__) diff --git a/test/integration/rest_api/dmsf_file_api_test.rb b/test/integration/rest_api/dmsf_file_api_test.rb index ec45b90e..7091a12c 100644 --- a/test/integration/rest_api/dmsf_file_api_test.rb +++ b/test/integration/rest_api/dmsf_file_api_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../../test_helper', __FILE__) diff --git a/test/integration/rest_api/dmsf_folder_api_test.rb b/test/integration/rest_api/dmsf_folder_api_test.rb index 0f633fd8..ab4b467a 100644 --- a/test/integration/rest_api/dmsf_folder_api_test.rb +++ b/test/integration/rest_api/dmsf_folder_api_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../../test_helper', __FILE__) diff --git a/test/integration/rest_api/dmsf_link_api_test.rb b/test/integration/rest_api/dmsf_link_api_test.rb index 30801e43..e43d1c79 100644 --- a/test/integration/rest_api/dmsf_link_api_test.rb +++ b/test/integration/rest_api/dmsf_link_api_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../../test_helper', __FILE__) diff --git a/test/integration/webdav/dmsf_webdav_custom_middleware_test.rb b/test/integration/webdav/dmsf_webdav_custom_middleware_test.rb index 354fa59b..625f74a5 100644 --- a/test/integration/webdav/dmsf_webdav_custom_middleware_test.rb +++ b/test/integration/webdav/dmsf_webdav_custom_middleware_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../../test_helper', __FILE__) diff --git a/test/integration/webdav/dmsf_webdav_delete_test.rb b/test/integration/webdav/dmsf_webdav_delete_test.rb index db2f3ba5..87f90741 100644 --- a/test/integration/webdav/dmsf_webdav_delete_test.rb +++ b/test/integration/webdav/dmsf_webdav_delete_test.rb @@ -4,19 +4,18 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../../test_helper', __FILE__) diff --git a/test/integration/webdav/dmsf_webdav_get_test.rb b/test/integration/webdav/dmsf_webdav_get_test.rb index ec75e031..cdf870c8 100644 --- a/test/integration/webdav/dmsf_webdav_get_test.rb +++ b/test/integration/webdav/dmsf_webdav_get_test.rb @@ -4,19 +4,18 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../../test_helper', __FILE__) diff --git a/test/integration/webdav/dmsf_webdav_head_test.rb b/test/integration/webdav/dmsf_webdav_head_test.rb index a28d7c2f..223f97c5 100644 --- a/test/integration/webdav/dmsf_webdav_head_test.rb +++ b/test/integration/webdav/dmsf_webdav_head_test.rb @@ -4,19 +4,18 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../../test_helper', __FILE__) diff --git a/test/integration/webdav/dmsf_webdav_lock_test.rb b/test/integration/webdav/dmsf_webdav_lock_test.rb index 981de6bc..bf540255 100644 --- a/test/integration/webdav/dmsf_webdav_lock_test.rb +++ b/test/integration/webdav/dmsf_webdav_lock_test.rb @@ -4,19 +4,18 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../../test_helper', __FILE__) require 'fileutils' diff --git a/test/integration/webdav/dmsf_webdav_mkcol_test.rb b/test/integration/webdav/dmsf_webdav_mkcol_test.rb index 917554b0..62630c25 100644 --- a/test/integration/webdav/dmsf_webdav_mkcol_test.rb +++ b/test/integration/webdav/dmsf_webdav_mkcol_test.rb @@ -4,19 +4,18 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../../test_helper', __FILE__) diff --git a/test/integration/webdav/dmsf_webdav_move_test.rb b/test/integration/webdav/dmsf_webdav_move_test.rb index d89137a5..d6615df4 100644 --- a/test/integration/webdav/dmsf_webdav_move_test.rb +++ b/test/integration/webdav/dmsf_webdav_move_test.rb @@ -4,19 +4,18 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../../test_helper', __FILE__) require 'fileutils' diff --git a/test/integration/webdav/dmsf_webdav_options_test.rb b/test/integration/webdav/dmsf_webdav_options_test.rb index f0d5520c..e02be686 100644 --- a/test/integration/webdav/dmsf_webdav_options_test.rb +++ b/test/integration/webdav/dmsf_webdav_options_test.rb @@ -4,19 +4,18 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../../test_helper', __FILE__) diff --git a/test/integration/webdav/dmsf_webdav_post_test.rb b/test/integration/webdav/dmsf_webdav_post_test.rb index ffb764e9..37071a42 100644 --- a/test/integration/webdav/dmsf_webdav_post_test.rb +++ b/test/integration/webdav/dmsf_webdav_post_test.rb @@ -4,19 +4,18 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../../test_helper', __FILE__) diff --git a/test/integration/webdav/dmsf_webdav_propfind_test.rb b/test/integration/webdav/dmsf_webdav_propfind_test.rb index 532e17f0..828f05be 100644 --- a/test/integration/webdav/dmsf_webdav_propfind_test.rb +++ b/test/integration/webdav/dmsf_webdav_propfind_test.rb @@ -4,19 +4,18 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../../test_helper', __FILE__) require 'uri' diff --git a/test/integration/webdav/dmsf_webdav_put_test.rb b/test/integration/webdav/dmsf_webdav_put_test.rb index 25c175f7..38de9c66 100644 --- a/test/integration/webdav/dmsf_webdav_put_test.rb +++ b/test/integration/webdav/dmsf_webdav_put_test.rb @@ -4,19 +4,18 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../../test_helper', __FILE__) require 'fileutils' diff --git a/test/integration/webdav/dmsf_webdav_unlock_test.rb b/test/integration/webdav/dmsf_webdav_unlock_test.rb index 26664433..be5e5cbc 100644 --- a/test/integration/webdav/dmsf_webdav_unlock_test.rb +++ b/test/integration/webdav/dmsf_webdav_unlock_test.rb @@ -4,19 +4,18 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../../test_helper', __FILE__) require 'fileutils' diff --git a/test/integration_test.rb b/test/integration_test.rb index 4bc44e31..0795864b 100644 --- a/test/integration_test.rb +++ b/test/integration_test.rb @@ -2,21 +2,20 @@ # Redmine plugin for Document Management System "Features" # -# Vít Jonáš , Daniel Munn , Karel Pičman +# Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Test diff --git a/test/test_case.rb b/test/test_case.rb index 40c16cad..00fff643 100644 --- a/test/test_case.rb +++ b/test/test_case.rb @@ -2,21 +2,20 @@ # Redmine plugin for Document Management System "Features" # -# Vít Jonáš , Daniel Munn , Karel Pičman +# Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Test diff --git a/test/test_helper.rb b/test/test_helper.rb index 0b9974d6..f68422de 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -2,21 +2,20 @@ # Redmine plugin for Document Management System "Features" # -# Vít Jonáš , Daniel Munn , Karel Pičman +# Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . # Load the normal Rails helper require File.expand_path('../../../../test/test_helper', __FILE__) diff --git a/test/unit/custom_field_dmsf_file_format_test.rb b/test/unit/custom_field_dmsf_file_format_test.rb index 61042b6b..2a471ff7 100644 --- a/test/unit/custom_field_dmsf_file_format_test.rb +++ b/test/unit/custom_field_dmsf_file_format_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/unit/custom_field_path_test.rb b/test/unit/custom_field_path_test.rb index 3110b678..7f689727 100644 --- a/test/unit/custom_field_path_test.rb +++ b/test/unit/custom_field_path_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/unit/dmsf_file_revision_test.rb b/test/unit/dmsf_file_revision_test.rb index c6534e5c..b4963800 100644 --- a/test/unit/dmsf_file_revision_test.rb +++ b/test/unit/dmsf_file_revision_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/unit/dmsf_file_test.rb b/test/unit/dmsf_file_test.rb index db473ffa..0495e80d 100644 --- a/test/unit/dmsf_file_test.rb +++ b/test/unit/dmsf_file_test.rb @@ -4,19 +4,18 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/unit/dmsf_folder_permission_test.rb b/test/unit/dmsf_folder_permission_test.rb index eae32355..cfd7110a 100644 --- a/test/unit/dmsf_folder_permission_test.rb +++ b/test/unit/dmsf_folder_permission_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/unit/dmsf_folder_test.rb b/test/unit/dmsf_folder_test.rb index e7294dda..0fe6ba0a 100644 --- a/test/unit/dmsf_folder_test.rb +++ b/test/unit/dmsf_folder_test.rb @@ -4,19 +4,18 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/unit/dmsf_link_test.rb b/test/unit/dmsf_link_test.rb index 966d4bae..fad945c9 100644 --- a/test/unit/dmsf_link_test.rb +++ b/test/unit/dmsf_link_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/unit/dmsf_lock_test.rb b/test/unit/dmsf_lock_test.rb index 824348bd..01f69e66 100644 --- a/test/unit/dmsf_lock_test.rb +++ b/test/unit/dmsf_lock_test.rb @@ -4,19 +4,18 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper.rb', __FILE__) diff --git a/test/unit/dmsf_mailer_test.rb b/test/unit/dmsf_mailer_test.rb index 5905b603..aeea3898 100644 --- a/test/unit/dmsf_mailer_test.rb +++ b/test/unit/dmsf_mailer_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/unit/dmsf_public_url_test.rb b/test/unit/dmsf_public_url_test.rb index bc9bc222..6e0976ff 100644 --- a/test/unit/dmsf_public_url_test.rb +++ b/test/unit/dmsf_public_url_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/unit/dmsf_query_test.rb b/test/unit/dmsf_query_test.rb index f366e332..ffdfdacb 100644 --- a/test/unit/dmsf_query_test.rb +++ b/test/unit/dmsf_query_test.rb @@ -4,19 +4,18 @@ # # Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/unit/dmsf_upload_test.rb b/test/unit/dmsf_upload_test.rb index 91bbfea4..89f551a3 100644 --- a/test/unit/dmsf_upload_test.rb +++ b/test/unit/dmsf_upload_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/unit/dmsf_workflow_step_action_test.rb b/test/unit/dmsf_workflow_step_action_test.rb index 477cbc91..23a16197 100644 --- a/test/unit/dmsf_workflow_step_action_test.rb +++ b/test/unit/dmsf_workflow_step_action_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/unit/dmsf_workflow_step_assignment_test.rb b/test/unit/dmsf_workflow_step_assignment_test.rb index 390acab7..543ba154 100644 --- a/test/unit/dmsf_workflow_step_assignment_test.rb +++ b/test/unit/dmsf_workflow_step_assignment_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/unit/dmsf_workflow_step_test.rb b/test/unit/dmsf_workflow_step_test.rb index 77a5fd40..961a4147 100644 --- a/test/unit/dmsf_workflow_step_test.rb +++ b/test/unit/dmsf_workflow_step_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/unit/dmsf_workflow_test.rb b/test/unit/dmsf_workflow_test.rb index f0580f4f..1b0a576b 100644 --- a/test/unit/dmsf_workflow_test.rb +++ b/test/unit/dmsf_workflow_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) @@ -152,7 +151,7 @@ class DmsfWorkflowTest < RedmineDmsf::Test::UnitTest wsa.author_id = @jsmith.id assert wsa.save # The workflow is finished - assert @wf1.try_finish(@revision1, @wfsac1, @jsmith.id) + assert @wf1.try_finish?(@revision1, @wfsac1, @jsmith.id) @revision1.reload assert_equal DmsfWorkflow::STATE_APPROVED, @revision1.workflow end @@ -161,7 +160,7 @@ class DmsfWorkflowTest < RedmineDmsf::Test::UnitTest # The forkflow is waiting for an approval assert_equal DmsfWorkflow::STATE_WAITING_FOR_APPROVAL, @revision1.workflow # The workflow is not finished - assert_not @wf1.try_finish(@revision1, @wfsac1, @jsmith.id) + assert_not @wf1.try_finish?(@revision1, @wfsac1, @jsmith.id) @revision1.reload assert_equal DmsfWorkflow::STATE_WAITING_FOR_APPROVAL, @revision1.workflow end diff --git a/test/unit/issue_patch_test.rb b/test/unit/issue_patch_test.rb index 7331a725..62eec31e 100644 --- a/test/unit/issue_patch_test.rb +++ b/test/unit/issue_patch_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/unit/lib/acccess_control_patch_test.rb b/test/unit/lib/acccess_control_patch_test.rb index ad645faf..09727845 100644 --- a/test/unit/lib/acccess_control_patch_test.rb +++ b/test/unit/lib/acccess_control_patch_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../../test_helper', __FILE__) @@ -24,8 +23,6 @@ require File.expand_path('../../../test_helper', __FILE__) class AccessControlPatchTest < RedmineDmsf::Test::UnitTest def test_available_project_modules assert Redmine::AccessControl.available_project_modules.include?(:documents) - return if defined?(EasyExtensions) # It doesn't work with Easy due to alias_method_change - with_settings plugin_redmine_dmsf: { 'remove_original_documents_module' => '1' } do assert_not Redmine::AccessControl.available_project_modules.include?(:documents) end diff --git a/test/unit/lib/attachable_patch_test.rb b/test/unit/lib/attachable_patch_test.rb deleted file mode 100644 index f4ff9c6e..00000000 --- a/test/unit/lib/attachable_patch_test.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -# Redmine plugin for Document Management System "Features" -# -# 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. - -require File.expand_path('../../../test_helper', __FILE__) - -# Attachable tests -class AttachablePatchTest < RedmineDmsf::Test::UnitTest - fixtures :issues, :dmsf_folders, :dmsf_files, :dmsf_file_revisions - - def setup - super - @issue1 = Issue.find 1 - @issue2 = Issue.find 2 - end - - def test_has_attachmets - if defined?(EasyExtensions) - assert @issue1.has_attachments? - assert_not @issue2.has_attachments? - else - assert @issue1.dmsf_files.present? - assert @issue2.dmsf_files.blank? - end - end -end diff --git a/test/unit/lib/redmine_dmsf/dmsf_macros_test.rb b/test/unit/lib/redmine_dmsf/dmsf_macros_test.rb index cc3cc440..207ab983 100644 --- a/test/unit/lib/redmine_dmsf/dmsf_macros_test.rb +++ b/test/unit/lib/redmine_dmsf/dmsf_macros_test.rb @@ -4,40 +4,55 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../../../test_helper', __FILE__) # Macros tests class DmsfMacrosTest < RedmineDmsf::Test::HelperTest - include ApplicationHelper - include ActionView::Helpers - include ActionDispatch::Routing - include ERB::Util - include Rails.application.routes.url_helpers - include ActionView::Helpers::UrlHelper - fixtures :dmsf_folders, :dmsf_files, :dmsf_file_revisions + # Mock view context for macros + class DmsfView + include ApplicationHelper + include ActionView::Helpers + include ActionDispatch::Routing + include ERB::Util + include Rails.application.routes.url_helpers + end + + # Cache the view context to avoid creating it for each macro call + def dmsf_view_context + @dmsf_view_context ||= DmsfView.new + end + + # Hack to bypass missing methods to mocked view context + def respond_to_missing?(name, include_private) + dmsf_view_context.respond_to?(name) || super + end + + def method_missing(method_name, ...) + dmsf_view_context.send(method_name.to_s, ...) + end + def setup super User.current = @jsmith - default_url_options[:host] = 'www.example.com' + Rails.application.routes.default_url_options[:host] = 'www.example.com' @file1 = DmsfFile.find_by(id: 1) - @file6 = DmsfFile.find_by(id: 6) # video - @file7 = DmsfFile.find_by(id: 7) # image + @file6 = DmsfFile.find_by(id: 6) # video + @file7 = DmsfFile.find_by(id: 7) # image @folder1 = DmsfFolder.find_by(id: 1) end @@ -346,10 +361,12 @@ class DmsfMacrosTest < RedmineDmsf::Test::HelperTest text = textilizable("{{dmsftn(#{@file7.id} #{@file7.id})}}") url = static_dmsf_file_url(@file7, @file7.last_revision.name) img = image_tag(url, alt: @file7.name, title: @file7.title, width: 'auto', height: 200) - link = link_to(img, url, target: '_blank', - rel: 'noopener', - title: h(@file7.last_revision.try(:tooltip)), - 'data-downloadurl': 'image/gif:test.gif:http://www.example.com/dmsf/files/7/test.gif') + link = link_to(img, + url, + target: '_blank', + rel: 'noopener', + title: h(@file7.last_revision.try(:tooltip)), + 'data-downloadurl': 'image/gif:test.gif:http://www.example.com/dmsf/files/7/test.gif') assert text.include?(link + link), text end @@ -380,10 +397,12 @@ class DmsfMacrosTest < RedmineDmsf::Test::HelperTest height = '480' text = textilizable("{{dmsftn(#{@file7.id}, height=#{height})}}") img = image_tag(url, alt: @file7.name, title: @file7.title, width: 'auto', height: 480) - link = link_to(img, url, target: '_blank', - rel: 'noopener', - title: h(@file7.last_revision.try(:tooltip)), - 'data-downloadurl': 'image/gif:test.gif:http://www.example.com/dmsf/files/7/test.gif') + link = link_to(img, + url, + target: '_blank', + rel: 'noopener', + title: h(@file7.last_revision.try(:tooltip)), + 'data-downloadurl': 'image/gif:test.gif:http://www.example.com/dmsf/files/7/test.gif') assert text.include?(link), text width = '640' text = textilizable("{{dmsftn(#{@file7.id}, width=#{width})}}") diff --git a/test/unit/lib/redmine_dmsf/dmsf_plugin_test.rb b/test/unit/lib/redmine_dmsf/dmsf_plugin_test.rb index a3ded3e9..55ce667f 100644 --- a/test/unit/lib/redmine_dmsf/dmsf_plugin_test.rb +++ b/test/unit/lib/redmine_dmsf/dmsf_plugin_test.rb @@ -4,21 +4,21 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../../../test_helper', __FILE__) +require File.expand_path('../../../../../lib/redmine_dmsf/plugin', __FILE__) # Plugin tests class DmsfPluginTest < RedmineDmsf::Test::HelperTest diff --git a/test/unit/lib/redmine_dmsf/dmsf_zip_test.rb b/test/unit/lib/redmine_dmsf/dmsf_zip_test.rb index 1d5d8c9b..5c177583 100644 --- a/test/unit/lib/redmine_dmsf/dmsf_zip_test.rb +++ b/test/unit/lib/redmine_dmsf/dmsf_zip_test.rb @@ -4,21 +4,21 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../../../test_helper', __FILE__) +require File.expand_path('../../../../../lib/redmine_dmsf/dmsf_zip', __FILE__) # Plugin tests class DmsfZipTest < RedmineDmsf::Test::HelperTest diff --git a/test/unit/lib/search_patch_test.rb b/test/unit/lib/search_patch_test.rb index 5b62e2d6..2ae83036 100644 --- a/test/unit/lib/search_patch_test.rb +++ b/test/unit/lib/search_patch_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../../test_helper', __FILE__) @@ -24,8 +23,6 @@ require File.expand_path('../../../test_helper', __FILE__) class SearchPatchTest < RedmineDmsf::Test::UnitTest def test_available_search_types assert Redmine::Search.available_search_types.include?('documents') - return if defined?(EasyExtensions) # It doesn't work with Easy due to alias_method_change - with_settings plugin_redmine_dmsf: { 'remove_original_documents_module' => '1' } do assert_not Redmine::Search.available_search_types.include?('documents') end diff --git a/test/unit/project_patch_test.rb b/test/unit/project_patch_test.rb index ac091f25..9b5a792a 100644 --- a/test/unit/project_patch_test.rb +++ b/test/unit/project_patch_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/unit/user_patch_test.rb b/test/unit/user_patch_test.rb index ee9da917..1ddad4f1 100644 --- a/test/unit/user_patch_test.rb +++ b/test/unit/user_patch_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) @@ -34,13 +33,10 @@ class UserPatchTest < RedmineDmsf::Test::UnitTest assert_equal 0, DmsfFileRevision.where(dmsf_workflow_assigned_by_user_id: id).all.size assert_equal 0, DmsfFileRevision.where(dmsf_workflow_started_by_user_id: id).all.size assert_equal 0, DmsfFile.where(deleted_by_user_id: id).all.size - assert_equal 0, DmsfFolder.where(user_id: id).all.size assert_equal 0, DmsfFolder.where(deleted_by_user_id: id).all.size assert_equal 0, DmsfLink.where(user_id: id).all.size assert_equal 0, DmsfLink.where(deleted_by_user_id: id).all.size - # TODO: Expected: 0, Actual: 1 in Easy extension - return if defined?(EasyExtensions) - + assert_equal 0, DmsfFolder.where(user_id: id).all.size assert_equal 0, DmsfLock.where(user_id: id).all.size assert_equal 0, DmsfWorkflowStepAction.where(author_id: id).all.size assert_equal 0, DmsfWorkflowStepAssignment.where(user_id: id).all.size diff --git a/test/unit/user_preference_patch_test.rb b/test/unit/user_preference_patch_test.rb index c2ff87d3..d233bb99 100644 --- a/test/unit/user_preference_patch_test.rb +++ b/test/unit/user_preference_patch_test.rb @@ -4,19 +4,18 @@ # # 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . require File.expand_path('../../test_helper', __FILE__) diff --git a/test/unit_test.rb b/test/unit_test.rb index 3cbd0335..488d1e41 100644 --- a/test/unit_test.rb +++ b/test/unit_test.rb @@ -2,21 +2,20 @@ # Redmine plugin for Document Management System "Features" # -# Vít Jonáš , Daniel Munn , Karel Pičman +# Vít Jonáš , Daniel Munn , 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 file is part of Redmine DMSF plugin. # -# 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. +# Redmine DMSF plugin 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 3 of the License, or (at your option) any +# later version. # -# 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. +# Redmine DMSF plugin 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 Redmine DMSF plugin. If not, see +# . module RedmineDmsf module Test