Coding style
This commit is contained in:
parent
a871ebd766
commit
bea9ce62aa
@ -29,62 +29,62 @@ ActiveSupport::Dependencies.autoload_paths << File.join(File.dirname(__FILE__),
|
||||
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,
|
||||
:html => { :class => 'icon icon-approvalworkflows' }, :if => Proc.new { |_| User.current.admin? }
|
||||
menu.push :dmsf_approvalworkflows, :dmsf_workflows_path, caption: :label_dmsf_workflow_plural,
|
||||
html: { class: 'icon icon-approvalworkflows' }, if: Proc.new { |_| User.current.admin? }
|
||||
end
|
||||
|
||||
Redmine::MenuManager.map :project_menu do |menu|
|
||||
menu.push :dmsf, { :controller => 'dmsf', :action => 'show' }, :caption => :menu_dmsf, :before => :documents,
|
||||
:param => :id
|
||||
menu.push :dmsf, { controller: 'dmsf', action: 'show' }, caption: :menu_dmsf, before: :documents,
|
||||
param: :id
|
||||
end
|
||||
|
||||
# Permissions
|
||||
Redmine::AccessControl.map do |map|
|
||||
map.project_module :dmsf do |pmap|
|
||||
pmap.permission :view_dmsf_file_revision_accesses,
|
||||
:read => true
|
||||
read: true
|
||||
pmap.permission :view_dmsf_file_revisions,
|
||||
:read => true
|
||||
read: true
|
||||
pmap.permission :view_dmsf_folders,
|
||||
{:dmsf => [:show]},
|
||||
:read => true
|
||||
{ dmsf: [:show] },
|
||||
read: true
|
||||
pmap.permission :user_preferences,
|
||||
{ dmsf_state: [:user_pref_save] }
|
||||
pmap.permission :view_dmsf_files,
|
||||
{:dmsf => [:entries_operation, :entries_email, :download_email_entries, :tag_changed, :add_email,
|
||||
{ dmsf: [:entries_operation, :entries_email, :download_email_entries, :tag_changed, :add_email,
|
||||
:append_email, :autocomplete_for_user],
|
||||
:dmsf_files => [:show, :view, :thumbnail],
|
||||
:dmsf_workflows => [:log]},
|
||||
:read => true
|
||||
dmsf_files: [:show, :view, :thumbnail],
|
||||
dmsf_workflows: [:log] },
|
||||
read: true
|
||||
pmap.permission :email_documents,
|
||||
{:dmsf_public_urls => [:create]}
|
||||
{ dmsf_public_urls: [:create] }
|
||||
pmap.permission :folder_manipulation,
|
||||
{ dmsf: [:new, :create, :delete, :edit, :save, :edit_root, :save_root, :lock, :unlock,
|
||||
:notify_activate, :notify_deactivate, :restore, :drop],
|
||||
:dmsf_folder_permissions => [:new, :append, :autocomplete_for_user],
|
||||
:dmsf_folders_copy => [:new, :copy, :move],
|
||||
:dmsf_context_menus => [:dmsf]}
|
||||
dmsf_folder_permissions: [:new, :append, :autocomplete_for_user],
|
||||
dmsf_folders_copy: [:new, :copy, :move],
|
||||
dmsf_context_menus: [:dmsf] }
|
||||
pmap.permission :file_manipulation,
|
||||
{:dmsf_files => [:create_revision, :lock, :unlock, :delete_revision, :obsolete_revision,
|
||||
{ dmsf_files: [:create_revision, :lock, :unlock, :delete_revision, :obsolete_revision,
|
||||
:notify_activate, :notify_deactivate, :restore],
|
||||
:dmsf_upload => [:upload_files, :upload_file, :upload, :commit_files, :commit,
|
||||
dmsf_upload: [:upload_files, :upload_file, :upload, :commit_files, :commit,
|
||||
:delete_dmsf_attachment, :delete_dmsf_link_attachment, :multi_upload],
|
||||
:dmsf_links => [:new, :create, :destroy, :restore, :autocomplete_for_project,
|
||||
dmsf_links: [:new, :create, :destroy, :restore, :autocomplete_for_project,
|
||||
:autocomplete_for_folder],
|
||||
:dmsf_files_copy => [:new, :copy, :move],
|
||||
:dmsf_context_menus => [:dmsf]}
|
||||
dmsf_files_copy: [:new, :copy, :move],
|
||||
dmsf_context_menus: [:dmsf]}
|
||||
pmap.permission :file_delete,
|
||||
{:dmsf => [:trash, :delete_entries],
|
||||
:dmsf_files => [:delete],
|
||||
:dmsf_trash_context_menus => [:trash]}
|
||||
{ dmsf: [:trash, :delete_entries],
|
||||
dmsf_files: [:delete],
|
||||
dmsf_trash_context_menus: [:trash] }
|
||||
pmap.permission :force_file_unlock, {}
|
||||
pmap.permission :file_approval,
|
||||
{:dmsf_workflows => [:action, :new_action, :autocomplete_for_user, :start, :assign, :assignment]}
|
||||
{ dmsf_workflows: [:action, :new_action, :autocomplete_for_user, :start, :assign, :assignment] }
|
||||
pmap.permission :manage_workflows,
|
||||
{:dmsf_workflows => [:index, :new, :create, :destroy, :show, :new_step, :add_step, :remove_step,
|
||||
{ dmsf_workflows: [: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
|
||||
read: true
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -96,8 +96,8 @@ if Redmine::Plugin.installed?(:easy_extensions)
|
||||
require File.expand_path('../app/models/easy_page_modules/easy_dms/epm_dmsf_locked_documents', __FILE__)
|
||||
require File.expand_path('../app/models/easy_page_modules/easy_dms/epm_dmsf_open_approvals', __FILE__)
|
||||
|
||||
EpmDmsfLockedDocuments.register_to_scope(:user, :plugin => :redmine_dmsf)
|
||||
EpmDmsfOpenApprovals.register_to_scope(:user, :plugin => :redmine_dmsf)
|
||||
EpmDmsfLockedDocuments.register_to_scope(:user, plugin: :redmine_dmsf)
|
||||
EpmDmsfOpenApprovals.register_to_scope(:user, plugin: :redmine_dmsf)
|
||||
end
|
||||
else
|
||||
dmsf_init
|
||||
@ -108,15 +108,15 @@ RedmineExtensions::Reloader.to_prepare do
|
||||
Zip.unicode_names = true
|
||||
|
||||
# DMS custom fields
|
||||
CustomFieldsHelper::CUSTOM_FIELDS_TABS << { :name => 'DmsfFileRevisionCustomField', :partial => 'custom_fields/index',
|
||||
:label => :dmsf }
|
||||
CustomFieldsHelper::CUSTOM_FIELDS_TABS << { name: 'DmsfFileRevisionCustomField', partial: 'custom_fields/index',
|
||||
label: :dmsf }
|
||||
|
||||
Redmine::Search.map do |search|
|
||||
search.register :dmsf_files
|
||||
search.register :dmsf_folders
|
||||
end
|
||||
|
||||
Redmine::Activity.register :dmsf_file_revision_accesses, :default => false
|
||||
Redmine::Activity.register :dmsf_file_revision_accesses, default: false
|
||||
Redmine::Activity.register :dmsf_file_revisions
|
||||
|
||||
# Uncomment to remove the original Documents from searching and project's modules (replaced with DMSF)
|
||||
|
||||
@ -25,15 +25,13 @@ class DmsfController < ApplicationController
|
||||
include RedmineDmsf::DmsfZip
|
||||
|
||||
before_action :find_project
|
||||
before_action :authorize, :except => [:expand_folder, :exp_folder]
|
||||
before_action :find_folder, :except => [:new, :create, :edit_root, :save_root, :add_email, :append_email,
|
||||
before_action :authorize, except: [:expand_folder]
|
||||
before_action :find_folder, except: [:new, :create, :edit_root, :save_root, :add_email, :append_email,
|
||||
:autocomplete_for_user]
|
||||
before_action :find_parent, :only => [:new, :create]
|
||||
before_action :tree_view, :only => [:delete, :show]
|
||||
before_action :find_parent, only: [:new, :create]
|
||||
before_action :permissions
|
||||
|
||||
# also try to lookup folder by title if this is API call
|
||||
before_action :find_folder_by_title, :only => [:show], :if => :api_request?
|
||||
before_action :find_folder_by_title, only: [:show]
|
||||
|
||||
accept_api_auth :show, :create, :save, :delete
|
||||
|
||||
@ -48,16 +46,6 @@ class DmsfController < ApplicationController
|
||||
end
|
||||
|
||||
def expand_folder
|
||||
@tree_view = true
|
||||
get_display_params
|
||||
@idnt = params[:idnt].present? ? params[:idnt].to_i + 1 : 0
|
||||
@pos = params[:pos].present? ? params[:pos].to_f : 0.0
|
||||
respond_to do |format|
|
||||
format.js { render :action => 'dmsf_rows' }
|
||||
end
|
||||
end
|
||||
|
||||
def exp_folder
|
||||
@idnt = params[:idnt].present? ? params[:idnt].to_i + 1 : 0
|
||||
@query = retrieve_query(DmsfQuery, true)
|
||||
@query.dmsf_folder_id = @folder.id
|
||||
@ -89,11 +77,7 @@ class DmsfController < ApplicationController
|
||||
}
|
||||
format.api
|
||||
format.csv {
|
||||
filename = @project.name
|
||||
filename << "_#{@folder.title}" if @folder
|
||||
filename << DateTime.current.strftime('_%Y%m%d%H%M%S.csv')
|
||||
send_data(DmsfHelper.dmsf_to_csv(@folder ? @folder : @project, params[:settings][:dmsf_columns]),
|
||||
type: 'text/csv; header=present', filename: filename)
|
||||
send_data query_to_csv(@query.dmsf_nodes, @query), type: 'text/csv; header=present', filename: 'dmsf.csv'
|
||||
}
|
||||
end
|
||||
end
|
||||
@ -202,13 +186,13 @@ class DmsfController < ApplicationController
|
||||
File.delete(params[:email][:zipped_content])
|
||||
flash[:notice] = l(:notice_email_sent, params[:email][:to])
|
||||
end
|
||||
redirect_to dmsf_folder_path(:id => @project, :folder_id => @folder)
|
||||
redirect_to dmsf_folder_path(id: @project, folder_id: @folder)
|
||||
end
|
||||
|
||||
def new
|
||||
@folder = DmsfFolder.new
|
||||
@pathfolder = @parent
|
||||
render :action => 'edit'
|
||||
render action: 'edit'
|
||||
end
|
||||
|
||||
def edit
|
||||
@ -279,10 +263,10 @@ class DmsfController < ApplicationController
|
||||
end
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
if commit || @tree_view
|
||||
if commit
|
||||
redirect_to :back
|
||||
else
|
||||
redirect_to dmsf_folder_path(:id => @project, :folder_id => @folder.dmsf_folder)
|
||||
redirect_to dmsf_folder_path(id: @project, folder_id: @folder.dmsf_folder)
|
||||
end
|
||||
end
|
||||
format.api { result ? render_api_ok : render_validation_errors(@folder) }
|
||||
@ -310,7 +294,7 @@ class DmsfController < ApplicationController
|
||||
flash[:error] = @project.errors.full_messages.to_sentence
|
||||
end
|
||||
end
|
||||
redirect_to dmsf_folder_path(:id => @project)
|
||||
redirect_to dmsf_folder_path(id: @project)
|
||||
end
|
||||
|
||||
def notify_activate
|
||||
@ -405,13 +389,13 @@ class DmsfController < ApplicationController
|
||||
when 'folder'
|
||||
dmsf_folder = DmsfFolder.find_by(id: id)
|
||||
if dmsf_folder
|
||||
dmsf_folder.dmsf_folder_id = $1;
|
||||
dmsf_folder.dmsf_folder_id = $1
|
||||
result = dmsf_folder.save
|
||||
end
|
||||
when 'file-link', 'folder-link', 'url-link'
|
||||
dmsf_link = DmsfLink.find_by(id: id)
|
||||
if dmsf_link
|
||||
dmsf_link.dmsf_folder_id = $1;
|
||||
dmsf_link.dmsf_folder_id = $1
|
||||
result = dmsf_link.save
|
||||
end
|
||||
end
|
||||
@ -453,15 +437,15 @@ class DmsfController < ApplicationController
|
||||
end
|
||||
|
||||
@email_params = {
|
||||
:zipped_content => zipped_content,
|
||||
:folders => selected_folders,
|
||||
:files => selected_files,
|
||||
:subject => "#{@project.name} #{l(:label_dmsf_file_plural).downcase}",
|
||||
:from => Setting.plugin_redmine_dmsf['dmsf_documents_email_from'].presence ||
|
||||
zipped_content: zipped_content,
|
||||
folders: selected_folders,
|
||||
files: selected_files,
|
||||
subject: "#{@project.name} #{l(:label_dmsf_file_plural).downcase}",
|
||||
from: Setting.plugin_redmine_dmsf['dmsf_documents_email_from'].presence ||
|
||||
"#{User.current.name} <#{User.current.mail}>",
|
||||
:reply_to => Setting.plugin_redmine_dmsf['dmsf_documents_email_reply_to']
|
||||
reply_to: Setting.plugin_redmine_dmsf['dmsf_documents_email_reply_to']
|
||||
}
|
||||
render :action => 'email_entries'
|
||||
render action: 'email_entries'
|
||||
rescue Exception
|
||||
raise
|
||||
ensure
|
||||
@ -479,9 +463,9 @@ class DmsfController < ApplicationController
|
||||
audit.save!
|
||||
end
|
||||
send_file(zip.finish,
|
||||
:filename => filename_for_content_disposition("#{@project.name}-#{DateTime.current.strftime('%y%m%d%H%M%S')}.zip"),
|
||||
:type => 'application/zip',
|
||||
:disposition => 'attachment')
|
||||
filename: filename_for_content_disposition("#{@project.name}-#{DateTime.current.strftime('%y%m%d%H%M%S')}.zip"),
|
||||
type: 'application/zip',
|
||||
disposition: 'attachment')
|
||||
rescue StandardError
|
||||
raise
|
||||
ensure
|
||||
@ -589,7 +573,7 @@ class DmsfController < ApplicationController
|
||||
if recipients.any?
|
||||
to = recipients.collect{ |r| r.name }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ')
|
||||
to << ((recipients.count > DMSF_MAX_NOTIFICATION_RECEIVERS_INFO) ? ',...' : '.')
|
||||
flash[:warning] = l(:warning_email_notifications, :to => to)
|
||||
flash[:warning] = l(:warning_email_notifications, to: to)
|
||||
end
|
||||
end
|
||||
rescue => e
|
||||
@ -597,7 +581,8 @@ class DmsfController < ApplicationController
|
||||
end
|
||||
end
|
||||
unless not_deleted_files.empty?
|
||||
flash[:warning] = l(:warning_some_entries_were_not_deleted, :entries => not_deleted_files.map{|e| e.title}.join(', '))
|
||||
flash[:warning] = l(:warning_some_entries_were_not_deleted, entries: not_deleted_files.map{ |f| f.title }.
|
||||
join(', '))
|
||||
end
|
||||
# Links
|
||||
selected_dir_links.each do |id|
|
||||
@ -624,7 +609,7 @@ class DmsfController < ApplicationController
|
||||
end
|
||||
|
||||
def find_folder_by_title
|
||||
if !@folder && params[:folder_title].present?
|
||||
if api_request? && !@folder && params[:folder_title].present?
|
||||
@folder = DmsfFolder.find_by(title: params[:folder_title], project_id: @project.id)
|
||||
render_404 unless @folder
|
||||
end
|
||||
@ -636,11 +621,6 @@ class DmsfController < ApplicationController
|
||||
render_404
|
||||
end
|
||||
|
||||
def tree_view
|
||||
tag = params[:custom_field_id].present? && params[:custom_value].present?
|
||||
@tree_view = (User.current.pref.dmsf_tree_view == '1') && (!%w(atom xml json).include?(params[:format])) && !tag
|
||||
end
|
||||
|
||||
def copy_folder(folder)
|
||||
copy = folder.clone
|
||||
copy.id = folder.id
|
||||
|
||||
@ -24,10 +24,9 @@ class DmsfFilesController < ApplicationController
|
||||
|
||||
menu_item :dmsf
|
||||
|
||||
before_action :find_file, :except => [:delete_revision, :obsolete_revision]
|
||||
before_action :find_revision, :only => [:delete_revision, :obsolete_revision]
|
||||
before_action :find_file, except: [:delete_revision, :obsolete_revision]
|
||||
before_action :find_revision, only: [:delete_revision, :obsolete_revision]
|
||||
before_action :authorize
|
||||
before_action :tree_view, :only => [:delete]
|
||||
before_action :permissions
|
||||
|
||||
accept_api_auth :show, :view, :delete
|
||||
@ -70,9 +69,9 @@ class DmsfFilesController < ApplicationController
|
||||
# IE has got a tendency to cache files
|
||||
expires_in(0.year, 'must-revalidate' => true)
|
||||
send_file(@revision.disk_file,
|
||||
:filename => filename_for_content_disposition(@revision.formatted_name(title_format)),
|
||||
:type => @revision.detect_content_type,
|
||||
:disposition => @revision.dmsf_file.disposition)
|
||||
filename: filename_for_content_disposition(@revision.formatted_name(title_format)),
|
||||
type: @revision.detect_content_type,
|
||||
disposition: @revision.dmsf_file.disposition)
|
||||
rescue DmsfAccessError => e
|
||||
Rails.logger.error e.message
|
||||
render_403
|
||||
@ -94,7 +93,7 @@ class DmsfFilesController < ApplicationController
|
||||
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
render :layout => !request.xhr?
|
||||
render layout: !request.xhr?
|
||||
}
|
||||
format.api
|
||||
end
|
||||
@ -186,7 +185,7 @@ class DmsfFilesController < ApplicationController
|
||||
if recipients.any?
|
||||
to = recipients.collect{ |r| r.name }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ')
|
||||
to << ((recipients.count > DMSF_MAX_NOTIFICATION_RECEIVERS_INFO) ? ',...' : '.')
|
||||
flash[:warning] = l(:warning_email_notifications, :to => to)
|
||||
flash[:warning] = l(:warning_email_notifications, to: to)
|
||||
end
|
||||
end
|
||||
rescue => e
|
||||
@ -216,7 +215,7 @@ class DmsfFilesController < ApplicationController
|
||||
if recipients.any?
|
||||
to = recipients.collect{ |r| r.name }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ')
|
||||
to << ((recipients.count > DMSF_MAX_NOTIFICATION_RECEIVERS_INFO) ? ',...' : '.')
|
||||
flash[:warning] = l(:warning_email_notifications, :to => to)
|
||||
flash[:warning] = l(:warning_email_notifications, to: to)
|
||||
end
|
||||
end
|
||||
rescue => e
|
||||
@ -231,11 +230,7 @@ class DmsfFilesController < ApplicationController
|
||||
end
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
if commit || (@tree_view && params[:details].blank?)
|
||||
redirect_to :back
|
||||
else
|
||||
redirect_to dmsf_folder_path(:id => @project, :folder_id => @file.dmsf_folder)
|
||||
end
|
||||
redirect_to dmsf_folder_path(id: @project, folder_id: @file.dmsf_folder)
|
||||
end
|
||||
format.api { result ? render_api_ok : render_validation_errors(@file) }
|
||||
end
|
||||
@ -332,9 +327,9 @@ class DmsfFilesController < ApplicationController
|
||||
if @file.image? && tbnail = @file.thumbnail(:size => params[:size])
|
||||
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'
|
||||
filename: filename_for_content_disposition(@file.last_revision.disk_file),
|
||||
type: @file.last_revision.detect_content_type,
|
||||
disposition: 'inline'
|
||||
end
|
||||
else
|
||||
head 404
|
||||
@ -364,9 +359,4 @@ class DmsfFilesController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def tree_view
|
||||
tag = params[:custom_field_id].present? && params[:custom_value].present?
|
||||
@tree_view = (User.current.pref.dmsf_tree_view == '1') && (!%w(atom xml json).include?(params[:format])) && !tag
|
||||
end
|
||||
|
||||
end
|
||||
@ -27,21 +27,20 @@ class DmsfFilesCopyController < ApplicationController
|
||||
before_action :find_file
|
||||
before_action :authorize
|
||||
before_action :find_target_folder
|
||||
before_action :check_target_folder, :only => [:copy, :move]
|
||||
before_action :check_target_folder, only: [:copy, :move]
|
||||
|
||||
def new
|
||||
@projects = DmsfFile.allowed_target_projects_on_copy
|
||||
@folders = DmsfFolder.directory_tree(@target_project, @folder)
|
||||
@target_folder = DmsfFolder.visible.find(params[:target_folder_id]) unless params[:target_folder_id].blank?
|
||||
render :layout => !request.xhr?
|
||||
render layout: !request.xhr?
|
||||
end
|
||||
|
||||
def copy
|
||||
new_file = @file.copy_to(@target_project, @target_folder)
|
||||
unless new_file.errors.empty?
|
||||
flash[:error] = new_file.errors.full_messages.to_sentence
|
||||
redirect_to :action => 'new', :id => @file, :target_project_id => @target_project,
|
||||
:target_folder_id => @target_folder
|
||||
redirect_to action: 'new', id: @file, target_project_id: @target_project, target_folder_id: @target_folder
|
||||
return
|
||||
end
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
@ -51,8 +50,7 @@ class DmsfFilesCopyController < ApplicationController
|
||||
def move
|
||||
unless @file.move_to(@target_project, @target_folder)
|
||||
flash[:error] = @file.errors.full_messages.to_sentence
|
||||
redirect_to :action => 'new', :id => @file, :target_project_id => @target_project,
|
||||
:target_folder_id => @target_folder
|
||||
redirect_to action: 'new', id: @file, target_project_id: @target_project, target_folder_id: @target_folder
|
||||
return
|
||||
end
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
@ -93,8 +91,7 @@ private
|
||||
if (@target_folder && @target_folder == @file.dmsf_folder) ||
|
||||
(@target_folder.nil? && @file.dmsf_folder.nil? && @target_project == @file.project)
|
||||
flash[:error] = l(:error_target_folder_same)
|
||||
redirect_to :action => :new, :id => @file, :target_project_id => @target_project.id,
|
||||
:target_folder_id => @target_folder
|
||||
redirect_to action: :new, id: @file, target_project_id: @target_project.id, target_folder_id: @target_folder
|
||||
return
|
||||
end
|
||||
if (@target_folder && (@target_folder.locked_for_user? || !DmsfFolder.permissions?(@target_folder, false))) ||
|
||||
|
||||
@ -27,25 +27,24 @@ class DmsfFoldersCopyController < ApplicationController
|
||||
before_action :find_folder
|
||||
before_action :authorize
|
||||
before_action :find_target_folder
|
||||
before_action :check_target_folder, :only => [:copy, :move]
|
||||
before_action :check_target_folder, only: [:copy, :move]
|
||||
|
||||
def new
|
||||
@projects = DmsfFolder.allowed_target_projects_on_copy
|
||||
@folders = DmsfFolder.directory_tree(@target_project, @folder)
|
||||
@target_folder = DmsfFolder.visible.find(params[:target_folder_id]) unless params[:target_folder_id].blank?
|
||||
render :layout => !request.xhr?
|
||||
render layout: !request.xhr?
|
||||
end
|
||||
|
||||
def copy
|
||||
new_folder = @folder.copy_to(@target_project, @target_folder)
|
||||
unless new_folder.errors.empty?
|
||||
flash[:error] = new_folder.errors.full_messages.to_sentence
|
||||
redirect_to :action => 'new', :id => @folder, :target_project_id => @target_project,
|
||||
:target_folder_id => @target_folder
|
||||
redirect_to action: 'new', id: @folder, target_project_id: @target_project, target_folder_id: @target_folder
|
||||
return
|
||||
end
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
redirect_to dmsf_folder_path(:id => @target_project, :folder_id => new_folder)
|
||||
redirect_to dmsf_folder_path(id: @target_project, folder_id: new_folder)
|
||||
end
|
||||
|
||||
def move
|
||||
@ -53,11 +52,10 @@ class DmsfFoldersCopyController < ApplicationController
|
||||
@folder.dmsf_folder = @target_folder
|
||||
if @folder.save
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
redirect_to dmsf_folder_path(:id => @target_project, :folder_id => @folder)
|
||||
redirect_to dmsf_folder_path(id: @target_project, folder_id: @folder)
|
||||
else
|
||||
flash[:error] = @folder.errors.full_messages.to_sentence
|
||||
redirect_to :action => 'new', :id => @folder, :target_project_id => @target_project,
|
||||
:target_folder_id => @target_folder
|
||||
redirect_to action: 'new', id: @folder, target_project_id: @target_project, target_folder_id: @target_folder
|
||||
end
|
||||
end
|
||||
|
||||
@ -95,8 +93,7 @@ class DmsfFoldersCopyController < ApplicationController
|
||||
if (@target_folder && @target_folder == @folder.dmsf_folder) ||
|
||||
(@target_folder.nil? && @folder.dmsf_folder.nil? && @target_project == @folder.project)
|
||||
flash[:error] = l(:error_target_folder_same)
|
||||
redirect_to :action => :new, :id => @folder, :target_project_id => @target_project.id,
|
||||
:target_folder_id => @target_folder
|
||||
redirect_to action: :new, id: @folder, target_project_id: @target_project.id, target_folder_id: @target_folder
|
||||
return
|
||||
end
|
||||
if (@target_folder && (@target_folder.locked_for_user? || !DmsfFolder.permissions?(@target_folder, false))) ||
|
||||
|
||||
@ -23,7 +23,7 @@ class DmsfLinksController < ApplicationController
|
||||
|
||||
model_object DmsfLink
|
||||
|
||||
before_action :find_model_object, :only => [:destroy, :restore]
|
||||
before_action :find_model_object, only: [:destroy, :restore]
|
||||
before_action :find_link_project
|
||||
before_action :authorize
|
||||
before_action :permissions
|
||||
@ -150,12 +150,12 @@ class DmsfLinksController < ApplicationController
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
if params[:dmsf_link][:type] == 'link_from'
|
||||
redirect_to dmsf_folder_path(:id => @project.id, :folder_id => @dmsf_link.dmsf_folder_id)
|
||||
redirect_to dmsf_folder_path(id: @project.id, folder_id: @dmsf_link.dmsf_folder_id)
|
||||
else
|
||||
if params[:dmsf_link][:dmsf_file_id].present?
|
||||
redirect_to dmsf_file_path(@dmsf_link.target_file)
|
||||
else
|
||||
redirect_to edit_dmsf_path(:id => params[:dmsf_link][:project_id], :folder_id => params[:dmsf_link][:dmsf_folder_id])
|
||||
redirect_to edit_dmsf_path(id: params[:dmsf_link][:project_id], folder_id: params[:dmsf_link][:dmsf_folder_id])
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
@ -22,8 +22,8 @@
|
||||
class DmsfPublicUrlsController < ApplicationController
|
||||
|
||||
model_object DmsfPublicUrl
|
||||
before_action :authorize, :only => [:create]
|
||||
skip_before_action :check_if_login_required, :only => [:show]
|
||||
before_action :authorize, only: [:create]
|
||||
skip_before_action :check_if_login_required, only: [:show]
|
||||
|
||||
def show
|
||||
dmsf_public_url = DmsfPublicUrl.where('token = ? AND expire_at >= ?', params[:token], DateTime.current).first
|
||||
@ -31,11 +31,11 @@ class DmsfPublicUrlsController < ApplicationController
|
||||
revision = dmsf_public_url.dmsf_file.last_revision
|
||||
begin
|
||||
# IE has got a tendency to cache files
|
||||
expires_in(0.year, "must-revalidate" => true)
|
||||
expires_in(0.year, 'must-revalidate' => true)
|
||||
send_file(revision.disk_file,
|
||||
:filename => filename_for_content_disposition(revision.name),
|
||||
:type => revision.detect_content_type,
|
||||
:disposition => dmsf_public_url.dmsf_file.disposition)
|
||||
filename: filename_for_content_disposition(revision.name),
|
||||
type: revision.detect_content_type,
|
||||
disposition: dmsf_public_url.dmsf_file.disposition)
|
||||
rescue => e
|
||||
Rails.logger.error e.message
|
||||
render_404
|
||||
|
||||
@ -44,7 +44,7 @@ class DmsfStateController < ApplicationController
|
||||
if Setting.plugin_redmine_dmsf['dmsf_act_as_attachable']
|
||||
@project.update_attribute :dmsf_act_as_attachable, params[:act_as_attachable]
|
||||
end
|
||||
redirect_to settings_project_path(@project, :tab => 'dmsf')
|
||||
redirect_to settings_project_path(@project, tab: 'dmsf')
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@ -24,11 +24,13 @@ class DmsfUploadController < ApplicationController
|
||||
|
||||
menu_item :dmsf
|
||||
|
||||
before_action :find_project, :except => [:upload, :delete_dmsf_attachment, :delete_dmsf_link_attachment]
|
||||
before_action :authorize, :except => [:upload, :delete_dmsf_attachment, :delete_dmsf_link_attachment]
|
||||
before_action :authorize_global, :only => [:upload, :delete_dmsf_attachment, :delete_dmsf_link_attachment]
|
||||
before_action :find_folder, :except => [:upload_file, :upload, :commit, :delete_dmsf_attachment, :delete_dmsf_link_attachment]
|
||||
before_action :permissions, :except => [:upload_file, :upload, :commit, :delete_dmsf_attachment, :delete_dmsf_link_attachment]
|
||||
before_action :find_project, except: [:upload, :delete_dmsf_attachment, :delete_dmsf_link_attachment]
|
||||
before_action :authorize, except: [:upload, :delete_dmsf_attachment, :delete_dmsf_link_attachment]
|
||||
before_action :authorize_global, only: [:upload, :delete_dmsf_attachment, :delete_dmsf_link_attachment]
|
||||
before_action :find_folder, except: [:upload_file, :upload, :commit, :delete_dmsf_attachment,
|
||||
:delete_dmsf_link_attachment]
|
||||
before_action :permissions, except: [:upload_file, :upload, :commit, :delete_dmsf_attachment,
|
||||
:delete_dmsf_link_attachment]
|
||||
|
||||
helper :all
|
||||
helper :dmsf_workflows
|
||||
@ -49,14 +51,6 @@ class DmsfUploadController < ApplicationController
|
||||
upload = DmsfUpload.create_from_uploaded_attachment(@project, @folder, uploaded_file)
|
||||
@uploads.push(upload) if upload
|
||||
end
|
||||
else
|
||||
# plupload multi upload completed
|
||||
uploaded = params[:uploaded]
|
||||
if uploaded
|
||||
uploaded.each do |_, uploaded_file|
|
||||
@uploads.push(DmsfUpload.new(@project, @folder, uploaded_file))
|
||||
end
|
||||
end
|
||||
end
|
||||
if @uploads.empty?
|
||||
flash.now[:error] = l(:label_attachment) + ' ' + l('activerecord.errors.messages.invalid')
|
||||
@ -81,7 +75,7 @@ class DmsfUploadController < ApplicationController
|
||||
f.write(@tempfile)
|
||||
end
|
||||
end
|
||||
render :layout => false
|
||||
render layout: false
|
||||
end
|
||||
|
||||
# REST API and Redmine attachment form
|
||||
@ -91,7 +85,7 @@ class DmsfUploadController < ApplicationController
|
||||
return
|
||||
end
|
||||
|
||||
@attachment = Attachment.new(:file => request.raw_post)
|
||||
@attachment = Attachment.new(file: request.raw_post)
|
||||
@attachment.author = User.current
|
||||
@attachment.filename = params[:filename].presence || Redmine::Utils.random_hex(16)
|
||||
@attachment.content_type = params[:content_type].presence
|
||||
@ -101,7 +95,7 @@ class DmsfUploadController < ApplicationController
|
||||
format.js
|
||||
format.api {
|
||||
if saved
|
||||
render :action => 'upload', :status => :created
|
||||
render action: 'upload', status: :created
|
||||
else
|
||||
render_validation_errors(@attachment)
|
||||
end
|
||||
@ -154,7 +148,7 @@ class DmsfUploadController < ApplicationController
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.api { render_validation_errors(failed_uploads) unless failed_uploads.empty? }
|
||||
format.html { redirect_to dmsf_folder_path(:id => @project, :folder_id => @folder) }
|
||||
format.html { redirect_to dmsf_folder_path(id: @project, folder_id: @folder) }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -23,11 +23,11 @@ class DmsfWorkflowsController < ApplicationController
|
||||
|
||||
model_object DmsfWorkflow
|
||||
|
||||
before_action :find_model_object, :except => [:create, :new, :index, :assign, :assignment]
|
||||
before_action :find_model_object, except: [:create, :new, :index, :assign, :assignment]
|
||||
before_action :find_project
|
||||
before_action :authorize_custom
|
||||
before_action :permissions, :only => [:new_action, :assignment, :start]
|
||||
before_action :approver_candidates, :only => [:remove_step, :show, :reorder_steps, :add_step]
|
||||
before_action :permissions, only: [:new_action, :assignment, :start]
|
||||
before_action :approver_candidates, only: [:remove_step, :show, :reorder_steps, :add_step]
|
||||
|
||||
layout :workflows_layout
|
||||
|
||||
@ -47,7 +47,7 @@ class DmsfWorkflowsController < ApplicationController
|
||||
|
||||
def index
|
||||
@status = params[:status] || 1
|
||||
@workflow_pages, @workflows = paginate DmsfWorkflow.status(@status).global.sorted, :per_page => 25
|
||||
@workflow_pages, @workflows = paginate DmsfWorkflow.status(@status).global.sorted, per_page: 25
|
||||
end
|
||||
|
||||
def action
|
||||
@ -56,9 +56,9 @@ class DmsfWorkflowsController < ApplicationController
|
||||
def new_action
|
||||
if params[:commit] == l(:button_submit)
|
||||
action = DmsfWorkflowStepAction.new(
|
||||
:dmsf_workflow_step_assignment_id => params[:dmsf_workflow_step_assignment_id],
|
||||
:action => (params[:step_action].to_i >= 10) ? DmsfWorkflowStepAction::ACTION_DELEGATE : params[:step_action],
|
||||
:note => params[:note])
|
||||
dmsf_workflow_step_assignment_id: params[:dmsf_workflow_step_assignment_id],
|
||||
action: (params[:step_action].to_i >= 10) ? DmsfWorkflowStepAction::ACTION_DELEGATE : params[:step_action],
|
||||
note: params[:note])
|
||||
if request.post?
|
||||
if action.save
|
||||
revision = DmsfFileRevision.find_by(id: params[:dmsf_file_revision_id])
|
||||
@ -85,7 +85,7 @@ class DmsfWorkflowsController < ApplicationController
|
||||
unless recipients.blank?
|
||||
to = recipients.collect{ |r| r.name }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ')
|
||||
to << ((recipients.count > DMSF_MAX_NOTIFICATION_RECEIVERS_INFO) ? ',...' : '.')
|
||||
flash[:warning] = l(:warning_email_notifications, :to => to)
|
||||
flash[:warning] = l(:warning_email_notifications, to: to)
|
||||
end
|
||||
end
|
||||
else
|
||||
@ -106,7 +106,7 @@ class DmsfWorkflowsController < ApplicationController
|
||||
unless recipients.blank?
|
||||
to = recipients.collect{ |r| r.name }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ')
|
||||
to << ((recipients.count > DMSF_MAX_NOTIFICATION_RECEIVERS_INFO) ? ',...' : '.')
|
||||
flash[:warning] = l(:warning_email_notifications, :to => to)
|
||||
flash[:warning] = l(:warning_email_notifications, to: to)
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -124,7 +124,7 @@ class DmsfWorkflowsController < ApplicationController
|
||||
:text_email_to_proceed,
|
||||
action.note)
|
||||
if Setting.plugin_redmine_dmsf['dmsf_display_notified_recipients']
|
||||
flash[:warning] = l(:warning_email_notifications, :to => delegate.name)
|
||||
flash[:warning] = l(:warning_email_notifications, to: delegate.name)
|
||||
end
|
||||
end
|
||||
else
|
||||
@ -162,7 +162,7 @@ class DmsfWorkflowsController < ApplicationController
|
||||
unless recipients.empty?
|
||||
to = recipients.collect{ |r| r.name }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ')
|
||||
to << ((recipients.count > DMSF_MAX_NOTIFICATION_RECEIVERS_INFO) ? ',...' : '.')
|
||||
flash[:warning] = l(:warning_email_notifications, :to => to)
|
||||
flash[:warning] = l(:warning_email_notifications, to: to)
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -266,7 +266,7 @@ class DmsfWorkflowsController < ApplicationController
|
||||
@dmsf_workflow.name = names.first
|
||||
end
|
||||
|
||||
render :layout => !request.xhr?
|
||||
render layout: !request.xhr?
|
||||
end
|
||||
|
||||
def create
|
||||
@ -285,19 +285,19 @@ class DmsfWorkflowsController < ApplicationController
|
||||
if request.post? && @dmsf_workflow && @dmsf_workflow.valid?
|
||||
flash[:notice] = l(:notice_successful_create)
|
||||
if @project
|
||||
redirect_to settings_project_path(@project, :tab => 'dmsf_workflow')
|
||||
redirect_to settings_project_path(@project, tab: 'dmsf_workflow')
|
||||
else
|
||||
redirect_to dmsf_workflows_path
|
||||
end
|
||||
else
|
||||
render :action => 'new'
|
||||
render action: 'new'
|
||||
end
|
||||
end
|
||||
|
||||
def update
|
||||
if params[:dmsf_workflow]
|
||||
res = @dmsf_workflow.update_attributes({:name => params[:dmsf_workflow][:name]}) if params[:dmsf_workflow][:name].present?
|
||||
res = @dmsf_workflow.update_attributes({:status => params[:dmsf_workflow][:status]}) if params[:dmsf_workflow][:status].present?
|
||||
res = @dmsf_workflow.update_attributes({ name: params[:dmsf_workflow][:name] }) if params[:dmsf_workflow][:name].present?
|
||||
res = @dmsf_workflow.update_attributes({ status: params[:dmsf_workflow][:status] }) if params[:dmsf_workflow][:status].present?
|
||||
if res
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
if @project
|
||||
|
||||
@ -77,103 +77,8 @@ module DmsfHelper
|
||||
File.join('/plugin_assets', plugin.to_s, asset_type, source)
|
||||
end
|
||||
|
||||
def json_url
|
||||
locale = I18n.locale || 'en'
|
||||
ret = File.join('jquery.dataTables', 'locales', "#{locale}.json")
|
||||
path = File.join('public', plugin_asset_path(:redmine_dmsf, 'javascripts', ret))
|
||||
unless File.exist?(path)
|
||||
Rails.logger.warn "#{path} not found"
|
||||
ret = File.join('jquery.dataTables', 'locales', 'en.json')
|
||||
end
|
||||
ret
|
||||
end
|
||||
|
||||
def js_url
|
||||
locale = I18n.locale || 'en'
|
||||
ret = File.join('plupload', 'js', 'i18n', "#{locale}.js")
|
||||
path = File.join('public', plugin_asset_path(:redmine_dmsf, 'javascripts', ret))
|
||||
unless File.exist?(path)
|
||||
Rails.logger.warn "#{path} not found"
|
||||
ret = File.join('plupload', 'js', 'i18n', 'en.js')
|
||||
end
|
||||
ret
|
||||
end
|
||||
|
||||
def all_children_sorted(parent, pos, ident)
|
||||
# Folders && files && links
|
||||
nodes = DmsfFolder::visible_folders(parent.dmsf_folders.visible.to_a, parent.is_a?(Project) ? parent : parent.project) +
|
||||
parent.dmsf_links.visible + parent.dmsf_files.visible
|
||||
# Alphabetical and type sort
|
||||
nodes.sort! do |x, y|
|
||||
if (x.is_a?(DmsfFolder) || (x.is_a?(DmsfLink) && x.is_folder?)) &&
|
||||
(y.is_a?(DmsfFile) || (y.is_a?(DmsfLink) && y.is_file?))
|
||||
-1
|
||||
elsif (x.is_a?(DmsfFile) || (x.is_a?(DmsfLink) && x.is_file?)) &&
|
||||
(y.is_a?(DmsfFolder) || (y.is_a?(DmsfLink) && y.is_folder?))
|
||||
1
|
||||
else
|
||||
clear_title(x.title) <=> clear_title(y.title)
|
||||
end
|
||||
end
|
||||
# Calculate position
|
||||
ident = 0 unless ident
|
||||
pos = (10 ** 12) unless pos
|
||||
step = (10 ** 12) / (10 ** (ident * 3))
|
||||
tree = []
|
||||
i = 0
|
||||
nodes.each do |x|
|
||||
if x.is_a?(DmsfFolder) || (x.is_a?(DmsfLink) && x.is_folder?)
|
||||
i += 1
|
||||
tree << [x, pos + (step * i)]
|
||||
else
|
||||
tree << [x, pos + (step * (i + 1))]
|
||||
end
|
||||
end
|
||||
tree
|
||||
end
|
||||
|
||||
def self.dmsf_to_csv(parent, columns)
|
||||
CSV.generate(:force_quotes => true, :encoding => 'UTF-8') do |csv|
|
||||
# Header
|
||||
csv << columns.map { |c| c.capitalize }
|
||||
# Lines
|
||||
DmsfHelper.object_to_csv(csv, parent, columns)
|
||||
end
|
||||
end
|
||||
|
||||
def self.object_to_csv(csv, parent, columns, level = -1)
|
||||
# Folder
|
||||
if level >= 0
|
||||
csv << parent.to_csv(columns, level)
|
||||
end
|
||||
# Sub-folders
|
||||
folders = parent.dmsf_folders.visible.to_a
|
||||
folders.concat(parent.folder_links.visible.to_a.map{ |l| l.folder })
|
||||
folders.compact!
|
||||
folders.sort!{ |x, y| x.title <=> y.title}
|
||||
folders.each do |f|
|
||||
DmsfHelper.object_to_csv(csv, f, columns, level + 1)
|
||||
end
|
||||
# Files
|
||||
files = parent.dmsf_files.visible.to_a
|
||||
files.concat(parent.file_links.visible.to_a.map{ |l| l.target_file })
|
||||
files.concat(parent.url_links.visible.to_a)
|
||||
files.compact!
|
||||
files.sort!{ |x, y| x.title <=> y.title}
|
||||
files.each do |file_or_link|
|
||||
csv << file_or_link.to_csv(columns, level + 1)
|
||||
end
|
||||
end
|
||||
|
||||
def render_principals_for_new_email(users)
|
||||
principals_check_box_tags 'user_ids[]', users
|
||||
end
|
||||
|
||||
# Replace specifics characters with their ASCII version + 'z' in order to fix the wrong ordering
|
||||
# e.g. 'č' -> 'cz'
|
||||
def clear_title(title)
|
||||
str = title.gsub(/[ěščřýáíéůúďťňĚŠČŘÝÁÍÉÚŮĎŤŇ]/) { |c| c + 'z' }
|
||||
str.tr('ěščřýáíéůúďťňĚŠČŘÝÁÍÉÚŮĎŤŇ', 'escryaieuudtnESCRYAIEUUDTN').downcase
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@ -24,7 +24,7 @@ module DmsfLinksHelper
|
||||
def folder_tree_options_for_select(folder_tree, options = {})
|
||||
s = +''
|
||||
folder_tree.each do |name, id|
|
||||
tag_options = {:value => id}
|
||||
tag_options = { value: id }
|
||||
if id == options[:selected]
|
||||
tag_options[:selected] = 'selected'
|
||||
else
|
||||
|
||||
@ -148,7 +148,7 @@ module DmsfUploadHelper
|
||||
unless recipients.empty?
|
||||
to = recipients.collect{ |r| r.name }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ')
|
||||
to << ((recipients.count > DMSF_MAX_NOTIFICATION_RECEIVERS_INFO) ? ',...' : '.')
|
||||
controller.flash[:warning] = l(:warning_email_notifications, :to => to) if controller
|
||||
controller.flash[:warning] = l(:warning_email_notifications, to: to) if controller
|
||||
end
|
||||
end
|
||||
rescue => e
|
||||
|
||||
@ -30,22 +30,22 @@ module DmsfWorkflowsHelper
|
||||
# Delegation
|
||||
if dmsf_workflow_step_assignment_id
|
||||
s = content_tag('div',
|
||||
content_tag('div', principals_radio_button_tags('step_action', principals), :id => 'users_for_delegate'),
|
||||
:class => 'objects-selection')
|
||||
content_tag('div', principals_radio_button_tags('step_action', principals), id: 'users_for_delegate'),
|
||||
class: 'objects-selection')
|
||||
# New step
|
||||
else
|
||||
s = content_tag('div',
|
||||
content_tag('div', principals_check_box_tags('user_ids[]', principals), :id => 'users'),
|
||||
:class => 'objects-selection')
|
||||
content_tag('div', principals_check_box_tags('user_ids[]', principals), id: 'users'),
|
||||
class: 'objects-selection')
|
||||
end
|
||||
|
||||
links = pagination_links_full(principal_pages, principal_count, :per_page_links => false) do |text, parameters, options|
|
||||
links = pagination_links_full(principal_pages, principal_count, per_page_links: false) do |text, parameters, options|
|
||||
link_to text,
|
||||
autocomplete_for_user_dmsf_workflow_path(workflow, parameters.merge(:q => params[:q], :format => 'js')),
|
||||
autocomplete_for_user_dmsf_workflow_path(workflow, parameters.merge(q: params[:q], format: 'js')),
|
||||
remote: true
|
||||
end
|
||||
|
||||
s + content_tag('span', links, :class => 'pagination')
|
||||
s + content_tag('span', links, class: 'pagination')
|
||||
end
|
||||
|
||||
def dmsf_workflow_steps_options_for_select(steps)
|
||||
@ -67,7 +67,7 @@ module DmsfWorkflowsHelper
|
||||
options << ["#{wf.name} #{l(:note_global)}", wf.id]
|
||||
end
|
||||
end
|
||||
options_for_select(options, :selected => dmsf_workflow_id)
|
||||
options_for_select(options, selected: dmsf_workflow_id)
|
||||
end
|
||||
|
||||
def dmsf_all_workflows_for_select(dmsf_workflow_id)
|
||||
@ -89,7 +89,7 @@ module DmsfWorkflowsHelper
|
||||
options << ["#{wf.name} #{l(:note_global)}", wf.id]
|
||||
end
|
||||
end
|
||||
options_for_select(options, :selected => dmsf_workflow_id)
|
||||
options_for_select(options, selected: dmsf_workflow_id)
|
||||
end
|
||||
|
||||
def principals_radio_button_tags(name, principals)
|
||||
|
||||
@ -39,12 +39,12 @@ class DmsfFile < ActiveRecord::Base
|
||||
belongs_to :deleted_by_user, :class_name => 'User', :foreign_key => 'deleted_by_user_id'
|
||||
|
||||
has_many :dmsf_file_revisions, -> { order(created_at: :desc, id: :desc) },
|
||||
:dependent => :destroy
|
||||
dependent: :destroy
|
||||
has_many :locks, -> { where(entity_type: 0).order(updated_at: :desc) },
|
||||
:class_name => 'DmsfLock', :foreign_key => 'entity_id', :dependent => :destroy
|
||||
class_name: 'DmsfLock', foreign_key: 'entity_id', :dependent => :destroy
|
||||
has_many :referenced_links, -> { where target_type: DmsfFile.model_name.to_s},
|
||||
:class_name => 'DmsfLink', :foreign_key => 'target_id', :dependent => :destroy
|
||||
has_many :dmsf_public_urls, :dependent => :destroy
|
||||
class_name: 'DmsfLink', foreign_key: 'target_id', dependent: :destroy
|
||||
has_many :dmsf_public_urls, dependent: :destroy
|
||||
|
||||
STATUS_DELETED = 1
|
||||
STATUS_ACTIVE = 0
|
||||
@ -54,11 +54,11 @@ class DmsfFile < ActiveRecord::Base
|
||||
|
||||
validates :name, presence: true, dmsf_file_name: true
|
||||
validates :project, presence: true
|
||||
validates_uniqueness_of :name, :scope => [:dmsf_folder_id, :project_id, :deleted],
|
||||
validates_uniqueness_of :name, scope: [:dmsf_folder_id, :project_id, :deleted],
|
||||
conditions: -> { where(deleted: STATUS_ACTIVE) }
|
||||
|
||||
acts_as_event :title => Proc.new { |o| o.name },
|
||||
:description => Proc.new { |o|
|
||||
acts_as_event title: Proc.new { |o| o.name },
|
||||
description: Proc.new { |o|
|
||||
desc = Redmine::Search.cache_store.fetch("DmsfFile-#{o.id}")
|
||||
if desc
|
||||
Redmine::Search.cache_store.delete("DmsfFile-#{o.id}")
|
||||
@ -70,13 +70,13 @@ class DmsfFile < ActiveRecord::Base
|
||||
end
|
||||
desc
|
||||
},
|
||||
:url => Proc.new { |o| {:controller => 'dmsf_files', :action => 'view', :id => o} },
|
||||
:datetime => Proc.new { |o| o.updated_at },
|
||||
:author => Proc.new { |o| o.last_revision.user }
|
||||
url: Proc.new { |o| { controller: 'dmsf_files', action: 'view', id: o } },
|
||||
datetime: Proc.new { |o| o.updated_at },
|
||||
author: Proc.new { |o| o.last_revision.user }
|
||||
|
||||
acts_as_searchable :columns => ["#{table_name}.name", "#{DmsfFileRevision.table_name}.title", "#{DmsfFileRevision.table_name}.description", "#{DmsfFileRevision.table_name}.comment"],
|
||||
:project_key => 'project_id',
|
||||
:date_column => "#{table_name}.updated_at"
|
||||
acts_as_searchable columns: ["#{table_name}.name", "#{DmsfFileRevision.table_name}.title", "#{DmsfFileRevision.table_name}.description", "#{DmsfFileRevision.table_name}.comment"],
|
||||
project_key: 'project_id',
|
||||
date_column: "#{table_name}.updated_at"
|
||||
|
||||
before_create :default_values
|
||||
|
||||
@ -132,7 +132,7 @@ class DmsfFile < ActiveRecord::Base
|
||||
if locked_for_user? && (!User.current.allowed_to?(:force_file_unlock, project))
|
||||
Rails.logger.info l(:error_file_is_locked)
|
||||
if lock.reverse[0].user
|
||||
errors[:base] << l(:title_locked_by_user, :user => lock.reverse[0].user)
|
||||
errors[:base] << l(:title_locked_by_user, user: lock.reverse[0].user)
|
||||
else
|
||||
errors[:base] << l(:error_file_is_locked)
|
||||
end
|
||||
@ -284,7 +284,7 @@ class DmsfFile < ActiveRecord::Base
|
||||
if File.exist? last_revision.disk_file
|
||||
FileUtils.cp last_revision.disk_file, new_revision.disk_file(false)
|
||||
end
|
||||
new_revision.comment = l(:comment_copied_from, :source => "#{project.identifier}: #{dmsf_path_str}")
|
||||
new_revision.comment = l(:comment_copied_from, source: "#{project.identifier}: #{dmsf_path_str}")
|
||||
new_revision.custom_values = []
|
||||
last_revision.custom_values.each do |cv|
|
||||
v = CustomValue.new
|
||||
@ -575,7 +575,7 @@ class DmsfFile < ActiveRecord::Base
|
||||
# Url
|
||||
if columns.include?(l(:label_document_url))
|
||||
default_url_options[:host] = Setting.host_name
|
||||
csv << url_for(:controller => :dmsf_files, :action => 'view', :id => id)
|
||||
csv << url_for(controller: :dmsf_files, action: 'view', id: id)
|
||||
end
|
||||
# Revision
|
||||
if columns.include?(l(:label_last_revision_id))
|
||||
@ -618,7 +618,7 @@ class DmsfFile < ActiveRecord::Base
|
||||
def get_locked_title
|
||||
if locked_for_user?
|
||||
if lock.reverse[0].user
|
||||
return l(:title_locked_by_user, :user => lock.reverse[0].user)
|
||||
return l(:title_locked_by_user, user: lock.reverse[0].user)
|
||||
else
|
||||
return l(:notice_account_unknown_email)
|
||||
end
|
||||
|
||||
@ -55,18 +55,18 @@ class DmsfFileRevision < ActiveRecord::Base
|
||||
scope :deleted, -> { where(deleted: STATUS_DELETED) }
|
||||
|
||||
acts_as_customizable
|
||||
acts_as_event :title => Proc.new {|o| (o.source_dmsf_file_revision_id.present? ? "#{l(:label_dmsf_updated)}" : "#{l(:label_created)}") +
|
||||
acts_as_event title: Proc.new {|o| (o.source_dmsf_file_revision_id.present? ? "#{l(:label_dmsf_updated)}" : "#{l(:label_created)}") +
|
||||
": #{o.dmsf_file.dmsf_path_str}"},
|
||||
:url => Proc.new {|o| {:controller => 'dmsf_files', :action => 'show', :id => o.dmsf_file}},
|
||||
:datetime => Proc.new {|o| o.updated_at },
|
||||
:description => Proc.new { |o| "#{o.description}\n#{o.comment}" },
|
||||
:author => Proc.new {|o| o.user }
|
||||
url: Proc.new { |o| { controller: 'dmsf_files', action: 'show', id: o.dmsf_file } },
|
||||
datetime: Proc.new {|o| o.updated_at },
|
||||
description: Proc.new { |o| "#{o.description}\n#{o.comment}" },
|
||||
author: Proc.new { |o| o.user }
|
||||
|
||||
acts_as_activity_provider :type => 'dmsf_file_revisions',
|
||||
:timestamp => "#{DmsfFileRevision.table_name}.updated_at",
|
||||
:author_key => "#{DmsfFileRevision.table_name}.user_id",
|
||||
:permission => :view_dmsf_file_revisions,
|
||||
:scope => DmsfFileRevision.joins(:dmsf_file).
|
||||
acts_as_activity_provider type: 'dmsf_file_revisions',
|
||||
timestamp: "#{DmsfFileRevision.table_name}.updated_at",
|
||||
author_key: "#{DmsfFileRevision.table_name}.user_id",
|
||||
permission: :view_dmsf_file_revisions,
|
||||
scope: DmsfFileRevision.joins(:dmsf_file).
|
||||
joins("JOIN #{Project.table_name} ON #{Project.table_name}.id = #{DmsfFile.table_name}.project_id").visible
|
||||
|
||||
validates :title, presence: true
|
||||
@ -93,7 +93,7 @@ class DmsfFileRevision < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def self.easy_activity_custom_project_scope(scope, options, event_type)
|
||||
scope.where(:dmsf_files => { project_id: options[:project_ids] })
|
||||
scope.where(dmsf_files: { project_id: options[:project_ids] })
|
||||
end
|
||||
|
||||
def delete(commit = false, force = true)
|
||||
@ -349,7 +349,7 @@ class DmsfFileRevision < ActiveRecord::Base
|
||||
end
|
||||
when DmsfWorkflow::STATE_APPROVED, DmsfWorkflow::STATE_REJECTED
|
||||
action = DmsfWorkflowStepAction.joins(:dmsf_workflow_step_assignment).where(
|
||||
:dmsf_workflow_step_assignments => { :dmsf_file_revision_id => id }).order(
|
||||
dmsf_workflow_step_assignments: { dmsf_file_revision_id: id }).order(
|
||||
'dmsf_workflow_step_actions.created_at').last
|
||||
tooltip << action.author.name if action
|
||||
end
|
||||
|
||||
@ -25,10 +25,9 @@ class DmsfFileRevisionAccess < ActiveRecord::Base
|
||||
belongs_to :dmsf_file_revision
|
||||
belongs_to :user
|
||||
|
||||
delegate :dmsf_file, :to => :dmsf_file_revision, :allow_nil => false
|
||||
delegate :project, :to => :dmsf_file, :allow_nil => false
|
||||
delegate :dmsf_file, to: :dmsf_file_revision, allow_nil: false
|
||||
delegate :project, to: :dmsf_file, allow_nil: false
|
||||
|
||||
# TODO: dmsf_file_revision_accesses.dmsf_file_revision_id should be a key
|
||||
scope :access_grouped, -> { select('user_id, COUNT(*) AS count, MIN(created_at) AS first_at, MAX(created_at) AS last_at').group('user_id') }
|
||||
|
||||
validates :dmsf_file_revision, presence: true
|
||||
@ -36,18 +35,18 @@ class DmsfFileRevisionAccess < ActiveRecord::Base
|
||||
DownloadAction = 0
|
||||
EmailAction = 1
|
||||
|
||||
acts_as_event :title => Proc.new {|ra| "#{l(:label_dmsf_downloaded)}: #{ra.dmsf_file.dmsf_path_str}"},
|
||||
:url => Proc.new {|ra| {:controller => 'dmsf_files', :action => 'show', :id => ra.dmsf_file}},
|
||||
:datetime => Proc.new {|ra| ra.updated_at },
|
||||
:description => Proc.new {|ra| ra.dmsf_file_revision.comment },
|
||||
:author => Proc.new {|ra| ra.user }
|
||||
acts_as_event title: Proc.new { |ra| "#{l(:label_dmsf_downloaded)}: #{ra.dmsf_file.dmsf_path_str}" },
|
||||
url: Proc.new { |ra| { controller: 'dmsf_files', action: 'show', id: ra.dmsf_file } },
|
||||
datetime: Proc.new { |ra| ra.updated_at },
|
||||
description: Proc.new { |ra| ra.dmsf_file_revision.comment },
|
||||
author: Proc.new { |ra| ra.user }
|
||||
|
||||
acts_as_activity_provider :type => 'dmsf_file_revision_accesses',
|
||||
:timestamp => "#{DmsfFileRevisionAccess.table_name}.updated_at",
|
||||
:author_key => "#{DmsfFileRevisionAccess.table_name}.user_id",
|
||||
:permission => :view_dmsf_file_revision_accesses,
|
||||
:scope => DmsfFileRevisionAccess.
|
||||
acts_as_activity_provider type: 'dmsf_file_revision_accesses',
|
||||
timestamp: "#{DmsfFileRevisionAccess.table_name}.updated_at",
|
||||
author_key: "#{DmsfFileRevisionAccess.table_name}.user_id",
|
||||
permission: :view_dmsf_file_revision_accesses,
|
||||
scope: DmsfFileRevisionAccess.
|
||||
joins(:dmsf_file_revision).joins("JOIN #{DmsfFile.table_name} ON dmsf_files.id = dmsf_file_revisions.dmsf_file_id").
|
||||
joins("JOIN #{Project.table_name} on dmsf_files.project_id = projects.id").
|
||||
where(:dmsf_files => { deleted: DmsfFile::STATUS_ACTIVE })
|
||||
where(dmsf_files: { deleted: DmsfFile::STATUS_ACTIVE })
|
||||
end
|
||||
|
||||
@ -26,23 +26,23 @@ class DmsfFolder < ActiveRecord::Base
|
||||
|
||||
belongs_to :project
|
||||
belongs_to :dmsf_folder
|
||||
belongs_to :deleted_by_user, :class_name => 'User', :foreign_key => 'deleted_by_user_id'
|
||||
belongs_to :deleted_by_user, class_name: 'User', foreign_key: 'deleted_by_user_id'
|
||||
belongs_to :user
|
||||
|
||||
has_many :dmsf_folders, -> { order :title }, :dependent => :destroy
|
||||
has_many :dmsf_files, :dependent => :destroy
|
||||
has_many :dmsf_folders, -> { order :title }, dependent: :destroy
|
||||
has_many :dmsf_files, dependent: :destroy
|
||||
has_many :folder_links, -> { where(target_type: 'DmsfFolder').order(:name) },
|
||||
:class_name => 'DmsfLink', :foreign_key => 'dmsf_folder_id', :dependent => :destroy
|
||||
class_name: 'DmsfLink', foreign_key: 'dmsf_folder_id', dependent: :destroy
|
||||
has_many :file_links, -> { where(target_type: 'DmsfFile') },
|
||||
:class_name => 'DmsfLink', :foreign_key => 'dmsf_folder_id', :dependent => :destroy
|
||||
class_name: 'DmsfLink', foreign_key: 'dmsf_folder_id', dependent: :destroy
|
||||
has_many :url_links, -> { where(target_type: 'DmsfUrl') },
|
||||
:class_name => 'DmsfLink', :foreign_key => 'dmsf_folder_id', :dependent => :destroy
|
||||
has_many :dmsf_links, :dependent => :destroy
|
||||
class_name: 'DmsfLink', foreign_key: 'dmsf_folder_id', dependent: :destroy
|
||||
has_many :dmsf_links, dependent: :destroy
|
||||
has_many :referenced_links, -> { where(target_type: 'DmsfFolder') },
|
||||
:class_name => 'DmsfLink', :foreign_key => 'target_id', :dependent => :destroy
|
||||
class_name: 'DmsfLink', foreign_key: 'target_id', dependent: :destroy
|
||||
has_many :locks, -> { where(entity_type: 1).order(updated_at: :desc) },
|
||||
:class_name => 'DmsfLock', :foreign_key => 'entity_id', :dependent => :destroy
|
||||
has_many :dmsf_folder_permissions, :dependent => :destroy
|
||||
class_name: 'DmsfLock', foreign_key: 'entity_id', dependent: :destroy
|
||||
has_many :dmsf_folder_permissions, dependent: :destroy
|
||||
|
||||
INVALID_CHARACTERS = '\[\]\/\\\?":<>#%\*'
|
||||
STATUS_DELETED = 1
|
||||
@ -79,21 +79,21 @@ class DmsfFolder < ActiveRecord::Base
|
||||
|
||||
acts_as_customizable
|
||||
|
||||
acts_as_searchable :columns => ["#{table_name}.title", "#{table_name}.description"],
|
||||
:project_key => 'project_id',
|
||||
:date_column => 'updated_at',
|
||||
:permission => :view_dmsf_files,
|
||||
:scope => Proc.new { DmsfFolder.visible }
|
||||
acts_as_searchable columns: ["#{table_name}.title", "#{table_name}.description"],
|
||||
project_key: 'project_id',
|
||||
date_column: 'updated_at',
|
||||
permission: :view_dmsf_files,
|
||||
scope: Proc.new { DmsfFolder.visible }
|
||||
|
||||
acts_as_event :title => Proc.new {|o| o.title},
|
||||
:description => Proc.new {|o| o.description },
|
||||
:url => Proc.new {|o| {:controller => 'dmsf', :action => 'show', :id => o.project, :folder_id => o}},
|
||||
:datetime => Proc.new {|o| o.updated_at },
|
||||
:author => Proc.new {|o| o.user }
|
||||
acts_as_event title: Proc.new { |o| o.title },
|
||||
description: Proc.new { |o| o.description },
|
||||
url: Proc.new { |o| { controller: 'dmsf', action: 'show', id: o.project, folder_id: o } },
|
||||
datetime: Proc.new { |o| o.updated_at },
|
||||
author: Proc.new { |o| o.user }
|
||||
|
||||
validates :title, presence: true, dmsf_file_name: true
|
||||
validates :project, presence: true
|
||||
validates_uniqueness_of :title, :scope => [:dmsf_folder_id, :project_id, :deleted],
|
||||
validates_uniqueness_of :title, scope: [:dmsf_folder_id, :project_id, :deleted],
|
||||
conditions: -> { where(deleted: STATUS_ACTIVE) }
|
||||
validates :description, length: { maximum: 65535 }
|
||||
|
||||
@ -226,7 +226,7 @@ class DmsfFolder < ActiveRecord::Base
|
||||
|
||||
def self.file_list(files)
|
||||
options = Array.new
|
||||
options.push ['', nil, :label => 'none']
|
||||
options.push ['', nil, label: 'none']
|
||||
files.each do |f|
|
||||
options.push [f.title, f.id]
|
||||
end
|
||||
@ -456,7 +456,7 @@ class DmsfFolder < ActiveRecord::Base
|
||||
# Url
|
||||
if columns.include?(l(:label_document_url))
|
||||
default_url_options[:host] = Setting.host_name
|
||||
csv << url_for(:controller => :dmsf, :action => 'show', :id => project_id, :folder_id => id)
|
||||
csv << url_for(controller: :dmsf, action: 'show', id: project_id, folder_id: id)
|
||||
end
|
||||
# Revision
|
||||
csv << '' if columns.include?(l(:label_last_revision_id))
|
||||
@ -470,7 +470,7 @@ class DmsfFolder < ActiveRecord::Base
|
||||
def get_locked_title
|
||||
if locked_for_user?
|
||||
if lock.reverse[0].user
|
||||
return l(:title_locked_by_user, :user => lock.reverse[0].user)
|
||||
return l(:title_locked_by_user, user: lock.reverse[0].user)
|
||||
else
|
||||
return l(:notice_account_unknown_email)
|
||||
end
|
||||
|
||||
@ -25,7 +25,7 @@ class DmsfLink < ActiveRecord::Base
|
||||
|
||||
belongs_to :project
|
||||
belongs_to :dmsf_folder
|
||||
belongs_to :deleted_by_user, :class_name => 'User', :foreign_key => 'deleted_by_user_id'
|
||||
belongs_to :deleted_by_user, class_name: 'User', foreign_key: 'deleted_by_user_id'
|
||||
belongs_to :user
|
||||
|
||||
validates :name, presence: true, length: { maximum: 255 }
|
||||
@ -92,9 +92,9 @@ class DmsfLink < ActiveRecord::Base
|
||||
|
||||
def self.find_link_by_file_name(project, folder, filename)
|
||||
links = DmsfLink.where(
|
||||
:project_id => project.id,
|
||||
:dmsf_folder_id => folder ? folder.id : nil,
|
||||
:target_type => DmsfFile.model_name.to_s).visible.all
|
||||
project_id: project.id,
|
||||
dmsf_folder_id: folder ? folder.id : nil,
|
||||
target_type: DmsfFile.model_name.to_s).visible.all
|
||||
links.each do |link|
|
||||
return link if link.target_file && (link.target_file.name == filename)
|
||||
end
|
||||
@ -142,7 +142,7 @@ class DmsfLink < ActiveRecord::Base
|
||||
else
|
||||
self.deleted = STATUS_DELETED
|
||||
self.deleted_by_user = User.current
|
||||
save(:validate => false)
|
||||
save validate: false
|
||||
end
|
||||
end
|
||||
|
||||
@ -153,7 +153,7 @@ class DmsfLink < ActiveRecord::Base
|
||||
end
|
||||
self.deleted = STATUS_ACTIVE
|
||||
self.deleted_by_user = nil
|
||||
save(:validate => false)
|
||||
save validate: false
|
||||
end
|
||||
|
||||
def is_folder?
|
||||
|
||||
@ -25,8 +25,8 @@ require 'simple_enum'
|
||||
|
||||
class DmsfLock < ActiveRecord::Base
|
||||
before_create :generate_uuid
|
||||
belongs_to :file, :class_name => 'DmsfFile', :foreign_key => 'entity_id'
|
||||
belongs_to :folder, :class_name => 'DmsfFolder', :foreign_key => 'entity_id'
|
||||
belongs_to :file, class_name: 'DmsfFile', foreign_key: 'entity_id'
|
||||
belongs_to :folder, class_name: 'DmsfFolder', foreign_key: 'entity_id'
|
||||
belongs_to :user
|
||||
|
||||
# At the moment apparently we're only supporting a write lock?
|
||||
|
||||
@ -43,7 +43,7 @@ class DmsfMailer < Mailer
|
||||
@author = User.anonymous unless @author
|
||||
message_id project
|
||||
set_language_if_valid user.language
|
||||
mail :to => user.mail, subject: "[#{@project.name} - #{l(:menu_dmsf)}] #{l(:text_email_doc_updated_subject)}"
|
||||
mail to: user.mail, subject: "[#{@project.name} - #{l(:menu_dmsf)}] #{l(:text_email_doc_updated_subject)}"
|
||||
end
|
||||
end
|
||||
|
||||
@ -65,8 +65,8 @@ class DmsfMailer < Mailer
|
||||
@author = User.anonymous unless @author
|
||||
message_id project
|
||||
set_language_if_valid user.language
|
||||
mail :to => user.mail,
|
||||
:subject => "[#{@project.name} - #{l(:menu_dmsf)}] #{l(:text_email_doc_deleted_subject)}"
|
||||
mail to: user.mail,
|
||||
subject: "[#{@project.name} - #{l(:menu_dmsf)}] #{l(:text_email_doc_deleted_subject)}"
|
||||
end
|
||||
end
|
||||
|
||||
@ -85,7 +85,7 @@ class DmsfMailer < Mailer
|
||||
@author = author
|
||||
unless @links_only
|
||||
zipped_content_data = open(email_params[:zipped_content], 'rb') { |io| io.read }
|
||||
attachments['Documents.zip'] = { :content_type => 'application/zip', :content => zipped_content_data }
|
||||
attachments['Documents.zip'] = { content_type: 'application/zip', content: zipped_content_data }
|
||||
end
|
||||
mail to: email_params[:to], cc: email_params[:cc], subject: email_params[:subject], 'From' => email_params[:from],
|
||||
'Reply-To' => email_params[:reply_to]
|
||||
@ -108,13 +108,13 @@ class DmsfMailer < Mailer
|
||||
message_id workflow
|
||||
@workflow = workflow
|
||||
@revision = revision
|
||||
@text1 = l(text1_id, :name => workflow.name, :filename => revision.dmsf_file.name, :notice => notice)
|
||||
@text1 = l(text1_id, name: workflow.name, filename: revision.dmsf_file.name, notice: notice)
|
||||
@text2 = l(text2_id)
|
||||
@notice = notice
|
||||
@author = revision.dmsf_workflow_assigned_by_user
|
||||
@author = User.anonymous unless @author
|
||||
mail :to => user.mail,
|
||||
:subject => "[#{@project.name} - #{l(:field_label_dmsf_workflow)}] #{@workflow.name} #{l(subject_id)}"
|
||||
mail to: user.mail,
|
||||
subject: "[#{@project.name} - #{l(:field_label_dmsf_workflow)}] #{@workflow.name} #{l(subject_id)}"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -44,11 +44,11 @@ class DmsfUpload
|
||||
a = Attachment.find_by_token(uploaded_file[:token])
|
||||
if a
|
||||
uploaded = {
|
||||
:disk_filename => DmsfHelper.temp_filename(a.filename),
|
||||
:content_type => a.content_type,
|
||||
:original_filename => a.filename,
|
||||
:comment => uploaded_file[:description],
|
||||
:tempfile_path => a.diskfile
|
||||
disk_filename: DmsfHelper.temp_filename(a.filename),
|
||||
content_type: a.content_type,
|
||||
original_filename: a.filename,
|
||||
comment: uploaded_file[:description],
|
||||
tempfile_path: a.diskfile
|
||||
}
|
||||
DmsfUpload.new(project, folder, uploaded)
|
||||
else
|
||||
@ -104,7 +104,7 @@ class DmsfUpload
|
||||
present_custom_fields = file.last_revision.custom_values.collect(&:custom_field).uniq
|
||||
file.last_revision.available_custom_fields.each do |cf|
|
||||
unless present_custom_fields.include?(cf)
|
||||
@custom_values << CustomValue.new({:custom_field => cf, :value => cf.default_value}) if cf.default_value
|
||||
@custom_values << CustomValue.new({ custom_field: cf, value: cf.default_value}) if cf.default_value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -20,13 +20,14 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
class DmsfWorkflow < ActiveRecord::Base
|
||||
|
||||
has_many :dmsf_workflow_steps, -> { order(step: :asc, operator: :desc) }, dependent: :destroy
|
||||
belongs_to :author, :class_name => 'User'
|
||||
belongs_to :author, class_name: 'User'
|
||||
|
||||
scope :sorted, lambda { order(name: :asc) }
|
||||
scope :global, lambda { where(project_id: nil) }
|
||||
scope :active, lambda { where(status: STATUS_ACTIVE) }
|
||||
scope :status, lambda { |arg| where(arg.blank? ? nil : {:status => arg.to_i}) }
|
||||
scope :status, lambda { |arg| where(arg.blank? ? nil : { status: arg.to_i }) }
|
||||
|
||||
validates :name, presence: true, length: { maximum: 255 }, dmsf_workflow_name: true
|
||||
|
||||
@ -222,7 +223,7 @@ class DmsfWorkflow < ActiveRecord::Base
|
||||
unless recipients.blank?
|
||||
to = recipients.collect{ |r| r.name }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ')
|
||||
to << ((recipients.count > DMSF_MAX_NOTIFICATION_RECEIVERS_INFO) ? ',...' : '.')
|
||||
controller.flash[:warning] = l(:warning_email_notifications, :to => to) if controller
|
||||
controller.flash[:warning] = l(:warning_email_notifications, to: to) if controller
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -20,10 +20,11 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
class DmsfWorkflowStep < ActiveRecord::Base
|
||||
|
||||
belongs_to :dmsf_workflow
|
||||
belongs_to :user
|
||||
|
||||
has_many :dmsf_workflow_step_assignments, :dependent => :destroy
|
||||
has_many :dmsf_workflow_step_assignments, dependent: :destroy
|
||||
|
||||
validates :dmsf_workflow, presence: true
|
||||
validates :step, presence: true
|
||||
|
||||
@ -22,12 +22,12 @@
|
||||
class DmsfWorkflowStepAction < ActiveRecord::Base
|
||||
|
||||
belongs_to :dmsf_workflow_step_assignment
|
||||
belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
|
||||
belongs_to :author, class_name: 'User', foreign_key: 'author_id'
|
||||
|
||||
validates :dmsf_workflow_step_assignment, presence: true
|
||||
validates :action, presence: true
|
||||
validates :author_id, presence: true
|
||||
validates :note, presence: true, :unless => lambda { action == DmsfWorkflowStepAction::ACTION_APPROVE }
|
||||
validates :note, presence: true, unless: lambda { action == DmsfWorkflowStepAction::ACTION_APPROVE }
|
||||
validates_uniqueness_of :dmsf_workflow_step_assignment_id, scope: [:action],
|
||||
unless: lambda { action == DmsfWorkflowStepAction::ACTION_DELEGATE }
|
||||
|
||||
|
||||
@ -20,11 +20,12 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
class DmsfWorkflowStepAssignment < ActiveRecord::Base
|
||||
|
||||
belongs_to :dmsf_workflow_step
|
||||
belongs_to :user
|
||||
belongs_to :dmsf_file_revision
|
||||
|
||||
has_many :dmsf_workflow_step_actions, :dependent => :destroy
|
||||
has_many :dmsf_workflow_step_actions, dependent: :destroy
|
||||
|
||||
validates :dmsf_workflow_step, presence: true
|
||||
validates :dmsf_file_revision, presence: true
|
||||
@ -43,4 +44,5 @@ class DmsfWorkflowStepAssignment < ActiveRecord::Base
|
||||
end
|
||||
false
|
||||
end
|
||||
|
||||
end
|
||||
@ -23,21 +23,21 @@
|
||||
<h3 class="title"><%= l(:label_email_address_add) %></h3>
|
||||
|
||||
<%= form_tag(append_email_dmsf_path,
|
||||
:remote => true,
|
||||
:method => :post,
|
||||
:id => 'new-user-form') do %>
|
||||
remote: true,
|
||||
method: :post,
|
||||
id: 'new-user-form') do %>
|
||||
<%= hidden_field_tag :project_id, @project.id %>
|
||||
|
||||
<p><%= label_tag 'user_search', l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p>
|
||||
<%= late_javascript_tag "observeSearchfield('user_search', 'users_for_users', '#{ escape_javascript url_for(
|
||||
:controller => 'dmsf', :action => 'autocomplete_for_user', :project_id => @project) }')" %>
|
||||
controller: 'dmsf', action: 'autocomplete_for_user', project_id: @project) }')" %>
|
||||
|
||||
<div id="users_for_watcher">
|
||||
<%= render_principals_for_new_email(@principals) %>
|
||||
</div>
|
||||
|
||||
<p class="buttons">
|
||||
<%= submit_tag l(:button_add), :name => nil, :onclick => "hideModal(this);" %>
|
||||
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
|
||||
<%= submit_tag l(:button_add), name: nil, onclick: 'hideModal(this);' %>
|
||||
<%= submit_tag l(:button_cancel), name: nil, onclick: 'hideModal(this);', type: 'button' %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
@ -22,17 +22,17 @@
|
||||
|
||||
<h2>
|
||||
<% if folder %>
|
||||
<%= link_to l(:link_documents), dmsf_folder_path(:id => @project) %>
|
||||
<%= 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 %>
|
||||
<%= link_to h(path_element.title), dmsf_folder_path(:id => @project, :folder_id => path_element) %>
|
||||
<%= link_to h(path_element.title), dmsf_folder_path(id: @project, folder_id: path_element) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= link_to l(:link_documents), dmsf_folder_path(:id => @project) %>
|
||||
<%= link_to l(:link_documents), dmsf_folder_path(id: @project) %>
|
||||
<% end %>
|
||||
<% if filename %>
|
||||
/
|
||||
|
||||
@ -22,6 +22,6 @@
|
||||
|
||||
var modal = $('#ajax-modal');
|
||||
|
||||
modal.html("<%= escape_javascript(render :partial => 'dmsf/add_email') %>");
|
||||
modal.html("<%= escape_javascript(render partial: 'dmsf/add_email') %>");
|
||||
showModal('ajax-modal', '400px');
|
||||
modal.addClass('new-user');
|
||||
|
||||
@ -28,52 +28,53 @@
|
||||
<% if !@folder.new_record? && User.current.allowed_to?(:folder_manipulation, @project) && !@folder.system %>
|
||||
<% if @folder.locked? %>
|
||||
<%= link_to_if(@folder.unlockable? && (!@folder.locked_for_user? || @force_file_unlock_allowed), l(:button_unlock),
|
||||
unlock_dmsf_path(:id => @project, :folder_id => @folder),
|
||||
:title => l(:title_unlock_file), :class => 'icon icon-unlock') %>
|
||||
unlock_dmsf_path(id: @project, folder_id: @folder),
|
||||
title: l(:title_unlock_file), class: 'icon icon-unlock') %>
|
||||
<% else %>
|
||||
<%= link_to(l(:button_lock), lock_dmsf_path(:id => @project, :folder_id => @folder),
|
||||
:title => l(:title_lock_file), :class => 'icon icon-lock') %>
|
||||
<%= link_to(l(:button_lock), lock_dmsf_path(id: @project, folder_id: @folder),
|
||||
title: l(:title_lock_file), class: 'icon icon-lock') %>
|
||||
<% end %>
|
||||
<% unless @folder.locked? %>
|
||||
<% if @folder.notification %>
|
||||
<%= link_to(l(:label_notifications_off),
|
||||
notify_deactivate_dmsf_path(:id => @project, :folder_id => @folder),
|
||||
:title => l(:title_notifications_active_deactivate),
|
||||
:class => 'icon icon-email') %>
|
||||
notify_deactivate_dmsf_path(id: @project, folder_id: @folder),
|
||||
title: l(:title_notifications_active_deactivate),
|
||||
class: 'icon icon-email') %>
|
||||
<% else %>
|
||||
<%= link_to(l(:label_notifications_on),
|
||||
notify_activate_dmsf_path(:id => @project, :folder_id => @folder),
|
||||
:title => l(:title_notifications_not_active_activate),
|
||||
:class => 'icon icon-email-add') %>
|
||||
notify_activate_dmsf_path(id: @project, folder_id: @folder),
|
||||
title: l(:title_notifications_not_active_activate),
|
||||
class: 'icon icon-email-add') %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= link_to(l(:label_link_to),
|
||||
new_dmsf_link_path(:project_id => @project.id, :dmsf_folder_id => @folder.id, :type => 'link_to'),
|
||||
:title => l(:title_create_link), :class => 'icon icon-link') %>
|
||||
<%= link_to("#{l(:button_copy)}/#{l(:button_move)}", copy_folder_path(:id => @folder),
|
||||
:title => l(:title_copy), :class => 'icon icon-copy') %>
|
||||
new_dmsf_link_path(project_id: @project.id, dmsf_folder_id: @folder.id, type: 'link_to'),
|
||||
title: l(:title_create_link), class: 'icon icon-link') %>
|
||||
<%= link_to("#{l(:button_copy)}/#{l(:button_move)}", copy_folder_path(id: @folder),
|
||||
title: l(:title_copy), class: 'icon icon-copy') %>
|
||||
<% unless @folder.locked? %>
|
||||
<%= link_to(l(:button_delete), delete_dmsf_path(:id => @project, :folder_id => @folder),
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:title => l(:button_delete), :class => 'icon icon-del', :method => :delete) %>
|
||||
<%= link_to(l(:button_delete), delete_dmsf_path(id: @project, folder_id: @folder),
|
||||
data: { confirm: l(:text_are_you_sure) },
|
||||
title: l(:button_delete), class: 'icon icon-del', method: :delete) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% create = @pathfolder == @parent %>
|
||||
<%= render(:partial => 'path',
|
||||
:locals => {:folder => @pathfolder, :filename => create ? l(:heading_new_folder) : nil, :title => nil}) %>
|
||||
<%= render partial: 'path',
|
||||
locals: { folder: @pathfolder, filename: create ? l(:heading_new_folder) : nil, title: nil} %>
|
||||
|
||||
<%= labelled_form_for(@folder, :url => {:action => create ? 'create' : 'save', :id => @project, :folder_id => @folder, :parent_id => @parent},
|
||||
:html => {:method=>:post}) do |f| %>
|
||||
<%= labelled_form_for(@folder,
|
||||
url: { action: create ? 'create' : 'save', id: @project, folder_id: @folder, parent_id: @parent},
|
||||
html: { method: :post}) do |f| %>
|
||||
<%= error_messages_for(@folder) %>
|
||||
<%= f.hidden_field :redirect_to_folder_id, value: @redirect_to_folder_id %>
|
||||
<div class="box tabular">
|
||||
<p>
|
||||
<%= f.text_field(:title, :required => true) %>
|
||||
<%= f.text_field(:title, required: true) %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.text_area :description, :rows => 8, :class => 'wiki-edit' %>
|
||||
<%= f.text_area :description, rows: 8, class: 'wiki-edit' %>
|
||||
</p>
|
||||
<p>
|
||||
<% dir = @folder.inherited_permissions_from %>
|
||||
@ -117,9 +118,9 @@
|
||||
<% end %>
|
||||
<span class="search_for_watchers">
|
||||
<%= link_to l(:label_user_search_add),
|
||||
new_dmsf_folder_permissions_path(:project_id => @project, :dmsf_folder_id => @folder),
|
||||
:remote => true,
|
||||
:method => 'get' %>
|
||||
new_dmsf_folder_permissions_path(project_id: @project, dmsf_folder_id: @folder),
|
||||
remote: true,
|
||||
method: :get %>
|
||||
</span>
|
||||
</p>
|
||||
<% values = @folder ? @folder.custom_field_values : (@parent ? @parent.custom_field_values : DmsfFolder.new.custom_field_values) %>
|
||||
|
||||
@ -28,27 +28,24 @@
|
||||
<% if User.current.allowed_to?(:folder_manipulation, @project) %>
|
||||
<% if @project.dmsf_notification %>
|
||||
<%= link_to(l(:label_notifications_off),
|
||||
notify_deactivate_dmsf_path(:id => @project),
|
||||
:title => l(:title_notifications_active_deactivate),
|
||||
:class => 'icon icon-email') %>
|
||||
notify_deactivate_dmsf_path(id: @project),
|
||||
title: l(:title_notifications_active_deactivate),
|
||||
class: 'icon icon-email') %>
|
||||
<% else %>
|
||||
<%= link_to(l(:label_notifications_on),
|
||||
notify_activate_dmsf_path(:id => @project),
|
||||
:title => l(:title_notifications_active_deactivate),
|
||||
:class => 'icon icon-email-add') %>
|
||||
notify_activate_dmsf_path(id: @project),
|
||||
title: l(:title_notifications_active_deactivate),
|
||||
class: 'icon icon-email-add') %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= render(:partial => 'path',
|
||||
:locals => {:folder => nil, :filename => nil, :title => nil}) %>
|
||||
<%= render partial: 'path', locals: { folder: nil, filename: nil, title: nil } %>
|
||||
|
||||
<%= labelled_form_for(@project, :url => {:action => 'save_root', :id => @project},
|
||||
:html => {:method => :post}) do |f| %>
|
||||
<%= labelled_form_for(@project, url: { action: 'save_root', id: @project }, html: { method: :post }) do |f| %>
|
||||
<div class="box tabular">
|
||||
<p>
|
||||
<%= f.text_area(:dmsf_description, :rows => 8, :class => 'wiki-edit',
|
||||
:label => l(:field_description)) %>
|
||||
<%= f.text_area :dmsf_description, rows: 8, class: 'wiki-edit', label: l(:field_description) %>
|
||||
</p>
|
||||
</div>
|
||||
<%= f.submit l(:submit_save) %>
|
||||
|
||||
@ -22,13 +22,11 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
%>
|
||||
|
||||
<% html_title(l(:dmsf)) %>
|
||||
<% html_title l(:dmsf) %>
|
||||
|
||||
<%= render(:partial => 'path',
|
||||
:locals => {:folder => @folder, :filename => nil, :title => l(:heading_send_documents_by_email)}) %>
|
||||
<%= render partial: 'path', locals: { folder: @folder, filename: nil, title: l(:heading_send_documents_by_email) } %>
|
||||
|
||||
<%= form_tag(email_entries_path(:id => @project, :folder_id => @folder),
|
||||
{ :method => :post }) do %>
|
||||
<%= form_tag(email_entries_path(id: @project, folder_id: @folder), { method: :post }) do %>
|
||||
<%= hidden_field_tag('email[zipped_content]', @email_params[:zipped_content]) %>
|
||||
<%= hidden_field_tag('email[folders]', @email_params[:folders].to_json) %>
|
||||
<%= hidden_field_tag('email[files]', @email_params[:files].to_json) %>
|
||||
@ -37,40 +35,40 @@
|
||||
<div class="box tabular">
|
||||
<p>
|
||||
<%= label_tag('', l(:label_email_from)) %>
|
||||
<%= text_field_tag('email[from_disabled]', @email_params[:from], :style => 'width: 90%;', :disabled => true) %>
|
||||
<%= text_field_tag('email[from_disabled]', @email_params[:from], style: 'width: 90%;', disabled: true) %>
|
||||
</p>
|
||||
<p>
|
||||
<%= label_tag('email[to]', l(:label_email_to)) %>
|
||||
<span>
|
||||
<%= text_field_tag('email[to]', @email_params[:to], :style => 'width: 90%;', :required => true) %>
|
||||
<%= link_to l(:button_add), add_email_dmsf_path(:project_id => @project),
|
||||
:title => l(:label_email_address_add), :class => 'icon icon-add', :remote => true %>
|
||||
<%= text_field_tag('email[to]', @email_params[:to], style: 'width: 90%;', required: true) %>
|
||||
<%= link_to l(:button_add), add_email_dmsf_path(project_id: @project),
|
||||
title: l(:label_email_address_add), class: 'icon icon-add', remote: true %>
|
||||
</span>
|
||||
</p>
|
||||
<p>
|
||||
<%= label_tag('email[cc]', l(:label_email_cc)) %>
|
||||
<%= text_field_tag('email[cc]', @email_params[:cc], :style => 'width: 90%;') %>
|
||||
<%= text_field_tag('email[cc]', @email_params[:cc], style: 'width: 90%;') %>
|
||||
</p>
|
||||
<p>
|
||||
<%= label_tag('email[subject]', l(:label_email_subject)) %>
|
||||
<%= text_field_tag('email[subject]', @email_params[:subject], :style => 'width: 90%;') %>
|
||||
<%= text_field_tag('email[subject]', @email_params[:subject], style: 'width: 90%;') %>
|
||||
</p>
|
||||
<p>
|
||||
<%= label_tag('', l(:label_email_documents)) %>
|
||||
<span>
|
||||
<%= link_to 'Documents.zip', download_email_entries_path(:id => @project, :folder_id => @folder,
|
||||
:path => @email_params[:zipped_content]) %>
|
||||
<%= link_to 'Documents.zip', download_email_entries_path(id: @project, folder_id: @folder,
|
||||
path: @email_params[:zipped_content]) %>
|
||||
<%= l(:label_or) %>
|
||||
<%= check_box_tag('email[links_only]', 1, Setting.plugin_redmine_dmsf['dmsf_documents_email_links_only'],
|
||||
:onchange => "$('#public_url').toggle($('#email_links_only').prop('checked'))")
|
||||
onchange: "$('#public_url').toggle($('#email_links_only').prop('checked'))")
|
||||
%>
|
||||
<%= l(:label_links_only) %>
|
||||
<%= render(:partial => 'dmsf_public_urls/new') %>
|
||||
<%= render partial: 'dmsf_public_urls/new' %>
|
||||
</span>
|
||||
</p>
|
||||
<p>
|
||||
<%= label_tag('email[body]', l(:label_email_body)) %>
|
||||
<%= text_area_tag('email[body]', @email_params['body'], :rows => '20', :style => 'width: 90%;') %>
|
||||
<%= text_area_tag('email[body]', @email_params['body'], rows: '20', style: 'width: 90%;') %>
|
||||
</p>
|
||||
</div>
|
||||
<p><%= submit_tag(l(:label_email_send)) %></p>
|
||||
|
||||
@ -1,31 +1,12 @@
|
||||
api.dmsf do
|
||||
api.array :dmsf_folders, api_meta(:total_count => @subfolders.size) do
|
||||
@subfolders.each do |folder|
|
||||
api.folder do
|
||||
api.id folder.id
|
||||
api.title folder.title
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
api.array :dmsf_files, api_meta(:total_count => @files.size) do
|
||||
@files.each do |file|
|
||||
api.file do
|
||||
api.id file.id
|
||||
api.name file.name
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
api.array :dmsf_links, api_meta(:total_count => @dir_links.size + @file_links.size + @url_links.size) do
|
||||
(@dir_links + @file_links + @url_links).each do |link|
|
||||
api.link do
|
||||
api.id link.id
|
||||
api.name link.name
|
||||
api.target_type link.target_type
|
||||
api.target_id link.target_id
|
||||
api.target_project_id link.target_project_id
|
||||
api.external_url link.external_url if link.external_url.present?
|
||||
api.array :dmsf_nodes, api_meta(total_count: @query.dmsf_nodes.count) do
|
||||
@query.dmsf_nodes.each do |node|
|
||||
api.node do
|
||||
api.id node.id
|
||||
api.title node.title
|
||||
api.type node.type
|
||||
api.filename node.filename
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -31,47 +31,47 @@
|
||||
<%= actions_dropdown do %>
|
||||
<% if @folder_manipulation_allowed && !@system_folder %>
|
||||
<% if @folder.nil? %>
|
||||
<%= link_to(l(:button_edit), edit_root_dmsf_path(:id => @project),
|
||||
:title => l(:link_edit, :title => l(:link_documents)),
|
||||
:class => 'icon icon-edit') %>
|
||||
<%= link_to l(:button_edit), edit_root_dmsf_path(id: @project),
|
||||
title: l(:link_edit, title: l(:link_documents)),
|
||||
class: 'icon icon-edit' %>
|
||||
<% elsif !@locked_for_user %>
|
||||
<%= link_to(l(:button_edit),
|
||||
<%= link_to l(:button_edit),
|
||||
edit_dmsf_path(id: @project, folder_id: @folder, redirect_to_folder_id: @folder.id),
|
||||
title: l(:link_edit, title: h(@folder.title)),
|
||||
class: 'icon icon-edit') %>
|
||||
class: 'icon icon-edit' %>
|
||||
<% end %>
|
||||
<% if @folder && (!@locked_for_user || User.current.allowed_to?(:force_file_unlock, @project)) %>
|
||||
<% if @folder.locked? %>
|
||||
<%= link_to_if(@folder.unlockable?, l(:button_unlock),
|
||||
unlock_dmsf_path(:id => @project, :folder_id => @folder, :current => request.url),
|
||||
:title => l(:title_unlock_folder), :class => 'icon icon-unlock') %>
|
||||
<%= link_to_if @folder.unlockable?, l(:button_unlock),
|
||||
unlock_dmsf_path(id: @project, folder_id: @folder, current: request.url),
|
||||
title: l(:title_unlock_folder), class: 'icon icon-unlock' %>
|
||||
<% else %>
|
||||
<%= link_to(l(:button_lock),
|
||||
lock_dmsf_path(:id => @project, :folder_id => @folder, :current => request.url),
|
||||
:title => l(:title_lock_folder), :class => 'icon icon-lock') %>
|
||||
lock_dmsf_path(id: @project, folder_id: @folder, current: request.url),
|
||||
title: l(:title_lock_folder), class: 'icon icon-lock') %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if !@locked_for_user && ((@folder && @folder.notification) || (!@folder && @project.dmsf_notification)) %>
|
||||
<%= link_to(l(:label_notifications_off),
|
||||
notify_deactivate_dmsf_path(:id => @project, :folder_id => @folder),
|
||||
:title => l(:title_notifications_active_deactivate),
|
||||
:class => 'icon icon-email') %>
|
||||
<%= link_to l(:label_notifications_off),
|
||||
notify_deactivate_dmsf_path(id: @project, folder_id: @folder),
|
||||
title: l(:title_notifications_active_deactivate),
|
||||
class: 'icon icon-email' %>
|
||||
<% else %>
|
||||
<%= link_to(l(:label_notifications_on),
|
||||
notify_activate_dmsf_path(:id => @project, :folder_id => @folder),
|
||||
:title => l(:title_notifications_not_active_activate),
|
||||
:class => 'icon icon-email-add') %>
|
||||
<%= link_to l(:label_notifications_on),
|
||||
notify_activate_dmsf_path(id: @project, folder_id: @folder),
|
||||
title: l(:title_notifications_not_active_activate),
|
||||
class: 'icon icon-email-add' %>
|
||||
<% end %>
|
||||
<% if @file_manipulation_allowed && !@locked_for_user %>
|
||||
<%= link_to(l(:label_link_from),
|
||||
new_dmsf_link_path(:project_id => @project.id, :dmsf_folder_id => @folder ? @folder.id : @folder,
|
||||
:type => 'link_from'), :title => l(:title_create_link),
|
||||
:class => 'icon icon-link') %>
|
||||
<%= link_to l(:label_link_from),
|
||||
new_dmsf_link_path(project_id: @project.id, dmsf_folder_id: @folder ? @folder.id : @folder,
|
||||
type: 'link_from'), title: l(:title_create_link),
|
||||
class: 'icon icon-link' %>
|
||||
<% end %>
|
||||
<%= link_to(l(:link_create_folder),
|
||||
new_dmsf_path(:id => @project, :parent_id => @folder),
|
||||
:title => l(:link_create_folder),
|
||||
:class => 'icon icon-add') unless @locked_for_user %>
|
||||
new_dmsf_path(id: @project, parent_id: @folder),
|
||||
title: l(:link_create_folder),
|
||||
class: 'icon icon-add') unless @locked_for_user %>
|
||||
<% end %>
|
||||
<% if @trash_enabled %>
|
||||
<%= link_to l(:link_trash_bin), trash_dmsf_path(@project), title: l(:link_trash_bin), class: 'icon icon-del' %>
|
||||
@ -101,22 +101,6 @@
|
||||
|
||||
<% unless (@folder && @folder.system) %>
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'CSV', onclick: "showModal('dmsf_csv_export_options', '350px'); return false;" %>
|
||||
<%= f.link_to 'CSV', url: { action: :show, id: @project, dmsf_folder_id: @folder } %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<div id="dmsf_csv_export_options">
|
||||
<h3 class="title"><%= l(:label_export_options, export_format: 'CSV') %></h3>
|
||||
<%= form_tag(dmsf_folder_path(id: @project, format: 'csv'), method: :get, id: 'csv-export-form') do %>
|
||||
<%= hidden_field_tag(:folder_id, @folder.id) if @folder %>
|
||||
<div class="tabular">
|
||||
<%= render(partial: 'settings/dmsf_columns',
|
||||
locals: { selected_columns: Setting.plugin_redmine_dmsf['dmsf_columns'],
|
||||
extra_columns: @extra_columns ? @extra_columns : @query.extra_columns }) %>
|
||||
</div>
|
||||
<p class="buttons">
|
||||
<%= submit_tag l(:button_export), name: nil, onclick: "hideModal(this);" %>
|
||||
<%= submit_tag l(:button_cancel), name: nil, onclick: "hideModal(this);", type: 'button' %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@ -28,8 +28,8 @@
|
||||
<% if @file.locked_for_user? %>
|
||||
<p class="warning"><%= l(:info_file_locked) %></p>
|
||||
<% else %>
|
||||
<%= labelled_form_for(@revision, :url => { :action => 'create_revision', :id => @file },
|
||||
:html => { :method => :post, :multipart => true, :id => 'new_revision_form' }) do |f| %>
|
||||
<%= labelled_form_for(@revision, url: { action: 'create_revision', id: @file },
|
||||
html: { method: :post, multipart: true, id: 'new_revision_form' }) do |f| %>
|
||||
<div class="clear">
|
||||
<div class="splitcontentleft">
|
||||
<p>
|
||||
@ -38,12 +38,12 @@
|
||||
</div>
|
||||
<div class="splitcontentright">
|
||||
<p>
|
||||
<%= f.text_field(:name, :label => l(:label_file)) %>
|
||||
<%= f.text_field :name, label: l(:label_file) %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
<%= f.text_area(:description, :rows => 6, :class => 'wiki-edit') %>
|
||||
<%= f.text_area :description, rows: 6, class: 'wiki-edit' %>
|
||||
</p>
|
||||
<div class="clear">
|
||||
<div class="splitcontentright">
|
||||
@ -69,23 +69,23 @@
|
||||
<%= radio_button_tag('version', 3) %>
|
||||
<%= select_tag 'custom_version_major', options_for_select(DmsfUploadHelper::major_version_select_options,
|
||||
DmsfUploadHelper::gui_version(DmsfUploadHelper::increase_version(@file.last_revision.major_version, 2))),
|
||||
:onchange => '$("#version_3").prop("checked", true)', :class => 'dmsf_select_version' %>.
|
||||
onchange: '$("#version_3").prop("checked", true)', class: 'dmsf_select_version' %>.
|
||||
<%= select_tag 'custom_version_minor', options_for_select(DmsfUploadHelper::minor_version_select_options,
|
||||
DmsfUploadHelper::gui_version(DmsfUploadHelper.increase_version(@file.last_revision.minor_version, 1))),
|
||||
:onchange => '$("#version_3").prop("checked", true)', :class => 'dmsf_select_version' %>
|
||||
onchange: '$("#version_3").prop("checked", true)', class: 'dmsf_select_version' %>
|
||||
<%= l(:option_version_custom) %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box" id="file_upload_box">
|
||||
<p>
|
||||
<%= label_tag('file_upload', l(:label_new_content)) %>
|
||||
<%= render :partial => 'dmsf_upload/form',
|
||||
:locals => { :multiple => false, :container => nil, :description => false, :awf => false } %>
|
||||
<%= label_tag 'file_upload', l(:label_new_content) %>
|
||||
<%= render partial: 'dmsf_upload/form',
|
||||
locals: { multiple: false, container: nil, description: false, awf: false } %>
|
||||
</p>
|
||||
</div>
|
||||
<p>
|
||||
<%= f.text_area(:comment, :rows => 2, :label => l(:label_comment), :class => 'wiki-edit') %>
|
||||
<%= f.text_area :comment, rows: 2, label: l(:label_comment), class: 'wiki-edit' %>
|
||||
</p>
|
||||
<%= f.submit l(:submit_create) %>
|
||||
<% end %>
|
||||
|
||||
@ -24,18 +24,18 @@
|
||||
<% else %>
|
||||
<p>
|
||||
<% end %>
|
||||
<% file_view_url = url_for({:controller => :dmsf_files, :action => 'view', :id => dmsf_file}) %>
|
||||
<% file_view_url = url_for({ controller: :dmsf_files, action: 'view', id: dmsf_file }) %>
|
||||
<%= link_to(h(dmsf_file.title),
|
||||
file_view_url,
|
||||
:target => '_blank',
|
||||
:class => "icon icon-file #{DmsfHelper.filetype_css(dmsf_file.name)}",
|
||||
:title => h(dmsf_file.last_revision.try(:tooltip)),
|
||||
target: '_blank',
|
||||
class: "icon icon-file #{DmsfHelper.filetype_css(dmsf_file.name)}",
|
||||
title: h(dmsf_file.last_revision.try(:tooltip)),
|
||||
'data-downloadurl' => "#{dmsf_file.last_revision.detect_content_type}:#{h(dmsf_file.name)}:#{file_view_url}") %>
|
||||
<% if dmsf_file.text? || dmsf_file.image? %>
|
||||
<%= link_to l(:button_view),
|
||||
file_view_url,
|
||||
:class => 'icon-only icon-magnifier',
|
||||
:title => l(:button_view) %>
|
||||
class: 'icon-only icon-magnifier',
|
||||
title: l(:button_view) %>
|
||||
<% end %>
|
||||
<%= " - #{dmsf_file.description}" unless dmsf_file.description.blank? %>
|
||||
<span class="size">(<%= number_to_human_size dmsf_file.last_revision.size %>)</span>
|
||||
@ -44,47 +44,47 @@
|
||||
<span class="dmsf_upload_select">
|
||||
<% # Details %>
|
||||
<% if User.current.allowed_to? :file_manipulation, dmsf_file.project %>
|
||||
<%= link_to('', dmsf_file_path(:id => dmsf_file),
|
||||
:title => l(:link_details, :title => h(dmsf_file.last_revision.title)),
|
||||
:class => 'icon-only icon-edit') %>
|
||||
<%= link_to '', dmsf_file_path(id: dmsf_file),
|
||||
title: l(:link_details, title: h(dmsf_file.last_revision.title)),
|
||||
class: 'icon-only icon-edit' %>
|
||||
<% else %>
|
||||
<span class="icon-only"></span>
|
||||
<% end %>
|
||||
<% # Email %>
|
||||
<%= link_to('', entries_operations_dmsf_path(:id => dmsf_file.project_id, :email_entries => 'email',
|
||||
:ids => ["file-#{dmsf_file.id}"]), :method => :post, :title => l(:heading_send_documents_by_email),
|
||||
:class => 'icon-only icon-email-disabled') %>
|
||||
<%= link_to '', entries_operations_dmsf_path(id: dmsf_file.project_id, email_entries: 'email',
|
||||
ids: ["file-#{dmsf_file.id}"]), method: :post, title: l(:heading_send_documents_by_email),
|
||||
class: 'icon-only icon-email-disabled' %>
|
||||
<% # Lock %>
|
||||
<% if !dmsf_file.locked? %>
|
||||
<%= link_to('', lock_dmsf_files_path(:id => dmsf_file),
|
||||
:title => l(:title_lock_file),
|
||||
:class => 'icon-only icon-lock') %>
|
||||
<%= link_to '', lock_dmsf_files_path(id: dmsf_file),
|
||||
title: l(:title_lock_file),
|
||||
class: 'icon-only icon-lock' %>
|
||||
<% elsif dmsf_file.unlockable? && (!dmsf_file.locked_for_user? || User.current.allowed_to?(:force_file_unlock, dmsf_file.project)) %>
|
||||
<%= link_to('', unlock_dmsf_files_path(:id => dmsf_file),
|
||||
:title => dmsf_file.get_locked_title,
|
||||
:class => 'icon-only icon-unlock') %>
|
||||
<%= link_to '', unlock_dmsf_files_path(id: dmsf_file),
|
||||
title: dmsf_file.get_locked_title,
|
||||
class: 'icon-only icon-unlock' %>
|
||||
<% else %>
|
||||
<span class="icon-only icon-unlock" title="<%= dmsf_file.get_locked_title %>"></span>
|
||||
<% end %>
|
||||
<% if !dmsf_file.locked? %>
|
||||
<% # Notifications %>
|
||||
<% if dmsf_file.notification %>
|
||||
<%= link_to('', notify_deactivate_dmsf_files_path(:id => dmsf_file),
|
||||
:title => l(:title_notifications_active_deactivate),
|
||||
:class => 'icon-only icon-email') %>
|
||||
<%= link_to '', notify_deactivate_dmsf_files_path(id: dmsf_file),
|
||||
title: l(:title_notifications_active_deactivate),
|
||||
class: 'icon-only icon-email' %>
|
||||
<% else %>
|
||||
<%= link_to('', notify_activate_dmsf_files_path(:id => dmsf_file),
|
||||
:title => l(:title_notifications_not_active_activate),
|
||||
:class => 'icon-only icon-email-add') %>
|
||||
<%= link_to '', notify_activate_dmsf_files_path(id: dmsf_file),
|
||||
title: l(:title_notifications_not_active_activate),
|
||||
class: 'icon-only icon-email-add' %>
|
||||
<% end %>
|
||||
<% # Delete %>
|
||||
<% if @issue.attributes_editable? && User.current.allowed_to?(:file_delete, dmsf_file.project) %>
|
||||
<%= link_to('',
|
||||
link ? dmsf_link_path(link, :commit => 'yes') : dmsf_file_path(:id => dmsf_file, :commit => 'yes'),
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:method => :delete,
|
||||
:title => l(:button_delete),
|
||||
:class => 'icon-only icon-del') %>
|
||||
<%= link_to '',
|
||||
link ? dmsf_link_path(link, commit: 'yes') : dmsf_file_path(id: dmsf_file, commit: 'yes'),
|
||||
data: { confirm: l(:text_are_you_sure) },
|
||||
method: :delete,
|
||||
title: l(:button_delete),
|
||||
class: 'icon-only icon-del' %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<span class="icon-only"></span>
|
||||
@ -92,10 +92,10 @@
|
||||
<% end %>
|
||||
<% # Approval workflow %>
|
||||
<% wf = DmsfWorkflow.find_by(id: dmsf_file.last_revision.dmsf_workflow_id) if dmsf_file.last_revision.dmsf_workflow_id %>
|
||||
<%= render(: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.where(['project_id = ? OR project_id IS NULL', dmsf_file.project_id]).exists?,
|
||||
:project => dmsf_file.project, :wf => wf, :dmsf_link_id => nil }) %>
|
||||
<%= render 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.where(['project_id = ? OR project_id IS NULL', dmsf_file.project_id]).exists?,
|
||||
project: dmsf_file.project, wf: wf, dmsf_link_id: nil } %>
|
||||
</span>
|
||||
</p>
|
||||
|
||||
@ -26,8 +26,8 @@
|
||||
<div class="attachments dmsf_parent_container">
|
||||
<% # DMS documents & links %>
|
||||
<% links.each do |dmsf_file, link, create_at| %>
|
||||
<%= render :partial => 'dmsf_files/link', :locals => { :dmsf_file => dmsf_file, :link => link } %>
|
||||
<%= render partial: 'dmsf_files/link', locals: { dmsf_file: dmsf_file, link: link } %>
|
||||
<% end %>
|
||||
<%= render :partial => 'dmsf_files/thumbnails', :locals => { :links => links, :thumbnails => thumbnails, :link_to => true } %>
|
||||
<%= render partial: 'dmsf_files/thumbnails', locals: { links: links, thumbnails: thumbnails, link_to: true } %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<% query.inline_columns.each do |column| %>
|
||||
<%= column_header(query, column, query_options) %>
|
||||
<%= column_header query, column, query_options %>
|
||||
<% end %>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -37,7 +37,7 @@
|
||||
<% query.accesses.each do |access| %>
|
||||
<tr>
|
||||
<% query.inline_columns.each do |column| %>
|
||||
<%= content_tag('td', column_content(column, access), class: column.css_classes) %>
|
||||
<%= content_tag 'td', column_content(column, access), class: column.css_classes %>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
@ -30,10 +30,10 @@
|
||||
<% images.each do |file| %>
|
||||
<div>
|
||||
<% if link_to # Redmine classic %>
|
||||
<%= link_to image_tag(dmsf_thumbnail_path(file)), view_dmsf_file_path(file), :alt => file.title %>
|
||||
<%= link_to image_tag(dmsf_thumbnail_path(file)), view_dmsf_file_path(file), alt: file.title %>
|
||||
<% else # jQuery gallery %>
|
||||
<%= image_tag(dmsf_thumbnail_path(file),
|
||||
{ :'data-fullsrc' => view_dmsf_file_path(file), :alt => file.title }) %>
|
||||
{ :'data-fullsrc' => view_dmsf_file_path(file), alt: file.title }) %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@ -22,46 +22,46 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
%>
|
||||
|
||||
<% html_title(l(:dmsf)) %>
|
||||
<% html_title l(:dmsf) %>
|
||||
|
||||
<div class="contextual">
|
||||
<% if @file_manipulation_allowed %>
|
||||
<% if @file.locked_for_user? %>
|
||||
<% if User.current.allowed_to?(:force_file_unlock, @project) %>
|
||||
<%= link_to_if(@file.unlockable?, l(:button_unlock), unlock_dmsf_files_path(id: @file),
|
||||
title: l(:title_unlock_file), class: 'icon icon-unlock')%>
|
||||
<%= link_to_if @file.unlockable?, l(:button_unlock), unlock_dmsf_files_path(id: @file),
|
||||
title: l(:title_unlock_file), class: 'icon icon-unlock' %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% if @file.locked? %>
|
||||
<%= link_to_if(@file.unlockable?, l(:button_unlock), unlock_dmsf_files_path(id: @file),
|
||||
title: l(:title_unlock_file), class: 'icon icon-unlock') %>
|
||||
<%= link_to_if @file.unlockable?, l(:button_unlock), unlock_dmsf_files_path(id: @file),
|
||||
title: l(:title_unlock_file), class: 'icon icon-unlock' %>
|
||||
<% else %>
|
||||
<%= link_to(l(:button_lock), lock_dmsf_files_path(id: @file),
|
||||
title: l(:title_lock_file), class: 'icon icon-lock') %>
|
||||
<%= link_to l(:button_lock), lock_dmsf_files_path(id: @file),
|
||||
title: l(:title_lock_file), class: 'icon icon-lock' %>
|
||||
<% end %>
|
||||
<% if @file.notification %>
|
||||
<%= link_to(l(:label_notifications_off),
|
||||
<%= link_to l(:label_notifications_off),
|
||||
notify_deactivate_dmsf_files_path(id: @file),
|
||||
title: l(:title_notifications_active_deactivate),
|
||||
class: 'icon icon-email') %>
|
||||
class: 'icon icon-email' %>
|
||||
<% else %>
|
||||
<%= link_to(l(:label_notifications_on),
|
||||
<%= link_to l(:label_notifications_on),
|
||||
notify_activate_dmsf_files_path(id: @file),
|
||||
title: l(:title_notifications_not_active_activate),
|
||||
class: 'icon icon-email-add') %>
|
||||
class: 'icon icon-email-add' %>
|
||||
<% end %>
|
||||
<%= link_to(l(:label_link_to),
|
||||
<%= link_to l(:label_link_to),
|
||||
new_dmsf_link_path(project_id: @project.id, dmsf_folder_id: @file.dmsf_folder ? @file.dmsf_folder.id : nil, dmsf_file_id: @file.id, type: 'link_to'),
|
||||
title: l(:title_create_link),
|
||||
class: 'icon icon-link') %>
|
||||
<%= link_to("#{l(:button_copy)}/#{l(:button_move)}", copy_file_path(id: @file),
|
||||
title: l(:title_copy), class: 'icon icon-copy') %>
|
||||
class: 'icon icon-link' %>
|
||||
<%= link_to "#{l(:button_copy)}/#{l(:button_move)}", copy_file_path(id: @file),
|
||||
title: l(:title_copy), class: 'icon icon-copy' %>
|
||||
<%= delete_link(dmsf_file_path(id: @file, details: true)) if @file_delete_allowed %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= render(partial: '/dmsf/path', locals: { folder: @file.dmsf_folder, filename: @file.title, title: nil}) %>
|
||||
<%= render partial: '/dmsf/path', locals: { folder: @file.dmsf_folder, filename: @file.title, title: nil} %>
|
||||
|
||||
<% if @file_manipulation_allowed && !@file.locked_for_user? %>
|
||||
<%= error_messages_for('file') %>
|
||||
@ -76,7 +76,7 @@
|
||||
|
||||
<h3><%= l(:heading_revisions) %></h3>
|
||||
<% @file.dmsf_file_revisions.visible[@revision_pages.offset, @revision_pages.per_page].each do |revision| %>
|
||||
<div class="dmsf_revision_box dataTables_wrapper">
|
||||
<div class="dmsf_revision_box">
|
||||
<div class="fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix">
|
||||
<div class="dataTables_lenght">
|
||||
<div id="dmsf_tag" class="dmsf_controls contextual">
|
||||
@ -101,7 +101,7 @@
|
||||
</div>
|
||||
<i><%= l(:info_revision, rev: revision.id) %></i>
|
||||
<%= (revision.source_revision.nil? ? l(:label_created) : l(:label_changed)).downcase %>
|
||||
<%= l(:info_changed_by_user, :changed => format_time(revision.updated_at)) %>
|
||||
<%= l(:info_changed_by_user, changed: format_time(revision.updated_at)) %>
|
||||
<%= link_to(revision.user.name, user_path(revision.user)) if revision.user %>
|
||||
</div>
|
||||
</div>
|
||||
@ -185,8 +185,6 @@
|
||||
<span class="pagination"><%= pagination_links_full @revision_pages, @file.dmsf_file_revisions.visible.count %></span>
|
||||
|
||||
<%= late_javascript_tag do %>
|
||||
$('.dmsf_controls').show();
|
||||
$('#browser').show();
|
||||
$('a.delete-revision').click(function(event) {
|
||||
if(!window.confirm('<%= l(:text_are_you_sure) %>')) {
|
||||
event.preventDefault();
|
||||
@ -213,17 +211,4 @@
|
||||
$('#new_revision_form_content').show();
|
||||
}
|
||||
});
|
||||
$('.dmsf_list').dataTable({
|
||||
language: {
|
||||
url: "<%= plugin_asset_path(:redmine_dmsf, 'javascripts', json_url) %>"
|
||||
},
|
||||
oLanguage: {
|
||||
sSearch: "<%= l(:description_filter) %>:"
|
||||
}
|
||||
});
|
||||
<% end %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag 'jquery.dataTables/datatables.min.css', plugin: :redmine_dmsf %>
|
||||
<%= javascript_include_tag 'jquery.dataTables/datatables.min.js', plugin: :redmine_dmsf, defer: true %>
|
||||
<% end %>
|
||||
|
||||
@ -22,15 +22,14 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
%>
|
||||
|
||||
<%= render(:partial => '/dmsf/path', :locals => { :folder => @file.dmsf_folder, :filename => @file.title,
|
||||
:title => nil }) %>
|
||||
<%= render partial: '/dmsf/path', locals: { folder: @file.dmsf_folder, filename: @file.title, title: nil } %>
|
||||
|
||||
<%= render(:partial => '/dmsf_folders_copy/form', :locals => {
|
||||
:projects => @projects,
|
||||
:project => @project,
|
||||
:target_project => @target_project,
|
||||
:folders => @folders,
|
||||
:file_or_folder => @file,
|
||||
:target_folder => @target_folder,
|
||||
:permission => :file_manipulation
|
||||
}) %>
|
||||
<%= render partial: '/dmsf_folders_copy/form',
|
||||
locals: {
|
||||
projects: @projects,
|
||||
project: @project,
|
||||
target_project: @target_project,
|
||||
folders: @folders,
|
||||
file_or_folder: @file,
|
||||
target_folder: @target_folder,
|
||||
permission: :file_manipulation } %>
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
dmsf_folder_id: @dmsf_folder) }')" %>
|
||||
|
||||
<div id="users_for_watcher">
|
||||
<%= render_principals_for_new_folder_permissions(@principals) %>
|
||||
<%= render_principals_for_new_folder_permissions @principals %>
|
||||
</div>
|
||||
|
||||
<p class="buttons">
|
||||
|
||||
@ -23,6 +23,6 @@
|
||||
var modal = $('#ajax-modal');
|
||||
|
||||
$('#users_for_watcher').html('<%= escape_javascript(render_principals_for_new_folder_permissions(@principals)) %>');
|
||||
modal.html('<%= escape_javascript(render :partial => 'dmsf_folder_permissions/new') %>');
|
||||
modal.html('<%= escape_javascript(render partial: 'dmsf_folder_permissions/new') %>');
|
||||
showModal('ajax-modal', '400px');
|
||||
modal.addClass('new-user');
|
||||
|
||||
@ -21,23 +21,21 @@
|
||||
%>
|
||||
|
||||
<% if projects.present? %>
|
||||
<%= form_tag({:action => 'copy', :id => file_or_folder}, :id => 'copyForm') do %>
|
||||
<%= form_tag({ action: 'copy', id: file_or_folder}, id: 'copyForm') do %>
|
||||
<div class="box tabular">
|
||||
<p>
|
||||
<%= label_tag('target_project_id', l(:field_target_project)) %>
|
||||
<%= select_tag('target_project_id',
|
||||
project_tree_options_for_select(projects, :selected => target_project)) %>
|
||||
<%= label_tag 'target_project_id', l(:field_target_project) %>
|
||||
<%= select_tag 'target_project_id', project_tree_options_for_select(projects, selected: target_project) %>
|
||||
</p>
|
||||
<p>
|
||||
<%= label_tag('target_folder_id', l(:field_target_folder)) %>
|
||||
<%= select_tag('target_folder_id', options_for_select(folders,
|
||||
:selected => (target_folder.id if target_folder))) %>
|
||||
<%= label_tag 'target_folder_id', l(:field_target_folder) %>
|
||||
<%= select_tag 'target_folder_id', options_for_select(folders, selected: (target_folder.id if target_folder)) %>
|
||||
</p>
|
||||
</div>
|
||||
<p>
|
||||
<%= submit_tag(l(:button_copy), :id => 'copy_button') %>
|
||||
<%= submit_tag l(:button_copy), id: 'copy_button' %>
|
||||
<% if !file_or_folder.locked? && User.current.allowed_to?(permission, project) %>
|
||||
<%= submit_tag(l(:button_move), :id => 'move_button') %>
|
||||
<%= submit_tag l(:button_move), id: 'move_button' %>
|
||||
<% end %>
|
||||
</p>
|
||||
<% end %>
|
||||
@ -45,11 +43,11 @@
|
||||
|
||||
<%= late_javascript_tag do %>
|
||||
$('#move_button').click(function(event) {
|
||||
$('#copyForm').attr('action', "<%= url_for(:action => 'move', :id => file_or_folder) %>");
|
||||
$('#copyForm').attr('action', "<%= url_for(action: 'move', id: file_or_folder) %>");
|
||||
$('#copyForm').submit();
|
||||
});
|
||||
$('#target_project_id').change(function () {
|
||||
$('#content').load("<%= url_for(:action => 'new') %>", $('#copyForm').serialize());
|
||||
$('#content').load("<%= url_for(action: 'new') %>", $('#copyForm').serialize());
|
||||
});
|
||||
$('#target_project_id').select2();
|
||||
$('#target_folder_id').select2();
|
||||
|
||||
@ -22,14 +22,13 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
%>
|
||||
|
||||
<%= render(:partial => '/dmsf/path', :locals => { :folder => @folder, :filename => nil, :title => nil }) %>
|
||||
<%= render partial: '/dmsf/path', locals: { folder: @folder, filename: nil, title: nil } %>
|
||||
|
||||
<%= render(:partial => '/dmsf_folders_copy/form', :locals => {
|
||||
:projects => @projects,
|
||||
:project => @project,
|
||||
:target_project => @target_project,
|
||||
:folders => @folders,
|
||||
:file_or_folder => @folder,
|
||||
:target_folder => @target_folder,
|
||||
:permission => :folder_manipulation
|
||||
}) %>
|
||||
<%= render partial: '/dmsf_folders_copy/form', locals: {
|
||||
projects: @projects,
|
||||
project: @project,
|
||||
target_project: @target_project,
|
||||
folders: @folders,
|
||||
file_or_folder: @folder,
|
||||
target_folder: @target_folder,
|
||||
permission: :folder_manipulation } %>
|
||||
|
||||
@ -22,13 +22,13 @@
|
||||
|
||||
<h3 class="title"><%= l(:title_create_link) %></h3>
|
||||
|
||||
<%= labelled_form_for @dmsf_link, :remote => modal do |f| %>
|
||||
<%= labelled_form_for @dmsf_link, remote: modal do |f| %>
|
||||
<%= error_messages_for @dmsf_link %>
|
||||
<%= f.hidden_field :project_id, :value => @dmsf_link.project_id %>
|
||||
<%= f.hidden_field :dmsf_folder_id, :value => @dmsf_link.dmsf_folder_id if @dmsf_link.dmsf_folder_id %>
|
||||
<%= f.hidden_field :type, :value => @type %>
|
||||
<%= f.hidden_field :dmsf_file_id, :value => @dmsf_file_id %>
|
||||
<%= f.hidden_field(:container, :value => @container) if @container %>
|
||||
<%= f.hidden_field :project_id, value: @dmsf_link.project_id %>
|
||||
<%= f.hidden_field :dmsf_folder_id, value: @dmsf_link.dmsf_folder_id if @dmsf_link.dmsf_folder_id %>
|
||||
<%= f.hidden_field :type, value: @type %>
|
||||
<%= f.hidden_field :dmsf_file_id, value: @dmsf_file_id %>
|
||||
<%= f.hidden_field(:container, value: @container) if @container %>
|
||||
<div class="box tabular">
|
||||
<% if (@type == 'link_from') && !@container %>
|
||||
<p>
|
||||
@ -46,11 +46,11 @@
|
||||
<% end %>
|
||||
<%= select_tag('dmsf_link[target_project_id]',
|
||||
project_tree_options_for_select(DmsfFile.allowed_target_projects_on_copy,
|
||||
:selected => @dmsf_link.target_project)) %>
|
||||
selected: @dmsf_link.target_project)) %>
|
||||
<%= late_javascript_tag do %>
|
||||
$('#dmsf_link_target_project_id').change(function(){
|
||||
$.ajax({
|
||||
url: '<%= escape_javascript autocomplete_for_project_dmsf_link_path(@project, :format => 'js') %>',
|
||||
url: '<%= escape_javascript autocomplete_for_project_dmsf_link_path(@project, format: 'js') %>',
|
||||
type: 'get',
|
||||
data: $('#new_dmsf_link').serialize()
|
||||
});
|
||||
@ -67,17 +67,17 @@
|
||||
<span class="required">*</span>
|
||||
</label>
|
||||
<% if @fast_links %>
|
||||
<%= text_field_tag 'dmsf_link[target_folder_id]', '', :required => true, :max_length => 255 %>
|
||||
<%= text_field_tag 'dmsf_link[target_folder_id]', '', required: true, max_length: 255 %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% 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),
|
||||
:selected => @target_folder_id)) %>
|
||||
selected: @target_folder_id)) %>
|
||||
<%= late_javascript_tag do %>
|
||||
$('#dmsf_link_target_folder_id').change(function(){
|
||||
$.ajax({
|
||||
url: '<%= escape_javascript autocomplete_for_folder_dmsf_link_path(@project, :format => 'js') %>',
|
||||
url: '<%= escape_javascript autocomplete_for_folder_dmsf_link_path(@project, format: 'js') %>',
|
||||
type: 'get',
|
||||
data: $('#new_dmsf_link').serialize()
|
||||
});
|
||||
@ -90,24 +90,24 @@
|
||||
<%= label_tag('dmsf_link[target_file_id]', l(:field_target_file)) %>
|
||||
<% files = files_for_select(@dmsf_link.target_project.id, @target_folder_id) %>
|
||||
<%= select_tag('dmsf_link[target_file_id]',
|
||||
options_for_select(DmsfFolder.file_list(files)), :required => modal) %>
|
||||
options_for_select(DmsfFolder.file_list(files)), required: modal) %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if (@type == 'link_from') && !@container %>
|
||||
<div id="dmsf_link_external">
|
||||
<p>
|
||||
<%= f.text_field :external_url, :required => false %>
|
||||
<%= f.text_field :external_url, required: false %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<p>
|
||||
<%= f.text_field :name, :required => true, :max_length => 255 %>
|
||||
<%= f.text_field :name, required: true, max_length: 255 %>
|
||||
</p>
|
||||
</div>
|
||||
<p>
|
||||
<% if modal %>
|
||||
<%= f.submit l(:button_create), :onclick => 'hideModal(this);' %>
|
||||
<%= f.submit l(:button_create), onclick: 'hideModal(this);' %>
|
||||
<% else %>
|
||||
<%= f.submit l(:button_create) %>
|
||||
<% end %>
|
||||
|
||||
@ -20,4 +20,4 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
%>
|
||||
|
||||
<%= render :partial => 'form', :locals => { :modal => false } %>
|
||||
<%= render partial: 'form', locals: { modal: false } %>
|
||||
@ -20,5 +20,5 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
%>
|
||||
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'form', :locals => { :modal => true }) %>');
|
||||
$('#ajax-modal').html('<%= escape_javascript(render partial: 'form', locals: { modal: true }) %>');
|
||||
showModal('ajax-modal', '40%');
|
||||
@ -22,14 +22,12 @@
|
||||
<%= link_to @project, project_url(@project) %> <%= l(:text_email_doc_follows) %>
|
||||
<% @files.each do |file| %>
|
||||
<p>
|
||||
<%= link_to(h(file.dmsf_path_str),
|
||||
dmsf_file_url(file, :download => '')) %>
|
||||
<%= link_to h(file.dmsf_path_str), dmsf_file_url(file, download: '') %>
|
||||
(<%= file.name %>),
|
||||
<%= number_to_human_size(file.last_revision.size) %>,
|
||||
<%= l(:label_dmsf_version) %> <%= file.last_revision.version %>,
|
||||
<%= "#{file.last_revision.workflow_str(true)}," if file.last_revision.workflow_str(true) != l(:title_none) %>
|
||||
<%= link_to(l(:link_details, :title => h(file.title)),
|
||||
dmsf_file_url(file)) %>
|
||||
<%= link_to l(:link_details, title: h(file.title)), dmsf_file_url(file) %>
|
||||
<% if file.last_revision.comment.present? %>
|
||||
<br/><span style="font-size: 0.9em"> <em><%= h(file.last_revision.comment) %></em></span>
|
||||
<% end %>
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
<% dir = DmsfFolder.find_by(id: i) %>
|
||||
<% if dir && !folders.include?(dir) %>
|
||||
<br/>
|
||||
<%= link_to(h(dir.dmsf_path_str), dmsf_folder_path(:id => dir.project_id, :folder_id => dir.id, :only_path => false)) %>
|
||||
<%= link_to h(dir.dmsf_path_str), dmsf_folder_path(id: dir.project_id, folder_id: dir.id, only_path: false) %>
|
||||
<br/><br/>
|
||||
<% dir.dmsf_files.each do |file| %>
|
||||
<% unless files.include?(file) %>
|
||||
@ -44,8 +44,8 @@
|
||||
<% dmsf_public_url.user = @author %>
|
||||
<% dmsf_public_url.expire_at = @expired_at %>
|
||||
<% dmsf_public_url.save %>
|
||||
<%= link_to(h(file.title), dmsf_public_urls_url(:token => dmsf_public_url.token)) %>
|
||||
(<%= link_to(h(file.name), dmsf_public_urls_url(:token => dmsf_public_url.token)) %>)
|
||||
<%= link_to h(file.title), dmsf_public_urls_url(token: dmsf_public_url.token) %>
|
||||
(<%= link_to h(file.name), dmsf_public_urls_url(token: dmsf_public_url.token) %>)
|
||||
<% else %>
|
||||
<%= link_to(h(file.title), dmsf_file_url(file)) %>
|
||||
(<%= link_to(h(file.name), dmsf_file_url(file)) %>)
|
||||
@ -71,11 +71,11 @@
|
||||
<% dmsf_public_url.user = @author %>
|
||||
<% dmsf_public_url.expire_at = @expired_at %>
|
||||
<% dmsf_public_url.save %>
|
||||
<%= link_to(h(file.title), dmsf_public_urls_url(:token => dmsf_public_url.token)) %>
|
||||
(<%= link_to(h(file.name), dmsf_public_urls_url(:token => dmsf_public_url.token)) %>)
|
||||
<%= link_to h(file.title), dmsf_public_urls_url(token: dmsf_public_url.token) %>
|
||||
(<%= link_to h(file.name), dmsf_public_urls_url(token: dmsf_public_url.token) %>)
|
||||
<% else %>
|
||||
<%= link_to(h(file.title), dmsf_file_url(file)) %>
|
||||
(<%= link_to(h(file.name), dmsf_file_url(file)) %>)
|
||||
<%= link_to h(file.title), dmsf_file_url(file) %>
|
||||
(<%= link_to h(file.name), dmsf_file_url(file) %>)
|
||||
<% end %>
|
||||
<br/>
|
||||
<% files << file %>
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
<% dmsf_public_url.user = @author %>
|
||||
<% dmsf_public_url.expire_at = @expired_at %>
|
||||
<% dmsf_public_url.save %>
|
||||
<%= dmsf_public_urls_url(:token => dmsf_public_url.token) %>
|
||||
<%= dmsf_public_urls_url(token: dmsf_public_url.token) %>
|
||||
<% else %>
|
||||
<%= dmsf_file_url(file) %>
|
||||
<% end %>
|
||||
@ -64,7 +64,7 @@
|
||||
<% dmsf_public_url.user = @author %>
|
||||
<% dmsf_public_url.expire_at = @expired_at %>
|
||||
<% dmsf_public_url.save %>
|
||||
<%= dmsf_public_urls_url(:token => dmsf_public_url.token) %>
|
||||
<%= dmsf_public_urls_url(token: dmsf_public_url.token) %>
|
||||
<% else %>
|
||||
<%= dmsf_file_url(file) %>
|
||||
<% end %>
|
||||
|
||||
@ -24,9 +24,8 @@
|
||||
<%= @text2 %>
|
||||
<% if @revision.dmsf_file.dmsf_folder %>
|
||||
<%= link_to @revision.dmsf_file.dmsf_folder.title,
|
||||
dmsf_folder_url(:id => @revision.dmsf_file.project, :folder_id => @revision.dmsf_file.dmsf_folder) %>
|
||||
dmsf_folder_url(id: @revision.dmsf_file.project, folder_id: @revision.dmsf_file.dmsf_folder) %>
|
||||
<% else %>
|
||||
<%= link_to l(:link_documents),
|
||||
dmsf_folder_url(:id => @revision.dmsf_file.project) %>
|
||||
<%= link_to l(:link_documents), dmsf_folder_url(id: @revision.dmsf_file.project) %>
|
||||
<% end %>.
|
||||
</p>
|
||||
@ -22,7 +22,7 @@
|
||||
<%= @user.name %>,
|
||||
<%= @text1 %>
|
||||
<% if @revision.dmsf_file.dmsf_folder %>
|
||||
<%= @text2 %> <%= dmsf_folder_url(:id => @revision.dmsf_file.project, :folder_id => @revision.dmsf_file.dmsf_folder) %>.
|
||||
<%= @text2 %> <%= dmsf_folder_url(id: @revision.dmsf_file.project, folder_id: @revision.dmsf_file.dmsf_folder) %>.
|
||||
<% else %>
|
||||
<%= @text2 %> <%= dmsf_folder_url(:id => @revision.dmsf_file.project) %>.
|
||||
<%= @text2 %> <%= dmsf_folder_url(id: @revision.dmsf_file.project) %>.
|
||||
<% end %>
|
||||
@ -22,7 +22,7 @@
|
||||
%>
|
||||
|
||||
<span id="public_url" <%= "class='hol'" unless Setting.plugin_redmine_dmsf['dmsf_documents_email_links_only'] %>">
|
||||
<%= check_box_tag('email[public_urls]', 1, false) %> <%= l(:label_public_urls) %>
|
||||
<%= date_field_tag('email[expired_at]', '', :value => (DateTime.current + 3.days).to_date, :size => 10,
|
||||
:readonly => true) + calendar_for('email_expired_at') %>
|
||||
<%= check_box_tag 'email[public_urls]', 1, false %> <%= l(:label_public_urls) %>
|
||||
<%= date_field_tag('email[expired_at]', '', value: (DateTime.current + 3.days).to_date, size: 10, readonly: true) +
|
||||
calendar_for('email_expired_at') %>
|
||||
</span>
|
||||
|
||||
@ -34,20 +34,19 @@
|
||||
<legend><%= l(:link_user_preferences) %></legend>
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_notifications)) %>
|
||||
<%= select_tag(
|
||||
'email_notify',
|
||||
<%= select_tag 'email_notify',
|
||||
options_for_select([[l(:select_option_default), nil],
|
||||
[l(:select_option_activated), true], [l(:select_option_deactivated), false]],
|
||||
:selected => mail_notification)) %>
|
||||
selected: mail_notification) %>
|
||||
</p>
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_title_format)) %>
|
||||
<%= text_field_tag 'title_format', title_format, :size => 10 %>
|
||||
<%= content_tag :label, l(:label_title_format) %>
|
||||
<%= text_field_tag 'title_format', title_format, size: 10 %>
|
||||
<em class="info"><%= l(:text_title_format) %></em>
|
||||
</p>
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_dmsf_fast_links)) %>
|
||||
<%= check_box_tag('fast_links', 1, fast_links) %>
|
||||
<%= content_tag :label, l(:label_dmsf_fast_links) %>
|
||||
<%= check_box_tag 'fast_links', 1, fast_links %>
|
||||
<em class="info">
|
||||
<%= l(:text_dmsf_fast_links_info) %>
|
||||
</em>
|
||||
@ -58,14 +57,13 @@
|
||||
<legend><%= l(:field_project) %> <%= l(:label_preferences) %></legend>
|
||||
<p>
|
||||
<%= content_tag(:label, "#{l(:label_act_as_attachable)}:") %>
|
||||
<%= select_tag(
|
||||
'act_as_attachable',
|
||||
<%= select_tag 'act_as_attachable',
|
||||
options_for_select([
|
||||
[l(:label_attachment_plural) + ' & ' + l(:menu_dmsf), Project::ATTACHABLE_DMS_AND_ATTACHMENTS],
|
||||
[l(:label_attachment_plural), Project::ATTACHABLE_ATTACHMENTS],
|
||||
],:selected => @project.dmsf_act_as_attachable)) %>
|
||||
], selected: @project.dmsf_act_as_attachable) %>
|
||||
</p>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
<%= submit_tag(l(:submit_save), :title => l(:title_save_preferences)) %>
|
||||
<%= submit_tag l(:submit_save), title: l(:title_save_preferences) %>
|
||||
<% end %>
|
||||
@ -25,19 +25,19 @@
|
||||
<% container.saved_dmsf_attachments.each_with_index do |attachment, i| %>
|
||||
<span id="dmsf_attachments_p<%= i %>" class="attachment">
|
||||
<%= 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') %>
|
||||
<%= 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 %>
|
||||
<a href="javascript:void(0);" title="<%= l(:title_assigned) %>" class="icon-only icon-ok"></a>
|
||||
<%= 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') %>
|
||||
<%= 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 %>
|
||||
</span>
|
||||
<% end %>
|
||||
@ -50,19 +50,19 @@
|
||||
<span id="dmsf_links_attachments_<%= index %>" class="attachment">
|
||||
<input name="dmsf_links[<%= index %>]" value="<%= dmsf_link.id %>" type="hidden">
|
||||
<input type="text" class='filename readonly' value="<%= dmsf_link.name %>">
|
||||
<%= link_to('', dmsf_link_attachment_path(dmsf_link, :link_id => "#{index}", :format => 'js'),
|
||||
:method => 'delete', :remote => true, :class => 'remove-upload icon-only icon-del') %>
|
||||
<%= 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 %>
|
||||
<a href="javascript:void(0);" title="<%= l(:title_assigned) %>" class="modify-upload icon-only icon-ok"></a>
|
||||
<%= hidden_field_tag("dmsf_links_wfs[#{dmsf_link.id}]", wf.id) if wf %>
|
||||
<% else %>
|
||||
<%= render(:partial => 'dmsf_workflows/approval_workflow_button',
|
||||
:locals => {:file => dmsf_link.target_file,
|
||||
:file_approval_allowed => User.current.allowed_to?(:file_approval, dmsf_link.target_file.project),
|
||||
:workflows_available => DmsfWorkflow.where(
|
||||
<%= render partial: 'dmsf_workflows/approval_workflow_button',
|
||||
locals: { file: dmsf_link.target_file,
|
||||
file_approval_allowed: User.current.allowed_to?(:file_approval, dmsf_link.target_file.project),
|
||||
workflows_available: DmsfWorkflow.where(
|
||||
['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 }) %>
|
||||
project: dmsf_link.target_file.project, wf: wf, dmsf_link_id: dmsf_link.id } %>
|
||||
<% end %>
|
||||
</span>
|
||||
<% end %>
|
||||
@ -71,27 +71,27 @@
|
||||
|
||||
<span class="dmsf_add_attachment add_attachment">
|
||||
<%= file_field_tag 'dmsf_attachments[dummy][file]',
|
||||
:id => nil,
|
||||
:class => 'file_selector',
|
||||
:multiple => multiple,
|
||||
:onchange => "dmsfAddInputFiles(this);",
|
||||
:data => {
|
||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||
:max_file_size_message => l(:error_attachment_too_big,
|
||||
: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 ? "#{@project.identifier}" : "",
|
||||
:description => description,
|
||||
:awf => awf
|
||||
id: nil,
|
||||
class: 'file_selector',
|
||||
multiple: multiple,
|
||||
onchange: 'dmsfAddInputFiles(this);',
|
||||
data: {
|
||||
max_file_size: Setting.attachment_max_size.to_i.kilobytes,
|
||||
max_file_size_message: l(:error_attachment_too_big,
|
||||
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 ? "#{@project.identifier}" : '',
|
||||
description: description,
|
||||
awf: awf
|
||||
} %>
|
||||
</span>
|
||||
<% if defined?(container) && container %>
|
||||
<span class="dmsf_add_link">
|
||||
<%= link_to l(:label_link_from),
|
||||
new_dmsf_link_path(:project_id => container.project.id, :type => 'link_from', :container => container.class.name),
|
||||
:title => l(:title_create_link), :class => 'icon icon-add file_selector', :remote => true %>
|
||||
new_dmsf_link_path(project_id: container.project.id, type: 'link_from', container: container.class.name),
|
||||
title: l(:title_create_link), class: 'icon icon-add file_selector', remote: true %>
|
||||
</span>
|
||||
<% end %>
|
||||
<span class="info">
|
||||
|
||||
@ -23,28 +23,28 @@
|
||||
%>
|
||||
|
||||
<div class="box tabular" style="padding-top: 10px">
|
||||
<%= hidden_field_tag("commited_files[#{i}][disk_filename]", upload.disk_filename) %>
|
||||
<%= hidden_field_tag("commited_files[#{i}][tempfile_path]", upload.tempfile_path) %>
|
||||
<%= hidden_field_tag("commited_files[#{i}][size]", upload.size) %>
|
||||
<%= hidden_field_tag("commited_files[#{i}][mime_type]", upload.mime_type) %>
|
||||
<%= hidden_field_tag "commited_files[#{i}][disk_filename]", upload.disk_filename %>
|
||||
<%= hidden_field_tag "commited_files[#{i}][tempfile_path]", upload.tempfile_path %>
|
||||
<%= hidden_field_tag "commited_files[#{i}][size]", upload.size %>
|
||||
<%= hidden_field_tag "commited_files[#{i}][mime_type]", upload.mime_type %>
|
||||
<div class="clear">
|
||||
<div class="splitcontentleft">
|
||||
<p>
|
||||
<%= label_tag("commited_files[#{i}][title]", l(:label_title)) %>
|
||||
<%= text_field_tag("commited_files[#{i}][title]", upload.title, :required => true) %>
|
||||
<%= label_tag "commited_files[#{i}][title]", l(:label_title) %>
|
||||
<%= text_field_tag "commited_files[#{i}][title]", upload.title, required:true %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="splitcontentright">
|
||||
<p>
|
||||
<%= label_tag('', l(:label_filename)) %>
|
||||
<%= text_field_tag(:name, h(upload.name), :readonly => true) %>
|
||||
<%= hidden_field_tag("commited_files[#{i}][name]", upload.name) %>
|
||||
<%= label_tag '', l(:label_filename) %>
|
||||
<%= text_field_tag :name, h(upload.name), readonly: true %>
|
||||
<%= hidden_field_tag "commited_files[#{i}][name]", upload.name %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
<%= label_tag("commited_files[#{i}][description]", l(:label_description)) %>
|
||||
<%= text_area_tag("commited_files[#{i}][description]", upload.description, :rows => 6, :class => 'wiki-edit') %>
|
||||
<%= label_tag "commited_files[#{i}][description]", l(:label_description) %>
|
||||
<%= text_area_tag "commited_files[#{i}][description]", upload.description, rows: 6, class: 'wiki-edit' %>
|
||||
</p>
|
||||
<div class="clear">
|
||||
<div class="splitcontentright">
|
||||
@ -57,41 +57,41 @@
|
||||
</div>
|
||||
<div class="splitcontentleft">
|
||||
<p>
|
||||
<%= label_tag("commited_files[#{i}][version]_minor", l(:label_dmsf_version)) %>
|
||||
<%= radio_button_tag("commited_files[#{i}][version]", 1, true) %>
|
||||
<%= label_tag "commited_files[#{i}][version]_minor", l(:label_dmsf_version) %>
|
||||
<%= radio_button_tag "commited_files[#{i}][version]", 1, true %>
|
||||
<%= DmsfUploadHelper::gui_version(upload.major_version) %>.<%= DmsfUploadHelper::gui_version(DmsfUploadHelper.increase_version(upload.minor_version, 1)) %>
|
||||
<%= l(:option_version_minor) %><br/>
|
||||
<%= radio_button_tag("commited_files[#{i}][version]", 2) %>
|
||||
<%= radio_button_tag "commited_files[#{i}][version]", 2 %>
|
||||
<%= DmsfUploadHelper::gui_version(DmsfUploadHelper::increase_version(upload.major_version, 1)) %>.0
|
||||
<%= l(:option_version_major) %><br/>
|
||||
<%= radio_button_tag("commited_files[#{i}][version]", 3) %>
|
||||
<%= radio_button_tag "commited_files[#{i}][version]", 3 %>
|
||||
<%= select_tag "commited_files[#{i}][custom_version_major]",
|
||||
options_for_select(DmsfUploadHelper::major_version_select_options,
|
||||
DmsfUploadHelper::gui_version(DmsfUploadHelper::increase_version(upload.major_version, 2))),
|
||||
:onchange => "$('#commited_files_#{i}_version_3').prop('checked', true)",
|
||||
:class => 'dmsf_select_version'%>.
|
||||
onchange: "$('#commited_files_#{i}_version_3').prop('checked', true)",
|
||||
class: 'dmsf_select_version'%>.
|
||||
<%= select_tag "commited_files[#{i}][custom_version_minor]",
|
||||
options_for_select(DmsfUploadHelper::minor_version_select_options,
|
||||
DmsfUploadHelper::gui_version(DmsfUploadHelper.increase_version(upload.minor_version, 1))),
|
||||
:onchange => "$('#commited_files_#{i}_version_3').prop('checked', true)",
|
||||
:class => 'dmsf_select_version' %>
|
||||
onchange: "$('#commited_files_#{i}_version_3').prop('checked', true)",
|
||||
class: 'dmsf_select_version' %>
|
||||
<%= l(:option_version_custom) %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="splitcontentright">
|
||||
<p>
|
||||
<%= label_tag '', l(:label_mime) %>
|
||||
<%= text_field_tag(:name, h(upload.mime_type), :readonly => true) %>
|
||||
<%= text_field_tag :name, h(upload.mime_type), readonly: true %>
|
||||
</p>
|
||||
<p>
|
||||
<%= label_tag('', l(:label_size)) %>
|
||||
<%= text_field_tag(:name, number_to_human_size(upload.size), :readonly => true) %>
|
||||
<%= label_tag '', l(:label_size) %>
|
||||
<%= text_field_tag :name, number_to_human_size(upload.size), readonly: true %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
<%= label_tag("commited_files[#{i}][comment]", l(:label_comment)) %>
|
||||
<%= text_area_tag("commited_files[#{i}][comment]", upload.comment, :rows => 2, :class => 'wiki-edit') %>
|
||||
<%= label_tag "commited_files[#{i}][comment]", l(:label_comment) %>
|
||||
<%= text_area_tag "commited_files[#{i}][comment]", upload.comment, rows: 2, class: 'wiki-edit' %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@ -23,31 +23,31 @@
|
||||
%>
|
||||
|
||||
<div class="box tabular" style="padding-top: 10px">
|
||||
<%= hidden_field_tag("commited_files[#{i}][disk_filename]", upload.disk_filename) %>
|
||||
<%= hidden_field_tag("commited_files[#{i}][tempfile_path]", upload.tempfile_path) %>
|
||||
<%= hidden_field_tag("commited_files[#{i}][size]", upload.size) %>
|
||||
<%= hidden_field_tag("commited_files[#{i}][mime_type]", upload.mime_type) %>
|
||||
<%= hidden_field_tag("commited_files[#{i}][name]", upload.name) %>
|
||||
<%= hidden_field_tag "commited_files[#{i}][disk_filename]", upload.disk_filename %>
|
||||
<%= hidden_field_tag "commited_files[#{i}][tempfile_path]", upload.tempfile_path %>
|
||||
<%= hidden_field_tag "commited_files[#{i}][size]", upload.size %>
|
||||
<%= hidden_field_tag "commited_files[#{i}][mime_type]", upload.mime_type %>
|
||||
<%= hidden_field_tag "commited_files[#{i}][name]", upload.name %>
|
||||
<p class="warning"><%= l(:info_file_locked) %></p>
|
||||
<div class="clear">
|
||||
<div class="splitcontentleft">
|
||||
<p>
|
||||
<%= label_tag('', l(:label_title)) %>
|
||||
<%= text_field_tag(:name, h(upload.title), :readonly => true) %>
|
||||
<%= label_tag '', l(:label_title) %>
|
||||
<%= text_field_tag :name, h(upload.title), readonly: true %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="splitcontentright">
|
||||
<p>
|
||||
<%= label_tag('', l(:label_filename)) %>
|
||||
<%= text_field_tag(:name, h(upload.name), :readonly => true) %>
|
||||
<%= label_tag '', l(:label_filename) %>
|
||||
<%= text_field_tag :name, h(upload.name), readonly: true %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<% if upload.description.present? %>
|
||||
<p>
|
||||
<%= label_tag('', l(:label_description)) %>
|
||||
<%= label_tag '', l(:label_description) %>
|
||||
<div class="wiki">
|
||||
<%= textilizable(upload.description) %>
|
||||
<%= textilizable upload.description %>
|
||||
</div>
|
||||
</p>
|
||||
<% end %>
|
||||
@ -56,34 +56,36 @@
|
||||
<div class="custom_fields">
|
||||
<% upload.custom_values.each do |value| %>
|
||||
<p>
|
||||
<%= label_tag('', h(value.custom_field.name)) %>
|
||||
<%= label_tag '', h(value.custom_field.name) %>
|
||||
<% value.value = nil if value.custom_field.dmsf_not_inheritable %>
|
||||
<%= text_field_tag(:name, h(value.value), :readonly => true) %>
|
||||
<%= text_field_tag :name, h(value.value), readonly: true %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="splitcontentleft">
|
||||
<p>
|
||||
<%= label_tag('', l(:label_dmsf_version)) %>
|
||||
<%= text_field_tag(:name, "#{DmsfUploadHelper::gui_version(upload.major_version)}.#{DmsfUploadHelper::gui_version(upload.minor_version)}", :readonly => true) %>
|
||||
<%= label_tag '', l(:label_dmsf_version) %>
|
||||
<%= text_field_tag :name,
|
||||
"#{DmsfUploadHelper::gui_version(upload.major_version)}.#{DmsfUploadHelper::gui_version(upload.minor_version)}",
|
||||
readonly: true %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="splitcontentright">
|
||||
<p>
|
||||
<%= label_tag('', l(:label_mime)) %>
|
||||
<%= text_field_tag(:name, h(upload.mime_type), :readonly => true) %>
|
||||
<%= label_tag '', l(:label_mime) %>
|
||||
<%= text_field_tag :name, h(upload.mime_type), readonly: true %>
|
||||
</p>
|
||||
<p>
|
||||
<%= label_tag('', l(:label_size)) %>
|
||||
<%= text_field_tag(:name, h(number_to_human_size(upload.size)), :readonly => true) %>
|
||||
<%= label_tag '', l(:label_size) %>
|
||||
<%= text_field_tag :name, h(number_to_human_size(upload.size)), readonly: true %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<% if upload.comment.present? %>
|
||||
<p>
|
||||
<%= label_tag('', l(:label_comment)) %>
|
||||
<div class="wiki"><%= textilizable(upload.comment) %></div>
|
||||
<%= label_tag '', l(:label_comment) %>
|
||||
<div class="wiki"><%= textilizable upload.comment %></div>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
api.array :dmsf_files, api_meta(:total_count => @files.size) do
|
||||
api.array :dmsf_files, api_meta(total_count: @files.size) do
|
||||
@files.each do |file|
|
||||
api.file do
|
||||
api.id file.id
|
||||
|
||||
@ -20,8 +20,8 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
%>
|
||||
|
||||
<%= render(partial: '/dmsf/path',
|
||||
locals: { folder: @folder, filename: nil, title: l(:label_attachment_new) }) %>
|
||||
<%= render partial: '/dmsf/path',
|
||||
locals: { folder: @folder, filename: nil, title: l(:label_attachment_new) } %>
|
||||
<%= form_tag({ controller: 'dmsf_upload', action: 'upload_files', id: @project, folder_id: @folder },
|
||||
id: 'uploadform', method: :post, multipart: true) do %>
|
||||
<div>
|
||||
|
||||
@ -30,7 +30,7 @@ fileSpan.find('a.dmsf-remove-upload')
|
||||
.attr({
|
||||
"data-remote": true,
|
||||
"data-method": 'delete',
|
||||
href: '<%= j dmsf_attachment_path(@attachment, :attachment_id => params[:attachment_id], :format => 'js') %>'
|
||||
href: '<%= j dmsf_attachment_path(@attachment, attachment_id: params[:attachment_id], format: 'js') %>'
|
||||
})
|
||||
.off('click');
|
||||
<% end %>
|
||||
|
||||
@ -24,8 +24,8 @@
|
||||
|
||||
<% html_title l(:dmsf) %>
|
||||
|
||||
<%= render(partial: '/dmsf/path',
|
||||
locals: { folder: @folder, filename: nil, title: l(:heading_uploaded_files) }) %>
|
||||
<%= render partial: '/dmsf/path',
|
||||
locals: { folder: @folder, filename: nil, title: l(:heading_uploaded_files) } %>
|
||||
|
||||
<% if (@folder && @folder.description.present?) || @project.dmsf_description.present? %>
|
||||
<div class="wiki">
|
||||
@ -34,13 +34,12 @@
|
||||
<% end %>
|
||||
|
||||
<% unless @uploads.empty? %>
|
||||
<%= form_tag({ action: 'commit_files', id: @project, folder_id: @folder },
|
||||
method: :post) do %>
|
||||
<%= form_tag({ action: 'commit_files', id: @project, folder_id: @folder }, method: :post) do %>
|
||||
<% @uploads.each_with_index do |upload, i| %>
|
||||
<% if upload.locked %>
|
||||
<%= render(partial: 'upload_file_locked', locals: { upload: upload, i: i }) %>
|
||||
<%= render partial: 'upload_file_locked', locals: { upload: upload, i: i } %>
|
||||
<% else %>
|
||||
<%= render(partial: 'upload_file', locals: { upload: upload, i: i }) %>
|
||||
<%= render partial: 'upload_file', locals: { upload: upload, i: i } %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="form-actions">
|
||||
|
||||
@ -22,8 +22,7 @@
|
||||
|
||||
<h3 class="title"><%= l(:field_label_dmsf_workflow) %></h3>
|
||||
|
||||
<%= form_tag({:controller => 'dmsf_workflows', :action => 'new_action'},
|
||||
:method => :post, :id => 'new-action-form') do %>
|
||||
<%= form_tag({ controller: 'dmsf_workflows', action: 'new_action'}, method: :post, id: 'new-action-form') do %>
|
||||
<%= hidden_field_tag :dmsf_workflow_step_assignment_id, params[:dmsf_workflow_step_assignment_id] %>
|
||||
<%= hidden_field_tag :dmsf_file_revision_id, params[:dmsf_file_revision_id] %>
|
||||
<p>
|
||||
@ -38,13 +37,13 @@
|
||||
<%= l(:label_dmsf_wokflow_action_reject) %>
|
||||
</label>
|
||||
<br/>
|
||||
<%= text_area_tag :note, '', :placeholder => l(:message_dmsf_wokflow_note), :style => 'width: 90%' %>
|
||||
<%= text_area_tag :note, '', placeholder: l(:message_dmsf_wokflow_note), style: 'width: 90%' %>
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<%= label_tag 'delegate', l(:label_dmsf_wokflow_action_delegate) %><br/>
|
||||
<%= 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]) }')" %>
|
||||
<%= 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])}')" %>
|
||||
<div id="dmsf_users_for_delegate">
|
||||
<%= render_principals_for_new_dmsf_workflow_users(
|
||||
@dmsf_workflow, params[:dmsf_workflow_step_assignment_id], params[:dmsf_file_revision_id]) %>
|
||||
@ -52,7 +51,7 @@
|
||||
</div>
|
||||
|
||||
<p class="buttons">
|
||||
<%= submit_tag l(:button_submit), :name => 'commit', :onclick => 'hideModal(this);' %>
|
||||
<%= submit_tag l(:button_cancel), :name => 'commit', :onclick => 'hideModal(this);' %>
|
||||
<%= submit_tag l(:button_submit), name: 'commit', onclick: 'hideModal(this);' %>
|
||||
<%= submit_tag l(:button_cancel), name: 'commit', onclick: 'hideModal(this);' %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
@ -27,15 +27,13 @@
|
||||
<% assignments = wf.next_assignments(file.last_revision.id) %>
|
||||
<% index = assignments.find_index{|assignment| assignment.user_id == User.current.id} if assignments %>
|
||||
<% if assignments && index %>
|
||||
<%= link_to('',
|
||||
action_dmsf_workflow_path(
|
||||
:project_id => project.id,
|
||||
:id => wf.id,
|
||||
:dmsf_workflow_step_assignment_id => assignments[index].id,
|
||||
:dmsf_file_revision_id => file.last_revision.id),
|
||||
:title => l(:title_waiting_for_approval),
|
||||
:remote => true,
|
||||
:class => 'icon-only icon-ok') %>
|
||||
<%= link_to '',
|
||||
action_dmsf_workflow_path(project_id: project.id, id: wf.id,
|
||||
dmsf_workflow_step_assignment_id: assignments[index].id,
|
||||
dmsf_file_revision_id: file.last_revision.id),
|
||||
title: l(:title_waiting_for_approval),
|
||||
remote: true,
|
||||
class: 'icon-only icon-ok' %>
|
||||
<% else %>
|
||||
<span class="icon-only"></span>
|
||||
<% end %>
|
||||
@ -44,12 +42,11 @@
|
||||
<% end %>
|
||||
<% when DmsfWorkflow::STATE_ASSIGNED %>
|
||||
<% if User.current && (file.last_revision.dmsf_workflow_assigned_by_user == User.current) && wf %>
|
||||
<%= link_to('',
|
||||
start_dmsf_workflow_path(
|
||||
:id => file.last_revision.dmsf_workflow_id,
|
||||
:dmsf_file_revision_id => file.last_revision.id),
|
||||
:title => l(:label_dmsf_wokflow_action_start),
|
||||
:class => 'icon-only icon-ok') %>
|
||||
<%= link_to '',
|
||||
start_dmsf_workflow_path(id: file.last_revision.dmsf_workflow_id,
|
||||
dmsf_file_revision_id: file.last_revision.id),
|
||||
title: l(:label_dmsf_wokflow_action_start),
|
||||
class: 'icon-only icon-ok' %>
|
||||
<% else %>
|
||||
<span class="icon"></span>
|
||||
<% end %>
|
||||
@ -57,19 +54,14 @@
|
||||
<span class="icon-only"></span>
|
||||
<% else %>
|
||||
<% if workflows_available %>
|
||||
<%= link_to('',
|
||||
<%= link_to '',
|
||||
dmsf_link_id ?
|
||||
assign_dmsf_workflow_path(
|
||||
:id => project.id,
|
||||
:project_id => project.id,
|
||||
:dmsf_link_id => dmsf_link_id) :
|
||||
assign_dmsf_workflow_path(
|
||||
:id => project.id,
|
||||
:project_id => project.id,
|
||||
:dmsf_file_revision_id => file.last_revision.id),
|
||||
:title => l(:label_dmsf_wokflow_action_assign),
|
||||
:remote => true,
|
||||
:class => 'icon-only icon-ok') %>
|
||||
assign_dmsf_workflow_path(id: project.id, project_id: project.id, dmsf_link_id: dmsf_link_id) :
|
||||
assign_dmsf_workflow_path(id: project.id, project_id: project.id,
|
||||
dmsf_file_revision_id: file.last_revision.id),
|
||||
title: l(:label_dmsf_wokflow_action_assign),
|
||||
remote: true,
|
||||
class: 'icon-only icon-ok' %>
|
||||
<% else %>
|
||||
<span class="icon-only"></span>
|
||||
<% end %>
|
||||
|
||||
@ -22,25 +22,22 @@
|
||||
|
||||
<h3 class="title"><%= l(:field_label_dmsf_workflow) %></h3>
|
||||
<% remote = params[:dmsf_link_id] || params[:attachment_id] %>
|
||||
<%= form_tag({:controller => 'dmsf_workflows', :action => 'assignment'},
|
||||
:method => :post, :id => 'assignment-form', :remote => remote) do %>
|
||||
<%= form_tag({ controller: 'dmsf_workflows', action: 'assignment' }, method: :post, id: 'assignment-form',
|
||||
remote: remote) do %>
|
||||
<%= hidden_field_tag :dmsf_file_revision_id, params[:dmsf_file_revision_id] %>
|
||||
<%= hidden_field_tag :dmsf_link_id, params[:dmsf_link_id] %>
|
||||
<%= hidden_field_tag :attachment_id, params[:attachment_id] %>
|
||||
<p>
|
||||
<%= label_tag('workflow', "#{l(:link_workflow)}:") %>
|
||||
<%= select_tag(
|
||||
'dmsf_workflow_id',
|
||||
dmsf_workflows_for_select(@project, nil))%>
|
||||
<%= label_tag 'workflow', "#{l(:link_workflow)}:" %>
|
||||
<%= select_tag 'dmsf_workflow_id', dmsf_workflows_for_select(@project, nil)%>
|
||||
</p>
|
||||
<% if (!remote) && User.current.allowed_to?(:manage_workflows, @project) %>
|
||||
<p>
|
||||
<%= link_to l(:label_dmsf_workflow_new), new_dmsf_workflow_path(:project_id => @project.id),
|
||||
:class => 'icon icon-add' %>
|
||||
<%= link_to l(:label_dmsf_workflow_new), new_dmsf_workflow_path(project_id: @project.id), class: 'icon icon-add' %>
|
||||
</p>
|
||||
<% end %>
|
||||
<p class="buttons">
|
||||
<%= submit_tag l(:button_submit), :name => 'commit', :onclick => 'hideModal(this);' %>
|
||||
<%= submit_tag l(:button_cancel), :name => 'commit', :onclick => 'hideModal(this);' %>
|
||||
<%= submit_tag l(:button_submit), name: 'commit', onclick: 'hideModal(this);' %>
|
||||
<%= submit_tag l(:button_cancel), name: 'commit', onclick: 'hideModal(this);' %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
@ -20,30 +20,28 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
%>
|
||||
|
||||
<% @workflows = DmsfWorkflow.active.sorted.where(:project_id => @project.id) if @project && @workflows.nil? %>
|
||||
<% @workflows = DmsfWorkflow.active.sorted.where(project_id: @project.id) if @project && @workflows.nil? %>
|
||||
|
||||
<% unless @project %>
|
||||
<div class="contextual">
|
||||
<%= link_to l(:label_dmsf_workflow_new), new_dmsf_workflow_path, :class => 'icon icon-add' %>
|
||||
<%= link_to l(:label_dmsf_workflow_new), new_dmsf_workflow_path, class: 'icon icon-add' %>
|
||||
</div>
|
||||
|
||||
<h2><%=l(:label_dmsf_workflow_plural)%></h2>
|
||||
|
||||
<%= form_tag(dmsf_workflows_path, :method => :get) do %>
|
||||
<%= form_tag(dmsf_workflows_path, method: :get) do %>
|
||||
<fieldset>
|
||||
<legend><%= l(:label_filter_plural) %></legend>
|
||||
<label for='status'><%= l(:field_status) %>:</label>
|
||||
<%= select_tag 'status', workflows_status_options_for_select(@status), :class => 'small', :onchange => 'this.form.submit(); return false;' %>
|
||||
<%= select_tag 'status', workflows_status_options_for_select(@status), class: 'small',
|
||||
onchange: 'this.form.submit(); return false;' %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if @workflows.any? %>
|
||||
<table class="list">
|
||||
<thead><tr>
|
||||
<th><%= l(:field_name) %></th>
|
||||
<th/>
|
||||
<th></th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% @workflows.each do |workflow| %>
|
||||
@ -62,7 +60,9 @@
|
||||
<% end %>
|
||||
|
||||
<% if @project %>
|
||||
<p><%= link_to l(:label_dmsf_workflow_new), new_dmsf_workflow_path(:project_id => @project.id), :class => 'icon icon-add' %></p>
|
||||
<p>
|
||||
<%= link_to l(:label_dmsf_workflow_new), new_dmsf_workflow_path(project_id: @project.id), class: 'icon icon-add' %>
|
||||
</p>
|
||||
<% else %>
|
||||
<% if @workflow_pages %>
|
||||
<span class="pagination"><%= pagination_links_full @workflow_pages %></span>
|
||||
|
||||
@ -23,18 +23,18 @@
|
||||
<fieldset class="box">
|
||||
<legend><%= l(:label_dmsf_workflow_add_approver) %></legend>
|
||||
<p><%= label_tag 'user_search', l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p>
|
||||
<%= 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) }')" %>
|
||||
<%= 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) }')" %>
|
||||
<div id="dmsf_users_for_delegate">
|
||||
<%= render_principals_for_new_dmsf_workflow_users(@dmsf_workflow) %>
|
||||
<%= render_principals_for_new_dmsf_workflow_users @dmsf_workflow %>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="box">
|
||||
<legend><%= l(:label_dmsf_workflow_step) %></legend>
|
||||
<%= select_tag 'step', dmsf_workflow_steps_options_for_select(@steps),
|
||||
:id => 'selected_step', :onchange => "$('#dmsf_step_name').toggle(this.value == 0);", :style => 'max-width: 40%' %>
|
||||
id: 'selected_step', onchange: "$('#dmsf_step_name').toggle(this.value == 0);", style: 'max-width: 40%' %>
|
||||
<span id="dmsf_step_name">
|
||||
<%= label_tag 'name', l(:field_name) %>
|
||||
<%= text_field_tag 'name', nil, :maxlength => 30, :style => 'max-width: 40%' %>
|
||||
<%= text_field_tag 'name', nil, maxlength: 30, style: 'max-width: 40%' %>
|
||||
</span>
|
||||
</fieldset>
|
||||
|
||||
@ -22,11 +22,11 @@
|
||||
|
||||
<h3 class="title"><%= l(:dmsf_new_step) %></h3>
|
||||
|
||||
<%= labelled_form_for(@dmsf_workflow, {:url => edit_dmsf_workflow_path(@dmsf_workflow), :method => :post}) do |f| %>
|
||||
<%= render :partial => 'new_step_form' %>
|
||||
<%= labelled_form_for(@dmsf_workflow, { url: edit_dmsf_workflow_path(@dmsf_workflow), method: :post}) do |f| %>
|
||||
<%= render partial: 'new_step_form' %>
|
||||
<p class="buttons">
|
||||
<%= f.submit l(:dmsf_and), :id => 'add-step-and' %>
|
||||
<%= f.submit l(:dmsf_or), :id => 'add-step-or' %>
|
||||
<%= f.submit l(:button_cancel), :name => nil, :onclick => 'hideModal(this);', :type => 'button', :class => 'button' %>
|
||||
<%= f.submit l(:dmsf_and), id: 'add-step-and' %>
|
||||
<%= f.submit l(:dmsf_or), id: 'add-step-or' %>
|
||||
<%= f.submit l(:button_cancel), name: nil, onclick: 'hideModal(this);', type: 'button', class: 'button' %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
%>
|
||||
|
||||
<% if @dmsf_workflow.project %>
|
||||
<h2><%= link_to l(:label_dmsf_workflow_plural), settings_project_path(@project, :tab => 'dmsf_workflow') %> » <%=h @dmsf_workflow %></h2>
|
||||
<h2><%= link_to l(:label_dmsf_workflow_plural), settings_project_path(@project, tab: 'dmsf_workflow') %> » <%=h @dmsf_workflow %></h2>
|
||||
<% else %>
|
||||
<h2><%= link_to l(:label_dmsf_workflow_plural), dmsf_workflows_path %> » <%=h @dmsf_workflow %></h2>
|
||||
<% end %>
|
||||
@ -57,13 +57,11 @@
|
||||
<td class="name">
|
||||
<span id="step-index-<%= index %>-name"><%= @dmsf_workflow.dmsf_workflow_steps[index].name if index %></span>
|
||||
<div id="<%= "step-index-#{index}-name-form" %>" class="hol">
|
||||
<%= form_for(@dmsf_workflow,
|
||||
:url => update_step_dmsf_workflow_path(step: index),
|
||||
:method => :put,
|
||||
:html => { id: "step-index-name-#{index}-form" }) do |f| %>
|
||||
<%= form_for(@dmsf_workflow, url: update_step_dmsf_workflow_path(step: index), method: :put,
|
||||
html: { id: "step-index-name-#{index}-form" }) do |f| %>
|
||||
<%= f.text_field(:step_name, value: @dmsf_workflow.dmsf_workflow_steps[index].name, id: "dmsf_workflow_step_name_#{index}") %>
|
||||
<p>
|
||||
<%= submit_tag l(:button_change), :class => 'small' %>
|
||||
<%= submit_tag l(:button_change), class: 'small' %>
|
||||
<%= link_to_function(
|
||||
l(:button_cancel),
|
||||
"$('#step-index-#{index}-name').show(); $('#step-index-#{index}-approvers').show(); $('#step-index-#{index}-name-form').hide(); $('#step-index-#{index}-approvers-form').hide();")
|
||||
@ -83,10 +81,8 @@
|
||||
<% end %>
|
||||
</span>
|
||||
<div id="<%= "step-index-#{index}-approvers-form" %>" class="hol">
|
||||
<%= form_for(@dmsf_workflow,
|
||||
:url => update_step_dmsf_workflow_path(step: index),
|
||||
:method => :put,
|
||||
:html => {:id => "step-index-operator-#{index}-form"}) do |_| %>
|
||||
<%= form_for(@dmsf_workflow, url: update_step_dmsf_workflow_path(step: index), method: :put,
|
||||
html: { id: "step-index-operator-#{index}-form"}) do |_| %>
|
||||
<div class="dmsf_parent_container">
|
||||
<% stps.each do |step| %>
|
||||
<div class="dmsf_child_container">
|
||||
@ -112,10 +108,9 @@
|
||||
<% end %>
|
||||
</div>
|
||||
<p>
|
||||
<%= submit_tag l(:button_change), :class => 'small' %>
|
||||
<%= link_to_function(
|
||||
l(:button_cancel),
|
||||
"$('#step-index-#{index}-name').show(); $('#step-index-#{index}-approvers').show(); $('#step-index-#{index}-name-form').hide(); $('#step-index-#{index}-approvers-form').hide();")
|
||||
<%= submit_tag l(:button_change), class: 'small' %>
|
||||
<%= link_to_function l(:button_cancel),
|
||||
"$('#step-index-#{index}-name').show(); $('#step-index-#{index}-approvers').show(); $('#step-index-#{index}-name-form').hide(); $('#step-index-#{index}-approvers-form').hide();"
|
||||
%>
|
||||
</p>
|
||||
<% end %>
|
||||
@ -125,8 +120,8 @@
|
||||
<%= reorder_handle(@dmsf_workflow, url: url_for(action: 'edit', id: @dmsf_workflow, step: i) ) %>
|
||||
<%= link_to_function l(:button_edit),
|
||||
"$('#step-index-#{index}-name').hide(); $('#step-index-#{index}-approvers').hide(); $('#step-index-#{index}-name-form').show(); $('#step-index-#{index}-approvers-form').show();",
|
||||
:class => 'icon icon-edit' %>
|
||||
<%= delete_link edit_dmsf_workflow_path(@dmsf_workflow, step: i) %>
|
||||
class: 'icon icon-edit' %>
|
||||
<%= delete_link edit_dmsf_workflow_path @dmsf_workflow, step: i %>
|
||||
</td>
|
||||
<% end %>
|
||||
</tr>
|
||||
|
||||
@ -22,6 +22,6 @@
|
||||
|
||||
var modal = $('#ajax-modal');
|
||||
|
||||
modal.html('<%= escape_javascript(render :partial => 'action', :locals => {:workflow => @dmsf_workflow}) %>');
|
||||
modal.html('<%= escape_javascript(render partial: 'action', locals: { workflow: @dmsf_workflow }) %>');
|
||||
showModal('ajax-modal', '35%');
|
||||
modal.addClass('new-action');
|
||||
@ -22,6 +22,6 @@
|
||||
|
||||
var modal = $('#ajax-modal');
|
||||
|
||||
modal.html('<%= escape_javascript(render :partial => 'assign') %>');
|
||||
modal.html('<%= escape_javascript(render partial: 'assign') %>');
|
||||
showModal('ajax-modal', '30%');
|
||||
modal.addClass('assignment');
|
||||
@ -24,22 +24,23 @@
|
||||
<% @project = Project.find_by_id params[:dmsf_workflow][:project_id] %>
|
||||
<% end %>
|
||||
<% if @project %>
|
||||
<h2><%= link_to l(:label_dmsf_workflow_plural), settings_project_path(@project, :tab => 'dmsf_workflow') %> » <%= l(:label_dmsf_workflow_new) %></h2>
|
||||
<h2>
|
||||
<%= link_to l(:label_dmsf_workflow_plural), settings_project_path(@project, tab: 'dmsf_workflow') %> » <%= l(:label_dmsf_workflow_new) %>
|
||||
</h2>
|
||||
<% else %>
|
||||
<h2><%= link_to l(:label_dmsf_workflow_plural), dmsf_workflows_path %> » <%= l(:label_dmsf_workflow_new) %></h2>
|
||||
<% end %>
|
||||
|
||||
<%= labelled_form_for @dmsf_workflow do |f| %>
|
||||
<%= f.hidden_field(:project_id, :value => @project.id) if @project %>
|
||||
<%= f.hidden_field(:project_id, value: @project.id) if @project %>
|
||||
<%= error_messages_for 'dmsf_workflow' %>
|
||||
<div class="box tabular">
|
||||
<p>
|
||||
<%= f.text_field :name, :required => true %>
|
||||
<%= f.text_field :name, required: true %>
|
||||
</p>
|
||||
<p>
|
||||
<%= f.select(:id,
|
||||
dmsf_all_workflows_for_select(params[:dmsf_workflow] ? params[:dmsf_workflow][:id] : nil),
|
||||
:label => l(:label_copy_workflow_from)) %>
|
||||
<%= f.select(:id, dmsf_all_workflows_for_select(params[:dmsf_workflow] ? params[:dmsf_workflow][:id] : nil),
|
||||
label: l(:label_copy_workflow_from)) %>
|
||||
</p>
|
||||
</div>
|
||||
<%= f.submit l(:button_create) %>
|
||||
@ -47,7 +48,7 @@
|
||||
|
||||
<%= late_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());
|
||||
$('#content').load("<%= @project ? url_for(action: 'new', project_id: @project.id) : url_for(action: 'new') %>", $('#new_dmsf_workflow').serialize());
|
||||
});
|
||||
$('#dmsf_workflow_id').select2();
|
||||
<% end %>
|
||||
|
||||
@ -19,5 +19,5 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
|
||||
|
||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'new_step_modal') %>');
|
||||
$('#ajax-modal').html('<%= escape_javascript(render partial: 'new_step_modal') %>');
|
||||
showModal('ajax-modal', '40%');
|
||||
@ -20,4 +20,4 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
%>
|
||||
|
||||
<%= render :partial => 'my/blocks/locked_documents' %>
|
||||
<%= render partial: 'my/blocks/locked_documents' %>
|
||||
|
||||
@ -20,4 +20,4 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
%>
|
||||
|
||||
<%= render :partial => 'my/blocks/open_approvals' %>
|
||||
<%= render partial: 'my/blocks/open_approvals' %>
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
<%#
|
||||
# encoding: utf-8
|
||||
#
|
||||
# Redmine plugin for Document Management System "Features"
|
||||
#
|
||||
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
%>
|
||||
|
||||
<%= labelled_fields_for :pref, @user.pref do |pref_fields| %>
|
||||
<p><%= pref_fields.check_box :dmsf_tree_view %></p>
|
||||
<% end %>
|
||||
@ -1,27 +0,0 @@
|
||||
<%#
|
||||
# encoding: utf-8
|
||||
#
|
||||
# Redmine plugin for Document Management System "Features"
|
||||
#
|
||||
# Copyright © 2011 Vít Jonáš <vit.jonas@gmail.com>
|
||||
# Copyright © 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
||||
# Copyright © 2011-20 Karel Pičman <karel.picman@kontron.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU 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.
|
||||
%>
|
||||
|
||||
<%= labelled_fields_for 'user[pref]', @user.pref do |pref_fields| %>
|
||||
<p><%= pref_fields.check_box :dmsf_tree_view %></p>
|
||||
<% end %>
|
||||
@ -50,16 +50,15 @@
|
||||
<%= link_to_project(folder.project) %>
|
||||
</td>
|
||||
<td class="title">
|
||||
<%= link_to(h(folder.title),
|
||||
{:controller => 'dmsf', :action => 'show', :id => folder.project, :folder_id => folder},
|
||||
:class => 'icon icon-folder') %>
|
||||
<%= link_to h(folder.title), { controller: 'dmsf', action: 'show', id: folder.project, folder_id: folder},
|
||||
class: 'icon icon-folder' %>
|
||||
</td>
|
||||
<td class="title">
|
||||
<% if folder.dmsf_folder %>
|
||||
<%= link_to(h(folder.dmsf_folder.title),
|
||||
{:controller => 'dmsf', :action => 'show', :id => folder.project, :folder_id => folder.dmsf_folder}) %>
|
||||
<%= link_to h(folder.dmsf_folder.title),
|
||||
{ controller: 'dmsf', action: 'show', id: folder.project, folder_id: folder.dmsf_folder } %>
|
||||
<% else %>
|
||||
<%= link_to(l(:link_documents), {:controller => 'dmsf', :action => 'show', :id=> folder.project }) %>
|
||||
<%= link_to l(:link_documents), { controller: 'dmsf', action: 'show', id: folder.project } %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
@ -70,17 +69,16 @@
|
||||
<%= link_to_project(file.project) if file.project %>
|
||||
</td>
|
||||
<td class="title">
|
||||
<%= link_to(h(file.title),
|
||||
{:controller => 'dmsf_files', :action => :show, :id => file },
|
||||
:class => "icon icon-file #{DmsfHelper.filetype_css(file.name)}") %>
|
||||
<%= link_to h(file.title), { controller: 'dmsf_files', action: :show, id: file },
|
||||
class: "icon icon-file #{DmsfHelper.filetype_css(file.name)}" %>
|
||||
</td>
|
||||
<td class="title">
|
||||
<% if file.dmsf_folder %>
|
||||
<%= link_to(h(file.dmsf_folder.title),
|
||||
{:controller => 'dmsf', :action => 'show', :id => file.project, :folder_id => file.dmsf_folder}) %>
|
||||
<%= link_to h(file.dmsf_folder.title),
|
||||
{ controller: 'dmsf', action: 'show', id: file.project, folder_id: file.dmsf_folder } %>
|
||||
<% else %>
|
||||
<%= link_to_if(file.project, l(:link_documents), {:controller => 'dmsf', :action => 'show',
|
||||
:id=> file.project }) %>
|
||||
<%= link_to_if file.project, l(:link_documents),
|
||||
{ controller: 'dmsf', action: 'show', id: file.project } %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
<% if @user %>
|
||||
<% all_assignments = DmsfWorkflowStepAssignment.joins(
|
||||
'LEFT JOIN dmsf_workflow_step_actions ON dmsf_workflow_step_assignments.id = dmsf_workflow_step_actions.dmsf_workflow_step_assignment_id').where(
|
||||
:dmsf_workflow_step_assignments => { :user_id => @user.id }).where(
|
||||
dmsf_workflow_step_assignments: { user_id: @user.id }).where(
|
||||
['dmsf_workflow_step_actions.id IS NULL OR dmsf_workflow_step_actions.action = ?', DmsfWorkflowStepAction::ACTION_DELEGATE]) %>
|
||||
<% all_assignments.find_each do |assignment| %>
|
||||
<% if assignment.dmsf_file_revision.dmsf_file.last_revision &&
|
||||
@ -67,44 +67,43 @@
|
||||
</td>
|
||||
<td class="dmsf_workflow">
|
||||
<% if assignment.dmsf_workflow_step.dmsf_workflow %>
|
||||
<%= link_to(
|
||||
assignment.dmsf_file_revision.workflow_str(false),
|
||||
<%= link_to assignment.dmsf_file_revision.workflow_str(false),
|
||||
log_dmsf_workflow_path(
|
||||
:project_id => assignment.dmsf_file_revision.dmsf_file.project_id,
|
||||
:id => assignment.dmsf_workflow_step.dmsf_workflow_id,
|
||||
:dmsf_file_revision_id => assignment.dmsf_file_revision_id),
|
||||
:title => assignment.dmsf_file_revision.workflow_tooltip,
|
||||
:remote => true) %>
|
||||
project_id: assignment.dmsf_file_revision.dmsf_file.project_id,
|
||||
id: assignment.dmsf_workflow_step.dmsf_workflow_id,
|
||||
dmsf_file_revision_id: assignment.dmsf_file_revision_id),
|
||||
title: assignment.dmsf_file_revision.workflow_tooltip,
|
||||
remote: true %>
|
||||
<% else %>
|
||||
<%= assignment.dmsf_file_revision.workflow_str(false) %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="title">
|
||||
<% if assignment.dmsf_file_revision && assignment.dmsf_file_revision.dmsf_file %>
|
||||
<%= link_to(h(assignment.dmsf_file_revision.title),
|
||||
{:controller => 'dmsf_files', :action => :show, :id => assignment.dmsf_file_revision.dmsf_file }) %>
|
||||
<%= link_to h(assignment.dmsf_file_revision.title),
|
||||
{ controller: 'dmsf_files', action: :show, id: assignment.dmsf_file_revision.dmsf_file } %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="title">
|
||||
<% if assignment.dmsf_file_revision %>
|
||||
<% if assignment.dmsf_file_revision.dmsf_file.dmsf_folder %>
|
||||
<%= link_to(h(assignment.dmsf_file_revision.dmsf_file.dmsf_folder.title),
|
||||
{:controller => 'dmsf', :action => 'show', :id => assignment.dmsf_file_revision.dmsf_file.project,
|
||||
:folder_id => assignment.dmsf_file_revision.dmsf_file.dmsf_folder}) %>
|
||||
<%= link_to h(assignment.dmsf_file_revision.dmsf_file.dmsf_folder.title),
|
||||
{ controller: 'dmsf', action: 'show', id: assignment.dmsf_file_revision.dmsf_file.project,
|
||||
folder_id: assignment.dmsf_file_revision.dmsf_file.dmsf_folder} %>
|
||||
<% elsif assignment.dmsf_file_revision.dmsf_file.project %>
|
||||
<%= link_to(l(:link_documents), {:controller => 'dmsf', :action => 'show',
|
||||
:id => assignment.dmsf_file_revision.dmsf_file.project }) %>
|
||||
<%= link_to l(:link_documents),
|
||||
{ controller: 'dmsf', action: 'show', id: assignment.dmsf_file_revision.dmsf_file.project } %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="dmsf_buttons">
|
||||
<%= render(:partial => 'dmsf_workflows/approval_workflow_button',
|
||||
:locals => {:file => assignment.dmsf_file_revision.dmsf_file,
|
||||
:file_approval_allowed => User.current.allowed_to?(:file_approval,
|
||||
<%= render partial: 'dmsf_workflows/approval_workflow_button',
|
||||
locals: { file: assignment.dmsf_file_revision.dmsf_file,
|
||||
file_approval_allowed: User.current.allowed_to?(:file_approval,
|
||||
assignment.dmsf_file_revision.dmsf_file.project),
|
||||
:workflows_available => nil,
|
||||
:project => assignment.dmsf_file_revision.dmsf_file.project,
|
||||
:wf => assignment.dmsf_workflow_step.dmsf_workflow, :dmsf_link_id => nil }) %>
|
||||
workflows_available: nil,
|
||||
project: assignment.dmsf_file_revision.dmsf_file.project,
|
||||
wf: assignment.dmsf_workflow_step.dmsf_workflow, dmsf_link_id: nil } %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
@ -27,5 +27,5 @@
|
||||
<% else %>
|
||||
<% title = dmsf_file_or_folder.project.name %>
|
||||
<% end %>
|
||||
<%= link_to(h(title), dmsf_folder_path(:id => dmsf_file_or_folder.project,
|
||||
:folder_id => dmsf_file_or_folder.dmsf_folder_id), :class => 'icon icon-folder') %>
|
||||
<%= link_to h(title), dmsf_folder_path(id: dmsf_file_or_folder.project,
|
||||
folder_id: dmsf_file_or_folder.dmsf_folder_id), class: 'icon icon-folder' %>
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
<% columns.concat(cfs.map{ |c| c.name }) %>
|
||||
<% selected_columns = DmsfFolder::DEFAULT_COLUMNS if selected_columns.blank? %>
|
||||
<% columns.each_with_index do |column, i| %>
|
||||
<%= check_box_tag('settings[dmsf_columns][]', column, selected_columns.include?(column), id: "dmsf_column_#{i}") %>
|
||||
<%= check_box_tag 'settings[dmsf_columns][]', column, selected_columns.include?(column), id: "dmsf_column_#{i}" %>
|
||||
<%= h column.capitalize %>
|
||||
<br/>
|
||||
<% end %>
|
||||
|
||||
@ -27,28 +27,28 @@
|
||||
</em>
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_maximum_files_download)) %>
|
||||
<%= text_field_tag 'settings[dmsf_max_file_download]', @settings['dmsf_max_file_download'], :size => 10 %>
|
||||
<%= content_tag :label, l(:label_maximum_files_download) %>
|
||||
<%= text_field_tag 'settings[dmsf_max_file_download]', @settings['dmsf_max_file_download'], size: 10 %>
|
||||
<em class="info">
|
||||
<%= l(:note_maximum_number_of_files_downloaded) %> <%= l(:label_default) %>: 0
|
||||
</em>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_maximum_email_filesize)) %>
|
||||
<%= text_field_tag 'settings[dmsf_max_email_filesize]', @settings['dmsf_max_email_filesize'], :size => 10 %>
|
||||
<%= content_tag :label, l(:label_maximum_email_filesize) %>
|
||||
<%= text_field_tag 'settings[dmsf_max_email_filesize]', @settings['dmsf_max_email_filesize'], size: 10 %>
|
||||
<em class="info">
|
||||
<%= l(:note_maximum_email_filesize) %> <%= l(:label_default) %>: 0
|
||||
</em>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_file_storage_directory)) %>
|
||||
<%= content_tag :label, l(:label_file_storage_directory) %>
|
||||
<%
|
||||
storage_dir = @settings['dmsf_storage_directory'].strip if @settings['dmsf_storage_directory'].present?
|
||||
storage_dir = 'dmsf' if storage_dir.blank?
|
||||
%>
|
||||
<%= text_field_tag 'settings[dmsf_storage_directory]', storage_dir, :size => 256 %>
|
||||
<%= text_field_tag 'settings[dmsf_storage_directory]', storage_dir, size: 256 %>
|
||||
<em class="info">
|
||||
<%= l(:label_default) %>: dmsf
|
||||
</em>
|
||||
@ -67,7 +67,7 @@
|
||||
<% rescue %>
|
||||
<p class="warning"><%= l(:error_file_can_not_be_created) %></p>
|
||||
<% ensure %>
|
||||
<% FileUtils.rm_f(testfilename) %>
|
||||
<% FileUtils.rm_f testfilename %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@ -77,7 +77,7 @@
|
||||
tmpdir = @settings['dmsf_tmpdir'].strip if @settings['dmsf_tmpdir'].present?
|
||||
tmpdir = Dir.tmpdir if tmpdir.blank?
|
||||
%>
|
||||
<%= text_field_tag 'settings[dmsf_tmpdir]', tmpdir, :size => 256 %>
|
||||
<%= text_field_tag 'settings[dmsf_tmpdir]', tmpdir, size: 256 %>
|
||||
<em class="info">
|
||||
<%= l(:label_default) %>: <%= Dir.tmpdir %>
|
||||
</em>
|
||||
@ -102,48 +102,48 @@
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_physical_file_delete)) %>
|
||||
<%= check_box_tag('settings[dmsf_really_delete_files]', true, @settings['dmsf_really_delete_files']) %>
|
||||
<%= content_tag :label, l(:label_physical_file_delete) %>
|
||||
<%= check_box_tag 'settings[dmsf_really_delete_files]', true, @settings['dmsf_really_delete_files'] %>
|
||||
<em class="info">
|
||||
<%= l(:label_default)%>: <%= l(:general_text_No)%>
|
||||
</em>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_default_notifications)) %>
|
||||
<%= select_tag('settings[dmsf_default_notifications]',
|
||||
<%= content_tag :label, l(:label_default_notifications) %>
|
||||
<%= select_tag 'settings[dmsf_default_notifications]',
|
||||
options_for_select([
|
||||
[l(:select_option_deactivated), nil],
|
||||
[l(:select_option_activated), '1']],
|
||||
:selected => @settings['dmsf_default_notifications'])) %>
|
||||
selected: @settings['dmsf_default_notifications']) %>
|
||||
<em class="info">
|
||||
<%= l(:label_default) %>: <%= l(:select_option_deactivated) %>
|
||||
</em>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_display_notified_recipients)) %>
|
||||
<%= select_tag('settings[dmsf_display_notified_recipients]',
|
||||
<%= content_tag :label, l(:label_display_notified_recipients) %>
|
||||
<%= select_tag 'settings[dmsf_display_notified_recipients]',
|
||||
options_for_select([
|
||||
[l(:select_option_deactivated), nil],
|
||||
[l(:select_option_activated), '1']],
|
||||
:selected => @settings['dmsf_display_notified_recipients'])) %>
|
||||
selected: @settings['dmsf_display_notified_recipients']) %>
|
||||
<em class="info">
|
||||
<%= l(:note_display_notified_recipients).html_safe %> <%= l(:label_default) %>: <%= l(:select_option_deactivated) %>
|
||||
</em>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_title_format)) %>
|
||||
<%= text_field_tag 'settings[dmsf_global_title_format]', @settings['dmsf_global_title_format'], :size => 10 %>
|
||||
<%= content_tag :label, l(:label_title_format) %>
|
||||
<%= text_field_tag 'settings[dmsf_global_title_format]', @settings['dmsf_global_title_format'], size: 10 %>
|
||||
<em class="info">
|
||||
<%= l(:text_title_format) %>
|
||||
</em>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_act_as_attachable)) %>
|
||||
<%= check_box_tag('settings[dmsf_act_as_attachable]', true, @settings['dmsf_act_as_attachable']) %>
|
||||
<%= content_tag :label, l(:label_act_as_attachable) %>
|
||||
<%= check_box_tag 'settings[dmsf_act_as_attachable]', true, @settings['dmsf_act_as_attachable'] %>
|
||||
<em class="info">
|
||||
<%= l(:note_dmsf_act_as_attachable) %><br/>
|
||||
<%= l(:label_default) %>: <%= l(:general_text_No) %>
|
||||
@ -155,7 +155,7 @@
|
||||
<%= l(:menu_dmsf) %> <%= l(:field_column_names) %>
|
||||
</em>
|
||||
|
||||
<%= render(:partial => 'settings/dmsf_columns', :locals => { :selected_columns => @settings['dmsf_columns'] }) %>
|
||||
<%= render partial: 'settings/dmsf_columns', locals: { selected_columns: @settings['dmsf_columns'] } %>
|
||||
|
||||
<hr/>
|
||||
<em class="info">
|
||||
@ -163,24 +163,24 @@
|
||||
</em>
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_email_from_override)) %>
|
||||
<%= text_field_tag 'settings[dmsf_documents_email_from]', @settings['dmsf_documents_email_from'], :size => 128 %>
|
||||
<%= content_tag :label, l(:label_email_from_override) %>
|
||||
<%= text_field_tag 'settings[dmsf_documents_email_from]', @settings['dmsf_documents_email_from'], size: 128 %>
|
||||
<em class="info">
|
||||
<%= l(:label_default) %>: <%= l(:text_email_from_override) %>
|
||||
</em>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_email_reply_to)) %>
|
||||
<%= text_field_tag 'settings[dmsf_documents_email_reply_to]', @settings['dmsf_documents_email_reply_to'], :size => 128 %>
|
||||
<%= content_tag :label, l(:label_email_reply_to) %>
|
||||
<%= text_field_tag 'settings[dmsf_documents_email_reply_to]', @settings['dmsf_documents_email_reply_to'], size: 128 %>
|
||||
<em class="info">
|
||||
<%= l(:label_default) %>: <%= "''" %>
|
||||
</em>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_links_only).capitalize) %>
|
||||
<%= check_box_tag('settings[dmsf_documents_email_links_only]', true, @settings['dmsf_documents_email_links_only']) %>
|
||||
<%= content_tag :label, l(:label_links_only).capitalize %>
|
||||
<%= check_box_tag 'settings[dmsf_documents_email_links_only]', true, @settings['dmsf_documents_email_links_only'] %>
|
||||
<em class="info">
|
||||
<%= l(:label_default) %>: <%= l(:general_text_No) %>
|
||||
</em>
|
||||
@ -192,8 +192,8 @@
|
||||
</em>
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_dmsf_keep_documents_locked)) %>
|
||||
<%= check_box_tag('settings[dmsf_keep_documents_locked]', false, @settings['dmsf_keep_documents_locked']) %>
|
||||
<%= content_tag :label, l(:label_dmsf_keep_documents_locked) %>
|
||||
<%= check_box_tag 'settings[dmsf_keep_documents_locked]', false, @settings['dmsf_keep_documents_locked'] %>
|
||||
<em class="info">
|
||||
<%= l(:note_dmsf_keep_documents_locked) %><br/>
|
||||
<%= l(:label_default)%>: <%= l(:general_text_No)%>
|
||||
@ -206,24 +206,25 @@
|
||||
</em>
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_webdav)) %>
|
||||
<%= select_tag('settings[dmsf_webdav]',
|
||||
<%= content_tag :label, l(:label_webdav) %>
|
||||
<%= select_tag 'settings[dmsf_webdav]',
|
||||
options_for_select([
|
||||
[l(:select_option_deactivated), nil],
|
||||
[l(:select_option_activated), '1']],
|
||||
:selected => @settings['dmsf_webdav'])) %>
|
||||
selected: @settings['dmsf_webdav']) %>
|
||||
<em class="info">
|
||||
<%= l(:note_webdav, :protocol => Setting.protocol, :domain => Setting.host_name).html_safe %> <%= l(:label_default) %>: <%= l(:select_option_activated) %>
|
||||
<%= l(:note_webdav, protocol: Setting.protocol, domain: Setting.host_name).html_safe %> <%= l(:label_default) %>: <%= l(:select_option_activated) %>
|
||||
</em>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_webdav_strategy)) %>
|
||||
<%= select_tag('settings[dmsf_webdav_strategy]',
|
||||
<%= content_tag :label, l(:label_webdav_strategy) %>
|
||||
<%= select_tag'settings[dmsf_webdav_strategy]',
|
||||
options_for_select([
|
||||
[l(:select_option_webdav_readonly), 'WEBDAV_READ_ONLY'],
|
||||
[l(:select_option_webdav_readwrite), 'WEBDAV_READ_WRITE']],
|
||||
:selected => @settings['dmsf_webdav_strategy'])) %><br/>
|
||||
selected: @settings['dmsf_webdav_strategy']) %>
|
||||
<br/>
|
||||
<em class="info">
|
||||
<%= l(:note_webdav_strategy).html_safe %> <%= l(:label_default) %>: <%= l(:select_option_webdav_readonly) %>
|
||||
</em>
|
||||
@ -231,14 +232,14 @@
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_webdav_ignore)) %>
|
||||
<%= text_field_tag 'settings[dmsf_webdav_ignore]', @settings['dmsf_webdav_ignore'], :size => 50 %>
|
||||
<%= text_field_tag 'settings[dmsf_webdav_ignore]', @settings['dmsf_webdav_ignore'], size: 50 %>
|
||||
<em class="info">
|
||||
<%= l(:note_webdav_ignore) %> <%= l(:label_default) %>: ^(\._|\.DS_Store$|Thumbs.db$)
|
||||
</em>
|
||||
</p>
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_webdav_disable_versioning)) %>
|
||||
<%= text_field_tag 'settings[dmsf_webdav_disable_versioning]', @settings['dmsf_webdav_disable_versioning'], :size => 50 %>
|
||||
<%= content_tag :label, l(:label_webdav_disable_versioning) %>
|
||||
<%= text_field_tag 'settings[dmsf_webdav_disable_versioning]', @settings['dmsf_webdav_disable_versioning'], size: 50 %>
|
||||
<em class="info">
|
||||
<%= l(:note_webdav_disable_versioning) %> <br/>
|
||||
<%= l(:label_default) %>: ^\~\$|\.tmp$
|
||||
@ -246,8 +247,8 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_webdav_use_project_names)) %>
|
||||
<%= check_box_tag('settings[dmsf_webdav_use_project_names]', true, @settings['dmsf_webdav_use_project_names']) %>
|
||||
<%= content_tag :label, l(:label_webdav_use_project_names) %>
|
||||
<%= check_box_tag 'settings[dmsf_webdav_use_project_names]', true, @settings['dmsf_webdav_use_project_names'] %>
|
||||
<em class="info">
|
||||
<%= l(:note_webdav_use_project_names) %> <br/>
|
||||
<%= l(:label_default)%>: <%= l(:general_text_No)%>
|
||||
@ -269,8 +270,9 @@
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_index_database)) %>
|
||||
<%= text_field_tag 'settings[dmsf_index_database]', @settings['dmsf_index_database'], :disabled => xapian_disabled, :size => 50 %>
|
||||
<%= content_tag :label, l(:label_index_database) %>
|
||||
<%= text_field_tag 'settings[dmsf_index_database]', @settings['dmsf_index_database'], disabled: xapian_disabled,
|
||||
size: 50 %>
|
||||
<em class="info">
|
||||
<%= l(:label_default) %>: <%= File.expand_path('dmsf_index', Rails.root) %>
|
||||
</em>
|
||||
@ -279,25 +281,28 @@
|
||||
<% stem_langs = %w(danish dutch english finnish french german hungarian italian norwegian portuguese romanian russian spanish swedish turkish) %>
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_stemming_language)) %>
|
||||
<%= select_tag('settings[dmsf_stemming_lang]', options_for_select(stem_langs, @settings['dmsf_stemming_lang']))%>
|
||||
<%= content_tag :label, l(:label_stemming_language) %>
|
||||
<%= select_tag 'settings[dmsf_stemming_lang]', options_for_select(stem_langs, @settings['dmsf_stemming_lang']) %>
|
||||
<em class="info">
|
||||
<%= l(:note_possible_values) %>: <%= stem_langs.join(', ') %>. <%= "#{l(:label_default)}: #{stem_langs[2]}" %>
|
||||
</em>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_stem_strategy)) %>
|
||||
<%= radio_button_tag 'settings[dmsf_stemming_strategy]', 'STEM_NONE', @settings['dmsf_stemming_strategy'] == 'STEM_NONE', :disabled => xapian_disabled, :checked => true %> <%= l(:option_stem_none) %><br/>
|
||||
<%= radio_button_tag 'settings[dmsf_stemming_strategy]', 'STEM_SOME', @settings['dmsf_stemming_strategy'] == 'STEM_SOME', :disabled => xapian_disabled %> <%= l(:option_stem_some) %><br/>
|
||||
<%= radio_button_tag 'settings[dmsf_stemming_strategy]', 'STEM_ALL', @settings['dmsf_stemming_strategy'] == 'STEM_ALL', :disabled => xapian_disabled %> <%= l(:option_stem_all) %><br/>
|
||||
<%= content_tag :label, l(:label_stem_strategy) %>
|
||||
<%= radio_button_tag 'settings[dmsf_stemming_strategy]', 'STEM_NONE', @settings['dmsf_stemming_strategy'] == 'STEM_NONE',
|
||||
disabled: xapian_disabled, checked: true %> <%= l(:option_stem_none) %><br/>
|
||||
<%= radio_button_tag 'settings[dmsf_stemming_strategy]', 'STEM_SOME', @settings['dmsf_stemming_strategy'] == 'STEM_SOME',
|
||||
disabled: xapian_disabled %> <%= l(:option_stem_some) %><br/>
|
||||
<%= radio_button_tag 'settings[dmsf_stemming_strategy]', 'STEM_ALL', @settings['dmsf_stemming_strategy'] == 'STEM_ALL',
|
||||
disabled: xapian_disabled %> <%= l(:option_stem_all) %><br/>
|
||||
<em class="info">
|
||||
<%= l(:text_stemming_info) %>
|
||||
</em>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= content_tag(:label, l(:label_enable_cjk_ngrams)) %>
|
||||
<%= content_tag :label, l(:label_enable_cjk_ngrams) %>
|
||||
<%= check_box_tag 'settings[enable_cjk_ngrams]', true, @settings['dmsf_enable_cjk_ngrams'] %>
|
||||
<em class="info">
|
||||
<%= l(:text_enable_cjk_ngrams) %>
|
||||
|
||||
@ -19,37 +19,6 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#browser.dmsf_list {
|
||||
border-bottom: none;
|
||||
display: none;
|
||||
padding-right: 1px;
|
||||
}
|
||||
|
||||
#dmsf_ajax_loading.ajax-loading {
|
||||
background:url(../../../images/loading.gif) no-repeat 0 50%;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
#browser_wrapper .ui-toolbar {
|
||||
margin-right: -2px;
|
||||
}
|
||||
|
||||
.dmsf_list .dmsf_th {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.list .dmsf_modified {
|
||||
min-width: 127px;
|
||||
width: 127px;
|
||||
font-size: 0.8em;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.dmsf_modified img {
|
||||
vertical-align:text-top;
|
||||
}
|
||||
|
||||
.list .dmsf_title {
|
||||
width: 40%;
|
||||
text-align: left;
|
||||
@ -235,8 +204,38 @@ div.dmsf_revision_inner_box .attribute .label {
|
||||
|
||||
/* DMSF tree view */
|
||||
.dmsf_hidden { display:none; }
|
||||
.dmsf_odd {background-color:#f6f7f8;}
|
||||
.dmsf_even {background-color: #fff;}
|
||||
.dmsf_tree span.dmsf_expander { cursor: pointer; }
|
||||
.dmsf_tree.dmsf_expanded td.dmsf_title span {
|
||||
background: url(../../../images/arrow_down.png) no-repeat 0 50%;
|
||||
padding-left: 16px;
|
||||
}
|
||||
.dmsf_tree.dmsf_child .dmsf_title span { padding-left: 16px; }
|
||||
.dmsf_tree.dmsf_collapsed .dmsf_title span {
|
||||
background: url(../../../images/arrow_right.png) no-repeat 0 50%;
|
||||
padding-left: 16px;
|
||||
}
|
||||
.dmsf_tree.idnt-1 .dmsf_title { padding-left: 1.5em; }
|
||||
.dmsf_tree.idnt-2 .dmsf_title { padding-left: 2em; }
|
||||
.dmsf_tree.idnt-3 .dmsf_title { padding-left: 2.5em; }
|
||||
.dmsf_tree.idnt-4 .dmsf_title { padding-left: 3em; }
|
||||
.dmsf_tree.idnt-5 .dmsf_title { padding-left: 3.5em; }
|
||||
.dmsf_tree.idnt-6 .dmsf_title { padding-left: 4em; }
|
||||
.dmsf_tree.idnt-7 .dmsf_title { padding-left: 4.5em; }
|
||||
.dmsf_tree.idnt-8 .dmsf_title { padding-left: 5em; }
|
||||
.dmsf_tree.idnt-9 .dmsf_title { padding-left: 5.5em; }
|
||||
|
||||
.dmsf_select_version {
|
||||
max-width: 50px;
|
||||
}
|
||||
|
||||
.dmsf_parent_container {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.dmsf_child_container {
|
||||
float: left;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.dmsf_select_version {
|
||||
max-width: 50px;
|
||||
|
||||
@ -339,7 +339,6 @@ cs:
|
||||
error_lock_exclusively: Nelze zamknout již zamčený objekt
|
||||
error_unlock_parent_locked: Nelze odemknout - nadřazený objekt je zamčený
|
||||
|
||||
field_dmsf_tree_view: Zobrazit složky jako stromovou strukturu
|
||||
label_dmsf_version: Verze
|
||||
|
||||
locked_documents: Zamčené dokumenty
|
||||
|
||||
@ -340,7 +340,6 @@ de:
|
||||
error_lock_exclusively: Unable to lock exclusively an already-locked resource
|
||||
error_unlock_parent_locked: Unlock failed - resource parent is locked
|
||||
|
||||
field_dmsf_tree_view: Ordner in der Baumstruktur durchstöbern
|
||||
label_dmsf_version: Version
|
||||
|
||||
locked_documents: Gesperrte Dateien
|
||||
|
||||
@ -339,7 +339,6 @@ en:
|
||||
error_lock_exclusively: Unable to lock exclusively an already-locked resource
|
||||
error_unlock_parent_locked: Unlock failed - resource parent is locked
|
||||
|
||||
field_dmsf_tree_view: Navigate folders in a tree
|
||||
label_dmsf_version: Version
|
||||
|
||||
locked_documents: Locked documents
|
||||
|
||||
@ -339,7 +339,6 @@ es:
|
||||
error_lock_exclusively: Unable to lock exclusively an already-locked resource
|
||||
error_unlock_parent_locked: Unlock failed - resource parent is locked
|
||||
|
||||
field_dmsf_tree_view: Navigate folders in a tree
|
||||
label_dmsf_version: Versión
|
||||
|
||||
locked_documents: Documentos bloqueados
|
||||
|
||||
@ -339,7 +339,6 @@ fr:
|
||||
error_lock_exclusively: Impossible de verrouiller de manière exclusive une ressource déjà verrouillée
|
||||
error_unlock_parent_locked: Echec du déverrouillage - la ressource parente est verrouillée
|
||||
|
||||
field_dmsf_tree_view: Vue arborescente des dossiers
|
||||
label_dmsf_version: Version
|
||||
|
||||
locked_documents: Documents verrouillés
|
||||
|
||||
@ -339,7 +339,6 @@ hu:
|
||||
error_lock_exclusively: Nem lehetséges kivételként zárolni egy már zárolt erőforrást
|
||||
error_unlock_parent_locked: Feloldás sikertelen - szülő erőforrás zárolva
|
||||
|
||||
field_dmsf_tree_view: Mappák közötti navigálás fastruktúrában
|
||||
label_dmsf_version: Verzió
|
||||
|
||||
locked_documents: Locked documents
|
||||
|
||||
@ -339,7 +339,6 @@ it: # Italian strings thx 2 Matteo Arceci!
|
||||
error_lock_exclusively: impossibile bloccare in modo esclusivo una risorsa già bloccata
|
||||
error_unlock_parent_locked: Sblocco fallito - la risorsa superiore è bloccata
|
||||
|
||||
field_dmsf_tree_view: Navigate folders in a tree
|
||||
label_dmsf_version: Version
|
||||
|
||||
locked_documents: Documenti bloccati
|
||||
|
||||
@ -339,7 +339,6 @@ ja:
|
||||
error_lock_exclusively: 既にロックされているリソースを排他的にロックできません
|
||||
error_unlock_parent_locked: ロック解除に失敗しました - リソースの親フォルダがロックされています
|
||||
|
||||
field_dmsf_tree_view: Navigate folders in a tree
|
||||
label_dmsf_version: バージョン
|
||||
|
||||
locked_documents: ロック中
|
||||
|
||||
@ -337,7 +337,6 @@ ko:
|
||||
error_lock_exclusively: 이미 잠겨있는 리소스를 잠글 수 없습니다
|
||||
error_unlock_parent_locked: 잠금 실패 - 리소스 상위 파일이 잠겨있습니다
|
||||
|
||||
field_dmsf_tree_view: 트리에서 폴더 검색
|
||||
label_dmsf_version: 버전
|
||||
|
||||
locked_documents: 잠긴 문서
|
||||
|
||||
@ -339,7 +339,6 @@ nl:
|
||||
error_lock_exclusively: Vergrendelen niet mogelijk op een reeds vergrendelde bron
|
||||
error_unlock_parent_locked: Ontgrendelen mislukt - bron ouder is vergrendeld
|
||||
|
||||
field_dmsf_tree_view: Navigeer door mappen in een boom
|
||||
label_dmsf_version: Versie
|
||||
|
||||
locked_documents: Vergrendelde documenten
|
||||
|
||||
@ -339,7 +339,6 @@ pl:
|
||||
error_lock_exclusively: Unable to lock exclusively an already-locked resource
|
||||
error_unlock_parent_locked: Unlock failed - resource parent is locked
|
||||
|
||||
field_dmsf_tree_view: Navigate folders in a tree
|
||||
label_dmsf_version: Wersja
|
||||
|
||||
locked_documents: Dokumenty zablokowane
|
||||
|
||||
@ -339,7 +339,6 @@ pt-BR:
|
||||
error_lock_exclusively: Não é possível bloquear exclusivamente um recurso já bloqueado
|
||||
error_unlock_parent_locked: Falha no desbloqueio - o recurso pai está bloqueado
|
||||
|
||||
field_dmsf_tree_view: Navegação de pastas em árvore
|
||||
label_dmsf_version: Versão
|
||||
|
||||
locked_documents: Documentos bloqueados
|
||||
|
||||
@ -339,7 +339,6 @@ ru:
|
||||
error_lock_exclusively: Невозможно эксклюзивно заблокировать уже заблокированный ресурс
|
||||
error_unlock_parent_locked: Разблокировка не удалась - родительская запись заблокирована
|
||||
|
||||
field_dmsf_tree_view: Навигация по папкам в виде дерева
|
||||
label_dmsf_version: Версия
|
||||
|
||||
locked_documents: Заблокированные документы
|
||||
|
||||
@ -339,7 +339,6 @@ sl:
|
||||
error_lock_exclusively: Unable to lock exclusively an already-locked resource
|
||||
error_unlock_parent_locked: Unlock failed - resource parent is locked
|
||||
|
||||
field_dmsf_tree_view: Navigate folders in a tree
|
||||
label_dmsf_version: Verzija
|
||||
|
||||
locked_documents: Locked documents
|
||||
|
||||
@ -339,7 +339,6 @@ zh-TW:
|
||||
error_lock_exclusively: Unable to lock exclusively an already-locked resource
|
||||
error_unlock_parent_locked: Unlock failed - resource parent is locked
|
||||
|
||||
field_dmsf_tree_view: Navigate folders in a tree
|
||||
label_dmsf_version: 版本
|
||||
|
||||
locked_documents: Locked documents
|
||||
|
||||
@ -339,7 +339,6 @@ zh:
|
||||
error_lock_exclusively: Unable to lock exclusively an already-locked resource
|
||||
error_unlock_parent_locked: Unlock failed - resource parent is locked
|
||||
|
||||
field_dmsf_tree_view: Navigate folders in a tree
|
||||
label_dmsf_version: 版本
|
||||
|
||||
locked_documents: Locked documents
|
||||
|
||||
123
config/routes.rb
123
config/routes.rb
@ -30,41 +30,40 @@ if Redmine::Plugin.installed? :redmine_dmsf
|
||||
# /projects/<project>/dmsf
|
||||
# [As this controller also processes 'folders' it maybe better to branch into a folder route rather than leaving it as is]
|
||||
##
|
||||
post '/projects/:id/dmsf/create', :controller => 'dmsf', :action => 'create'
|
||||
get '/projects/:id/dmsf/notify/activate', :controller => 'dmsf', :action => 'notify_activate', :as => 'notify_activate_dmsf'
|
||||
get '/projects/:id/dmsf/notify/deactivate', :controller => 'dmsf', :action => 'notify_deactivate', :as => 'notify_deactivate_dmsf'
|
||||
delete '/projects/:id/dmsf/delete', :controller => 'dmsf', :action => 'delete', :as => 'delete_dmsf'
|
||||
post '/projects/:id/dmsf/save', :controller => 'dmsf', :action => 'save'
|
||||
post '/projects/:id/dmsf/save/root', :controller => 'dmsf', :action => 'save_root'
|
||||
post '/projects/:id/dmsf/entries', :controller => 'dmsf', :action => 'entries_operation', :as => 'entries_operations_dmsf'
|
||||
post '/projects/:id/dmsf/tag_changed', :controller => 'dmsf', :action => 'tag_changed', :as => 'tag_changed'
|
||||
post '/projects/:id/dmsf/entries/delete', :controller => 'dmsf', :action => 'delete_entries', :as => 'delete_entries'
|
||||
post '/projects/:id/dmsf/entries/email', :to => 'dmsf#entries_email', :as => 'email_entries'
|
||||
get '/projects/:id/dmsf/entries/download_email_entries', :controller => 'dmsf', :action => 'download_email_entries', :as => 'download_email_entries'
|
||||
get '/projects/:id/dmsf/lock', :controller => 'dmsf', :action => 'lock', :as => 'lock_dmsf'
|
||||
get '/projects/:id/dmsf/unlock', :controller => 'dmsf', :action => 'unlock', :as => 'unlock_dmsf'
|
||||
get '/projects/:id/dmsf/', :controller => 'dmsf', :action => 'show', :as => 'dmsf_folder'
|
||||
get '/projects/:id/dmsf/new', :controller => 'dmsf', :action => 'new', :as => 'new_dmsf'
|
||||
get '/projects/:id/dmsf/edit', :controller => 'dmsf', :action => 'edit', :as => 'edit_dmsf'
|
||||
get '/projects/:id/dmsf/edit/root', :controller => 'dmsf', :action => 'edit_root', :as => 'edit_root_dmsf'
|
||||
get '/projects/:id/dmsf/trash', :controller => 'dmsf', :action => 'trash', :as => 'trash_dmsf'
|
||||
get '/projects/:id/dmsf/restore', :controller => 'dmsf', :action => 'restore', :as => 'restore_dmsf'
|
||||
post '/projects/:id/dmsf/expand_folder', :controller => 'dmsf', :action => 'expand_folder', :as => 'expand_folder_dmsf'
|
||||
post '/projects/:id/dmsf/exp_folder', controller: 'dmsf', action: 'exp_folder', as: 'exp_folder_dmsf'
|
||||
get '/projects/:id/dmsf/add_email', :controller => 'dmsf', :action => 'add_email', :as => 'add_email_dmsf'
|
||||
post '/projects/:id/dmsf/append_email', :controller => 'dmsf', :action => 'append_email', :as => 'append_email_dmsf'
|
||||
get '/projects/:id/dmsf/autocomplete_for_user', :controller => 'dmsf', :action => 'autocomplete_for_user'
|
||||
post '/projects/:id/dmsf/create', controller: 'dmsf', action: 'create'
|
||||
get '/projects/:id/dmsf/notify/activate', controller: 'dmsf', action: 'notify_activate', as: 'notify_activate_dmsf'
|
||||
get '/projects/:id/dmsf/notify/deactivate', controller: 'dmsf', action: 'notify_deactivate', as: 'notify_deactivate_dmsf'
|
||||
delete '/projects/:id/dmsf/delete', controller: 'dmsf', action: 'delete', as: 'delete_dmsf'
|
||||
post '/projects/:id/dmsf/save', controller: 'dmsf', action: 'save'
|
||||
post '/projects/:id/dmsf/save/root', controller: 'dmsf', action: 'save_root'
|
||||
post '/projects/:id/dmsf/entries', controller: 'dmsf', action: 'entries_operation', as: 'entries_operations_dmsf'
|
||||
post '/projects/:id/dmsf/tag_changed', controller: 'dmsf', action: 'tag_changed', as: 'tag_changed'
|
||||
post '/projects/:id/dmsf/entries/delete', controller: 'dmsf', action: 'delete_entries', as: 'delete_entries'
|
||||
post '/projects/:id/dmsf/entries/email', to: 'dmsf#entries_email', as: 'email_entries'
|
||||
get '/projects/:id/dmsf/entries/download_email_entries', controller: 'dmsf', action: 'download_email_entries', as: 'download_email_entries'
|
||||
get '/projects/:id/dmsf/lock', controller: 'dmsf', action: 'lock', as: 'lock_dmsf'
|
||||
get '/projects/:id/dmsf/unlock', controller: 'dmsf', action: 'unlock', as: 'unlock_dmsf'
|
||||
get '/projects/:id/dmsf/', controller: 'dmsf', action: 'show', as: 'dmsf_folder'
|
||||
get '/projects/:id/dmsf/new', controller: 'dmsf', action: 'new', as: 'new_dmsf'
|
||||
get '/projects/:id/dmsf/edit', controller: 'dmsf', action: 'edit', as: 'edit_dmsf'
|
||||
get '/projects/:id/dmsf/edit/root', controller: 'dmsf', action: 'edit_root', as: 'edit_root_dmsf'
|
||||
get '/projects/:id/dmsf/trash', controller: 'dmsf', action: 'trash', as: 'trash_dmsf'
|
||||
get '/projects/:id/dmsf/restore', controller: 'dmsf', action: 'restore', as: 'restore_dmsf'
|
||||
post '/projects/:id/dmsf/expand_folder', controller: 'dmsf', action: 'expand_folder', as: 'expand_folder_dmsf'
|
||||
get '/projects/:id/dmsf/add_email', controller: 'dmsf', action: 'add_email', as: 'add_email_dmsf'
|
||||
post '/projects/:id/dmsf/append_email', controller: 'dmsf', action: 'append_email', as: 'append_email_dmsf'
|
||||
get '/projects/:id/dmsf/autocomplete_for_user', controller: 'dmsf', action: 'autocomplete_for_user'
|
||||
put '/projects/:id/dmsf', controller: 'dmsf', action: 'drop'
|
||||
|
||||
# dmsf_context_menu_controller
|
||||
match '/projects/:id/dmsf/context_menu', :to => 'dmsf_context_menus#dmsf', :as => 'dmsf_context_menu', :via => [:get, :post]
|
||||
match '/projects/:id/dmsf/trash/context_menu', :to => 'dmsf_context_menus#trash', :as => 'dmsf_trash_context_menu', :via => [:get, :post]
|
||||
match '/projects/:id/dmsf/context_menu', to: 'dmsf_context_menus#dmsf', as: 'dmsf_context_menu', via: [:get, :post]
|
||||
match '/projects/:id/dmsf/trash/context_menu', to: 'dmsf_context_menus#trash', as: 'dmsf_trash_context_menu', via: [:get, :post]
|
||||
|
||||
#
|
||||
# dmsf_state controller
|
||||
# /projects/<project>/dmsf/state
|
||||
##
|
||||
post '/projects/:id/dmsf/state', :controller => 'dmsf_state', :action => 'user_pref_save', :as => 'dmsf_user_pref_save'
|
||||
post '/projects/:id/dmsf/state', controller: 'dmsf_state', action: 'user_pref_save', as: 'dmsf_user_pref_save'
|
||||
|
||||
#
|
||||
# dmsf_upload controller
|
||||
@ -72,60 +71,60 @@ if Redmine::Plugin.installed? :redmine_dmsf
|
||||
##
|
||||
|
||||
get '/projects/:id/dmsf/upload/multi_upload', controller: 'dmsf_upload', action: 'multi_upload', as: 'multi_dmsf_upload'
|
||||
post '/projects/:id/dmsf/upload/files', :controller => 'dmsf_upload', :action => 'upload_files'
|
||||
post '/projects/:id/dmsf/upload/file', :controller => 'dmsf_upload', :action => 'upload_file'
|
||||
post '/projects/:id/dmsf/upload', :controller => 'dmsf_upload', :action => 'upload'
|
||||
post '/projects/:id/dmsf/upload/commit', :controller => 'dmsf_upload', :action => 'commit_files'
|
||||
post '/projects/:id/dmsf/commit', :controller => 'dmsf_upload', :action => 'commit'
|
||||
match 'dmsf_uploads', :to => 'dmsf_upload#upload', :via => :post
|
||||
delete '/dmsf/attachments/:id/delete', :to => 'dmsf_upload#delete_dmsf_attachment', :as => 'dmsf_attachment'
|
||||
delete '/dmsf/link_attachments/:id/delete', :to => 'dmsf_upload#delete_dmsf_link_attachment', :as => 'dmsf_link_attachment'
|
||||
post '/projects/:id/dmsf/upload/files', controller: 'dmsf_upload', action: 'upload_files'
|
||||
post '/projects/:id/dmsf/upload/file', controller: 'dmsf_upload', action: 'upload_file'
|
||||
post '/projects/:id/dmsf/upload', controller: 'dmsf_upload', action: 'upload'
|
||||
post '/projects/:id/dmsf/upload/commit', controller: 'dmsf_upload', action: 'commit_files'
|
||||
post '/projects/:id/dmsf/commit', controller: 'dmsf_upload', action: 'commit'
|
||||
match 'dmsf_uploads', to: 'dmsf_upload#upload', via: :post
|
||||
delete '/dmsf/attachments/:id/delete', to: 'dmsf_upload#delete_dmsf_attachment', as: 'dmsf_attachment'
|
||||
delete '/dmsf/link_attachments/:id/delete', to: 'dmsf_upload#delete_dmsf_link_attachment', as: 'dmsf_link_attachment'
|
||||
|
||||
#
|
||||
# dmsf_files controller
|
||||
# /dmsf/files/<file id>
|
||||
##
|
||||
get '/dmsf/files/:id/notify/activate', :controller => 'dmsf_files', :action => 'notify_activate', :as => 'notify_activate_dmsf_files'
|
||||
get '/dmsf/files/:id/notify/deactivate', :controller => 'dmsf_files', :action => 'notify_deactivate', :as => 'notify_deactivate_dmsf_files'
|
||||
get '/dmsf/files/:id/lock', :controller => 'dmsf_files', :action => 'lock', :as => 'lock_dmsf_files'
|
||||
get '/dmsf/files/:id/unlock', :controller => 'dmsf_files', :action => 'unlock', :as => 'unlock_dmsf_files'
|
||||
post '/dmsf/files/:id/delete', :controller => 'dmsf_files', :action => 'delete', :as => 'delete_dmsf_files'
|
||||
post '/dmsf/files/:id/revision/create', :controller => 'dmsf_files', :action => 'create_revision'
|
||||
get '/dmsf/files/:id/revision/delete', :controller => 'dmsf_files', :action => 'delete_revision', :as => 'delete_revision'
|
||||
get '/dmsf/files/:id/revision/obsolete', :controller => 'dmsf_files', :action => 'obsolete_revision', :as => 'obsolete_revision'
|
||||
get '/dmsf/files/:id/download', :to => 'dmsf_files#view', :download => '', :as => 'download_dmsf_file' # Otherwise will not route nil into the download param
|
||||
get '/dmsf/files/:id/view', :to => 'dmsf_files#view', :as => 'view_dmsf_file'
|
||||
get '/dmsf/files/:id', :controller => 'dmsf_files', :action => 'show', :as => 'dmsf_file'
|
||||
delete '/dmsf/files/:id', :controller => 'dmsf_files', :action => 'delete'
|
||||
get '/dmsf/files/:id/restore', :controller => 'dmsf_files', :action => 'restore', :as => 'restore_dmsf_file'
|
||||
get '/dmsf/files/:id/thumbnail', :to => 'dmsf_files#thumbnail', :as => 'dmsf_thumbnail'
|
||||
get '/dmsf/files/:id/notify/activate', controller: 'dmsf_files', action: 'notify_activate', as: 'notify_activate_dmsf_files'
|
||||
get '/dmsf/files/:id/notify/deactivate', controller: 'dmsf_files', action: 'notify_deactivate', as: 'notify_deactivate_dmsf_files'
|
||||
get '/dmsf/files/:id/lock', controller: 'dmsf_files', action: 'lock', as: 'lock_dmsf_files'
|
||||
get '/dmsf/files/:id/unlock', controller: 'dmsf_files', action: 'unlock', as: 'unlock_dmsf_files'
|
||||
post '/dmsf/files/:id/delete', controller: 'dmsf_files', action: 'delete', as: 'delete_dmsf_files'
|
||||
post '/dmsf/files/:id/revision/create', controller: 'dmsf_files', action: 'create_revision'
|
||||
get '/dmsf/files/:id/revision/delete', controller: 'dmsf_files', action: 'delete_revision', as: 'delete_revision'
|
||||
get '/dmsf/files/:id/revision/obsolete', controller: 'dmsf_files', action: 'obsolete_revision', as: 'obsolete_revision'
|
||||
get '/dmsf/files/:id/download', to: 'dmsf_files#view', download: '', as: 'download_dmsf_file' # Otherwise will not route nil into the download param
|
||||
get '/dmsf/files/:id/view', to: 'dmsf_files#view', as: 'view_dmsf_file'
|
||||
get '/dmsf/files/:id', controller: 'dmsf_files', action: 'show', as: 'dmsf_file'
|
||||
delete '/dmsf/files/:id', controller: 'dmsf_files', action: 'delete'
|
||||
get '/dmsf/files/:id/restore', controller: 'dmsf_files', action: 'restore', as: 'restore_dmsf_file'
|
||||
get '/dmsf/files/:id/thumbnail', to: 'dmsf_files#thumbnail', as: 'dmsf_thumbnail'
|
||||
|
||||
#
|
||||
# url controller
|
||||
# /dmsf/links/<file id>
|
||||
##
|
||||
get '/dmsf/links/:id/restore', :controller => 'dmsf_links', :action => 'restore', :as => 'restore_dmsf_link'
|
||||
delete '/dmsf/links/:id', :controller => 'dmsf_links', :action => 'delete'
|
||||
get '/dmsf/links/:id/restore', controller: 'dmsf_links', action: 'restore', as: 'restore_dmsf_link'
|
||||
delete '/dmsf/links/:id', controller: 'dmsf_links', action: 'delete'
|
||||
|
||||
# Just to keep backward compatibility with old external direct links
|
||||
get '/dmsf_files/:id', :controller => 'dmsf_files', :action => 'show'
|
||||
get '/dmsf_files/:id/download', :controller => 'dmsf_files', :action => 'show', :download => ''
|
||||
get '/dmsf_files/:id', controller: 'dmsf_files', action: 'show'
|
||||
get '/dmsf_files/:id/download', controller: 'dmsf_files', action: 'show', download: ''
|
||||
|
||||
#
|
||||
# files_copy controller
|
||||
# /dmsf/files/<file id>/copy
|
||||
##
|
||||
post '/dmsf/files/:id/copy/copy', :controller => 'dmsf_files_copy', :action => 'copy'
|
||||
post '/dmsf/files/:id/copy/move', :controller => 'dmsf_files_copy', :action => 'move'
|
||||
get '/dmsf/files/:id/copy', :controller => 'dmsf_files_copy', :action => 'new', :as => 'copy_file'
|
||||
post '/dmsf/files/:id/copy/copy', controller: 'dmsf_files_copy', action: 'copy'
|
||||
post '/dmsf/files/:id/copy/move', controller: 'dmsf_files_copy', action: 'move'
|
||||
get '/dmsf/files/:id/copy', controller: 'dmsf_files_copy', action: 'new', as: 'copy_file'
|
||||
|
||||
#
|
||||
# folders_copy controller
|
||||
# /dmsf/folders/<folder id>/copy
|
||||
##
|
||||
post '/dmsf/folders/:id/copy/copy', :controller => 'dmsf_folders_copy', :action => 'copy'
|
||||
post '/dmsf/folders/:id/copy/move', :controller => 'dmsf_folders_copy', :action => 'move'
|
||||
get '/dmsf/folders/:id/copy', :controller => 'dmsf_folders_copy', :action => 'new', :as => 'copy_folder'
|
||||
post '/dmsf/folders/:id/copy/copy', controller: 'dmsf_folders_copy', action: 'copy'
|
||||
post '/dmsf/folders/:id/copy/move', controller: 'dmsf_folders_copy', action: 'move'
|
||||
get '/dmsf/folders/:id/copy', controller: 'dmsf_folders_copy', action: 'new', as: 'copy_folder'
|
||||
|
||||
# Approval workflow
|
||||
resources :dmsf_workflows do
|
||||
@ -143,9 +142,9 @@ if Redmine::Plugin.installed? :redmine_dmsf
|
||||
end
|
||||
end
|
||||
|
||||
match 'dmsf_workflows/:id/edit', :controller => 'dmsf_workflows', :action => 'add_step', :id => /\d+/, :via => :post
|
||||
match 'dmsf_workflows/:id/edit', :controller => 'dmsf_workflows', :action => 'remove_step', :id => /\d+/, :via => :delete
|
||||
match 'dmsf_workflows/:id/edit', :controller => 'dmsf_workflows', :action => 'reorder_steps', :id => /\d+/, :via => :put
|
||||
match 'dmsf_workflows/:id/edit', controller: 'dmsf_workflows', action: 'add_step', id: /\d+/, via: :post
|
||||
match 'dmsf_workflows/:id/edit', controller: 'dmsf_workflows', action: 'remove_step', id: /\d+/, via: :delete
|
||||
match 'dmsf_workflows/:id/edit', controller: 'dmsf_workflows', action: 'reorder_steps', id: /\d+/, via: :put
|
||||
|
||||
# Links
|
||||
resources :dmsf_links do
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user