devel-1.5.7 merged into the master

This commit is contained in:
Karel Picman 2016-08-12 12:02:28 +02:00
commit 6e87001d70
150 changed files with 5172 additions and 3762 deletions

View File

@ -1,6 +1,9 @@
Changelog for Redmine DMSF
==========================
1.5.7 *2015-??-??*
------------------
1.5.6 *2015-01-25*
------------------

View File

@ -23,10 +23,10 @@
source 'https://rubygems.org'
gem 'rubyzip', '>= 1.0.0'
gem 'zip-zip' # Just to avoid 'cannot load such file -- zip/zip' error
gem 'zip-zip'
gem 'simple_enum'
gem 'uuidtools', '~> 2.1.1'
gem 'dav4rack', '~> 0.3.0'
gem 'uuidtools'
gem 'dav4rack'
group :xapian do
gem 'xapian-full-alaveteli', :require => false

View File

@ -1,7 +1,7 @@
Redmine DMSF Plugin
===================
The current version of Redmine DMSF is **1.5.6** [![Build Status](https://api.travis-ci.org/danmunn/redmine_dmsf.png)](https://travis-ci.org/danmunn/redmine_dmsf)
The current version of Redmine DMSF is **1.5.7** [![Build Status](https://api.travis-ci.org/danmunn/redmine_dmsf.png)](https://travis-ci.org/danmunn/redmine_dmsf)
Redmine DMSF is Document Management System Features plugin for Redmine issue tracking system; It is aimed to replace current Redmine's Documents module.
@ -77,18 +77,18 @@ From Omega documentation:
On Debian use:
```sudo apt-get install xapian-omega libxapian-dev xpdf xpdf-utils \
```sudo apt-get install xapian-omega libxapian-dev xpdf poppler-utils \
antiword unzip catdoc libwpd-tools libwps-tools gzip unrtf catdvi \
djview djview3 uuid uuid-dev xz-utils```
On Ubuntu use:
```sudo apt-get install xapian-omega libxapian-dev xpdf xpdf-utils antiword \
```sudo apt-get install xapian-omega libxapian-dev xpdf poppler-utils antiword \
unzip catdoc libwpd-tools libwps-tools gzip unrtf catdvi djview djview3 \
uuid uuid-dev xz-utils```
On CentOS user:
```sudo yum install xapian-omega libxapian-dev xpdf xpdf-utils antiword \
```sudo yum install xapian-omega libxapian-dev xpdf poppler-utils antiword \
unzip catdoc libwpd-tools libwps-tools gzip unrtf catdvi djview djview3 \
uuid uuid-dev xz```
@ -101,16 +101,16 @@ Search will now automatically search DMSF content when a Redmine search is perfo
###Linking DMSF files from Wiki entries:
####Link to a file with id 17:
####Link to a document with id 17:
`{{dmsf(17)}}`
####Link to a file with id 17 with link text "File"
####Link to a document with id 17 with link text "File"
`{{dmsf(17, File)}}`
####Link to the description of a file with id 17
####Link to the description of a document with id 17
`{{dmsfd(17)}}`
####Link to the preview of the first 5 lines from a file with id 17
####Link to the preview of 5 lines from a document with id 17
`{{dmsft(17, 5)}}`
####An inline picture of the file with id 8; it must be an image file such as JPEG, PNG,...
@ -122,10 +122,26 @@ Search will now automatically search DMSF content when a Redmine search is perfo
####An inline picture with custom size
`{{dmsf_image(8, size=50%)}}`
####An inline picture with custom height
`{{dmsf_image(8, height=300)}}`
####An inline picture with custom width
`{{dmsf_image(8, width=300)}}`
####An inline picture with custom size
`{{dmsf_image(8, size=640x480)}}`
The DMSF file/revision id can be found in link for file/revision download from within Redmine.
####A thumbnail with height of 200px
`{{dmsftn(8)}}`
####A thumbnail with custom size
`{{dmsftn(8, size=300)}}`
####Approval workflow status of a document with id 8
`{{dmsfw(8)}}`
The DMSF document/revision id can be found in document details.
###Linking DMSF folders from Wiki entries:
@ -154,6 +170,12 @@ In the file <redmine_root>/public/help/<language>/wiki_syntax_detailed.html, aft
<li><strong>{{dmsf_image(8)}}</strong> (an inline picture of the file with id 8; it must be an image file such as JPEG, PNG,...)</li>
<li><strong>{{dmsf_image(8, size=300)}}</strong> (an inline picture with custom size)</li>
<li><strong>{{dmsf_image(8, size=640x480)}}</strong> (an inline picture with custom size)</li>
<li><strong>{{dmsf_image(8, size=50%)}}</strong> (an inline picture with custom size)</li>
<li><strong>{{dmsf_image(8, height=300)}}</strong> (an inline picture with custom size)</li>
<li><strong>{{dmsf_image(8, width=300)}}</strong> (an inline picture with custom size)</li>
<li><strong>{{dmsftn(8)}}</strong> (a thumbnail with height of 200px)</li>
<li><strong>{{dmsftn(8, size=300)}}</strong> (a thumbnail with custom size)</li>
<li><strong>{{dmsfw(8)}}</strong> (approval workflow status of a document with id 8)</li>
</ul>
The DMSF file/revision id can be found in the link for file/revision download from within Redmine.<br />
The DMSF folder id can be found in the link when opening folders within Redmine.
@ -179,6 +201,7 @@ Before installing ensure that the Redmine instance is stopped.
1. In case of upgrade BACKUP YOUR DATABASE first
2. Put redmine_dmsf plugin directory into plugins.
3. Install dependencies: `bundle install`.
3.1 To install dependencies without Xapian (full-text searching): `bundle install --without xapian`. This option might be useful especially in Windows.
4. Initialize/Update database: `bundle exec rake redmine:plugins:migrate RAILS_ENV="production"`.
5. The access rights must be set for web server, example: `chown -R www-data:www-data plugins/redmine_dmsf`.
6. Restart the web server.
@ -198,6 +221,10 @@ Before installing ensure that the Redmine instance is stopped.
rake redmine:dmsf_convert_documents project=test RAILS_ENV="production"
(If you don't run the rake task as the web server user, don't forget to change the ownership of the imported files, e.g.
chown -R www-data:www-data /redmine/files/dmsf
afterwards)
b) To alert all users who are expected to do an approval in the current approval steps
Example:

View File

@ -4,7 +4,7 @@
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -23,14 +23,11 @@
class DmsfController < ApplicationController
unloadable
class ZipMaxFilesError < StandardError; end
class EmailMaxFileSize < StandardError; end
class FileNotFound < StandardError; end
before_filter :find_project
before_filter :authorize
before_filter :find_folder, :except => [:new, :create, :edit_root, :save_root]
before_filter :find_parent, :only => [:new, :create]
before_filter :tree_view, :only => [:delete, :show]
accept_api_auth :show, :create
@ -42,11 +39,15 @@ class DmsfController < ApplicationController
@file_delete_allowed = User.current.allowed_to?(:file_delete, @project)
@file_view_allowed = User.current.allowed_to?(:view_dmsf_files, @project)
@force_file_unlock_allowed = User.current.allowed_to?(:force_file_unlock, @project)
@workflows_available = DmsfWorkflow.where(['project_id = ? OR project_id IS NULL', @project.id]).count > 0
@workflows_available = DmsfWorkflow.where(['project_id = ? OR project_id IS NULL', @project.id]).exists?
@file_approval_allowed = User.current.allowed_to?(:file_approval, @project)
tag = params[:custom_field_id].present? && params[:custom_value].present?
@folder = nil if tag
if @tree_view
@locked_for_user = false
else
unless @folder
if params[:custom_field_id].present? && params[:custom_value].present?
if tag
@subfolders = []
DmsfFolder.where(:project_id => @project.id).visible.each do |f|
f.custom_field_values.each do |v|
@ -120,19 +121,18 @@ class DmsfController < ApplicationController
end
@locked_for_user = false
else
if @folder.deleted
if @folder.deleted?
render_404
return
end
@subfolders = @folder.subfolders.visible
@files = @folder.files.visible
@subfolders = @folder.dmsf_folders.visible
@files = @folder.dmsf_files.visible
@dir_links = @folder.folder_links.visible
@file_links = @folder.file_links.visible
@url_links = @folder.url_links.visible
@locked_for_user = @folder.locked_for_user?
end
end
@ajax_upload_size = Setting.plugin_redmine_dmsf['dmsf_max_ajax_upload_filesize'].present? ? Setting.plugin_redmine_dmsf['dmsf_max_ajax_upload_filesize'] : 100
@ -188,19 +188,22 @@ class DmsfController < ApplicationController
return
end
if selected_dir_links.present?
if selected_dir_links.present? &&
(params[:email_entries].present? || params[:download_entries].present?)
selected_dir_links.each do |id|
link = DmsfLink.find_by_id id
selected_folders << link.target_id if link && !selected_folders.include?(link.target_id.to_s)
end
end
if selected_file_links.present?
if selected_file_links.present? &&
(params[:email_entries].present? || params[:download_entries].present?)
selected_file_links.each do |id|
link = DmsfLink.find_by_id id
selected_files << link.target_id if link && !selected_files.include?(link.target_id.to_s)
end
end
if params[:email_entries].present?
email_entries(selected_folders, selected_files)
elsif params[:restore_entries].present?
@ -215,16 +218,14 @@ class DmsfController < ApplicationController
else
download_entries(selected_folders, selected_files)
end
rescue ZipMaxFilesError
flash[:error] = l(:error_max_files_exceeded, :number => Setting.plugin_redmine_dmsf['dmsf_max_file_download'])
redirect_to :back
rescue EmailMaxFileSize
flash[:error] = l(:error_max_email_filesize_exceeded, :number => Setting.plugin_redmine_dmsf['dmsf_max_email_filesize'])
redirect_to :back
rescue FileNotFound
render_404
rescue DmsfAccessError
render_403
rescue Exception => e
flash[:error] = e.message
Rails.logger.error e.message
redirect_to :back
end
def tag_changed
@ -296,8 +297,9 @@ class DmsfController < ApplicationController
end
def edit
@parent = @folder.folder
@parent = @folder.dmsf_folder
@pathfolder = copy_folder(@folder)
@force_file_unlock_allowed = User.current.allowed_to?(:force_file_unlock, @project)
end
def save
@ -332,10 +334,10 @@ class DmsfController < ApplicationController
else
flash[:error] = @folder.errors.full_messages.to_sentence
end
if commit
if commit || @tree_view
redirect_to :back
else
redirect_to dmsf_folder_path(:id => @project, :folder_id => @folder.folder)
redirect_to dmsf_folder_path(:id => @project, :folder_id => @folder.dmsf_folder)
end
end
@ -352,10 +354,15 @@ class DmsfController < ApplicationController
end
def save_root
if params[:project]
@project.dmsf_description = params[:project][:dmsf_description]
@project.save!
if @project.save
flash[:notice] = l(:notice_folder_details_were_saved)
redirect_to :controller => 'dmsf', :action => 'show', :id => @project
else
flash[:error] = @project.errors.full_messages.to_sentence
end
end
redirect_to dmsf_folder_path(:id => @project)
end
def notify_activate
@ -445,7 +452,7 @@ class DmsfController < ApplicationController
log_activity(f, 'emailing zip')
audit = DmsfFileRevisionAccess.new
audit.user = User.current
audit.revision = f.last_revision
audit.dmsf_file_revision = f.last_revision
audit.action = DmsfFileRevisionAccess::EmailAction
audit.save!
end
@ -472,7 +479,7 @@ class DmsfController < ApplicationController
log_activity(f, 'download zip')
audit = DmsfFileRevisionAccess.new
audit.user = User.current
audit.revision = f.last_revision
audit.dmsf_file_revision = f.last_revision
audit.action = DmsfFileRevisionAccess::DownloadAction
audit.save!
end
@ -494,7 +501,7 @@ class DmsfController < ApplicationController
selected_folders.each do |selected_folder_id|
folder = DmsfFolder.visible.find_by_id selected_folder_id
if folder
zip.add_folder(folder, member, (folder.folder.dmsf_path_str if folder.folder))
zip.add_folder(folder, member, (folder.dmsf_folder.dmsf_path_str if folder.dmsf_folder))
else
raise FileNotFound
end
@ -503,19 +510,18 @@ class DmsfController < ApplicationController
if selected_files && selected_files.is_a?(Array)
selected_files.each do |selected_file_id|
file = DmsfFile.visible.find_by_id selected_file_id
unless file && file.last_revision && File.exists?(file.last_revision.disk_file)
raise FileNotFound
end
unless (file.project == @project) || User.current.allowed_to?(:view_dmsf_files, file.project)
raise DmsfAccessError
end
if file && file.last_revision && File.exists?(file.last_revision.disk_file)
zip.add_file(file, member, (file.folder.dmsf_path_str if file.folder)) if file
else
raise FileNotFound
end
zip.add_file(file, member, (file.dmsf_folder.dmsf_path_str if file.dmsf_folder)) if file
end
end
max_files = Setting.plugin_redmine_dmsf['dmsf_max_file_download'].to_i
if max_files > 0 && zip.files.length > max_files
raise ZipMaxFilesError, zip.files.length
raise ZipMaxFilesError#, zip.files.length
end
zip
end
@ -563,6 +569,7 @@ class DmsfController < ApplicationController
if folder
unless folder.delete commit
flash[:error] = folder.errors.full_messages.to_sentence
return
end
elsif !commit
raise FileNotFound
@ -589,9 +596,17 @@ class DmsfController < ApplicationController
log_activity(f, 'deleted')
end
begin
DmsfMailer.get_notify_users(@project, deleted_files).each do |u|
recipients = DmsfMailer.get_notify_users(@project, deleted_files)
recipients.each do |u|
DmsfMailer.files_deleted(u, @project, deleted_files).deliver
end
if Setting.plugin_redmine_dmsf[:dmsf_display_notified_recipients] == '1'
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)
end
end
rescue Exception => e
Rails.logger.error "Could not send email notifications: #{e.message}"
end
@ -625,18 +640,15 @@ 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
copy
end
private
def e_params
params.fetch(:email, {}).permit(
:to, :zipped_content, :email,
:cc, :subject, :zipped_content => [], :files => [])
end
end

View File

@ -3,7 +3,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -27,6 +27,7 @@ class DmsfFilesController < ApplicationController
before_filter :find_file, :except => [:delete_revision]
before_filter :find_revision, :only => [:delete_revision]
before_filter :authorize
before_filter :tree_view, :only => [:delete]
accept_api_auth :show
@ -39,14 +40,14 @@ class DmsfFilesController < ApplicationController
@revision = @file.last_revision
else
@revision = DmsfFileRevision.find(params[:download].to_i)
raise DmsfAccessError if @revision.file != @file
raise DmsfAccessError if @revision.dmsf_file != @file
end
check_project(@revision.file)
raise ActionController::MissingFile if @file.deleted
check_project(@revision.dmsf_file)
raise ActionController::MissingFile if @file.deleted?
log_activity('downloaded')
access = DmsfFileRevisionAccess.new
access.user = User.current
access.revision = @revision
access.dmsf_file_revision = @revision
access.action = DmsfFileRevisionAccess::DownloadAction
access.save!
member = Member.where(:user_id => User.current.id, :project_id => @file.project.id).first
@ -71,14 +72,14 @@ class DmsfFilesController < ApplicationController
@revision = @file.last_revision
else
@revision = DmsfFileRevision.find(params[:download].to_i)
raise DmsfAccessError if @revision.file != @file
raise DmsfAccessError if @revision.dmsf_file != @file
end
check_project(@revision.file)
raise ActionController::MissingFile if @revision.file.deleted
check_project(@revision.dmsf_file)
raise ActionController::MissingFile if @revision.dmsf_file.deleted?
log_activity('downloaded')
access = DmsfFileRevisionAccess.new
access.user = User.current
access.revision = @revision
access.dmsf_file_revision = @revision
access.action = DmsfFileRevisionAccess::DownloadAction
access.save!
member = Member.where(:user_id => User.current.id, :project_id => @file.project.id).first
@ -98,7 +99,8 @@ class DmsfFilesController < ApplicationController
@revision = @file.last_revision
@file_delete_allowed = User.current.allowed_to?(:file_delete, @project)
@revision_pages = Paginator.new @file.revisions.visible.count, params['per_page'] ? params['per_page'].to_i : 25, params['page']
@file_manipulation_allowed = User.current.allowed_to?(:file_manipulation, @project)
@revision_pages = Paginator.new @file.dmsf_file_revisions.visible.count, params['per_page'] ? params['per_page'].to_i : 25, params['page']
respond_to do |format|
format.html {
@ -119,7 +121,7 @@ class DmsfFilesController < ApplicationController
revision.description = params[:dmsf_file_revision][:description]
revision.comment = params[:dmsf_file_revision][:comment]
revision.file = @file
revision.dmsf_file = @file
last_revision = @file.last_revision
revision.source_revision = last_revision
revision.user = User.current
@ -127,27 +129,27 @@ class DmsfFilesController < ApplicationController
revision.major_version = last_revision.major_version
revision.minor_version = last_revision.minor_version
version = params[:version].to_i
if version == 3
revision.major_version = params[:custom_version_major].to_i
revision.minor_version = params[:custom_version_minor].to_i
else
revision.increase_version(version)
end
file_upload = params[:file_upload]
unless file_upload
revision.disk_filename = last_revision.disk_filename
if version == 3
revision.major_version = params[:custom_version_major].to_i
revision.minor_version = params[:custom_version_minor].to_i
else
revision.increase_version(version, false)
end
revision.mime_type = last_revision.mime_type
revision.size = last_revision.size
revision.disk_filename = last_revision.disk_filename
revision.mime_type = last_revision.mime_type
if last_revision.digest.blank?
revision.digest = DmsfFileRevision.create_digest last_revision.disk_file
else
if version == 3
revision.major_version = params[:custom_version_major].to_i
revision.minor_version = params[:custom_version_minor].to_i
else
revision.increase_version(version, true)
revision.digest = last_revision.digest
end
else
revision.size = file_upload.size
revision.disk_filename = revision.new_storage_filename
revision.mime_type = Redmine::MimeType.of(file_upload.original_filename)
revision.digest = DmsfFileRevision.create_digest file_upload.path
end
# Custom fields
@ -210,35 +212,39 @@ class DmsfFilesController < ApplicationController
if commit
log_activity('deleted')
begin
DmsfMailer.get_notify_users(@project, [@file]).each do |u|
recipients = DmsfMailer.get_notify_users(@project, [@file])
recipients.each do |u|
DmsfMailer.files_deleted(u, @project, [@file]).deliver
end
if Setting.plugin_redmine_dmsf[:dmsf_display_notified_recipients] == '1'
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)
end
end
rescue Exception => e
Rails.logger.error "Could not send email notifications: #{e.message}"
end
end
else
@file.errors.each do |e, msg|
flash[:error] = msg
flash[:error] = @file.errors.full_messages.join(', ')
end
end
end
if commit
if commit || @tree_view
redirect_to :back
else
redirect_to dmsf_folder_path(:id => @project, :folder_id => @file.folder)
redirect_to dmsf_folder_path(:id => @project, :folder_id => @file.dmsf_folder)
end
end
def delete_revision
if @revision # && !@revision.deleted
if @revision
if @revision.delete(true)
flash[:notice] = l(:notice_revision_deleted)
log_activity('deleted')
else
@revision.errors.each do |e, msg|
flash[:error] = msg
end
flash[:error] = @revision.errors.full_messages.join(', ')
end
end
redirect_to :action => 'show', :id => @file
@ -248,8 +254,12 @@ class DmsfFilesController < ApplicationController
if @file.locked?
flash[:warning] = l(:warning_file_already_locked)
else
begin
@file.lock!
flash[:notice] = l(:notice_file_locked)
rescue Exception => e
flash[:error] = e.message
end
end
redirect_to :back
end
@ -259,8 +269,12 @@ class DmsfFilesController < ApplicationController
flash[:warning] = l(:warning_file_not_locked)
else
if @file.locks[0].user == User.current || User.current.allowed_to?(:force_file_unlock, @file.project)
begin
@file.unlock!
flash[:notice] = l(:notice_file_unlocked)
rescue Exception => e
flash[:error] = e.message
end
else
flash[:error] = l(:error_only_user_that_locked_file_can_unlock_it)
end
@ -300,11 +314,6 @@ class DmsfFilesController < ApplicationController
private
def frev_params
params.require(:dmsf_file_revision).permit(
:title, :name, :description, :comment)
end
def log_activity(action)
Rails.logger.info "#{Time.now.strftime('%Y-%m-%d %H:%M:%S')} #{User.current.login}@#{request.remote_ip}/#{request.env['HTTP_X_FORWARDED_FOR']}: #{action} dmsf://#{@file.project.identifier}/#{@file.id}/#{@revision.id if @revision}"
end
@ -318,7 +327,7 @@ class DmsfFilesController < ApplicationController
def find_revision
@revision = DmsfFileRevision.visible.find params[:id]
@file = @revision.file
@file = @revision.dmsf_file
@project = @file.project
rescue ActiveRecord::RecordNotFound
render_404
@ -330,4 +339,9 @@ 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

View File

@ -36,7 +36,7 @@ class DmsfFilesCopyController < ApplicationController
end
@target_folder = DmsfFolder.visible.find(params[:target_folder_id]) unless params[:target_folder_id].blank?
@target_folder ||= @file.folder if @target_project == @project
@target_folder ||= @file.dmsf_folder if @target_project == @project
render :layout => !request.xhr?
end
@ -47,13 +47,13 @@ class DmsfFilesCopyController < ApplicationController
render_403
return
end
@target_folder = DmsfFolder.visible.find(params[:target_folder_id]) unless params[:target_folder_id].blank?
if !@target_folder.nil? && @target_folder.project != @target_project
@target_folder = DmsfFolder.visible.find_by_id(params[:target_folder_id]) unless params[:target_folder_id].blank?
if @target_folder && (@target_folder.project != @target_project)
raise DmsfAccessError, l(:error_entry_project_does_not_match_current_project)
end
if (@target_folder && @target_folder == @file.folder) ||
(@target_folder.nil? && @file.folder.nil? && @target_project == @file.project)
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, :target_folder_id => @target_folder
return
@ -84,8 +84,8 @@ class DmsfFilesCopyController < ApplicationController
raise DmsfAccessError, l(:error_entry_project_does_not_match_current_project)
end
if (@target_folder && @target_folder == @file.folder) ||
(@target_folder.nil? && @file.folder.nil? && @target_project == @file.project)
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, :target_folder_id => @target_folder
return
@ -105,7 +105,7 @@ class DmsfFilesCopyController < ApplicationController
redirect_to dmsf_file_path(@file)
end
private
private
def log_activity(file, action)
Rails.logger.info "#{Time.now.strftime('%Y-%m-%d %H:%M:%S')} #{User.current.login}@#{request.remote_ip}/#{request.env['HTTP_X_FORWARDED_FOR']}: #{action} dmsf://#{file.project.identifier}/#{file.id}/#{file.last_revision.id}"

View File

@ -34,7 +34,7 @@ class DmsfFoldersCopyController < ApplicationController
end
@target_folder = DmsfFolder.visible.find(params[:target_folder_id]) unless params[:target_folder_id].blank?
@target_folder ||= @folder.folder if @target_project == @project
@target_folder ||= @folder.dmsf_folder if @target_project == @project
render :layout => !request.xhr?
end
@ -50,8 +50,8 @@ class DmsfFoldersCopyController < ApplicationController
raise DmsfAccessError, l(:error_entry_project_does_not_match_current_project)
end
if (@target_folder && @target_folder == @folder.folder) ||
(@target_folder.nil? && @folder.folder.nil? && @target_project == @folder.project)
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, :target_folder_id => @target_folder
return

View File

@ -2,7 +2,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -32,7 +32,7 @@ class DmsfLinksController < ApplicationController
if params[:dmsf_link].present?
# Reload
@dmsf_link.dmsf_folder_id = params[:dmsf_link][:dmsf_folder_id] # TODO: Add stuff in here for external links so that if error occurs, repopulate the same
@dmsf_link.dmsf_folder_id = params[:dmsf_link][:dmsf_folder_id]
@dmsf_file_id = params[:dmsf_link][:dmsf_file_id]
@type = params[:dmsf_link][:type]
@link_external = (@type == 'link_from') && (params[:external_link] == 'true')
@ -53,7 +53,7 @@ class DmsfLinksController < ApplicationController
if file
folder = DmsfFolder.find_by_id params[:dmsf_link][:target_folder_id]
if (folder && (folder.project_id == @dmsf_link.target_project_id) && folder.files.include?(file)) || folder.nil?
if (folder && (folder.project_id == @dmsf_link.target_project_id) && folder.dmsf_files.include?(file)) || folder.nil?
@dmsf_link.name = file.title
end
end

View File

@ -61,14 +61,16 @@ class DmsfUploadController < ApplicationController
return
end
@disk_filename = DmsfHelper.temp_filename(@tempfile.original_filename)
target = "#{DmsfHelper.temp_dir}/#{@disk_filename}"
begin
FileUtils.cp @tempfile.path, "#{DmsfHelper.temp_dir}/#{@disk_filename}"
FileUtils.cp @tempfile.path, target
FileUtils.chmod 'u=wr,g=r', target
rescue Exception => e
Rails.logger.error e.message
end
if File.size("#{DmsfHelper.temp_dir}/#{@disk_filename}") <= 0
if File.size(target) <= 0
begin
File.delete "#{DmsfHelper.temp_dir}/#{@disk_filename}"
File.delete target
rescue Exception => e
Rails.logger.error e.message
end
@ -149,15 +151,11 @@ class DmsfUploadController < ApplicationController
file = DmsfFile.new
file.project = @project
file.name = name
file.folder = @folder
file.dmsf_folder = @folder
file.notification = Setting.plugin_redmine_dmsf[:dmsf_default_notifications].present?
new_revision.minor_version = 0
new_revision.major_version = 0
else
if file.locked_for_user?
failed_uploads.push(commited_file)
next
end
if file.last_revision
last_revision = file.last_revision
new_revision.source_revision = last_revision
@ -169,9 +167,14 @@ class DmsfUploadController < ApplicationController
end
end
if file.locked_for_user?
failed_uploads.push(commited_file)
next
end
commited_disk_filepath = "#{DmsfHelper.temp_dir}/#{commited_file[:disk_filename].gsub(/[\/\\]/,'')}"
new_revision.file = file
new_revision.dmsf_file = file
new_revision.user = User.current
new_revision.name = name
new_revision.title = commited_file[:title]
@ -182,20 +185,11 @@ class DmsfUploadController < ApplicationController
new_revision.major_version = commited_file[:custom_version_major].to_i
new_revision.minor_version = commited_file[:custom_version_minor].to_i
else
new_revision.increase_version(version, true)
new_revision.increase_version(version)
end
new_revision.mime_type = Redmine::MimeType.of(new_revision.name)
new_revision.size = File.size(commited_disk_filepath)
if file.locked?
begin
file.unlock!
flash[:notice] = l(:notice_file_unlocked)
rescue DmsfLockError => e
flash[:error] = e.message
next
end
end
new_revision.digest = DmsfFileRevision.create_digest commited_disk_filepath
# Need to save file first to generate id for it in case of creation.
# File id is needed to properly generate revision disk filename
@ -214,9 +208,15 @@ class DmsfUploadController < ApplicationController
if new_revision.save
new_revision.assign_workflow(commited_file[:dmsf_workflow_id])
begin
FileUtils.mv(commited_disk_filepath, new_revision.disk_file)
file.set_last_revision new_revision
@files.push(file)
rescue Exception => e
Rails.logger.error e.message
flash[:error] = e.message
failed_uploads.push(file)
end
else
failed_uploads.push(commited_file)
end

View File

@ -2,7 +2,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -29,7 +29,8 @@ class DmsfWorkflowsController < ApplicationController
layout :workflows_layout
def index
@workflow_pages, @workflows = paginate DmsfWorkflow.global.sorted, :per_page => 25
@status = params[:status] || 1
@workflow_pages, @workflows = paginate DmsfWorkflow.status(@status).global.sorted, :per_page => 25
end
def action
@ -46,17 +47,16 @@ class DmsfWorkflowsController < ApplicationController
revision = DmsfFileRevision.find_by_id params[:dmsf_file_revision_id]
if revision
if @dmsf_workflow.try_finish revision, action, (params[:step_action].to_i / 10)
file = DmsfFile.joins(:revisions).where(:dmsf_file_revisions => {:id => revision.id}).first
if file
if revision.dmsf_file
begin
file.unlock! true
revision.dmsf_file.unlock! true
rescue DmsfLockError => e
flash[:info] = e.message
end
end
if revision.workflow == DmsfWorkflow::STATE_APPROVED
# Just approved
recipients = DmsfMailer.get_notify_users(@project)
recipients = DmsfMailer.get_notify_users(@project, [revision.dmsf_file])
recipients.each do |user|
DmsfMailer.workflow_notification(
user,
@ -78,7 +78,7 @@ class DmsfWorkflowsController < ApplicationController
recipients = @dmsf_workflow.participiants
recipients.push User.find_by_id revision.dmsf_workflow_assigned_by
recipients.uniq!
recipients = recipients & DmsfMailer.get_notify_users(@project)
recipients = recipients & DmsfMailer.get_notify_users(@project, [revision.dmsf_file])
recipients.each do |user|
DmsfMailer.workflow_notification(
user,
@ -205,8 +205,8 @@ class DmsfWorkflowsController < ApplicationController
# Reload
if params[:dmsf_workflow] && params[:dmsf_workflow][:name].present?
@dmsf_workflow.name = params[:dmsf_workflow][:name]
elsif params[:dmsf_workflow_id].present?
wf = DmsfWorkflow.find_by_id params[:dmsf_workflow_id]
elsif params[:dmsf_workflow] && params[:dmsf_workflow][:id].present?
wf = DmsfWorkflow.find_by_id params[:dmsf_workflow][:id]
@dmsf_workflow.name = wf.name if wf
end
@ -215,13 +215,14 @@ class DmsfWorkflowsController < ApplicationController
def create
if params[:dmsf_workflow]
if (params[:dmsf_workflow_id].to_i > 0)
wf = DmsfWorkflow.find_by_id params[:dmsf_workflow_id]
if (params[:dmsf_workflow][:id].to_i > 0)
wf = DmsfWorkflow.find_by_id params[:dmsf_workflow][:id]
@dmsf_workflow = wf.copy_to(@project, params[:dmsf_workflow][:name]) if wf
else
@dmsf_workflow = DmsfWorkflow.new
@dmsf_workflow.name = params[:dmsf_workflow][:name]
@dmsf_workflow.project_id = @project.id if @project
@dmsf_workflow.author = User.current
@dmsf_workflow.save
end
end
@ -238,8 +239,10 @@ class DmsfWorkflowsController < ApplicationController
end
def update
if params[:dmsf_workflow] && @dmsf_workflow.update_attributes(
{:name => params[:dmsf_workflow][:name]})
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?
if res
flash[:notice] = l(:notice_successful_update)
if @project
redirect_to settings_project_path(@project, :tab => 'dmsf_workflow')
@ -250,6 +253,9 @@ class DmsfWorkflowsController < ApplicationController
flash[:error] = @dmsf_workflow.errors.full_messages.to_sentence
redirect_to dmsf_workflow_path(@dmsf_workflow)
end
else
redirect_to dmsf_workflow_path(@dmsf_workflow)
end
end
def destroy
@ -332,12 +338,15 @@ class DmsfWorkflowsController < ApplicationController
def reorder_steps
if request.put?
unless @dmsf_workflow.reorder_steps(params[:step].to_i, params[:workflow_step][:move_to])
unless @dmsf_workflow.reorder_steps(params[:step].to_i, params[:dmsf_workflow][:position].to_i)
flash[:error] = l(:notice_cannot_renumber_steps)
end
end
respond_to do |format|
format.html
format.js {
render inline: "location.replace('#{dmsf_workflow_path(@dmsf_workflow)}');"
}
end
end
@ -382,10 +391,12 @@ private
@project = @dmsf_workflow.project
else # Global workflow
revision = DmsfFileRevision.find_by_id params[:dmsf_file_revision_id]
@project = revision.file.project if revision && revision.file
@project = revision.dmsf_file.project if revision && revision.dmsf_file
end
else
if params[:project_id].present?
if params[:dmsf_workflow]
@project = Project.find_by_id params[:dmsf_workflow][:project_id]
elsif params[:project_id]
@project = Project.find_by_id params[:project_id]
else
@project = Project.find_by_identifier params[:id]

View File

@ -1,6 +1,9 @@
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2011-16 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
@ -64,16 +67,40 @@ module DmsfHelper
return "#{Redmine::Utils.relative_url_root}/plugin_assets/#{plugin}/#{asset_type}/#{source}"
end
def self.to_time(obj)
#Right, enough of bugs, let's try a better approach here.
return if !obj
return obj.to_time(ActiveRecord::Base.default_timezone) if obj.is_a?(String)
# Why can't Mysql::Time conform to time object? - without a utc? method it breaks redmine's
# rendering method, so we convert it to string, and back into time - not the most efficient
# of methods - however seems functional. Not sure if MySQL
return obj.to_s.to_time(ActiveRecord::Base.default_timezone) if obj.class.name == 'Mysql::Time'
return obj
def self.dmsf_tree(parent, obj, tree = nil)
tree ||= []
# Folders && files && links
nodes = obj.dmsf_folders.visible + obj.dmsf_links.visible + obj.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
x.title.downcase <=> y.title.downcase
end
end
# Create the tree
nodes.each do |node|
local_parent = node.dmsf_folder
level = 0
while local_parent && (local_parent != parent)
level += 1
local_parent = local_parent.dmsf_folder
end
position = tree.size
# Files of the same parent and on the same level have the same position
if position > 0 && tree[-1][1] == level &&
(tree[-1][0].is_a?(DmsfFile) || (tree[-1][0].is_a?(DmsfLink) && tree[-1][0].is_file?))
position = tree[-1][2]
end
tree << [node, level, position]
self.dmsf_tree(parent, node, tree) if node.is_a?(DmsfFolder)
end
tree
end
end

View File

@ -1,6 +1,8 @@
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2014 Karel Pičman <karel.picman@lbcfree.net>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@lbcfree.net>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -2,7 +2,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -26,10 +26,12 @@ module DmsfWorkflowsHelper
principal_pages = Redmine::Pagination::Paginator.new principal_count, 10, params['page']
principals = scope.offset(principal_pages.offset).limit(principal_pages.per_page).all
# Delegation
if dmsf_workflow_step_assignment_id
s = content_tag('div',
content_tag('div', principals_radio_button_tags('user_ids[]', principals), :id => 'users_for_delegate'),
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'),
@ -56,7 +58,7 @@ module DmsfWorkflowsHelper
def dmsf_workflows_for_select(project, dmsf_workflow_id)
options = Array.new
options << ['', -1]
DmsfWorkflow.sorted.where(['project_id = ? OR project_id IS NULL', project.id]).each do |wf|
DmsfWorkflow.active.sorted.where(['project_id = ? OR project_id IS NULL', project.id]).each do |wf|
if wf.project_id
options << [wf.name, wf.id]
else
@ -69,7 +71,7 @@ module DmsfWorkflowsHelper
def dmsf_all_workflows_for_select(dmsf_workflow_id)
options = Array.new
options << ['', 0]
DmsfWorkflow.sorted.all.each do |wf|
DmsfWorkflow.active.sorted.all.each do |wf|
if wf.project_id
prj = Project.find_by_id wf.project_id
if User.current.allowed_to?(:manage_workflows, prj)
@ -95,4 +97,21 @@ module DmsfWorkflowsHelper
end
s.html_safe
end
def change_status_link(workflow)
url = { :controller => 'dmsf_workflows', :action => 'update', :id => workflow.id }
if workflow.locked?
link_to l(:button_unlock), url.merge(:dmsf_workflow => {:status => DmsfWorkflow::STATUS_ACTIVE}), :method => :put, :class => 'icon icon-unlock'
else
link_to l(:button_lock), url.merge(:dmsf_workflow => {:status => DmsfWorkflow::STATUS_LOCKED}), :method => :put, :class => 'icon icon-lock'
end
end
def workflows_status_options_for_select(selected)
worflows_count_by_status = DmsfWorkflow.global.group('status').count.to_hash
options_for_select([[l(:label_all), ''],
["#{l(:status_active)} (#{worflows_count_by_status[DmsfWorkflow::STATUS_ACTIVE].to_i})", DmsfWorkflow::STATUS_ACTIVE.to_s],
["#{l(:status_locked)} (#{worflows_count_by_status[DmsfWorkflow::STATUS_LOCKED].to_i})", DmsfWorkflow::STATUS_LOCKED.to_s]], selected.to_s)
end
end

View File

@ -33,24 +33,21 @@ class DmsfFile < ActiveRecord::Base
include RedmineDmsf::Lockable
belongs_to :project
belongs_to :folder, :class_name => 'DmsfFolder', :foreign_key => 'dmsf_folder_id'
belongs_to :dmsf_folder
belongs_to :deleted_by_user, :class_name => 'User', :foreign_key => 'deleted_by_user_id'
has_many :revisions, -> { order("#{DmsfFileRevision.table_name}.major_version DESC, #{DmsfFileRevision.table_name}.minor_version DESC, #{DmsfFileRevision.table_name}.updated_at DESC") },
:class_name => 'DmsfFileRevision', :foreign_key => 'dmsf_file_id',
has_many :dmsf_file_revisions, -> { order("#{DmsfFileRevision.table_name}.major_version DESC, #{DmsfFileRevision.table_name}.minor_version DESC, #{DmsfFileRevision.table_name}.updated_at DESC") },
:dependent => :destroy
has_many :locks, -> { where(entity_type: 0).order("#{DmsfLock.table_name}.updated_at DESC") },
: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
accepts_nested_attributes_for :revisions, :locks, :referenced_links, :project
scope :visible, lambda { |*args|
where(deleted: false)
}
scope :deleted, lambda { |*args|
where(deleted: true)
}
STATUS_DELETED = 1
STATUS_ACTIVE = 0
scope :visible, -> { where(:deleted => STATUS_ACTIVE) }
scope :deleted, -> { where(:deleted => STATUS_DELETED) }
validates :name, :presence => true
validates_format_of :name, :with => DmsfFolder.invalid_characters,
@ -59,7 +56,7 @@ class DmsfFile < ActiveRecord::Base
validate :validates_name_uniqueness
def validates_name_uniqueness
existing_file = DmsfFile.visible.find_file_by_name(self.project, self.folder, self.name)
existing_file = DmsfFile.visible.find_file_by_name(self.project, self.dmsf_folder, self.name)
errors.add(:name, l('activerecord.errors.messages.taken')) unless
existing_file.nil? || existing_file.id == self.id
end
@ -76,7 +73,7 @@ class DmsfFile < ActiveRecord::Base
end
desc
},
:url => Proc.new { |o| {:controller => 'dmsf_files', :action => 'show', :id => o} },
: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 }
@ -97,19 +94,23 @@ class DmsfFile < ActiveRecord::Base
@@storage_path = nil
def self.storage_path
unless @@storage_path.present?
@@storage_path = Setting.plugin_redmine_dmsf['dmsf_storage_directory'].strip if Setting.plugin_redmine_dmsf['dmsf_storage_directory'].present?
@@storage_path = Pathname(Redmine::Configuration['attachments_storage_path']).join('dmsf') if @@storage_path.blank? && Redmine::Configuration['attachments_storage_path'].present?
@@storage_path = Rails.root.join('files/dmsf').to_s if @@storage_path.blank?
Dir.mkdir(@@storage_path) unless File.exists?(@@storage_path)
end
@@storage_path
return @@storage_path if @@storage_path.present?
path = Setting.plugin_redmine_dmsf['dmsf_storage_directory']
path = Pathname(Redmine::Configuration['attachments_storage_path']).join('dmsf') if path.blank? && Redmine::Configuration['attachments_storage_path'].present?
path = Rails.root.join('files/dmsf').to_s if path.blank?
path.strip if path
path
end
# Lets introduce a write for storage path, that way we can also
# better interact from test-cases etc
def self.storage_path=(obj)
@@storage_path = obj
def self.storage_path=(path)
begin
FileUtils.mkdir_p(path) unless File.exists?(path)
rescue Exception => e
Rails.logger.error e.message
end
@@storage_path = path
end
def self.find_file_by_name(project, folder, name)
@ -121,7 +122,7 @@ class DmsfFile < ActiveRecord::Base
def last_revision
unless @last_revision
@last_revision = deleted ? self.revisions.first : self.revisions.visible.first
@last_revision = self.deleted? ? self.dmsf_file_revisions.first : self.dmsf_file_revisions.visible.first
end
@last_revision
end
@ -130,6 +131,10 @@ class DmsfFile < ActiveRecord::Base
@last_revision = new_revision
end
def deleted?
self.deleted == STATUS_DELETED
end
def delete(commit)
if locked_for_user?
Rails.logger.info l(:error_file_is_locked)
@ -138,12 +143,11 @@ class DmsfFile < ActiveRecord::Base
end
begin
# Revisions and links of a deleted file SHOULD be deleted too
self.revisions.each { |r| r.delete(commit, true) }
self.referenced_links.each { |l| l.delete(commit) }
self.dmsf_file_revisions.each { |r| r.delete(commit, true) }
if commit
self.destroy
else
self.deleted = true
self.deleted = STATUS_DELETED
self.deleted_by_user = User.current
save
end
@ -155,13 +159,12 @@ class DmsfFile < ActiveRecord::Base
end
def restore
if self.dmsf_folder_id && (self.folder.nil? || self.folder.deleted)
if self.dmsf_folder_id && (self.dmsf_folder.nil? || self.dmsf_folder.deleted?)
errors[:base] << l(:error_parent_folder)
return false
end
self.revisions.each { |r| r.restore }
self.referenced_links.each { |l| l.restore }
self.deleted = false
self.dmsf_file_revisions.each { |r| r.restore }
self.deleted = STATUS_ACTIVE
self.deleted_by_user = nil
save
end
@ -187,7 +190,7 @@ class DmsfFile < ActiveRecord::Base
end
def dmsf_path
path = self.folder.nil? ? [] : self.folder.dmsf_path
path = self.dmsf_folder ? self.dmsf_folder.dmsf_path : []
path.push(self)
path
end
@ -198,8 +201,8 @@ class DmsfFile < ActiveRecord::Base
def notify?
return true if self.notification
return true if folder && folder.notify?
return true if !folder && self.project.dmsf_notification
return true if self.dmsf_folder && delf.dmsf_folder.notify?
return true if !self.dmsf_folder && self.project.dmsf_notification
return false
end
@ -232,7 +235,7 @@ class DmsfFile < ActiveRecord::Base
# If the target project differs from the source project we must physically move the disk files
if self.project != project
self.revisions.all.each do |rev|
self.dmsf_file_revisions.all.each do |rev|
if File.exist? rev.disk_file(self.project)
FileUtils.mv rev.disk_file(self.project), rev.disk_file(project)
end
@ -240,9 +243,9 @@ class DmsfFile < ActiveRecord::Base
end
self.project = project
self.folder = folder
self.dmsf_folder = folder
new_revision = self.last_revision.clone
new_revision.file = self
new_revision.dmsf_file = self
new_revision.comment = l(:comment_moved_from, :source => "#{self.project.identifier}:#{self.dmsf_path_str}")
new_revision.custom_values = []
@ -257,7 +260,7 @@ class DmsfFile < ActiveRecord::Base
# If the target project differs from the source project we must physically move the disk files
if self.project != project
self.revisions.all.each do |rev|
self.dmsf_file_revisions.all.each do |rev|
if File.exist? rev.disk_file(self.project)
FileUtils.cp rev.disk_file(self.project), rev.disk_file(project)
end
@ -265,14 +268,14 @@ class DmsfFile < ActiveRecord::Base
end
file = DmsfFile.new
file.folder = folder
file.dmsf_folder = folder
file.project = project
file.name = self.name
file.notification = Setting.plugin_redmine_dmsf['dmsf_default_notifications'].present?
if file.save && self.last_revision
new_revision = self.last_revision.clone
new_revision.file = file
new_revision.dmsf_file = file
new_revision.comment = l(:comment_copied_from, :source => "#{self.project.identifier}: #{self.dmsf_path_str}")
new_revision.custom_values = []
@ -313,7 +316,7 @@ class DmsfFile < ActiveRecord::Base
results = []
scope = self.visible.joins(:project, :revisions)
scope = self.visible.joins(:project, :dmsf_file_revisions)
scope = scope.limit(options[:limit]) unless options[:limit].blank?
scope = scope.where(limit_options) unless limit_options.blank?
scope = scope.where(project_conditions.join(' AND '))
@ -327,7 +330,7 @@ class DmsfFile < ActiveRecord::Base
Setting.plugin_redmine_dmsf['dmsf_index_database'].strip, lang)
database = Xapian::Database.new(databasepath)
rescue Exception => e
Rails.logger.warn 'REDMAIN_XAPIAN ERROR: Xapian database is not properly set or initiated or is corrupted.'
Rails.logger.warn "REDMAIN_XAPIAN ERROR: Xapian database is not properly set, initiated or it's corrupted."
Rails.logger.warn e.message
end
@ -438,4 +441,15 @@ class DmsfFile < ActiveRecord::Base
end
end
def owner?(user)
self.last_revision && (self.last_revision.user == user)
end
def involved?(user)
self.dmsf_file_revisions.each do |file_revision|
return true if file_revision.user == user
end
false
end
end

View File

@ -3,7 +3,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -19,24 +19,26 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
require 'digest/md5'
class DmsfFileRevision < ActiveRecord::Base
unloadable
belongs_to :file, :class_name => 'DmsfFile', :foreign_key => 'dmsf_file_id'
belongs_to :dmsf_file
belongs_to :source_revision, :class_name => 'DmsfFileRevision', :foreign_key => 'source_dmsf_file_revision_id'
belongs_to :user
belongs_to :folder, :class_name => 'DmsfFolder', :foreign_key => 'dmsf_folder_id'
belongs_to :deleted_by_user, :class_name => 'User', :foreign_key => 'deleted_by_user_id'
has_many :access, :class_name => 'DmsfFileRevisionAccess', :foreign_key => 'dmsf_file_revision_id', :dependent => :destroy
has_many :dmsf_file_revision_access, :dependent => :destroy
has_many :dmsf_workflow_step_assignment, :dependent => :destroy
accepts_nested_attributes_for :access, :dmsf_workflow_step_assignment, :file, :user
# Returns a list of revisions that are not deleted here, or deleted at parent level either
scope :visible, -> { where(deleted: false) }
scope :deleted, -> { where(deleted: true) }
STATUS_DELETED = 1
STATUS_ACTIVE = 0
scope :visible, -> { where(:deleted => STATUS_ACTIVE) }
scope :deleted, -> { where(:deleted => STATUS_DELETED) }
acts_as_customizable
acts_as_event :title => Proc.new {|o| "#{l(:label_dmsf_updated)}: #{o.file.dmsf_path_str}"},
:url => Proc.new {|o| {:controller => 'dmsf_files', :action => 'show', :id => o.file}},
acts_as_event :title => Proc.new {|o| "#{l(:label_dmsf_updated)}: #{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.comment },
:author => Proc.new {|o| o.user }
@ -49,18 +51,18 @@ class DmsfFileRevision < ActiveRecord::Base
joins(
"INNER JOIN #{DmsfFile.table_name} ON #{DmsfFileRevision.table_name}.dmsf_file_id = #{DmsfFile.table_name}.id " +
"INNER JOIN #{Project.table_name} ON #{DmsfFile.table_name}.project_id = #{Project.table_name}.id").
where("#{DmsfFile.table_name}.deleted = :false", {:false => false})
where("#{DmsfFile.table_name}.deleted = ?", STATUS_ACTIVE)
validates :title, :presence => true
validates_format_of :name, :with => DmsfFolder.invalid_characters,
:message => l(:error_contains_invalid_character)
def project
self.file.project if self.file
self.dmsf_file.project if self.dmsf_file
end
def folder
self.file.folder if self.file
self.dmsf_file.dmsf_folder if self.dmsf_file
end
def self.remove_extension(filename)
@ -72,11 +74,11 @@ class DmsfFileRevision < ActiveRecord::Base
end
def delete(commit = false, force = true)
if self.file.locked_for_user?
if self.dmsf_file.locked_for_user?
errors[:base] << l(:error_file_is_locked)
return false
end
if !commit && (!force && (self.file.revisions.length <= 1))
if !commit && (!force && (self.dmsf_file.dmsf_file_revisions.length <= 1))
errors[:base] << l(:error_at_least_one_revision_must_be_present)
return false
end
@ -88,14 +90,14 @@ class DmsfFileRevision < ActiveRecord::Base
if commit
self.destroy
else
self.deleted = true
self.deleted = DmsfFile::STATUS_DELETED
self.deleted_by_user = User.current
save
end
end
def restore
self.deleted = false
self.deleted = DmsfFile::STATUS_ACTIVE
self.deleted_by_user = nil
save
end
@ -120,7 +122,7 @@ class DmsfFileRevision < ActiveRecord::Base
# custom SQL into a temporary object
#
def access_grouped
access.select('user_id, COUNT(*) AS count, MIN(created_at) AS first_at, MAX(created_at) AS last_at').group('user_id')
self.dmsf_file_revision_access.select('user_id, COUNT(*) AS count, MIN(created_at) AS first_at, MAX(created_at) AS last_at').group('user_id')
end
def version
@ -128,13 +130,13 @@ class DmsfFileRevision < ActiveRecord::Base
end
def disk_file(project = nil)
project = self.file.project unless project
project = self.dmsf_file.project unless project
storage_base = DmsfFile.storage_path.dup
if self.file && project
if self.dmsf_file && project
project_base = project.identifier.gsub(/[^\w\.\-]/,'_')
storage_base << "/p_#{project_base}"
end
Dir.mkdir(storage_base) unless File.exists?(storage_base)
FileUtils.mkdir_p(storage_base) unless File.exists?(storage_base)
"#{storage_base}/#{self.disk_filename}"
end
@ -147,7 +149,7 @@ class DmsfFileRevision < ActiveRecord::Base
def clone
new_revision = DmsfFileRevision.new
new_revision.file = self.file
new_revision.dmsf_file = self.dmsf_file
new_revision.disk_filename = self.disk_filename
new_revision.size = self.size
new_revision.mime_type = self.mime_type
@ -159,6 +161,7 @@ class DmsfFileRevision < ActiveRecord::Base
new_revision.source_revision = self
new_revision.user = User.current
new_revision.name = self.name
new_revision.digest = self.digest
new_revision
end
@ -200,34 +203,31 @@ class DmsfFileRevision < ActiveRecord::Base
wf.assign(self.id) if wf && self.id
end
def increase_version(version_to_increase, new_content)
if new_content
def increase_version(version_to_increase)
self.minor_version = case version_to_increase
when 2 then 0
else self.minor_version + 1
end
when 1
self.minor_version + 1
when 2
0
else
self.minor_version = case version_to_increase
when 1 then self.minor_version + 1
when 2 then 0
else self.minor_version
self.minor_version
end
end
self.major_version = case version_to_increase
when 2 then self.major_version + 1
else self.major_version
when 2
self.major_version + 1
else
major_version
end
end
def new_storage_filename
raise DmsfAccessError, 'File id is not set' unless self.file.id
raise DmsfAccessError, 'File id is not set' unless self.dmsf_file.id
filename = DmsfHelper.sanitize_filename(self.name)
timestamp = DateTime.now.strftime("%y%m%d%H%M%S")
while File.exist?(File.join(DmsfFile.storage_path, "#{timestamp}_#{self.file.id}_#{filename}"))
while File.exist?(File.join(DmsfFile.storage_path, "#{timestamp}_#{self.dmsf_file.id}_#{filename}"))
timestamp.succ!
end
"#{timestamp}_#{self.file.id}_#{filename}"
"#{timestamp}_#{self.dmsf_file.id}_#{filename}"
end
def copy_file_content(open_file)
@ -256,12 +256,42 @@ class DmsfFileRevision < ActiveRecord::Base
else
filename = self.name
end
format.sub!('%t', filename)
format.sub!('%t', self.title)
format.sub!('%f', filename)
format.sub!('%d', self.updated_at.strftime('%Y%m%d%H%M%S'))
format.sub!('%v', self.version)
format.sub!('%i', self.file.id.to_s)
format.sub!('%i', self.dmsf_file.id.to_s)
format.sub!('%r', self.id.to_s)
format + ext
end
def self.create_digest(path)
begin
Digest::MD5.file(path).hexdigest
rescue Exception => e
Rails.logger.error e.message
nil
end
end
def create_digest
begin
self.digest = Digest::MD5.file(self.disk_file).hexdigest
true
rescue Exception => e
Rails.logger.error e.message
false
end
end
def tooltip
text = ''
text = self.description if self.description.present?
if self.comment.present?
text += '&#xA;' if text.present?
text += self.comment
end
text.html_safe
end
end

View File

@ -1,6 +1,9 @@
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2011-16 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
@ -17,21 +20,21 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class DmsfFileRevisionAccess < ActiveRecord::Base
unloadable
belongs_to :revision, :class_name => 'DmsfFileRevision', :foreign_key => 'dmsf_file_revision_id'
belongs_to :dmsf_file_revision
belongs_to :user
delegate :project, :to => :revision, :allow_nil => false
delegate :file, :to => :revision, :allow_nil => false
accepts_nested_attributes_for :user, :revision
delegate :dmsf_file, :to => :dmsf_file_revision, :allow_nil => false
delegate :project, :to => :dmsf_file, :allow_nil => false
DownloadAction = 0
EmailAction = 1
acts_as_event :title => Proc.new {|o| "#{l(:label_dmsf_downloaded)}: #{o.file.dmsf_path_str}"},
:url => Proc.new {|o| {:controller => 'dmsf_files', :action => 'show', :id => o.file}},
:datetime => Proc.new {|o| o.updated_at },
:description => Proc.new {|o| o.revision.comment },
:author => Proc.new {|o| o.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",
@ -42,6 +45,5 @@ class DmsfFileRevisionAccess < ActiveRecord::Base
"INNER JOIN #{DmsfFileRevision.table_name} ON #{DmsfFileRevisionAccess.table_name}.dmsf_file_revision_id = #{DmsfFileRevision.table_name}.id " +
"INNER JOIN #{DmsfFile.table_name} ON #{DmsfFileRevision.table_name}.dmsf_file_id = #{DmsfFile.table_name}.id " +
"INNER JOIN #{Project.table_name} ON #{DmsfFile.table_name}.project_id = #{Project.table_name}.id").
where("#{DmsfFile.table_name}.deleted = :false", {:false => false})
where("#{DmsfFile.table_name}.deleted = ?", DmsfFile::STATUS_ACTIVE)
end

View File

@ -1,7 +1,9 @@
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2013 Karel Picman <karel.picman@kontron.com>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -3,7 +3,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2011-15 Karel Pičman <karel.picman@konton.com>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@konton.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -28,32 +28,29 @@ class DmsfFolder < ActiveRecord::Base
@@invalid_characters = /\A[^\/\\\?":<>]*\z/
belongs_to :project
belongs_to :folder, :class_name => 'DmsfFolder', :foreign_key => 'dmsf_folder_id'
belongs_to :dmsf_folder
belongs_to :deleted_by_user, :class_name => 'User', :foreign_key => 'deleted_by_user_id'
belongs_to :user
has_many :subfolders, :class_name => 'DmsfFolder', :foreign_key => 'dmsf_folder_id',
:dependent => :destroy
has_many :files, :class_name => 'DmsfFile', :foreign_key => 'dmsf_folder_id',
:dependent => :destroy
has_many :folder_links, -> { where :target_type => 'DmsfFolder' },
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
has_many :file_links, -> { where :target_type => 'DmsfFile' },
: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
has_many :referenced_links, -> { where :target_type => 'DmsfFolder' },
:class_name => 'DmsfLink', :foreign_key => 'target_id', :dependent => :destroy
has_many :locks, -> { where(entity_type: 1).order("#{DmsfLock.table_name}.updated_at DESC") },
:class_name => 'DmsfLock', :foreign_key => 'entity_id', :dependent => :destroy
accepts_nested_attributes_for :user, :project, :folder, :subfolders, :files, :folder_links, :file_links, :url_links, :referenced_links, :locks
scope :visible, lambda { |*args|
where(deleted: false)
}
scope :deleted, lambda { |*args|
where(deleted: true)
}
STATUS_DELETED = 1
STATUS_ACTIVE = 0
scope :visible, -> { where(:deleted => STATUS_ACTIVE) }
scope :deleted, -> { where(:deleted => STATUS_DELETED) }
acts_as_customizable
@ -71,7 +68,7 @@ class DmsfFolder < ActiveRecord::Base
validates :title, :presence => true
validates_uniqueness_of :title, :scope => [:dmsf_folder_id, :project_id, :deleted],
conditions: -> { where.not(deleted: true) }
conditions: -> { where(:deleted => STATUS_ACTIVE) }
validates_format_of :title, :with => @@invalid_characters,
:message => l(:error_contains_invalid_character)
validate :check_cycle
@ -88,13 +85,13 @@ class DmsfFolder < ActiveRecord::Base
def check_cycle
folders = []
self.subfolders.each {|f| folders.push(f)}
folders.each do |folder|
if folder == self.folder
self.dmsf_folders.each {|f| folders.push(f)}
self.dmsf_folders.each do |folder|
if folder == self.dmsf_folder
errors.add(:folder, l(:error_create_cycle_in_folder_dependency))
return false
end
folder.subfolders.each {|f| folders.push(f)}
folder.dmsf_folders.each {|f| folders.push(f)}
end
return true
end
@ -111,27 +108,29 @@ class DmsfFolder < ActiveRecord::Base
if self.locked?
errors[:base] << l(:error_folder_is_locked)
return false
elsif !self.subfolders.visible.empty? || !self.files.visible.empty?
elsif !self.dmsf_folders.visible.empty? || !self.dmsf_files.visible.empty?
errors[:base] << l(:error_folder_is_not_empty)
return false
end
self.referenced_links.each { |l| l.delete(commit) }
if commit
self.destroy
else
self.deleted = true
self.deleted = STATUS_DELETED
self.deleted_by_user = User.current
self.save
end
end
def deleted?
self.deleted == STATUS_DELETED
end
def restore
if self.dmsf_folder_id && (self.folder.nil? || self.folder.deleted)
if self.dmsf_folder_id && (self.dmsf_folder.nil? || self.dmsf_folder.deleted?)
errors[:base] << l(:error_parent_folder)
return false
end
self.referenced_links.each { |l| l.restore }
self.deleted = false
self.deleted = STATUS_ACTIVE
self.deleted_by_user = nil
self.save
end
@ -141,7 +140,7 @@ class DmsfFolder < ActiveRecord::Base
path = []
while folder
path.unshift(folder)
folder = folder.folder
folder = folder.dmsf_folder
end
path
end
@ -154,8 +153,8 @@ class DmsfFolder < ActiveRecord::Base
def notify?
return true if self.notification
return true if folder && folder.notify?
return true if !folder && self.project.dmsf_notification
return true if self.dmsf_folder && self.dmsf_folder.notify?
return true if !self.dmsf_folder && self.project.dmsf_notification
return false
end
@ -196,21 +195,21 @@ class DmsfFolder < ActiveRecord::Base
end
def deep_file_count
file_count = self.files.visible.count
self.subfolders.visible.each {|subfolder| file_count += subfolder.deep_file_count}
file_count + self.file_links.visible.count
file_count = self.dmsf_files.visible.count
self.dmsf_folders.visible.each { |subfolder| file_count += subfolder.deep_file_count }
file_count + self.file_links.visible.count + self.url_links.visible.count
end
def deep_folder_count
folder_count = self.subfolders.visible.count
self.subfolders.visible.each {|subfolder| folder_count += subfolder.deep_folder_count}
folder_count = self.dmsf_folders.visible.count
self.dmsf_folders.visible.each { |subfolder| folder_count += subfolder.deep_folder_count }
folder_count + self.folder_links.visible.count
end
def deep_size
size = 0
self.files.visible.each {|file| size += file.size}
self.subfolders.visible.each {|subfolder| size += subfolder.deep_size}
self.dmsf_files.visible.each {|file| size += file.size}
self.dmsf_folders.visible.each {|subfolder| size += subfolder.deep_size}
size
end
@ -227,7 +226,7 @@ class DmsfFolder < ActiveRecord::Base
def copy_to(project, folder)
new_folder = DmsfFolder.new
new_folder.folder = folder ? folder : nil
new_folder.dmsf_folder = folder ? folder : nil
new_folder.project = folder ? folder.project : project
new_folder.title = self.title
new_folder.description = self.description
@ -240,11 +239,11 @@ class DmsfFolder < ActiveRecord::Base
return new_folder unless new_folder.save
self.files.visible.each do |f|
self.dmsf_files.visible.each do |f|
f.copy_to project, new_folder
end
self.subfolders.visible.each do |s|
self.dmsf_folders.visible.each do |s|
s.copy_to project, new_folder
end
@ -270,10 +269,10 @@ class DmsfFolder < ActiveRecord::Base
def modified
last_update = updated_at
subfolders.each do |subfolder|
dmsf_folders.each do |subfolder|
last_update = subfolder.updated_at if subfolder.updated_at > last_update
end
files.each do |file|
dmsf_files.each do |file|
last_update = file.updated_at if file.updated_at > last_update
end
folder_links.each do |folder_link|
@ -290,8 +289,8 @@ class DmsfFolder < ActiveRecord::Base
# Number of items in the folder
def items
subfolders.visible.count +
files.visible.count +
dmsf_folders.visible.count +
dmsf_files.visible.count +
folder_links.visible.count +
file_links.visible.count +
url_links.visible.count
@ -300,7 +299,7 @@ class DmsfFolder < ActiveRecord::Base
private
def self.directory_subtree(tree, folder, level, current_folder)
folder.subfolders.visible.each do |subfolder|
folder.dmsf_folders.visible.each do |subfolder|
unless subfolder == current_folder
tree.push(["#{'...' * level}#{subfolder.title}", subfolder.id])
directory_subtree(tree, subfolder, level + 1, current_folder)

View File

@ -2,7 +2,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -35,15 +35,22 @@ class DmsfLink < ActiveRecord::Base
def validate_url
if self.target_type == 'DmsfUrl'
begin
if self.external_url.present?
URI.parse self.external_url
else
errors.add :external_url, :invalid
end
rescue URI::InvalidURIError
errors.add :external_url, :invalid
end
end
end
scope :visible, -> { where(deleted: false) }
scope :deleted, -> { where(deleted: true) }
STATUS_DELETED = 1
STATUS_ACTIVE = 0
scope :visible, -> { where(:deleted => STATUS_ACTIVE) }
scope :deleted, -> { where(:deleted => STATUS_DELETED) }
def target_folder_id
if self.target_type == DmsfFolder.model_name.to_s
@ -119,20 +126,28 @@ class DmsfLink < ActiveRecord::Base
if commit
self.destroy
else
self.deleted = true
self.deleted = STATUS_DELETED
self.deleted_by_user = User.current
save
save(:validate => false)
end
end
def restore
if self.dmsf_folder_id && (self.folder.nil? || self.folder.deleted)
if self.dmsf_folder_id && (self.dmsf_folder.nil? || self.dmsf_folder.deleted?)
errors[:base] << l(:error_parent_folder)
return false
end
self.deleted = false
self.deleted = STATUS_ACTIVE
self.deleted_by_user = nil
save
save(:validate => false)
end
def is_folder?
self.target_type == 'DmsfFolder'
end
def is_file?
!is_folder?
end
end

View File

@ -29,7 +29,6 @@ class DmsfLock < ActiveRecord::Base
belongs_to :user
# At the moment apparently we're only supporting a write lock?
as_enum :lock_type, [:type_write, :type_other]
as_enum :lock_scope, [:scope_exclusive, :scope_shared]

View File

@ -3,7 +3,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -27,74 +27,68 @@ class DmsfMailer < Mailer
def files_updated(user, project, files)
if user && project && files.count > 0
files = files.select { |file| file.notify? }
redmine_headers 'Project' => project.identifier if project
@files = files
@project = project
message_id project
set_language_if_valid user.language
mail :to => user.mail,
:subject => l(:text_email_doc_updated_subject, :project => project.name)
:subject => "[#{@project.name} - #{l(:menu_dmsf)}] #{l(:text_email_doc_updated_subject)}"
end
end
def files_deleted(user, project, files)
if user && files.count > 0
files = files.select { |file| file.notify? }
redmine_headers 'Project' => project.identifier if project
@files = files
@project = project
message_id project
set_language_if_valid user.language
mail :to => user.mail,
:subject => l(:text_email_doc_deleted_subject, :project => project.name)
:subject => "[#{@project.name} - #{l(:menu_dmsf)}] #{l(:text_email_doc_deleted_subject)}"
end
end
def send_documents(project, user, email_params)
zipped_content_data = open(email_params[:zipped_content], 'rb') { |io| io.read }
redmine_headers 'Project' => project.identifier if project
@body = email_params[:body]
@links_only = email_params[:links_only]
@folders = email_params[:folders]
@files = email_params[:files]
unless @links_only == '1'
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 => user.mail
mail :to => email_params[:to], :cc => email_params[:cc],
:subject => email_params[:subject], :from => user.mail
end
def workflow_notification(user, workflow, revision, subject_id, text1_id, text2_id, notice = nil)
if user && workflow && revision
if revision.file && revision.file.project
@project = revision.file.project
if revision.dmsf_file && revision.dmsf_file.project
@project = revision.dmsf_file.project
redmine_headers 'Project' => @project.identifier
end
set_language_if_valid user.language
@user = user
message_id workflow
@workflow = workflow
@revision = revision
@text1 = l(text1_id, :name => workflow.name, :filename => revision.file.name, :notice => notice)
@text1 = l(text1_id, :name => workflow.name, :filename => revision.dmsf_file.name, :notice => notice)
@text2 = l(text2_id)
@notice = notice
mail :to => user.mail, :subject => l(subject_id, :name => workflow.name)
mail :to => user.mail,
:subject => "[#{@project.name} - #{l(:field_label_dmsf_workflow)}] #{@workflow.name} #{l(subject_id)}"
end
end
def self.get_notify_users(project, files = nil)
if files
def self.get_notify_users(project, files = [])
if files.present?
notify_files = files.select { |file| file.notify? }
return [] if notify_files.empty?
end
notify_members = project.members
notify_members = notify_members.select do |notify_member|
notify_members = project.members.select do |notify_member|
notify_user = notify_member.user
if notify_user == User.current && notify_user.pref.no_self_notified
false
@ -105,8 +99,24 @@ class DmsfMailer < Mailer
true
when 'selected'
notify_member.mail_notification?
when 'only_my_events', 'only_owner'
notify_user.allowed_to?(:file_manipulation, project)
when 'only_my_events'
author = false
files.each do |file|
if file.involved?(notify_user)
author = true
break
end
end
author
when 'only_owner', 'only_assigned'
author = false
files.each do |file|
if file.owner?(notify_user)
author = true
break
end
end
author
else
false
end

View File

@ -1,8 +1,10 @@
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-14 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -73,7 +75,11 @@ class DmsfUpload
@major_version = 0
@minor_version = 0
@workflow = nil
@custom_values = DmsfFileRevision.new(:file => DmsfFile.new(:project => @project)).custom_field_values
file = DmsfFile.new
file.project = @project
revision = DmsfFileRevision.new
revision.dmsf_file = file
@custom_values = revision.custom_field_values
else
last_revision = file.last_revision
@title = last_revision.title

View File

@ -2,7 +2,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-15 Karel Picman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -19,11 +19,13 @@
# 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'
scope :sorted, lambda { order('name ASC') }
scope :global, lambda { where('project_id IS NULL') }
scope :active, lambda { where(:status => STATUS_ACTIVE) }
scope :status, lambda { |arg| where(arg.blank? ? nil : {:status => arg.to_i}) }
validate :name_validation
validates :name, :presence => true
@ -33,22 +35,22 @@ class DmsfWorkflow < ActiveRecord::Base
if self.project_id
if self.id
if (DmsfWorkflow.where(['(project_id IS NULL OR (project_id = ? AND id != ?)) AND name = ?',
self.project_id, self.id, self.name]).count > 0)
self.project_id, self.id, self.name]).exists?)
errors.add(:name, l('activerecord.errors.messages.taken'))
end
else
if (DmsfWorkflow.where(['(project_id IS NULL OR project_id = ?) AND name = ?',
self.project_id, self.name]).count > 0)
self.project_id, self.name]).exists?)
errors.add(:name, l('activerecord.errors.messages.taken'))
end
end
else
if self.id
if DmsfWorkflow.where(['name = ? AND id != ?', self.name, self.id]).count > 0
if DmsfWorkflow.where(['name = ? AND id != ?', self.name, self.id]).exists?
errors.add(:name, l('activerecord.errors.messages.taken'))
end
else
if DmsfWorkflow.where(:name => self.name).count > 0
if DmsfWorkflow.where(:name => self.name).exists?
errors.add(:name, l('activerecord.errors.messages.taken'))
end
end
@ -61,6 +63,9 @@ class DmsfWorkflow < ActiveRecord::Base
STATE_APPROVED = 2
STATE_REJECTED = 4
STATUS_LOCKED = 0
STATUS_ACTIVE = 1
def participiants
users = Array.new
self.dmsf_workflow_steps.each do |step|
@ -83,51 +88,19 @@ class DmsfWorkflow < ActiveRecord::Base
def reorder_steps(step, move_to)
DmsfWorkflow.transaction do
case move_to
when 'highest'
unless step == 1
dmsf_workflow_steps.each do |ws|
if ws.step < step
if ws.step == step
return false unless ws.update_attribute('step', move_to)
elsif ws.step >= move_to && ws.step < step
# Move up
return false unless ws.update_attribute('step', ws.step + 1)
elsif ws.step == step
return false unless ws.update_attribute('step', 1)
end
end
end
when 'higher'
unless step == 1
dmsf_workflow_steps.each do |ws|
if ws.step == step - 1
return false unless ws.update_attribute('step', step)
elsif ws.step == step
return false unless ws.update_attribute('step', step - 1)
end
end
end
when 'lower'
unless step == dmsf_workflow_steps.collect{|s| s.step}.uniq.count
dmsf_workflow_steps.each do |ws|
if ws.step == step + 1
return false unless ws.update_attribute('step', step)
elsif ws.step == step
return false unless ws.update_attribute('step', step + 1)
end
end
end
when 'lowest'
size = dmsf_workflow_steps.collect{|s| s.step}.uniq.count
unless step == size
dmsf_workflow_steps.each do |ws|
if ws.step > step
elsif ws.step <= move_to && ws.step > step
# Move down
return false unless ws.update_attribute('step', ws.step - 1)
elsif ws.step == step
return false unless ws.update_attribute('step', size)
end
end
end
end
end
return reload
return true
end
def delegates(q, dmsf_workflow_step_assignment_id, dmsf_file_revision_id)
@ -170,6 +143,7 @@ class DmsfWorkflow < ActiveRecord::Base
exists = a.add?(dmsf_file_revision_id)
break if exists
end
break if exists
end
step_is_finished = false if exists
break
@ -240,6 +214,7 @@ class DmsfWorkflow < ActiveRecord::Base
new_wf = self.dup
new_wf.name = name if name
new_wf.project_id = project ? project.id : nil
new_wf.author = User.current
if new_wf.save
self.dmsf_workflow_steps.each do |step|
step.copy_to(new_wf)
@ -247,4 +222,13 @@ class DmsfWorkflow < ActiveRecord::Base
end
return new_wf
end
def locked?
self.status == STATUS_LOCKED
end
def active?
self.status == STATUS_ACTIVE
end
end

View File

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

View File

@ -2,7 +2,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -28,8 +28,6 @@ class DmsfWorkflowStepAction < ActiveRecord::Base
validates :author_id, :presence => true
validates_uniqueness_of :dmsf_workflow_step_assignment_id, :scope => [:action], :unless => lambda {self.action == DmsfWorkflowStepAction::ACTION_DELEGATE}
attr_accessible :dmsf_workflow_step_assignment_id, :action, :note
ACTION_APPROVE = 1
ACTION_REJECT = 2
ACTION_DELEGATE = 3

View File

@ -2,7 +2,7 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -26,8 +26,6 @@ class DmsfWorkflowStepAssignment < ActiveRecord::Base
validates :dmsf_workflow_step_id, :dmsf_file_revision_id, :presence => true
validates_uniqueness_of :dmsf_workflow_step_id, :scope => [:dmsf_file_revision_id]
attr_accessible :dmsf_workflow_step_id, :user_id, :dmsf_file_revision_id
def add?(dmsf_file_revision_id)
if self.dmsf_file_revision_id == dmsf_file_revision_id
add = true

View File

@ -1,7 +1,11 @@
<%# Redmine plugin for Document Management System "Features"
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-16 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
@ -18,11 +22,12 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
<% if object %>
<div class="dmsf-customfields">
<div>
<% object.show_custom_field_values.each do |custom_value| %>
<div class="dmsf-customfield-<%= custom_value.custom_field.id %> dmsf-customfield customfield">
<%= label_tag('', "#{h(custom_value.custom_field.name)}:") %> <%= show_value(custom_value) %>
</div>
<p>
<%= label_tag('', h(custom_value.custom_field.name)) %>
<%= show_value custom_value %>
</p>
<% end %>
</div>
<% end %>

View File

@ -1,9 +1,9 @@
<%#=
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -23,20 +23,24 @@
<% locked_for_user = subfolder && subfolder.locked_for_user? %>
<% locked = subfolder && subfolder.locked? %>
<td class="check"><%= check_box_tag(name, id, false,
<td class="dmsf_checkbox"><%= check_box_tag(name, id, false,
:title => l(:title_check_for_zip_download_or_email), :id => "subfolder_#{id}") %></td>
<td class="title">
<td class="dmsf_title">
<% if @tree_view %>
<span class='dmsf_expander' <%= onclick.html_safe %>></span>
<% end %>
<%= link_to(h(title),
dmsf_folder_path(:id => project, :folder_id => subfolder),
:class => 'icon icon-folder') %>
:class => 'icon icon-folder',
:title => h(subfolder.description)) %>
<% if link %>
<div class="filename" title="<%= l(:label_target_folder)%>"><%= link.path %></div>
<div class="dmsf_filename" title="<%= l(:label_target_folder)%>"><%= link.path %></div>
<% else %>
<div class="filename" title="<%= l(:title_items)%>">[<%= subfolder.items %>]</div>
<div class="dmsf_filename" title="<%= l(:title_items)%>">[<%= subfolder.items %>]</div>
<% end %>
</td>
<td class="size"></td>
<td class="modified"><%= format_time(subfolder.modified) if subfolder %>
<td class="dmsf_size"></td>
<td class="dmsf_modified"><%= format_time(subfolder.modified) if subfolder %>
<% if locked_for_user %>
<% if subfolder.lock.reverse[0].user %>
<%= link_to(image_tag(link ? 'locked_gray.png' : 'locked.png', :plugin => 'redmine_dmsf'),
@ -51,19 +55,29 @@
:title => l(:title_locked_by_you)) %>
<% end %>
</td>
<td class="version"></td>
<td class="workflow"></td>
<td class="author"><%= h(subfolder.user) if subfolder %></td>
<td class="buttons">
<td class="dmsf_version"></td>
<td class="dmsf_workflow"></td>
<td class="dmsf_author"><%= h(subfolder.user) if subfolder %></td>
<td class="dmsf_buttons">
<% if @folder_manipulation_allowed %>
<% unless locked %>
<% unless locked_for_user %>
<%= link_to(image_tag('edit.png'),
edit_dmsf_path(:id => project, :folder_id => subfolder),
:title => l(:link_edit, :title => subfolder ? h(subfolder.title) : project.name)) %>
<% if subfolder %>
<% if locked %>
<% if subfolder.unlockable? %>
<%= link_to(image_tag('unlock.png', :plugin => 'redmine_dmsf'),
unlock_dmsf_path(:id => project, :folder_id => subfolder),
:title => l(:title_unlock_file)) %>
<% else %>
<span class="icon"></span>
<% end %>
<% else %>
<%= link_to(image_tag('lock.png', :plugin => 'redmine_dmsf'),
lock_dmsf_path(:id => project, :folder_id => subfolder),
:title => l(:title_lock_file)) %>
<% end %>
<% else %>
<span class="icon"></span>
<% end %>
@ -77,11 +91,9 @@
:title => l(:title_notifications_not_active_activate)) %>
<% end %>
<% if link %>
<%= link_to(image_tag('delete.png'),
dmsf_link_path(link),
<%= link_to(image_tag('delete.png'), dmsf_link_path(link),
:data => {:confirm => l(:text_are_you_sure)},
:method => :delete,
:title => l(:title_delete)) %>
:method => :delete, :title => l(:title_delete)) %>
<% else %>
<%= link_to(image_tag('delete.png'),
delete_dmsf_path(:id => project, :folder_id => subfolder),
@ -98,7 +110,7 @@
<% end %>
<% end %>
</td>
<td class="invisible">0</td>
<td class="invisible">0</td>
<td class="invisible"><%= subfolder.modified.to_i if subfolder %></td>
<td class="invisible">0</td>
<td class="dmsf_invisible"><%= position %></td>
<td class="dmsf_invisible">0</td>
<td class="dmsf_invisible"><%= subfolder.modified.to_i if subfolder %></td>
<td class="dmsf_invisible">0</td>

View File

@ -1,9 +1,9 @@
<%#=
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -20,27 +20,37 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<td class="check"><%= check_box_tag(name, id, false,
<td class="dmsf_checkbox"><%= check_box_tag(name, id, false,
:title => l(:title_check_for_restore_or_delete), :id => "subfolder_#{id}") %></td>
<td class="title">
<td class="dmsf_title">
<%= content_tag(:span, h(title),
:title => h(title),
:title => h(subfolder.description),
:class => 'icon icon-folder') %>
<% if link %>
<div class="filename" title="<%= l(:label_target_folder)%>"><%= link.path %></div>
<div class="dmsf_filename" title="<%= l(:label_target_folder)%>"><%= link.path %></div>
<% else %>
<div class="filename" title="<%= l(:title_items)%>">[<%= subfolder.items %>]</div>
<div class="dmsf_filename" title="<%= l(:title_items)%>">[<%= subfolder.items %>]</div>
<% end %>
</td>
<td class="size"></td>
<td class="modified">
<td class="dmsf_size"></td>
<td class="dmsf_modified">
<%= format_time(subfolder.modified) if subfolder %>
</td>
<td class="version"></td>
<td class="workflow"></td>
<td class="author"><%= h(subfolder.user) %></td>
<td class="buttons">
<td class="dmsf_version"></td>
<td class="dmsf_workflow"></td>
<td class="dmsf_author"><%= h(subfolder.user) %></td>
<td class="dmsf_buttons">
<% if @folder_manipulation_allowed %>
<% if link %>
<%= link_to(image_tag('restore.png', :plugin => 'redmine_dmsf'),
restore_dmsf_link_path(:id => link),
:title => l(:title_restore)) %>
<%= link_to(image_tag('rev_delete.png', :plugin => 'redmine_dmsf'),
dmsf_link_path(:id => link, :commit => 'yes'),
:data => {:confirm => l(:text_are_you_sure)},
:method => :delete,
:title => l(:title_delete)) %>
<% else # folder %>
<%= link_to(image_tag('restore.png', :plugin => 'redmine_dmsf'),
restore_dmsf_path(:id => project, :folder_id => subfolder),
:title => l(:title_restore)) %>
@ -49,8 +59,9 @@
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:title_delete)) %>
<% end %>
<% end %>
</td>
<td class="invisible">0</td>
<td class="invisible">0</td>
<td class="invisible"><%= subfolder.modified.to_i if subfolder %></td>
<td class="invisible">0</td>
<td class="dmsf_invisible">0</td>
<td class="dmsf_invisible">0</td>
<td class="dmsf_invisible"><%= subfolder.modified.to_i if subfolder %></td>
<td class="dmsf_invisible">0</td>

View File

@ -1,9 +1,9 @@
<%#=
<%
# encode: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -20,26 +20,28 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<% locked_for_user = file.locked_for_user? %>
<% locked = file.locked? %>
<% wf = DmsfWorkflow.find_by_id(file.last_revision.dmsf_workflow_id) %>
<td class="check"><%= check_box_tag(name, id, false,
<td class="dmsf_checkbox"><%= check_box_tag(name, id, false,
:title => l(:title_check_for_zip_download_or_email), :id => "file_#{id}") %></td>
<td class="title">
<td class="dmsf_title">
<% if @tree_view %>
<span class='dmsf_expander' <%= onclick.html_safe %>></span>
<% end %>
<% file_view_url = url_for({:controller => :dmsf_files, :action => 'view', :id => file}) %>
<%= link_to(h(title),
file_view_url,
:target => "_blank",
:target => '_blank',
:class => "icon icon-file #{DmsfHelper.filetype_css(file.name)}",
:title => l(:title_title_version_version_download, :title => h(file.title), :version => file.version),
:title => file.last_revision.try(:tooltip),
'data-downloadurl' => "#{file.last_revision.detect_content_type}:#{h(file.name)}:#{file_view_url}") %>
<div class="filename" title="<%= l(:title_filename_for_download)%>"><%= h(link ? link.path : file.display_name) %></div>
<div class="dmsf_filename" title="<%= l(:title_filename_for_download)%>"><%= h(link ? link.path : file.display_name) %></div>
<%= '</span>'.html_safe if @tree_view %>
</td>
<td class="size"><%= number_to_human_size(file.last_revision.size) %></td>
<td class="modified">
<td class="dmsf_size"><%= number_to_human_size(file.last_revision.size) %></td>
<td class="dmsf_modified">
<%= format_time(file.last_revision.updated_at) %>
<% if locked_for_user %>
<% if file.locked_for_user? %>
<% if file.lock.reverse[0].user %>
<%= link_to(image_tag(link ? 'locked_gray.png' : 'locked.png', :plugin => 'redmine_dmsf'),
user_path(file.lock.reverse[0].user),
@ -48,13 +50,13 @@
<%= content_tag(:span, image_tag(link ? 'locked_gray.png' : 'locked.png', :plugin => 'redmine_dmsf'),
:title => l(:notice_account_unknown_email)) %>
<% end %>
<% elsif locked %>
<% elsif file.locked? %>
<%= content_tag(:span, image_tag(link ? 'lockedbycurrent_gray.png' : 'lockedbycurrent.png', :plugin => 'redmine_dmsf'),
:title => l(:title_locked_by_you)) %>
<% end %>
</td>
<td class="version" title="<%= file.last_revision.comment %>"><%= file.last_revision.version %></td>
<td class="workflow">
<td class="dmsf_version" title="<%= file.last_revision.comment %>"><%= file.last_revision.version %></td>
<td class="dmsf_workflow">
<% if wf && @file_approval_allowed %>
<%= link_to(
file.last_revision.workflow_str(false),
@ -68,17 +70,24 @@
<%= file.last_revision.workflow_str(false) %>
<% end %>
</td>
<td class="author"><%= h(file.last_revision.user) %></td>
<td class="buttons">
<% if @file_manipulation_allowed || @file_approval_allowed %>
<td class="dmsf_author"><%= h(file.last_revision.user) %></td>
<td class="dmsf_buttons">
<% if @file_manipulation_allowed %>
<% unless locked %>
<%= link_to(image_tag('filedetails.png', :plugin => 'redmine_dmsf'),
dmsf_file_path(:id => file),
:title => l(:link_details, :title => h(file.last_revision.title))) %>
<% unless file.locked_for_user? %>
<% if !file.locked? %>
<%= link_to(image_tag('lock.png', :plugin => 'redmine_dmsf'),
lock_dmsf_files_path(:id => file),
:title => l(:title_lock_file)) %>
<% elsif file.unlockable? %>
<%= link_to(image_tag('unlock.png', :plugin => 'redmine_dmsf'),
unlock_dmsf_files_path(:id => file),
:title => l(:title_unlock_file))%>
<% else %>
<span class="icon"></span>
<% end %>
<% if file.notification %>
<%= link_to(image_tag('notify.png', :plugin => 'redmine_dmsf'),
notify_deactivate_dmsf_files_path(:id => file),
@ -100,14 +109,13 @@
dmsf_file_path(:id => file),
:data => {:confirm => l(:text_are_you_sure)},
:method => :delete,
:title => l(:title_delete)) unless locked_for_user %>
:title => l(:title_delete)) unless file.locked_for_user? %>
<% else %>
<span class="icon"></span>
<% end %>
<% end %>
<% else %>
<span class="icon"></span>
<% if (!locked_for_user || @force_file_unlock_allowed) && file.unlockable? %>
<% if @force_file_unlock_allowed && file.unlockable? %>
<%= link_to(image_tag('unlock.png', :plugin => 'redmine_dmsf'),
unlock_dmsf_files_path(:id => file),
:title => l(:title_unlock_file))%>
@ -115,7 +123,7 @@
<span class="icon"></span>
<% end %>
<span class="icon"></span>
<span class="icon dmsf_icon-narrow"></span>
<span class="icon"></span>
<% end %>
<% end %>
<% if @file_approval_allowed %>
@ -156,10 +164,10 @@
title => l(:label_dmsf_wokflow_action_start)) %>
<% end %>
<% when DmsfWorkflow::STATE_REJECTED %>
<%= content_tag(:span, image_tag('assigned.png', :plugin => 'redmine_dmsf'),
<%= content_tag(:span, image_tag('rejected.png', :plugin => 'redmine_dmsf'),
:title => l(:title_rejected)) %>
<% else %>
<% if @workflows_available %>
<% if @workflows_available && !file.locked_for_user? %>
<%= link_to(image_tag('none.png', :plugin => 'redmine_dmsf'),
assign_dmsf_workflow_path(
:project_id => project.id,
@ -169,9 +177,8 @@
<% end %>
<% end %>
<% end %>
<% end %>
</td>
<td class="invisible">1</td>
<td class="invisible"><%= file.last_revision.size %></td>
<td class="invisible"><%= file.last_revision.updated_at.to_i %></td>
<td class="invisible"><%= file.last_revision.iversion %></td>
<td class="dmsf_invisible"><%= position %></td>
<td class="dmsf_invisible"><%= file.last_revision.size %></td>
<td class="dmsf_invisible"><%= file.last_revision.updated_at.to_i %></td>
<td class="dmsf_invisible"><%= file.last_revision.iversion %></td>

View File

@ -1,9 +1,9 @@
<%#=
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -20,25 +20,35 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<td class="check"><%= check_box_tag(name, id, false,
<td class="dmsf_checkbox"><%= check_box_tag(name, id, false,
:title => l(:title_check_for_restore_or_delete), :id => "file_#{id}") %></td>
<td class="title">
<td class="dmsf_title">
<%= content_tag(:span, h(title),
:title => h(title),
:title => h(file.last_revision.try(:tooltip)),
:class => "icon icon-file #{DmsfHelper.filetype_css(file.name)}") %>
<div class="filename" title="<%= l(:title_filename_for_download)%>"><%= h(link ? link.path : file.display_name) %></div>
<div class="dmsf_filename" title="<%= l(:title_filename_for_download)%>"><%= h(link ? link.path : file.display_name) %></div>
</td>
<td class="size"><%= number_to_human_size(file.last_revision.size) %></td>
<td class="modified">
<td class="dmsf_size"><%= number_to_human_size(file.last_revision.size) %></td>
<td class="dmsf_modified">
<%= format_time(file.last_revision.updated_at) %>
</td>
<td class="version" title="<%= file.last_revision.comment %>"><%= file.last_revision.version %></td>
<td class="workflow">
<td class="dmsf_version" title="<%= file.last_revision.comment %>"><%= file.last_revision.version %></td>
<td class="dmsf_workflow">
<%= file.last_revision.workflow_str(false) %>
</td>
<td class="author"><%= h(file.last_revision.user) %></td>
<td class="buttons">
<td class="dmsf_author"><%= h(file.last_revision.user) %></td>
<td class="dmsf_buttons">
<% if @file_manipulation_allowed %>
<% if link %>
<%= link_to(image_tag('restore.png', :plugin => 'redmine_dmsf'),
restore_dmsf_link_path(:id => link),
:title => l(:title_restore)) %>
<%= link_to(image_tag('rev_delete.png', :plugin => 'redmine_dmsf'),
dmsf_link_path(:id => link, :commit => 'yes'),
:data => {:confirm => l(:text_are_you_sure)},
:method => :delete,
:title => l(:title_delete)) %>
<% else # file %>
<%= link_to(image_tag('restore.png', :plugin => 'redmine_dmsf'),
restore_dmsf_file_path(:id => file),
:title => l(:title_restore)) %>
@ -48,8 +58,9 @@
:method => :delete,
:title => l(:title_delete)) %>
<% end %>
<% end %>
</td>
<td class="invisible">1</td>
<td class="invisible"><%= file.last_revision.size %></td>
<td class="invisible"><%= file.last_revision.updated_at.to_i %></td>
<td class="invisible"><%= file.last_revision.iversion %></td>
<td class="dmsf_invisible">1</td>
<td class="dmsf_invisible"><%= file.last_revision.size %></td>
<td class="dmsf_invisible"><%= file.last_revision.updated_at.to_i %></td>
<td class="dmsf_invisible"><%= file.last_revision.iversion %></td>

View File

@ -0,0 +1,118 @@
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-16 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.
%>
<table class="display list dmsf_list" id="browser">
<thead>
<tr>
<th class="dmsf_checkbox dmsf_th">
<input id="check_all_entries" title="<%= l(:title_check_uncheck_all_for_zip_download_or_email) %>" type="checkbox" />
</th>
<th class ="dmsf_th"><%= l(:link_title) %></th>
<th class ="dmsf_th"><%= l(:link_size) %></th>
<th class ="dmsf_th"><%= l(:link_modified) %></th>
<th title="<%= l(:label_dmsf_version) %>" class ="dmsf_th"><%= l(:link_ver) %></th>
<th class ="dmsf_th"><%= l(:link_workflow) %></th>
<th class ="dmsf_th"><%= l(:link_author) %></th>
<th class ="dmsf_th"></th>
<th class="dmsf_invisible"></th>
<th class="dmsf_invisible"></th>
<th class="dmsf_invisible"></th>
<th class="dmsf_invisible"></th>
</tr>
</thead>
<tbody>
<% @subfolders.each do |subfolder| %>
<tr class="dir">
<%= render(:partial => 'dir',
:locals => {
:project => @project,
:subfolder => subfolder,
:link => nil,
:id => subfolder.id,
:name => 'subfolders[]',
:title => subfolder.title,
:position => 0 }) %>
</tr>
<% end %>
<% @dir_links.each do |link| %>
<% unless link.target_project %>
<% Rails.logger.error "Error: dmsf_link id #{link.id} has no target!" %>
<% next %>
<% end %>
<tr class="dmsf_gray">
<%= render(:partial => 'dir',
:locals => {
:project => link.target_project,
:subfolder => link.target_folder,
:link => link,
:id => link.id,
:name => 'dir_links[]',
:title => link.name,
:position => 0}) %>
</tr>
<% end %>
<% @files.each do |file| %>
<% unless file.last_revision %>
<% Rails.logger.error "Error: dmsf_file id #{file.id} has no revision!" %>
<% next %>
<% end %>
<tr class="file">
<%= render(:partial => 'file', :locals => {
:project => @project,
:file => file,
:link => nil,
:id => file.id,
:name => 'files[]',
:title => file.title,
:position => 1 }) %>
</tr>
<% end %>
<% @file_links.each do |link| %>
<% unless link.target_file.last_revision %>
<% Rails.logger.error "Error: dmsf_file id #{link.target_id} has no revision!" %>
<% next %>
<% end %>
<tr class="dmsf_gray">
<%= render(:partial => 'file', :locals => {
:project => link.target_project,
:file => link.target_file,
:link => link,
:id => link.id,
:name => 'file_links[]',
:title => link.name,
:position => 1}) %>
</tr>
<% end %>
<% @url_links.each do |link| %>
<tr class="dmsf_gray">
<%= render(:partial => 'url', :locals => {
:project => link.target_project,
:file => link.target_file,
:link => link,
:id => link.id,
:name => 'file_links[]',
:title => link.name,
:position => 1}) %>
</tr>
<% end %>
</tbody>
</table>

View File

@ -17,14 +17,15 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<h2>
<% if folder %>
<%= link_to l(:link_documents), dmsf_folder_path(:id => @project) %>
<% folder.dmsf_path.each do |path_element| %>
/
<% if !filename && path_element == folder.dmsf_path.last %>
<% 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) %>
@ -37,4 +38,7 @@
/
<%= h(filename) %>
<% end %>
<% if title %>
&#187; <%= title %>
<% end %>
</h2>

View File

@ -0,0 +1,143 @@
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-16 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.
%>
<table class="display list dmsf_list" id="browser">
<thead>
<tr>
<th class="dmsf_checkbox dmsf_th">
<input id="check_all_entries" title="<%= l(:title_check_uncheck_all_for_zip_download_or_email) %>" type="checkbox" />
</th>
<th class ="dmsf_th"><%= l(:link_title) %></th>
<th class ="dmsf_th"><%= l(:link_size) %></th>
<th class ="dmsf_th"><%= l(:link_modified) %></th>
<th title="<%= l(:label_dmsf_version) %>" class ="dmsf_th"><%= l(:link_ver) %></th>
<th class ="dmsf_th"><%= l(:link_workflow) %></th>
<th class ="dmsf_th"><%= l(:link_author) %></th>
<th class ="dmsf_th"></th>
<th class="dmsf_invisible"></th>
<th class="dmsf_invisible"></th>
<th class="dmsf_invisible"></th>
<th class="dmsf_invisible"></th>
</tr>
</thead>
<tbody>
<% parent = @folder ? @folder : @project %>
<% DmsfHelper.dmsf_tree(parent, parent).each do |obj, level, position| %>
<% classes = "dmsf_tree idnt-#{level}" %>
<% if obj.is_a?(DmsfFolder) && ((obj.dmsf_folders.visible.count > 0) || (obj.dmsf_files.visible.count > 0) || (obj.dmsf_links.visible.count > 0)) %>
<% classes += ' idnt dmsf_collapsed' %>
<% id = "id='#{obj.id}span'".html_safe %>
<% onclick = "onclick=\"dmsf_toggle('#{obj.id}','#{obj.id}span')\"" %>
<% else %>
<% classes += ' dmsf_child' %>
<% onclick = '' %>
<% end %>
<%if obj.dmsf_folder && obj.dmsf_folder != @folder %>
<% classes += ' dmsf_hidden' %>
<% else %>
<%# Force odd/even backgroung style for visible items %>
<% classes += " dmsf_#{cycle('odd', 'even')}" %>
<% end %>
<% parent = obj.dmsf_folder %>
<% while parent %>
<% classes += " #{parent.id}" %>
<% parent = parent.dmsf_folder %>
<% end %>
<% if obj.is_a? DmsfFolder %>
<tr <%= id %> class="dir <%= classes %>">
<%= render(:partial => 'dir',
:locals => {
:project => @project,
:subfolder => obj,
:link => nil,
:id => obj.id,
:name => 'subfolders[]',
:title => obj.title,
:onclick => onclick,
:position => position}) %>
</tr>
<% elsif obj.is_a?(DmsfLink) && (obj.target_type == 'DmsfFolder') %>
<% unless obj.target_project %>
<% Rails.logger.error "Error: dmsf_link id #{obj.id} has no target!" %>
<% next %>
<% end %>
<tr <%= id %> class="dmsf_gray <%= classes %>">
<%= render(:partial => 'dir',
:locals => {
:project => obj.target_project,
:subfolder => obj.target_folder,
:link => obj,
:id => obj.id,
:name => 'dir_links[]',
:title => obj.name,
:onclick => onclick,
:position => position}) %>
</tr>
<% elsif obj.is_a?(DmsfFile) %>
<% unless obj.last_revision %>
<% Rails.logger.error "Error: dmsf_file id #{obj.id} has no revision!" %>
<% next %>
<% end %>
<tr <%= id %> class="file <%= classes %>">
<%= render(:partial => 'file', :locals => {
:project => @project,
:file => obj,
:link => nil,
:id => obj.id,
:name => 'files[]',
:title => obj.title,
:onclick => onclick,
:position => position}) %>
</tr>
<% elsif obj.is_a?(DmsfLink) && (obj.target_type == 'DmsfFile') %>
<% unless obj.target_file.last_revision %>
<% Rails.logger.error "Error: dmsf_file id #{obj.target_id} has no revision!" %>
<% next %>
<% end %>
<tr <%= id %> class="dmsf_gray <%= classes %>">
<%= render(:partial => 'file', :locals => {
:project => obj.target_project,
:file => obj.target_file,
:link => obj,
:id => obj.id,
:name => 'file_links[]',
:title => obj.name,
:onclick => onclick,
:position => position}) %>
</tr>
<% elsif obj.is_a?(DmsfLink) && (obj.target_type == 'DmsfUrl') %>
<tr <%= id %> class="dmsf_gray <%= classes %>">
<%= render(:partial => 'url', :locals => {
:project => obj.target_project,
:file => obj.target_file,
:link => obj,
:id => obj.id,
:name => 'file_links[]',
:title => obj.name,
:onclick => onclick,
:position => position}) %>
</tr>
<% end %>
<% end %>
</tbody>
</table>

View File

@ -1,9 +1,9 @@
<%#=
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -20,25 +20,30 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<td class="check"></td>
<td class="title">
<td class="dmsf_checkbox"></td>
<td class="dmsf_title">
<% if @tree_view %>
<span class='dmsf_expander' <%= onclick.html_safe %>></span>
<% end %>
<%= link_to(h(title),
link.external_url,
:target => "_blank",
:class => 'icon icon-link') %>
<div class="filename" title="<%= l(:label_target_folder)%>"><%= link.external_url %></div>
:target => '_blank',
:class => 'icon dmsf_icon-link') %>
<div class="dmsf_filename" title="<%= l(:label_target_folder) %>">
<%= link.external_url %>
</div>
<%= '</span>'.html_safe if @tree_view %>
</td>
<td class="size"></td>
<td class="modified"><%= format_time(link.updated_at) %></td>
<td class="version"></td>
<td class="workflow"></td>
<td class="author"><%= h(link.user) %></td>
<td class="buttons">
<td class="dmsf_size"></td>
<td class="dmsf_modified"><%= format_time(link.updated_at) %></td>
<td class="dmsf_version"></td>
<td class="dmsf_workflow"></td>
<td class="dmsf_author"><%= h(link.user) %></td>
<td class="dmsf_buttons">
<span class="icon"></span>
<span class="icon"></span>
<span class="icon"></span>
<% if @file_manipulation_allowed %>
<% if @file_manipulation_allowed %>
<span class="icon"></span>
<span class="icon"></span>
<span class="icon"></span>
<%= link_to(image_tag('delete.png'),
dmsf_link_path(link),
:data => {:confirm => l(:text_are_you_sure)},
@ -46,13 +51,9 @@
:title => l(:title_delete)) %>
<% else %>
<span class="icon"></span>
<span class="icon"></span>
<span class="icon"></span>
<span class="icon dmsf_icon-narrow"></span>
<% end %>
<% end %>
</td>
<td class="invisible">1</td>
<td class="invisible"></td>
<td class="invisible">link.updated_at.to_i</td>
<td class="invisible"></td>
<td class="dmsf_invisible"><%= position %> </td>
<td class="dmsf_invisible"></td>
<td class="dmsf_invisible">link.updated_at.to_i</td>
<td class="dmsf_invisible"></td>

View File

@ -1,9 +1,9 @@
<%#=
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -20,21 +20,21 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<td class="check"><%= check_box_tag(name, id, false,
<td class="dmsf_checkbox"><%= check_box_tag(name, id, false,
:title => l(:title_check_for_restore_or_delete)) %></td>
<td class="title">
<td class="dmsf_title">
<%= link_to(h(title),
link.external_url,
:target => "_blank",
:class => 'icon icon-link') %>
<div class="filename" title="<%= l(:label_target_folder)%>"><%= link.external_url %></div>
:target => '_blank',
:class => 'icon dmsf_icon-link') %>
<div class="dmsf_filename" title="<%= l(:label_target_folder)%>"><%= link.external_url %></div>
</td>
<td class="size"></td>
<td class="modified"><%= format_time(link.updated_at) %></td>
<td class="version"></td>
<td class="workflow"></td>
<td class="author"><%= h(link.user) %></td>
<td class="buttons">
<td class="dmsf_size"></td>
<td class="dmsf_modified"><%= format_time(link.updated_at) %></td>
<td class="dmsf_version"></td>
<td class="dmsf_workflow"></td>
<td class="dmsf_author"><%= h(link.user) %></td>
<td class="dmsf_buttons">
<% if @file_manipulation_allowed %>
<%= link_to(image_tag('restore.png', :plugin => 'redmine_dmsf'),
restore_dmsf_link_path(:id => link),
@ -46,7 +46,7 @@
:title => l(:title_delete)) %>
<% end %>
</td>
<td class="invisible">1</td>
<td class="invisible"></td>
<td class="invisible">link.updated_at.to_i</td>
<td class="invisible"></td>
<td class="dmsf_invisible">1</td>
<td class="dmsf_invisible"></td>
<td class="dmsf_invisible">link.updated_at.to_i</td>
<td class="dmsf_invisible"></td>

View File

@ -1,7 +1,11 @@
<%# Redmine plugin for Document Management System "Features"
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-16 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
@ -15,86 +19,82 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<% html_title(l(:dmsf)) %>
<div class="contextual">
<% if User.current.allowed_to?(:folder_manipulation, @project) && params[:action] == 'edit' %>
<% if !@folder.new_record? && User.current.allowed_to?(:folder_manipulation, @project) %>
<% if !@folder.locked_for_user? %>
<% unless @folder.locked? %>
<%= link_to(l(:button_lock),
lock_dmsf_path(:id => @project, :folder_id => @folder),
:title => l(:title_lock_file),
:class => 'icon icon-dmsf-lock') %>
:title => l(:title_lock_file), :class => 'icon dmsf_icon-lock') %>
<% else %>
<%= link_to_if(@folder.unlockable?, l(:button_unlock),
unlock_dmsf_path(:id => @project, :folder_id => @folder),
:title => l(:title_unlock_file), :class => 'icon dmsf_icon-unlock')%>
<% end %>
<% 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-notification-on') %>
:class => 'icon dmsf_icon-notification-on') %>
<% 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-notification-off') %>
:class => 'icon dmsf_icon-notification-off') %>
<% 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') %>
:title => l(:title_create_link), :class => 'icon dmsf_icon-link') %>
<%= link_to(l(:button_copy), copy_folder_path(:id => @folder),
:title => l(:title_copy), :class => 'icon icon-copy') %>
<%= link_to(l(:button_delete),
delete_dmsf_path(:id => @project, :folder_id => @folder),
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:title_delete),
:class => 'icon icon-del') %>
<% else %>
<% if (!@folder.locked_for_user? || User.current.allowed_to?(:force_file_unlock, @project)) && @folder.unlockable? %>
<%= link_to(l(:button_unlock),
:title => l(:title_delete), :class => 'icon icon-del') %>
<% elsif @force_file_unlock_allowed %>
<%= link_to_if(@folder.unlockable?, l(:button_unlock),
unlock_dmsf_path(:id => @project, :folder_id => @folder),
:title => l(:title_unlock_file),
:class => 'icon icon-dmsf-unlock')%>
<% end %>
:title => l(:title_unlock_file), :class => 'icon dmsf_icon-unlock')%>
<% end %>
<% end %>
</div>
<% create = @pathfolder == @parent %>
<%= render(:partial => 'path', :locals => {:folder => @pathfolder, :filename => create ? l(:heading_new_folder) : nil}) %>
<%= render(:partial => 'path',
:locals => {:folder => @pathfolder, :filename => create ? l(:heading_new_folder) : nil, :title => nil}) %>
<%= form_for(@folder, :url => {:action => create ? 'create' : 'save', :id => @project, :folder_id => @folder, :parent_id => @parent},
<%= 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) %>
<div class="box dmsf_detail">
<div class="clear">
<div class="splitcontentleft">
<div class="box tabular">
<p>
<%= label_tag('dmsf_folder_title', "#{l(:label_title)}:") %>
<%= f.text_field(:title, :size => '32', :required => true) %>
<%= f.text_field(:title, :required => true) %>
</p>
</div>
<div class="splitcontentright">
<p>
<%= label_tag('', "#{l(:field_folder)}:") %>
<%= f.select(:dmsf_folder_id,
options_for_select(DmsfFolder.directory_tree(@project, @folder),
:selected => @parent? @parent.id : (@pathfolder.id if @pathfolder)))
:selected => @parent? @parent.id : (@pathfolder.id if @pathfolder)),
:label => l(:field_folder))
%>
</p>
</div>
</div>
<p class="no-ident">
<%= label_tag('dmsf_folder_description', "#{l(:label_description)}:") %>
<p>
<%= f.text_area :description, :rows => 8, :class => 'wiki-edit' %>
</p>
<div class="wiki data clear">
<%= f.text_area(:description, :rows => 15, :class => 'wiki-edit') %>
</div>
<% values = @folder ? @folder.custom_field_values : @parent ? @parent.custom_field_values : DmsfFolder.new(:project => @project).custom_field_values %>
<% values.each do |value| %>
<p><%= custom_field_tag_with_label(:dmsf_folder, value) %></p>
<% end %>
</div>
<%= submit_tag(create ? l(:submit_create) : l(:submit_save)) %>
<p><%= submit_tag(create ? l(:submit_create) : l(:submit_save)) %></p>
<% end %>
<%= wikitoolbar_for 'dmsf_folder_description' %>
<script type="text/javascript">
$('#dmsf_folder_dmsf_folder_id').select2();
</script>

View File

@ -1,7 +1,11 @@
<%# Redmine plugin for Document Management System "Features"
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-16 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
@ -15,7 +19,8 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<% html_title(l(:dmsf)) %>
@ -25,29 +30,28 @@
<%= link_to(l(:label_notifications_off),
notify_deactivate_dmsf_path(:id => @project),
:title => l(:title_notifications_active_deactivate),
:class => 'icon icon-notification-on') %>
:class => 'icon dmsf_icon-notification-on') %>
<% else %>
<%= link_to(l(:label_notifications_on),
notify_activate_dmsf_path(:id => @project),
:title => l(:title_notifications_active_deactivate),
:class => 'icon icon-notification-off') %>
:class => 'icon dmsf_icon-notification-off') %>
<% end %>
<% end %>
</div>
<%= render(:partial => 'path', :locals => {:folder => nil, :filename => nil}) %>
<%= render(:partial => 'path',
:locals => {:folder => nil, :filename => nil, :title => nil}) %>
<%= form_for(@project, :url => {:action => 'save_root', :id => @project},
:html => {:method=>:post}) do |f| %>
<div class="box dmsf_detail">
<p class="no-ident">
<%= label_tag('project_dmsf_description', "#{l(:label_description)}:") %>
<%= 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)) %>
</p>
<div class="wiki data clear">
<%= f.text_area(:dmsf_description, :rows => 15, :class => 'wiki-edit') %>
</div>
</div>
<%= submit_tag(l(:submit_save)) %>
<%= f.submit l(:submit_save) %>
<% end %>
<%= wikitoolbar_for 'project_dmsf_description' %>

View File

@ -1,8 +1,11 @@
<%# Redmine plugin for Document Management System "Features"
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-14 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -16,50 +19,50 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<% html_title(l(:dmsf)) %>
<div class="contextual">
</div>
<%= render(:partial => 'path',
:locals => {:folder => @folder, :filename => nil, :title => l(:heading_send_documents_by_email)}) %>
<%= render(:partial => 'path', :locals => {:folder => @folder, :filename => nil}) %>
<h3><%= l(:heading_send_documents_by_email) %></h3>
<%= form_tag({:action => 'entries_email', :id => @project, :folder_id => @folder},
{ :method=>:post, :class => 'tabular'}) do %>
<%= form_tag({ :action => 'entries_email', :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) %>
<div class="box">
<div class="box tabular">
<p>
<%= label_tag('', "#{l(:label_email_from)}:") %>
<i><%= h(Setting.mail_from) %></i>
<%= label_tag('', l(:label_email_from)) %>
<%= text_field_tag('email[from]', h(Setting.mail_from), :style => 'width: 90%;', :disabled => true) %>
</p>
<p>
<%= label_tag('email[to]', "#{l(:label_email_to)}:") %>
<%= label_tag('email[to]', l(:label_email_to)) %>
<%= text_field_tag('email[to]', @email_params['to'], :style => 'width: 90%;') %>
</p>
<p>
<%= label_tag('email[cc]', "#{l(:label_email_cc)}:") %>
<%= label_tag('email[cc]', l(:label_email_cc)) %>
<%= text_field_tag('email[cc]', @email_params['cc'], :style => 'width: 90%;') %>
</p>
<p>
<%= label_tag('email[subject]', "#{l(:label_email_subject)}:") %>
<%= label_tag('email[subject]', l(:label_email_subject)) %>
<%= text_field_tag('email[subject]', @email_params['subject'], :style => 'width: 90%;') %>
</p>
<p>
<%= label_tag('', "#{l(:label_email_documents)}:") %>
<%= 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]) %>
<%= l(:label_or) %> <%= check_box_tag('email[links_only]') %> <%= l(:label_links_only) %>
<%= l(:label_or) %>
<%= check_box_tag('email[links_only]') %> <%= l(:label_links_only) %>
</span>
</p>
<p>
<%= label_tag('email[body]', "#{l(:label_email_body)}:") %>
<%= text_area_tag('email[body]', @email_params['body'], :rows=> '20', :style => 'width: 90%;') %>
<%= label_tag('email[body]', l(:label_email_body)) %>
<%= text_area_tag('email[body]', @email_params['body'], :rows => '20', :style => 'width: 90%;') %>
</p>
<p><%= submit_tag(l(:label_email_send)) %></p>
</div>
<p><%= submit_tag(l(:label_email_send)) %></p>
<% end %>
<%= wikitoolbar_for 'email_body' %>

View File

@ -1,11 +1,11 @@
<%#=
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -22,12 +22,11 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<% html_title(l(:dmsf)) %>
<% html_title l(:dmsf) %>
<div class="contextual">
<% if @folder_manipulation_allowed %>
<% if @folder.nil? %>
<%= link_to(l(:button_edit),
edit_root_dmsf_path(:id => @project),
<%= 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 %>
@ -38,53 +37,30 @@
<% end %>
<% if @folder && (!@locked_for_user || User.current.allowed_to?(:force_file_unlock, @project)) %>
<% if @folder.locked? %>
<% unless @folder.unlockable? %>
<%= link_to(l(:button_unlock),
:title => l(:title_folder_parent_locked, :name => @folder.folder.lock.reverse[0].folder.title),
:class => 'icon icon-dmsf-unlock') if @folder %>
<% else %>
<%= link_to(l(:button_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-dmsf-unlock') if @folder %>
<% end %>
:title => l(:title_unlock_folder), :class => 'icon dmsf_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-dmsf-lock') if @folder %>
:title => l(:title_lock_folder), :class => 'icon dmsf_icon-lock') %>
<% end %>
<% end %>
<% unless @folder %>
<% 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-notification-on') %>
<% else %>
<%= link_to(l(:label_notifications_on),
notify_activate_dmsf_path(:id => @project),
:title => l(:title_notifications_active_deactivate),
:class => 'icon icon-notification-off') %>
<% end %>
<% else %>
<% if @folder.notification %>
<% 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-notification-on') %>
:class => 'icon dmsf_icon-notification-on') %>
<% 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-notification-off') %>
:class => 'icon dmsf_icon-notification-off') %>
<% end %>
<% end %>
<% if @file_manipulation_allowed %>
<% 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') unless @locked_for_user %>
:title => l(:title_create_link), :class => 'icon dmsf_icon-link') %>
<% end %>
<%= link_to(l(:link_create_folder),
new_dmsf_path(:id => @project, :parent_id => @folder),
@ -95,7 +71,8 @@
:title => l(:link_trash_bin), :class => 'icon icon-del') if @trash_visible %>
</div>
<%= render(:partial => 'path', :locals => {:folder => @folder, :filename => nil}) %>
<%= render(:partial => 'path',
:locals => {:folder => @folder, :filename => nil, :title => nil}) %>
<div class="dmsf-header">
<div class="wiki">
@ -106,9 +83,9 @@
<%= error_messages_for('dmsf_workflow') %>
<%= form_tag({:action => :entries_operation, :id => @project, :folder_id => @folder}, :method => :post,
:class => 'dmfs_entries', :id => 'entries_form') do %>
:class => 'dmsf_entries', :id => 'entries_form') do %>
<%= hidden_field_tag('action') %>
<div class="controls" style="float: left">
<div class="dmsf_controls" style="float: left">
<%= submit_tag(l(:button_download), :title => l(:title_download_checked), :name => 'download_entries') if @file_view_allowed %>
<%= submit_tag(l(:field_mail), :title => l(:title_send_checked_by_email), :name => 'email_entries') if (@file_view_allowed && User.current.allowed_to?(:email_documents, @project)) %>
<% if @file_delete_allowed%>
@ -117,103 +94,19 @@
</div>
<% values = @folder ? @folder.custom_field_values : @parent ? @parent.custom_field_values : DmsfFolder.new(:project => @project).custom_field_values %>
<% unless values.empty? %>
<div class="controls" style="float: right">
<div class="dmsf_controls" style="float: right">
<%= custom_field_tag_with_label(
:dmsf_folder,
CustomValue.new(:custom_field_id => params[:custom_field_id].present? ? params[:custom_field_id] : values.first.custom_field_id, :value => params[:custom_value])) %>
</div>
<% end %>
<table class="display entries" id="browser">
<thead>
<tr id="root">
<th class="check">
<input id="check_all_entries" title="<%= l(:title_check_uncheck_all_for_zip_download_or_email) %>" type="checkbox" />
</th>
<th><%= l(:link_title) %></th>
<th><%= l(:link_size) %></th>
<th><%= l(:link_modified) %></th>
<th title="<%= l(:label_version) %>"><%= l(:link_ver) %></th>
<th><%= l(:link_workflow) %></th>
<th><%= l(:link_author) %></th>
<th></th>
<th class="invisible"></th>
<th class="invisible"></th>
<th class="invisible"></th>
<th class="invisible"></th>
</tr>
</thead>
<tbody>
<% @subfolders.each do |subfolder| %>
<tr class="dir">
<%= render(:partial => 'dir',
:locals => {
:project => @project,
:subfolder => subfolder,
:link => nil,
:id => subfolder.id,
:name => 'subfolders[]',
:title => subfolder.title }) %>
</tr>
<div class="autoscroll">
<% if @tree_view %>
<%= render(:partial => 'tree_view') %>
<% else %>
<%= render(:partial => 'list_view') %>
<% end %>
<% @dir_links.each do |link| %>
<% unless link.target_project %>
<% Rails.logger.error "Error: dmsf_link id #{link.id} has no target!" %>
<% next %>
<% end %>
<tr class="gray">
<%= render(:partial => 'dir',
:locals => {
:project => link.target_project,
:subfolder => link.target_folder,
:link => link,
:id => link.id,
:name => 'dir_links[]',
:title => link.name }) %>
</tr>
<% end %>
<% @files.each do |file| %>
<% unless file.last_revision %>
<% Rails.logger.error "Error: dmsf_file id #{file.id} has no revision!" %>
<% next %>
<% end %>
<tr class="file">
<%= render(:partial => 'file', :locals => {
:project => @project,
:file => file,
:link => nil,
:id => file.id,
:name => 'files[]',
:title => file.title }) %>
</tr>
<% end %>
<% @file_links.each do |link| %>
<% unless link.target_file.last_revision %>
<% Rails.logger.error "Error: dmsf_file id #{link.target_id} has no revision!" %>
<% next %>
<% end %>
<tr class="gray">
<%= render(:partial => 'file', :locals => {
:project => link.target_project,
:file => link.target_file,
:link => link,
:id => link.id,
:name => 'file_links[]',
:title => link.name }) %>
</tr>
<% end %>
<% @url_links.each do |link| %>
<tr class="gray">
<%= render(:partial => 'url', :locals => {
:project => link.target_project,
:file => link.target_file,
:link => link,
:id => link.id,
:name => 'file_links[]',
:title => link.name }) %>
</tr>
<% end %>
</tbody>
</table>
</div>
<% end %>
<script type="text/javascript">
@ -235,8 +128,8 @@
</script>
<%
sUrl = "jquery.dataTables/#{I18n.locale.to_s.downcase}.json"
sUrl = 'jquery.dataTables/en.json' unless File.exist?(sUrl)
sUrl = 'jquery.dataTables/en.json'
sUrl = "jquery.dataTables/#{I18n.locale.to_s.downcase}.json" if I18n.locale && !I18n.locale.to_s.match(/^en.*/)
%>
<% content_for :header_tags do %>
@ -253,20 +146,28 @@
},
'bAutoWidth': false,
'bPaginate': false,
'aaSorting': [[1,'asc']],
'aaSortingFixed': [[8,'asc']],
'aaSorting': [[1, 'asc']],
'aaSortingFixed': [[ 8, 'asc']],
'aoColumnDefs': [
{ 'bSearchable': false, 'aTargets': [0, 7, 8, 9] },
{ 'bSortable': false, 'aTargets': [0, 7, 8] },
{ 'bSearchable': false, 'aTargets': [0, 7, 8, 9, 10, 11] },
{ 'bSortable': false, 'aTargets': [0, 7] },
{ 'iDataSort': 9, 'aTargets': [ 2 ] },
{ 'iDataSort': 10, 'aTargets': [ 3 ] },
{ 'iDataSort': 11, 'aTargets': [ 4 ] }
],
'fnInitComplete': function() {
jQuery('div.controls').prependTo(jQuery('#browser_wrapper div.fg-toolbar')[0]);
jQuery('div.dmsf_controls').prependTo(jQuery('#browser_wrapper div.fg-toolbar')[0]);
},
'fnInfoCallback': function( oSettings, iStart, iEnd, iMax, iTotal, sPre ) {
return "<%= l(:label_number_of_folders)%>: <%= @subfolders.count + @dir_links.count %>, <%= l(:label_number_of_documents)%>: <%= @files.count + @file_links.count + @url_links.count %>";
<% if @tree_view %>
<% if @folder %>
return "<%= "#{l(:label_number_of_folders)}: #{@folder.deep_folder_count} #{l(:label_number_of_documents)}: #{@folder.deep_file_count}" %>";
<% else %>
return "<%= "#{l(:label_number_of_folders)}: #{DmsfFolder.visible.where(:project_id => @project.id).count + DmsfLink.visible.where(:project_id => @project.id, :target_type => 'DmsfFolder').count}, #{l(:label_number_of_documents)}: #{DmsfFile.visible.where(:project_id => @project.id).count + DmsfLink.visible.where(:project_id => @project.id, :target_type => 'DmsfFile').count + DmsfLink.visible.where(:project_id => @project.id, :target_type => 'DmsfUrl').count}" %>";
<% end %>
<% else %>
return "<%= "#{l(:label_number_of_folders)}: #{@subfolders.count + @dir_links.count}, #{l(:label_number_of_documents)}: #{@files.count + @file_links.count + @url_links.count}" %>";
<% end %>
}
});
@ -288,4 +189,6 @@
</script>
<% end %>
<%= render(:partial => 'dmsf_upload/multi_upload') if (@file_manipulation_allowed && !@locked_for_user) %>
<% if (@file_manipulation_allowed && !@locked_for_user) %>
<%= render(:partial => 'dmsf_upload/multi_upload') %>
<% end %>

View File

@ -1,9 +1,9 @@
<%#=
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -21,8 +21,6 @@
%>
<% html_title(l(:dmsf)) %>
<div class="contextual">
</div>
<h2><%= l(:link_trash_bin) %></h2>
@ -35,9 +33,9 @@
<%= error_messages_for('dmsf_workflow') %>
<%= form_tag({:action => :entries_operation, :id => @project, :folder_id => @folder}, :method => :post,
:class => 'dmfs_entries', :id => 'entries_form') do %>
:class => 'dmsf_entries', :id => 'entries_form') do %>
<%= hidden_field_tag('action') %>
<div class="controls" style="float: left">
<div class="dmsf_controls" style="float: left">
<% if @file_manipulation_allowed && @folder_manipulation_allowed %>
<%= submit_tag(l(:title_restore), :title => l(:title_restore_checked), :name => 'restore_entries') %>
<% if @file_delete_allowed%>
@ -45,23 +43,24 @@
<% end %>
<% end %>
</div>
<table class="display entries" id="browser">
<div class="autoscroll">
<table class="display list dmsf_list" id="browser">
<thead>
<tr id="root">
<th class="check">
<tr>
<th class="dmsf_checkbox dmsf_th">
<input id="check_all_entries" title="<%= l(:title_check_uncheck_all_for_restore_or_delete) %>" type="checkbox" />
</th>
<th><%= l(:link_title) %></th>
<th><%= l(:link_size) %></th>
<th><%= l(:link_modified) %></th>
<th title="<%= l(:label_version) %>"><%= l(:link_ver) %></th>
<th><%= l(:link_workflow) %></th>
<th><%= l(:link_author) %></th>
<th></th>
<th class="invisible"></th>
<th class="invisible"></th>
<th class="invisible"></th>
<th class="invisible"></th>
<th class="dmsf_th"><%= l(:link_title) %></th>
<th class="dmsf_th"><%= l(:link_size) %></th>
<th class="dmsf_th"><%= l(:link_modified) %></th>
<th title="<%= l(:label_dmsf_version) %>" class="dmsf_th"><%= l(:link_ver) %></th>
<th class="dmsf_th"><%= l(:link_workflow) %></th>
<th class="dmsf_th"><%= l(:link_author) %></th>
<th class="dmsf_th"></th>
<th class="dmsf_invisible"></th>
<th class="dmsf_invisible"></th>
<th class="dmsf_invisible"></th>
<th class="dmsf_invisible"></th>
</tr>
</thead>
<tbody>
@ -78,7 +77,7 @@
</tr>
<% end %>
<% @dir_links.each do |link| %>
<tr class="gray">
<tr class="dmsf_gray">
<%= render(:partial => 'dir_trash',
:locals => {
:project => link.target_project,
@ -109,7 +108,7 @@
<% Rails.logger.error "Error: dmsf_file id #{link.target_id} has no revision!" %>
<% next %>
<% end %>
<tr class="gray">
<tr class="dmsf_gray">
<%= render(:partial => 'file_trash', :locals => {
:project => link.target_project,
:file => link.target_file,
@ -120,7 +119,7 @@
</tr>
<% end %>
<% @url_links.each do |link| %>
<tr class="gray">
<tr class="dmsf_gray">
<%= render(:partial => 'url_trash', :locals => {
:project => link.target_project,
:file => link.target_file,
@ -132,6 +131,7 @@
<% end %>
</tbody>
</table>
</div>
<% end %>
<script type="text/javascript">
@ -180,7 +180,7 @@
{ 'iDataSort': 11, 'aTargets': [ 4 ] }
],
'fnInitComplete': function() {
jQuery('div.controls').prependTo(jQuery('#browser_wrapper div.fg-toolbar')[0]);
jQuery('div.dmsf_controls').prependTo(jQuery('#browser_wrapper div.fg-toolbar')[0]);
},
'fnInfoCallback': function( oSettings, iStart, iEnd, iMax, iTotal, sPre ) {
return "<%= l(:label_number_of_folders)%>: <%= @subfolders.count + @dir_links.count %>, <%= l(:label_number_of_documents)%>: <%= @files.count + @file_links.count + @url_links.count %>";

View File

@ -1,11 +1,11 @@
<%#=
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -22,61 +22,51 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<div class="box dmsf_detail">
<div class="box tabular">
<strong><%= l(:heading_new_revision) %> <a href="#" id="newRevisionFormContentToggle">[-]</a></strong>
<div id="newRevisionFormContent">
<% if @file.locked_for_user? %>
<p class="warning"><%= l(:info_file_locked) %></p>
<% else %>
<%= form_for(@revision, :url => { :action => 'create_revision', :id => @file },
<%= 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>
<%= label_tag('dmsf_file_revision_title', "#{l(:label_title)}:") %>
<%= f.text_field(:title, :size => 32) %>
<%= f.text_field(:title) %>
</p>
</div>
<div class="splitcontentright">
<p style="white-space: nowrap;">
<%= label_tag('', "#{l(:label_file)}:") %>
<%= f.text_field(:name, :size => 22) %>
<p>
<%= f.text_field(:name, :label => l(:label_file)) %>
</p>
</div>
</div>
<p class="no-ident">
<%= label_tag('dmsf_file_revision_description', "#{l(:label_description)}:") %>
</p>
<div class="wiki data clear">
<p>
<%= f.text_area(:description, :rows => 6, :class => 'wiki-edit') %>
</div>
</p>
<div class="clear">
<div class="splitcontentleft">
<p>
<%= label_tag('version_0', "#{l(:label_version)}:") %>
</p>
<div class="data clear">
<%= radio_button_tag('version', 0,
@revision.version == @file.last_revision.version) %>
<%= label_tag('version_0', l(:label_dmsf_version)) %>
<%= radio_button_tag('version', 0, @revision.version == @file.last_revision.version) %>
<%= @file.last_revision.major_version %>.<%= @file.last_revision.minor_version %>
<%= l(:option_version_same) %><br/>
<%= radio_button_tag('version', 1,
@revision.major_version == @file.last_revision.major_version &&
@revision.minor_version != @file.last_revision.minor_version) %>
<%= radio_button_tag('version', 1, @revision.major_version == @file.last_revision.major_version && @revision.minor_version != @file.last_revision.minor_version) %>
<%= @file.last_revision.major_version %>.<%= @file.last_revision.minor_version + 1 %>
<%= l(:option_version_minor) %><br/>
<%= radio_button_tag('version', 2,
@revision.major_version != @file.last_revision.major_version) %>
<%= radio_button_tag('version', 2, @revision.major_version != @file.last_revision.major_version) %>
<%= @file.last_revision.major_version + 1 %>.0
<%= l(:option_version_major) %><br/>
<%= radio_button_tag('version', 3) %>
<%= select_tag 'custom_version_major', options_for_select(0..99, @file.last_revision.major_version + 2) %>.<%= select_tag 'custom_version_minor', options_for_select(0..99, @file.last_revision.minor_version + 1) %>
<%= select_tag 'custom_version_major', options_for_select(0..99, @file.last_revision.major_version + 2), :onchange => '$("#version_3").prop("checked", true)' %>.
<%= select_tag 'custom_version_minor', options_for_select(0..99, @file.last_revision.minor_version + 1), :onchange => '$("#version_3").prop("checked", true)' %>
<%= l(:option_version_custom) %>
</div>
</div>
<div class="splitcontentright clear">
<p>
<%= label_tag('file_upload', "#{l(:label_new_content)}:") %>
</p>
</div>
<div class="splitcontentright">
<p>
<%= label_tag('file_upload', l(:label_new_content)) %>
<span class="add_attachment">
<%= file_field_tag 'file_upload',
:id => 'file_upload',
@ -92,23 +82,18 @@
%>
(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)
</span>
</p>
</div>
</div>
<br style="clear: both"/>
<div class="custom_fields">
<% @revision.custom_field_values.each do |value| %>
<p><%= custom_field_tag_with_label(:dmsf_file_revision, value) %></p>
<% end %>
</div>
<div class="comment">
<p>
<%= label_tag('dmsf_file_revision_comment', "#{l(:label_comment)}:") %>
<%= f.text_area(:comment, :rows => 2, :label => l(:label_comment)) %>
</p>
<div class="data">
<%= f.text_area(:comment, :rows=> 2, :style => 'width: 99%;') %>
</div>
</div>
<br/>
<%= submit_tag(l(:submit_create)) %>
<%= f.submit l(:submit_create) %>
<% end %>
<% end %>
</div>

View File

@ -1,9 +1,11 @@
<%#=
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2013 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -19,23 +21,23 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<br/>
<table class="display access-table list">
<table class="display list dmsf_list">
<thead>
<tr>
<th><%= l(:field_user) %></th>
<th><%= l(:heading_access_downloads_emails) %></th>
<th><%= l(:heading_access_first) %></th>
<th><%= l(:heading_access_last) %></th>
<th class="dmsf_th"><%= l(:field_user) %></th>
<th class="dmsf_th"><%= l(:heading_access_downloads_emails) %></th>
<th class="dmsf_th"><%= l(:heading_access_first) %></th>
<th class="dmsf_th"><%= l(:heading_access_last) %></th>
</tr>
</thead>
<tbody>
<% revision.access_grouped.each do |access| %>
<tr>
<td><%= link_to_user(access.user) %></td>
<td><%= access['count'] %></td>
<td><%= format_time(DmsfHelper::to_time(access.first_at)) %></td>
<td><%= format_time(DmsfHelper::to_time(access.last_at)) %></td>
<td class="dmsf_author"><%= link_to_user(access.user) %></td>
<td class="dmsf_version"><%= access.count %></td>
<td class="dmsf_modified"><%= format_time(access.first_at) %></td>
<td class="dmsf_modified"><%= format_time(access.last_at) %></td>
</tr>
<% end %>
</tbody>

View File

@ -1,4 +1,4 @@
<%#=
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
@ -26,52 +26,61 @@
<div class="contextual">
<% if User.current.allowed_to?(:file_manipulation, @project) %>
<% unless @file.locked_for_user? %>
<% unless @file.locked? %>
<%= link_to(l(:button_lock),
lock_dmsf_files_path(:id => @file),
:title => l(:title_lock_file),
:class => 'icon icon-dmsf-lock') %>
<%= link_to(l(:button_lock), lock_dmsf_files_path(:id => @file),
:title => l(:title_lock_file), :class => 'icon dmsf_icon-lock') %>
<% else %>
<%= link_to_if(@file.unlockable?, l(:button_unlock), unlock_dmsf_files_path(:id => @file),
:title => l(:title_unlock_file), :class => 'icon dmsf_icon-unlock') %>
<% end %>
<% if @file.notification %>
<%= link_to(l(:label_notifications_off),
notify_deactivate_dmsf_files_path(:id => @file),
:title => l(:title_notifications_active_deactivate),
:class => 'icon icon-notification-on') %>
:class => 'icon dmsf_icon-notification-on') %>
<% else %>
<%= link_to(l(:label_notifications_on),
notify_activate_dmsf_files_path(:id => @file),
:title => l(:title_notifications_not_active_activate),
:class => 'icon icon-notification-off') %>
:class => 'icon dmsf_icon-notification-off') %>
<% end %>
<%= link_to(l(:label_link_to),
new_dmsf_link_path(:project_id => @project.id, :dmsf_folder_id => @file.folder ? @file.folder.id : nil, :dmsf_file_id => @file.id, :type => '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') %>
:class => 'icon dmsf_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 @file if @file_delete_allowed %>
<% else %>
<% if (!@file.locked_for_user? || User.current.allowed_to?(:force_file_unlock, @project)) && @file.unlockable? %>
<%= link_to(l(:button_unlock),
unlock_dmsf_files_path(:id => @file),
:title => l(:title_unlock_file),
:class => 'icon icon-dmsf-unlock')%>
<% 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 dmsf_icon-unlock')%>
<% end %>
<% end %>
<% end %>
</div>
<%= render(:partial => '/dmsf/path', :locals => {:folder => @file.folder, :filename => @file.title}) %>
<%= render(:partial => '/dmsf/path',
:locals => {:folder => @file.dmsf_folder, :filename => @file.title, :title => nil}) %>
<%= error_messages_for('file') %>
<%= error_messages_for('revision') %>
<%= render(:partial => 'file_new_revision') if User.current.allowed_to?(:file_manipulation, @file.project) %>
<% if User.current.allowed_to?(:file_manipulation, @file.project) && !@file.locked_for_user? %>
<%= error_messages_for('file') %>
<%= error_messages_for('revision') %>
<%= render(:partial => 'file_new_revision') %>
<% end %>
<div class="dmsf_id_box tabular">
<%= label_tag('', l(:label_document)) %>
<%= "##{@file.id}" %>
</div>
<h3><%= l(:heading_revisions) %></h3>
<% @file.revisions.visible[@revision_pages.offset,@revision_pages.per_page].each do |revision| %>
<div class="revision_box dmsf_detail dataTables_wrapper">
<% @file.dmsf_file_revisions.visible[@revision_pages.offset, @revision_pages.per_page].each do |revision| %>
<div class="dmsf_revision_box tabular dataTables_wrapper">
<div class="fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix">
<div class="dataTables_lenght">
<div class="controls" style="float: right">
<div class="dmsf_controls" style="float: right">
<%= link_to_function image_tag('rev_downloads.png', :plugin => 'redmine_dmsf'),
"$('#revision_access-#{revision.id}').toggle()",
:title => l(:title_download_entries) %>
@ -81,7 +90,7 @@
<%= link_to image_tag('rev_delete.png', :plugin => 'redmine_dmsf'),
delete_revision_path(revision),
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:title_delete_revision) if @file_delete_allowed && (@file.revisions.visible.count > 1) %>
:title => l(:title_delete_revision) if @file_delete_allowed && (@file.dmsf_file_revisions.visible.count > 1) %>
</div>
<i><%= l(:info_revision, :rev => revision.id) %></i>
<%= (revision.source_revision.nil? ? l(:label_created) : l(:label_changed)).downcase %>
@ -89,58 +98,67 @@
<%= link_to(revision.user.name, user_path(revision.user)) if revision.user %>
</div>
</div>
<div style="border: 1px solid #e4e4e4;">
<div class="clear">
<div class="attributes dmsf_revision_inner_box">
<div class="splitcontent">
<div class="splitcontentleft">
<%= label_tag('', "#{l(:label_title)}:") %>
<p>
<%= label_tag('', l(:label_title)) %>
<%= h(revision.title) %>
</div>
<div class="splitcontentright">
<%= label_tag('', "#{l(:label_file)}:") %>
<%= ("#{h(revision.file.folder.dmsf_path_str)}/") if revision.file.folder %><%= h(revision.name) %>
</div>
</div>
<p class="no-ident">
<%= label_tag('', "#{l(:label_description)}:") %>
</p>
<div class="wiki clear" style="margin-left: 110px">
<% if revision.description.present? %>
<p>
<%= label_tag('', l(:label_description)) %>
<div class="wiki">
<%= textilizable(revision.description) %>
</div>
<div class="splitcontentleft">
<%= label_tag('', "#{l(:label_version)}:") %>
</p>
<% end %>
<p>
<%= label_tag('', l(:label_dmsf_version)) %>
<%= revision.major_version %>.<%= revision.minor_version %>
<br/>
<%= label_tag('', "#{l(:link_workflow)}:") %>
</p>
<p>
<%= label_tag('', l(:label_size)) %>
<%= number_to_human_size(revision.size) %>
</p>
<% wf = DmsfWorkflow.find_by_id(revision.dmsf_workflow_id) %>
<% if wf %>
<p>
<%= label_tag('', l(:link_workflow)) %>
<%= "#{wf.name} - " %>
<%= link_to(
revision.workflow_str(false),
log_dmsf_workflow_path(
:project_id => @project.id,
:id => wf.id,
:dmsf_file_revision_id => revision.id),
<%= link_to(revision.workflow_str(false),
log_dmsf_workflow_path(:project_id => @project.id,
:id => wf.id, :dmsf_file_revision_id => revision.id),
:title => DmsfWorkflow.assignments_to_users_str(wf.next_assignments(revision.id)),
:remote => true) %>
<% else %>
<%= revision.workflow_str(true) %>
</p>
<% end %>
<% if revision.comment.present? %>
<p>
<%= label_tag('', l(:label_comment)) %>
<div class="wiki">
<%= textilizable(revision.comment) %>
</div>
</p>
<% end %>
</div>
<div class="splitcontentright clear">
<%= label_tag('', "#{l(:label_mime)}:") %>
<%= h(revision.mime_type) %>&nbsp;
<br/>
<%= label_tag('', "#{l(:label_size)}:") %>
<%= number_to_human_size(revision.size) %>
</div>
<div class="no-ident clear">
<div class="splitcontentright">
<p>
<%= label_tag('', l(:label_file)) %>
<%= ("#{h(revision.dmsf_file.dmsf_folder.dmsf_path_str)}/") if revision.dmsf_file.dmsf_folder %><%= h(revision.name) %>
</p>
<p>
<%= label_tag('', l(:label_mime)) %>
<%= h(revision.mime_type) %>
</p>
<% if revision.digest.present? %>
<p>
<%= label_tag('', 'MD5') %>
<%= revision.digest %>
</p>
<% end %>
<%= render 'dmsf/custom_fields', :object => revision %>
</div>
<p class="no-ident">
<%= label_tag('', "#{l(:label_comment)}:") %>
</p>
<div class="wiki clear" style="margin-left: 110px">
<%= textilizable(revision.comment) %>
</div>
<div id="<%= "revision_access-#{revision.id}" %>" style="display:none">
<%= render(:partial => 'revision_access', :locals => {:revision => revision}) if User.current.allowed_to?(:file_manipulation, @file.project) %>
@ -150,7 +168,7 @@
<br/>
<% end %>
<span class="pagination"><%= pagination_links_full @revision_pages, @file.revisions.visible.count %></span>
<span class="pagination"><%= pagination_links_full @revision_pages, @file.dmsf_file_revisions.visible.count %></span>
<%
url = 'jquery.dataTables/en.json'
@ -188,7 +206,7 @@
}
});
$('.access-table').dataTable({
$('.dmsf_list').dataTable({
'bJQueryUI': true,
'oLanguage': {
'sUrl': '/plugin_assets/<%= :redmine_dmsf %>/javascripts/<%= url %>'

View File

@ -1,7 +1,11 @@
<%# Redmine plugin for Document Management System "Features"
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-16 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
@ -15,53 +19,50 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
<!--Select2 Files-->
<%= stylesheet_link_tag 'select2.min.css', :plugin => 'redmine_dmsf' %>
<%= javascript_include_tag 'select2.min.js', :plugin => 'redmine_dmsf' %>
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<% html_title(l(:dmsf)) %>
<div class="contextual">
</div>
<%= render(:partial => '/dmsf/path', :locals => {:folder => @file.folder, :filename => @file.title}) %>
<%= render(:partial => '/dmsf/path',
:locals => {:folder => @file.dmsf_folder, :filename => @file.title,
:title => "#{l(:button_copy)}/#{l(:button_move)}"}) %>
<% if DmsfFile.allowed_target_projects_on_copy.present? %>
<%= form_tag({:action => 'create', :id => @file}, :id => 'copyForm') do |f| %>
<div class="box dmsf_detail">
<div class="box tabular">
<p>
<label for="target_project_id"><%=l(:field_target_project)%>:</label>
<%= label_tag('target_project_id', l(:field_target_project)) %>
<%= select_tag('target_project_id',
project_tree_options_for_select(DmsfFile.allowed_target_projects_on_copy, :selected => @target_project)) %>
project_tree_options_for_select(DmsfFile.allowed_target_projects_on_copy,
:selected => @target_project)) %>
</p>
<p>
<%= label_tag('target_folder_id', "#{l(:field_target_folder)}:") %>
<%= label_tag('target_folder_id', l(:field_target_folder)) %>
<%= select_tag('target_folder_id',
options_for_select(DmsfFolder.directory_tree(@target_project),
:selected => (@target_folder.id if @target_folder))) %>
</p>
</div>
<p>
<%= submit_tag(l(:button_copy)) %>
<% if User.current.allowed_to?(:file_manipulation, @project) %>
<button type="button" id="move_button" title="<%= l(:button_move) %>"><%= l(:button_move) %></button>
<%= submit_tag(l(:button_move), :id => 'move_button') %>
<% end %>
</p>
<% end %>
<% end %>
<script type="text/javascript">
jQuery('#move_button').click(function(event) {
jQuery('#copyForm').attr('action', "<%= url_for(:action => 'move', :id => @file) %>");
jQuery('#copyForm').submit();
$('#move_button').click(function(event) {
$('#copyForm').attr('action', "<%= url_for(:action => 'move', :id => @file) %>");
$('#copyForm').submit();
});
jQuery('#target_project_id').change(function () {
jQuery('#content').load("<%= url_for(:action => 'new') %>", jQuery('#copyForm').serialize());
jQuery('#target_folder_id' ).select2({ width: "600px" });
$('#target_project_id').change(function () {
$('#content').load("<%= url_for(:action => 'new') %>", $('#copyForm').serialize());
});
jQuery('#target_project_id' ).select2({ width: "600px" });
jQuery('#target_folder_id' ).select2({ width: "600px" });
$('#target_project_id').select2();
$('#target_folder_id').select2();
</script>

View File

@ -1,7 +1,11 @@
<%# Redmine plugin for Document Management System "Features"
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-16 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
@ -15,29 +19,24 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
<!--Select2 Files-->
<%= stylesheet_link_tag 'select2.min.css', :plugin => 'redmine_dmsf' %>
<%= javascript_include_tag 'select2.min.js', :plugin => 'redmine_dmsf' %>
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<% html_title(l(:dmsf)) %>
<div class="contextual"></div>
<%= render(:partial => '/dmsf/path', :locals => {:folder => @folder, :filename => nil}) %>
<%= render(:partial => '/dmsf/path',
:locals => {:folder => @folder, :filename => nil, :title => l(:button_copy)}) %>
<% unless DmsfFolder.allowed_target_projects_on_copy.blank? %>
<%= form_tag({:action => 'copy_to', :id => @folder}, :id => 'copyForm') do |f| %>
<div class="box dmsf_detail">
<div class="box tabular">
<p>
<label for="target_project_id"><%= l(:field_target_project) %>:</label>
<%= select_tag('target_project_id',
project_tree_options_for_select(DmsfFolder.allowed_target_projects_on_copy, :selected => @target_project)) %>
</p>
<p>
<%= label_tag('target_folder_id', "#{l(:field_target_folder)}:") %>
<%= label_tag('target_folder_id', l(:field_target_folder)) %>
<%= select_tag('target_folder_id',
options_for_select(DmsfFolder.directory_tree(@target_project, @folder),
:selected => (@target_folder.id if @target_folder))) %>
@ -48,11 +47,10 @@
<% end %>
<script type="text/javascript">
jQuery('#target_project_id').change(function () {
jQuery('#content').load("<%= url_for(:action => 'new') %>", jQuery('#copyForm').serialize());
jQuery('#target_folder_id' ).select2({ width: "600px" });
$('#target_project_id').change(function () {
$('#content').load("<%= url_for(:action => 'new') %>", $('#copyForm').serialize());
});
jQuery('#target_project_id' ).select2({ width: "600px" });
jQuery('#target_folder_id' ).select2({ width: "600px" });
$('#target_project_id').select2();
$('#target_folder_id').select2();
</script>

View File

@ -1,6 +1,9 @@
<%# Redmine plugin for Document Management System "Features"
<%
# encoding: utf-8
#
# Copyright (C) 2011-15 Karel Pičman <karel.picman@lbcfree.net>
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-16 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
@ -14,19 +17,19 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<% html_title l(:dmsf) %>
<div class="contextual">
</div>
<% if @dmsf_file_id %>
<% file = DmsfFile.find_by_id @dmsf_file_id%>
<% title = file.title if file %>
<% end %>
<%= render(:partial => '/dmsf/path', :locals => {:folder => @dmsf_link.folder, :filename => title}) %>
<%= render(:partial => '/dmsf/path',
:locals => {:folder => @dmsf_link.folder, :filename => nil,
:title => (@type == 'link_from') ? l(:label_link_from) : l(:label_link_to) }) %>
<%= labelled_form_for @dmsf_link do |f| %>
<%= error_messages_for @dmsf_link %>
@ -34,7 +37,7 @@
<%= 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 %>
<div class="box dmsf_detail">
<div class="box tabular">
<% if @type == 'link_from' %>
<p>
<%= radio_button_tag(:external_link, 'false', @link_external == false) %> <%= l(:label_internal) %><br/>
@ -44,9 +47,9 @@
<div id="link_internal" style="<%= @link_external ? 'display:none' : '' %>">
<p>
<% if @type == 'link_from' %>
<%= label_tag('dmsf_link[target_project_id]', l(:label_source_project), :class => 'required') %>
<label for="dmsf_link[target_project_id]"><%= l(:label_source_project) %><span class="required">*</span></label>
<% else %>
<%= label_tag('dmsf_link[target_project_id]', l(:label_target_project), :class => 'required') %>
<label for="dmsf_link[target_project_id]"><%= l(:label_target_project) %><span class="required">*</span></label>
<% end %>
<%= select_tag('dmsf_link[target_project_id]',
project_tree_options_for_select(DmsfFile.allowed_target_projects_on_copy,
@ -66,7 +69,7 @@
<p>
<% if @target_folder_id %>
<% folder = DmsfFolder.find_by_id @target_folder_id %>
<% files = folder.files.visible if folder %>
<% files = folder.dmsf_files.visible if folder %>
<% else %>
<% files = @dmsf_link.target_project.dmsf_files.visible if @dmsf_link.target_project %>
<% end %>
@ -74,31 +77,39 @@
options_for_select(DmsfFolder.file_list(files), @target_file_id)) %>
</p>
<% end %>
<p>
</div>
<div id="link_external" style="<%= @link_external ? '' : 'display:none' %>">
<%= label_tag('dmsf_link[external_url]', l(:label_link_external_url), :class => 'required') %>
<%= text_field_tag 'dmsf_link[external_url]', @dmsf_link.external_url, :size => 40, :maxlength => 255 %>
<p>
<%= f.text_field :external_url, :required => true,
:label => l(:label_link_external_url) %>
</p>
</div>
<%= label_tag('dmsf_link[name]', l(:label_link_name), :class => 'required') %>
<%= text_field_tag 'dmsf_link[name]', @dmsf_link.name, :size => 40, :maxlength => 255 %>
<!--</p>-->
<p>
<%= f.text_field :name, :required => true, :label => l(:label_link_name) %>
</p>
</div>
<%= f.submit l(:button_create) %>
<p><%= f.submit l(:button_create) %></p>
<% end %>
<script type="text/javascript">
$('#dmsf_link_target_project_id').change(function () {
$('#content').load("<%= url_for(:action => 'new', :project_id => @project.id, :reload => true) %>", $('#new_dmsf_link').serialize());
});
$('#dmsf_link_target_folder_id').change(function () {
$('#content').load("<%= url_for(:action => 'new', :project_id => @project.id) %>", $('#new_dmsf_link').serialize());
});
$('#dmsf_link_target_file_id').change(function () {
$('#content').load("<%= url_for(:action => 'new', :project_id => @project.id) %>", $('#new_dmsf_link').serialize());
});
$("input[name=external_link]:radio").change(function(){
$("#link_internal").toggle();
$("#link_external").toggle();
});
$('#dmsf_link_target_project_id').select2();
$('#dmsf_link_target_folder_id').select2();
$('#dmsf_link_target_file_id').select2();
</script>

View File

@ -1,6 +1,9 @@
<%# Redmine plugin for Document Management System "Features"
<%
# encoding: utf-8
#
# Copyright (C) 2014 Karel Pičman <karel.picman@lbcfree.net>
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-16 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
@ -14,6 +17,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<%= render 'form' %>

View File

@ -24,7 +24,7 @@
<p>
<%= h(file.dmsf_path_str) %> (<%= file.name %>)
<% if file.last_revision %>
, <%= number_to_human_size(file.last_revision.size) %>, <%= l(:label_version) %> <%= file.last_revision.major_version %>.<%= file.last_revision.minor_version %>
, <%= number_to_human_size(file.last_revision.size) %>, <%= l(:label_dmsf_version) %> <%= file.last_revision.major_version %>.<%= file.last_revision.minor_version %>
<% end %>
</p>
<% end %>

View File

@ -22,6 +22,6 @@
<% @files.each do |file| %>
<%= h(file.dmsf_path_str) %> (<%= file.name %>)
<% if file.last_revision %>
, <%= number_to_human_size(file.last_revision.size) %>, <%= l(:label_version) %> <%= file.last_revision.major_version %>.<%= file.last_revision.minor_version %>
, <%= number_to_human_size(file.last_revision.size) %>, <%= l(:label_dmsf_version) %> <%= file.last_revision.major_version %>.<%= file.last_revision.minor_version %>
<% end %>
<% end %>

View File

@ -26,7 +26,7 @@
dmsf_file_url(file, :download => '')) %>
(<%= file.name %>),
<%= number_to_human_size(file.last_revision.size) %>,
<%= l(:label_version) %> <%= file.last_revision.major_version %>.<%= file.last_revision.minor_version %>,
<%= l(:label_dmsf_version) %> <%= file.last_revision.major_version %>.<%= file.last_revision.minor_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)) %>

View File

@ -23,7 +23,7 @@
<% @files.each do |file| %>
<%= h(file.dmsf_path_str) %> (<%= file.name %>),
<%= number_to_human_size(file.last_revision.size) %>,
<%= l(:label_version) %> <%= file.last_revision.major_version %>.<%= file.last_revision.minor_version %>,
<%= l(:label_dmsf_version) %> <%= file.last_revision.major_version %>.<%= file.last_revision.minor_version %>,
<%= "#{file.last_revision.workflow_str(true)}," if file.last_revision.workflow_str(true) != l(:title_none) %>
<%= dmsf_file_url(file) %>
<% if file.last_revision.comment.present? %>

View File

@ -1,8 +1,11 @@
<%# Redmine plugin for Document Management System "Features"
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -21,22 +24,28 @@
<%= textilizable(@body) %>
<% if @links_only == '1' %>
<% folders = [] %>
<% files = [] %>
<% if @folders.present? %>
<% JSON.parse(@folders).each do |id| %>
<% folder = DmsfFolder.find_by_id id %>
<% if folder %>
<% folder.folder_tree.each do |name, i| %>
<% dir = DmsfFolder.find_by_id i %>
<% if dir %>
<% 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)) %>
<br/><br/>
<% dir.files.each do |file| %>
<% dir.dmsf_files.each do |file| %>
<% unless files.include?(file) %>
<%= link_to(h(file.title), dmsf_file_url(file)) %>
&nbsp;(<%= link_to(h(file.name), dmsf_file_url(file, :download => '')) %>)
<br/>
<% files << file %>
<% end %>
<% end %>
<% folders << dir %>
<% end %>
<% end %>
<% end %>
<% end %>
@ -45,11 +54,13 @@
<br/>
<% JSON.parse(@files).each do |id| %>
<% file = DmsfFile.find_by_id id %>
<% if file %>
<% if file && !files.include?(file) %>
<%= link_to(h(file.title), dmsf_file_url(file)) %>
&nbsp;(<%= link_to(h(file.name), dmsf_file_url(file, :download => '')) %>)
<br/>
<% files << file %>
<% end %>
<% end %>
<% end %>
<% end %>

View File

@ -1,8 +1,11 @@
<%# Redmine plugin for Document Management System "Features"
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -21,16 +24,21 @@
<%= @body %>
<% if @links_only == '1' %>
<% folders = [] %>
<% files = [] %>
<% if @folders.present? %>
<% JSON.parse(@folders).each do |id| %>
<% folder = DmsfFolder.find_by_id id %>
<% if folder %>
<% if folder && !folders.include?(folder) %>
<% folder.folder_tree.each do |name, i| %>
<% dir = DmsfFolder.find_by_id i %>
<% if dir %>
<%= dir.dmsf_path_str %>
<% dir.files.each do |file| %>
<% dir.dmsf_files.each do |file| %>
<% unless files.include?(file) %>
<%= dmsf_file_url(file, :download => '') %>
<% files << file %>
<% end %>
<% end %>
<% end %>
<% end %>
@ -40,8 +48,9 @@
<% if @files.present? %>
<% JSON.parse(@files).each do |id| %>
<% file = DmsfFile.find_by_id id %>
<% if file %>
<% if file && !files.include?(file) %>
<%= dmsf_file_url(file, :download => '') %>
<% files << file %>
<% end %>
<% end %>
<% end %>

View File

@ -22,11 +22,11 @@
</p>
<p>
<%= @text2 %>
<% unless @revision.file.folder %>
<% unless @revision.dmsf_file.dmsf_folder %>
<%= link_to l(:link_documents),
dmsf_folder_url(:id => @revision.file.project) %>
dmsf_folder_url(:id => @revision.dmsf_file.project) %>
<% else %>
<%= link_to @revision.file.folder.title,
dmsf_folder_url(:id => @revision.file.project, :folder_id => @revision.file.folder) %>
<%= link_to @revision.dmsf_file.dmsf_folder.title,
dmsf_folder_url(:id => @revision.dmsf_file.project, :folder_id => @revision.dmsf_file.dmsf_folder) %>
<% end %>.
</p>

View File

@ -18,8 +18,8 @@
<%= @user.name %>,
<%= @text1 %>
<% unless @revision.file.folder %>
<%= @text2 %> <%= dmsf_folder_url(:id => @revision.file.project) %>.
<% unless @revision.dmsf_file.dmsf_folder %>
<%= @text2 %> <%= dmsf_folder_url(:id => @revision.dmsf_file.project) %>.
<% else %>
<%= @text2 %> <%= dmsf_folder_url(:id => @revision.file.project, :folder_id => @revision.file.folder) %>.
<%= @text2 %> <%= dmsf_folder_url(:id => @revision.dmsf_file.project, :folder_id => @revision.dmsf_file.dmsf_folder) %>.
<% end %>

View File

@ -1,10 +1,11 @@
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -23,46 +24,36 @@
<div class="box">
<%= form_tag({:controller => 'dmsf_upload', :action => 'upload_files', :id => @project, :folder_id => @folder},
:id => 'uploadform', :method=>:post, :multipart => true) do %>
<% if Setting.attachment_max_size.to_i >= 102400 %>
<div class="upload_select">
<%= l(:label_file_size) %>:
:id => 'uploadform', :method => :post, :multipart => true) do %>
<div class="dmsf_upload_select">
<select id="uploader_select">
<option value="1">
&lt; <%= "#{@ajax_upload_size}" %> MB
<%= l(:label_drag_drop) %>
</option>
<option value="2">
> <%= "#{@ajax_upload_size}" %> MB
<%= l(:label_classic) %>
</option>
</select>
</div>
<% end %>
<h3><%= l(:heading_file_upload) %></h3>
<div style="padding-bottom: 6px; line-height: 1.4em; font-size: 0.9em;">
<span>
<% max_file_upload = Setting.plugin_redmine_dmsf['dmsf_max_file_upload'].to_i %>
<%= l(:note_uploaded_maximum_files_at_once, :number => max_file_upload) if max_file_upload > 0 %>
<%= l(:note_upload_files_greater_than_two_gb) if Setting.attachment_max_size.to_i >= 2097151 %>
</span>
</div>
<h3><%= l(:label_upload) %></h3>
<div id="uploader">
<p>
<label><%=l(:label_attachment_plural)%></label>
<label><%= l(:label_attachment_plural) %></label>
<%= render :partial => 'attachments/form' %>
</p>
<%= submit_tag(l(:submit_upload_files)) %>
<%= submit_tag l(:label_upload) %>
</div>
<% end %>
</div>
<script type="text/javascript">
var originalUploaderContent;
var uploader = jQuery('#uploader');
var uploader = $('#uploader');
originalUploaderContent = uploader.html();
jQuery('#uploader_select').change(function() {
if(jQuery(this).val() == 2) {
$('#uploader_select').change(function() {
if($(this).val() === '2') {
uploader.html(originalUploaderContent);
} else {
initPlUploader(uploader);
@ -83,7 +74,7 @@
<script type="text/javascript">
function initPlUploader(uploader) {
uploader.html('<div></div>');
uploader = jQuery('div', uploader);
uploader = $('div', uploader);
uploader.plupload({
runtimes : 'html5,flash,silverlight,html4',
url : '<%= url_for({:controller => 'dmsf_upload', :action => 'upload_file', :id => @project}) %>',
@ -110,28 +101,28 @@
// Silverlight settings
silverlight_xap_url : '<%= plugin_asset_path(:redmine_dmsf, 'javascripts', 'plupload/js/Moxie.xap') %>'
});
jQuery('.plupload_scroll',uploader).resizable({
$('.plupload_scroll',uploader).resizable({
handles: 's'
});
var pluploader = uploader.plupload('getUploader');
pluploader.bind('FileUploaded', function(pluploader, file, response) {
var responseObject = jQuery.parseJSON(response.response);
var responseObject = $.parseJSON(response.response);
if (responseObject == null) { //Bug: on Firefox folders entries act unexpectedly.
file.status = plupload.FAILED;
pluploader.trigger('UploadProgress', file);
pluploader.trigger('QueueChanged');
} else {
if (responseObject.error == null) {
var disk_filename_input = jQuery('<input/>').attr('type', 'hidden')
var disk_filename_input = $('<input/>').attr('type', 'hidden')
.attr('name', 'uploaded[' + dmsfFileFieldCount + '][disk_filename]')
.val(responseObject.disk_filename);
uploader.append(disk_filename_input);
var content_type_input = jQuery('<input/>').attr('type', 'hidden')
var content_type_input = $('<input/>').attr('type', 'hidden')
.attr('name', 'uploaded[' + dmsfFileFieldCount + '][content_type]')
.val(responseObject.content_type);
uploader.append(content_type_input);
var original_filename_input = jQuery('<input/>').attr('type', 'hidden')
var original_filename_input = $('<input/>').attr('type', 'hidden')
.attr('name', 'uploaded[' + dmsfFileFieldCount + '][original_filename]')
.val(responseObject.original_filename);
uploader.append(original_filename_input);
@ -142,7 +133,7 @@
}
}
if(pluploader.total.uploaded == pluploader.files.length) jQuery('#uploadform').submit();
else if((pluploader.total.uploaded + pluploader.total.failed) == pluploader.files.length) setTimeout(function() {jQuery('#uploadform').submit();}, 2000);
else if((pluploader.total.uploaded + pluploader.total.failed) == pluploader.files.length) setTimeout(function() {$('#uploadform').submit();}, 2000);
else dmsfFileFieldCount++;
return true;
});

View File

@ -1,11 +1,11 @@
<%#=
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -21,34 +21,32 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<div class="box dmsf_detail">
<div class="box tabular">
<%= hidden_field_tag("commited_files[#{i}][disk_filename]", upload.disk_filename) %>
<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, :size => 32) %>
<%= label_tag("commited_files[#{i}][title]", l(:label_title)) %>
<%= text_field_tag("commited_files[#{i}][title]", upload.title, :size => 32, :required => true) %>
</p>
</div>
<div class="splitcontentright">
<p>
<%= label_tag('', "#{l(:label_filename)}:") %>
<%= label_tag('', l(:label_filename)) %>
<%= h(upload.name) %>
<%= hidden_field_tag("commited_files[#{i}][name]", upload.name) %>
</p>
</div>
</div>
<p class="no-ident">
<%= label_tag("commited_files[#{i}][description]", "#{l(:label_description)}:") %>
<p>
<%= 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="wiki data clear">
<%= text_area_tag("commited_files[#{i}][description]", upload.description, :rows=> 6, :class => 'wiki-edit') %>
</div>
<div class="clear">
<div class="splitcontentleft">
<p>
<%= label_tag("commited_files[#{i}][version]_minor", "#{l(:label_version)}:") %>
</p>
<div class="data clear">
<%= label_tag("commited_files[#{i}][version]_minor", l(:label_dmsf_version)) %>
<%= radio_button_tag("commited_files[#{i}][version]", 1, true) %>
<%= upload.major_version %>.<%= upload.minor_version + 1 %>
<%= l(:option_version_minor) %><br/>
@ -56,30 +54,29 @@
<%= upload.major_version + 1 %>.0
<%= l(:option_version_major) %><br/>
<%= radio_button_tag("commited_files[#{i}][version]", 3) %>
<%= select_tag "commited_files[#{i}][custom_version_major]", options_for_select(0..99, upload.major_version + 2) %>.<%= select_tag "commited_files[#{i}][custom_version_minor]", options_for_select(0..99, upload.minor_version + 1) %>
<%= select_tag "commited_files[#{i}][custom_version_major]", options_for_select(0..99, upload.major_version + 2), :onchange => "$('#commited_files_#{i}_version_3').prop('checked', true)" %>.
<%= select_tag "commited_files[#{i}][custom_version_minor]", options_for_select(0..99, upload.minor_version + 1), :onchange => "$('#commited_files_#{i}_version_3').prop('checked', true)" %>
<%= l(:option_version_custom) %>
</p>
</div>
</div>
<div class="splitcontentright clear">
<div class="splitcontentright">
<p>
<%= label_tag('', "#{l(:label_mime)}:") %>
<%= label_tag('', l(:label_mime)) %>
<%= h(upload.mime_type) %>
</p>
<p>
<%= label_tag('', "#{l(:label_size)}:") %>
<%= label_tag('', l(:label_size)) %>
<%= number_to_human_size(upload.size) %>
</p>
</div>
<br style="clear: both"/>
</div>
<% upload.custom_values.each do |value| %>
<p><%= custom_field_tag_with_label("commited_files[#{i}][dmsf_file_revision]", value) %></p>
<% end %>
<p>
<%= label_tag("commited_files[#{i}][comment]", "#{l(:label_comment)}:") %>
<%= label_tag("commited_files[#{i}][comment]", l(:label_comment)) %>
<%= text_area_tag("commited_files[#{i}][comment]", upload.comment, :rows => 2) %>
</p>
<div class="data">
<%= text_area_tag("commited_files[#{i}][comment]", upload.comment, :rows => 2, :style => 'width: 99%;') %>
</div>
</div>
<%= wikitoolbar_for "commited_files_#{i}_description" %>

View File

@ -1,7 +1,11 @@
<%# Redmine plugin for Document Management System "Features"
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-16 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
@ -15,48 +19,57 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<div class="box dmsf_detail">
<div class="box tabular">
<%= hidden_field_tag("commited_files[#{i}][disk_filename]", upload.disk_filename) %>
<%= 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)}:") %>
<%= label_tag('', l(:label_title)) %>
<%= h(upload.title) %>
</p>
</div>
<div class="splitcontentright">
<p>
<%= label_tag('', "#{l(:label_filename)}:") %>
<%= label_tag('', l(:label_filename)) %>
<%= h(upload.name) %>
</p>
</div>
</div>
<p class="no-ident">
<%= label_tag('', "#{l(:label_description)}:") %>
</p>
<div class="wiki data clear">
<% if upload.description.present? %>
<p>
<%= label_tag('', l(:label_description)) %>
<div class="wiki">
<%= textilizable(upload.description) %>
</div>
</p>
<% end %>
<div class="clear">
<div class="splitcontentleft">
<p>
<%= label_tag('', "#{l(:label_version)}:") %>
<%= label_tag('', l(:label_dmsf_version)) %>
<%= upload.major_version %>.<%= upload.minor_version %>
</p>
</div>
<div class="splitcontentright clear">
<div class="splitcontentright">
<p>
<%= label_tag('', "#{l(:label_mime)}:") %>
<%= label_tag('', l(:label_mime)) %>
<%= h(upload.mime_type) %>
</p>
<p>
<%= label_tag('', "#{l(:label_size)}:") %>
<%= label_tag('', l(:label_size)) %>
<%= number_to_human_size(upload.size) %>
</p>
</div>
<br style="clear: both"/>
</div>
<% if upload.comment.present? %>
<p>
<%= label_tag('', l(:label_comment)) %>
<div class="wiki"><%= textilizable(upload.comment) %></div>
</p>
<% end %>
</div>

View File

@ -1,8 +1,11 @@
<%# Redmine plugin for Document Management System "Features"
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2014 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,11 @@
<%# Redmine plugin for Document Management System "Features"
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-16 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
@ -15,24 +19,23 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<% html_title(l(:dmsf)) %>
<% html_title l(:dmsf) %>
<div class="contextual">
</div>
<%= render(:partial => '/dmsf/path',
:locals => {:folder => @folder, :filename => nil, :title => l(:heading_uploaded_files)}) %>
<%= render(:partial => '/dmsf/path', :locals => {:folder => @folder, :filename => nil}) %>
<% if (@folder && @folder.description.present?) || @project.description.present? %>
<div class="wiki">
<%= textilizable(@folder ? @folder.description : @project.description) %>
</div>
<% end %>
<div class="wiki">
<%= textilizable(@folder.description) if @folder %>
</div>
<h3><%=l(:heading_uploaded_files)%></h3>
<% i = 1 %>
<%= form_tag({:action => 'commit_files', :id => @project, :folder_id => @folder},
:method=>:post) do %>
<% @uploads.each do |upload| %>
:method => :post) do %>
<% @uploads.each_with_index do |upload, i| %>
<% if upload.locked %>
<%= render(:partial => 'upload_file_locked', :locals => {:upload => upload, :i => i}) %>
<% else %>
@ -40,5 +43,5 @@
<% end %>
<% i += 1 %>
<% end %>
<%= submit_tag(l(:submit_commit)) %>
<%= submit_tag l(:submit_commit) %>
<% end %>

View File

@ -1,6 +1,9 @@
<%# Redmine plugin for Document Management System "Features"
<%
# encoding: utf-8
#
# Copyright (C) 2013 Karel Pičman <karel.picman@kontron.com>
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-16 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
@ -14,28 +17,35 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<h3 class="title"><%= l(:field_label_dmsf_workflow) %></h3>
<%= form_tag({:controller => 'dmsf_workflows', :action => 'new_action'},
:method => :post,
:id => 'new-action-form') do %>
: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><label><%= radio_button_tag 'step_action', DmsfWorkflowStepAction::ACTION_APPROVE, true %> <%= l(:label_dmsf_wokflow_action_approve) %></label><br/></p>
<p>
<label><%= radio_button_tag 'step_action', DmsfWorkflowStepAction::ACTION_REJECT %> <%= l(:label_dmsf_wokflow_action_reject) %></label><br/>
<%= text_area_tag :note, '', :placeholder => l(:message_dmsf_wokflow_note), :size => '38x2' %>
<label>
<%= radio_button_tag 'step_action', DmsfWorkflowStepAction::ACTION_APPROVE, true %>
<%= l(:label_dmsf_wokflow_action_approve) %>
</label>
</p>
<p>
<label>
<%= radio_button_tag 'step_action', DmsfWorkflowStepAction::ACTION_REJECT %>
<%= l(:label_dmsf_wokflow_action_reject) %>
</label>
<br/>
<%= text_area_tag :note, '', :placeholder => l(:message_dmsf_wokflow_note), :style => 'width: 90%' %>
</p>
<p>
<%= label_tag 'delegate', l(:label_dmsf_wokflow_action_delegate) %><br/>
<%= text_field_tag 'user_search', nil %>
<%= javascript_tag "observeSearchfield('user_search', 'users_for_delegate', '#{ 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]) }')" %>
<%= content_tag('div', principals_radio_button_tags('step_action', @dmsf_workflow.delegates(nil, params[:dmsf_workflow_step_assignment_id], params[:dmsf_file_revision_id])), :id => 'users_for_delegate') %>
<%= javascript_tag "observeSearchfield('user_search', 'dmsf_users_for_delegate', '#{ 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]) }')" %>
<%= content_tag('div', principals_radio_button_tags('step_action', @dmsf_workflow.delegates(nil, params[:dmsf_workflow_step_assignment_id], params[:dmsf_file_revision_id])), :id => 'dmsf_users_for_delegate') %>
</p>
<p class="buttons">

View File

@ -1,6 +1,9 @@
<%# Redmine plugin for Document Management System "Features"
<%
# encoding: utf-8
#
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-16 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
@ -14,16 +17,17 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<h3 class="title"><%= l(:title_dmsf_workflow_log) %></h3>
<p>
<% if params[:dmsf_file_revision_id].present? %>
<% revision = DmsfFileRevision.find_by_id(params[:dmsf_file_revision_id]) %>
<% if revision %>
<div class="log_header_box">
<div class="log_header_left">
<%= label_tag 'workflow_name', "#{l(:link_workflow)} #{l(:field_name).downcase}: " %>
<div class="dmsf_log_header_box">
<div class="dmsf_log_header_left">
<%= label_tag 'workflow_name', "#{l(:link_workflow)} #{l(:field_name).downcase} " %>
<% if User.current.allowed_to?(:manage_workflows, @dmsf_workflow.project) %>
<%= link_to @dmsf_workflow.name, dmsf_workflow_path(@dmsf_workflow) %>
<% else %>
@ -31,7 +35,7 @@
<% end %>
</div>
<div>
<%= label_tag 'workflow_status', "#{l(:field_status)}: " %>
<%= label_tag 'workflow_status', l(:field_status) %>
<%= revision.workflow_str false %>
</div>
</div>
@ -47,34 +51,34 @@
</tr></thead>
<tbody>
<tr id="step-0" class="even">
<td class="step"/>
<td class="id"/>
<td/>
<td/>
<td><%= DmsfWorkflowStepAction.workflow_str(0) %></td>
<td class="note"></td>
<td class="dmsf_note"></td>
<td/>
</tr>
<tr id="step-1" class="odd">
<td class="step"></td>
<td class="id"></td>
<td><%= link_to_user User.find_by_id(revision.dmsf_workflow_assigned_by) if revision.dmsf_workflow_assigned_by %></td>
<td><%= DmsfWorkflowStepAction.action_str(DmsfWorkflowStepAction::ACTION_ASSIGN) %></td>
<td><%= DmsfWorkflowStepAction.workflow_str(DmsfWorkflowStepAction::ACTION_ASSIGN) %></td>
<td class="note"></td>
<td class="dmsf_note"></td>
<td><%= format_time(revision.dmsf_workflow_assigned_at) if revision.dmsf_workflow_assigned_at %></td>
</tr>
<tr id="step-2" class="even">
<td class="step"></td>
<td class="id"></td>
<td><%= link_to_user User.find_by_id(revision.dmsf_workflow_started_by) if revision.dmsf_workflow_started_by %></td>
<td><%= DmsfWorkflowStepAction.action_str(DmsfWorkflowStepAction::ACTION_START) %></td>
<td><%= DmsfWorkflowStepAction.workflow_str(DmsfWorkflowStepAction::ACTION_START) if revision.dmsf_workflow_started_by %></td>
<td class="note"></td>
<td class="dmsf_note"></td>
<td><%= format_time(revision.dmsf_workflow_started_at) if revision.dmsf_workflow_started_at %></td>
</tr>
<% sql = "SELECT c.action, c.note, c.created_at, c.author_id, a.user_id, s.step FROM dmsf_workflow_step_actions c RIGHT JOIN dmsf_workflow_step_assignments a ON a.id = c.dmsf_workflow_step_assignment_id RIGHT JOIN dmsf_workflow_steps s ON s.id = a.dmsf_workflow_step_id WHERE a.dmsf_file_revision_id = #{revision.id} ORDER BY s.step, c.action DESC, c.created_at" %>
<% result = DmsfWorkflowStep.connection.exec_query sql %>
<% result.each_with_index do |row, i| %>
<tr id="step-<%= i + 3 %> " class="<%= cycle 'odd', 'even' %>">
<td class="step"><%= row['step'] %></td>
<td class="id"><%= row['step'] %></td>
<td><%= link_to_user User.find_by_id(row['author_id'].present? ? row['author_id'] : row['user_id']) %></td>
<td><%= DmsfWorkflowStepAction.action_str(row['action']) %></td>
<td>
@ -84,7 +88,7 @@
<%= DmsfWorkflowStepAction.workflow_str(row['action']) %>
<% end %>
</td>
<td class="note"><%= row['note'] %></td>
<td class="dmsf_note"><%= row['note'] %></td>
<td><%= format_time(row['created_at']) if row['created_at'].present? %></td>
</tr>
<% end %>
@ -94,4 +98,3 @@
<% end %>
<% end %>
</p>

View File

@ -1,4 +1,7 @@
<%# Redmine plugin for Document Management System "Features"
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
#
@ -14,9 +17,10 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<% @workflows = DmsfWorkflow.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">
@ -24,6 +28,15 @@
</div>
<h2><%=l(:label_dmsf_workflow_plural)%></h2>
<%= 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;' %>
</fieldset>
<% end %>
&nbsp;
<% end %>
<% if @workflows.any? %>
@ -34,9 +47,12 @@
</tr></thead>
<tbody>
<% for workflow in @workflows %>
<tr id="workflow-<%= workflow.id %>" class="<%= cycle('odd', 'even') %>">
<tr id="workflow-<%= workflow.id %>" class="dmsf_workflow <%= workflow.active? ? 'active' : 'locked' %> <%= cycle('odd', 'even') %>">
<td class="name"><%= link_to(h(workflow.name), dmsf_workflow_path(workflow)) %></td>
<td class="buttons"><%= delete_link dmsf_workflow_path(workflow) %></td>
<td class="buttons">
<%= change_status_link(workflow) unless @project %>
<%= delete_link dmsf_workflow_path(workflow) %>
</td>
</tr>
<% end %>
</tbody>

View File

@ -1,8 +1,9 @@
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -20,7 +21,7 @@
%>
<fieldset class="box">
<legend><%=l(:label_dmsf_workflow_add_approver)%></legend>
<legend><%= l(:label_dmsf_workflow_add_approver) %></legend>
<p><%= label_tag 'user_search', l(:label_user_search) %><%= text_field_tag 'user_search', nil %></p>
<%= javascript_tag "observeSearchfield('user_search', 'users', '#{ 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) }')" %>

View File

@ -1,8 +1,9 @@
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -21,11 +22,11 @@
<h3 class="title"><%= l(:dmsf_new_step) %></h3>
<%= form_for(:dmsf_workflow, {:url => edit_dmsf_workflow_path(@dmsf_workflow), :method => :post}) do |f| %>
<%= labelled_form_for(@dmsf_workflow, {:url => edit_dmsf_workflow_path(@dmsf_workflow), :method => :post}) do |f| %>
<%= render :partial => 'new_step_form' %>
<p class="buttons">
<%= submit_tag l(:dmsf_and), :id => 'add-step-and' %>
<%= submit_tag l(:dmsf_or), :id => 'add-step-or' %>
<%= submit_tag l(:button_cancel), :name => nil, :onclick => 'hideModal(this);', :type => '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' %>
</p>
<% end %>

View File

@ -1,8 +1,9 @@
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -28,7 +29,10 @@
<%= labelled_form_for @dmsf_workflow do |f| %>
<%= error_messages_for 'workflow' %>
<div class="box tabular">
<p><%= f.text_field :name, :value => @dmsf_workflow.name, :required => true %><%= submit_tag l(:button_save) %></p>
<p>
<%= f.text_field :name, :required => true %>
<%= f.submit l(:button_save) %>
</p>
</div>
<% end %>
@ -38,29 +42,27 @@
</p>
<% steps = @dmsf_workflow.dmsf_workflow_steps.collect{|s| s.step}.uniq %>
<% if steps.any? %>
<table class="list">
<table class="list steps">
<thead><tr>
<th><%= l(:label_dmsf_workflow_step) %></th>
<th><%= l(:label_dmsf_workflow_approval_plural) %></th>
<th><%= l(:button_sort)%></th>
<th></th>
</tr></thead>
<tbody>
<% steps.each do |i|%>
<tr id="step-<%= i %>" class="<%= cycle 'odd', 'even' %> step">
<td class="step"><%= i %></td>
<td class="id"><%= i %></td>
<td class="approval">
<% @dmsf_workflow.dmsf_workflow_steps.collect{|s| (s.step == i) ? s : nil}.compact.each_with_index do |step, j| %>
<% if j != 0 %>
<b><%= step.soperator %></b>&nbsp
<% stps = @dmsf_workflow.dmsf_workflow_steps.collect{|s| (s.step == i) ? s : nil}.compact %>
<% stps.each_with_index do |step, j| %>
<% if (j != 0) || (stps.count > 1) %>
<b><%= step.soperator %></b>
<% end %>
<%= link_to_user step.user %>
<% end %>
</td>
<td class="reorder">
<%= reorder_links('workflow_step', {:action => 'edit', :id => @dmsf_workflow, :step => i}, :put) %>
</td>
<td class="buttons">
<%= reorder_handle(@dmsf_workflow, :url => url_for(:action => 'edit', :id => @dmsf_workflow, :step => i) ) %>
<%= delete_link edit_dmsf_workflow_path(@dmsf_workflow, :step => i) %>
</td>
</tr>
@ -71,3 +73,7 @@
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
</div>
<%= javascript_tag do %>
$(function() { $("table.steps tbody").positionedItems(); });
<% end %>

View File

@ -1,6 +1,9 @@
<%# Redmine plugin for Document Management System "Features"
<%
# encoding: utf-8
#
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-16 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
@ -14,7 +17,8 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'action', :locals => {:workflow => @dmsf_workflow}) %>');
showModal('ajax-modal', '35%');

View File

@ -1,6 +1,9 @@
<%# Redmine plugin for Document Management System "Features"
<%
# encoding: utf-8
#
# Copyright (C) 2013 Karel Pičman <karel.picman@kontron.com>
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-16 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
@ -14,6 +17,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<%= render 'main' %>

View File

@ -1,6 +1,9 @@
<%# Redmine plugin for Document Management System "Features"
<%
# encoding: utf-8
#
# Copyright (C) 2011-14 Karel Pičman <karel.picman@kontron.com>
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-16 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
@ -14,34 +17,35 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<% project = Project.find_by_id params[:project_id] if params[:project_id] %>
<% if project %>
<h2><%= link_to l(:label_dmsf_workflow_plural), settings_project_path(project, :tab => 'dmsf_workflow') %> &#187; <%=l(:label_dmsf_workflow_new)%></h2>
<h2><%= link_to l(:label_dmsf_workflow_plural), settings_project_path(project, :tab => 'dmsf_workflow') %> &#187; <%= l(:label_dmsf_workflow_new) %></h2>
<% else %>
<h2><%= link_to l(:label_dmsf_workflow_plural), dmsf_workflows_path %> &#187; <%=l(:label_dmsf_workflow_new)%></h2>
<h2><%= link_to l(:label_dmsf_workflow_plural), dmsf_workflows_path %> &#187; <%= l(:label_dmsf_workflow_new) %></h2>
<% end %>
<%= labelled_form_for @dmsf_workflow do |f| %>
<%= f.hidden_field(:project_id, :value => project.id) if project %>
<%= error_messages_for 'dmsf_workflow' %>
<div class="box tabular">
<p>
<%= f.text_field :name, :value => @dmsf_workflow.name, :size => 25, :maxlength => 255, :required => true %>
<%= f.text_field :name, :required => true %>
</p>
<p>
<%= label_tag :label_copy_workflow_from, l(:label_copy_workflow_from) %>
<%= select_tag('dmsf_workflow_id', dmsf_all_workflows_for_select(params[:dmsf_workflow_id])) %>
<%= f.select(:id,
dmsf_all_workflows_for_select(params[:dmsf_workflow] ? params[:dmsf_workflow][:id] : nil),
:label => l(:label_copy_workflow_from)) %>
</p>
<% if project %>
<p><%= hidden_field_tag :project_id, project.id %></p>
<% end %>
</div>
<%= submit_tag l(:button_create) %>
<%= f.submit l(:button_create) %>
<% end %>
<script type="text/javascript">
$('#dmsf_workflow_id').change(function () {
$('#content').load("<%= url_for(:action => 'new', :project_id => @project) %>", $('#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();
</script>

View File

@ -1,19 +0,0 @@
<%
# encoding: utf-8
#
# Redmine plugin for Kontron customisation
# Copyright (c) 2011-15 Kontron
# Karel Pičman <karel.picman@kontron.com>
#
# Repository folders
%>
<h2><%= l(:label_repository_folders) %></h2>
<%= form_for(:repository_folder, {:url => edit_dmsf_workflow_path(@dmsf_workflow), :method => :post}) do |f| %>
<%= render :partial => 'new_step_form' %>
<p>
<%= submit_tag l(:dmsf_and), :id => 'add-step-and' %>
<%= submit_tag l(:dmsf_or), :id => 'add-step-or' %>
</p>
<% end %>

View File

@ -1,6 +1,9 @@
<%# Redmine plugin for Document Management System "Features"
<%
# encoding: utf-8
#
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,8 +1,9 @@
<%#
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-14 Karel Picman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -17,8 +18,8 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
require 'redmine_dmsf/patches/custom_fields_helper_patch'
require 'redmine_dmsf/patches/acts_as_customizable'
require 'redmine_dmsf/patches/project_patch'
require 'redmine_dmsf/patches/project_tabs_extended'
%>
<%= labelled_fields_for :pref, @user.pref do |pref_fields| %>
<p><%= pref_fields.check_box :dmsf_tree_view %></p>
<% end %>

View File

@ -1,8 +1,11 @@
<%# Redmine plugin for Document Management System "Features"
<%#
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-14 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -16,7 +19,8 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%>
<% if @project.new_record? && @source_project %>
<p>

View File

@ -1,7 +1,9 @@
<%#
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2013 Karel Picman <karel.picman@kontron.com>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -24,15 +26,15 @@
<% files = DmsfFile.joins(
'JOIN dmsf_locks ON dmsf_files.id = dmsf_locks.entity_id').where(
'dmsf_locks.entity_type' => 0, 'dmsf_locks.user_id' => @user.id).all %>
<h3><%= l(:label_my_locked_documents)%> (<%= folders.count %>/<%= files.count %>)</h3>
<h3><%= l(:locked_documents)%> (<%= folders.count %>/<%= files.count %>)</h3>
<% if folders.any? || files.any?%>
<%= form_tag({}) do %>
<table class="list">
<thead>
<tr>
<th><%=l(:field_project)%></th>
<th><%=l(:label_document)%>/<%=l(:field_folder)%></th>
<th><%=l(:field_folder)%></th>
<th><%= l(:field_project) %></th>
<th><%= l(:label_document) %>/<%= l(:field_folder) %></th>
<th><%= l(:field_folder) %></th>
</tr>
</thead>
<tbody>
@ -47,9 +49,9 @@
:class => 'icon icon-folder') %>
</td>
<td class="title">
<% if folder.folder %>
<%= link_to(h(folder.folder.title),
{:controller => 'dmsf', :action => 'show', :id => folder.project, :folder_id => folder.folder}) %>
<% if 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 }) %>
<% end %>
@ -67,9 +69,9 @@
:class => "icon icon-file #{DmsfHelper.filetype_css(file.name)}") %>
</td>
<td class="title">
<% if file.folder %>
<%= link_to(h(file.folder.title),
{:controller => 'dmsf', :action => 'show', :id => file.project, :folder_id => file.folder}) %>
<% if 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(l(:link_documents), {:controller => 'dmsf', :action => 'show', :id=> file.project }) %>
<% end %>

View File

@ -1,7 +1,9 @@
<%#
<%
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011-15 Karel Picman <karel.picman@kontron.com>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -23,14 +25,14 @@
'dmsf_workflow_step_assignments.user_id = ? AND dmsf_workflow_step_actions.id IS NULL', @user.id).all %>
<% assignments = Array.new %>
<% all_assignments.each do |assignment| %>
<% if assignment.dmsf_file_revision.file.last_revision &&
!assignment.dmsf_file_revision.file.last_revision.deleted &&
<% if assignment.dmsf_file_revision.dmsf_file.last_revision &&
!assignment.dmsf_file_revision.dmsf_file.last_revision.deleted? &&
(assignment.dmsf_file_revision.workflow == DmsfWorkflow::STATE_WAITING_FOR_APPROVAL) &&
(assignment.dmsf_file_revision == assignment.dmsf_file_revision.file.last_revision) %>
(assignment.dmsf_file_revision == assignment.dmsf_file_revision.dmsf_file.last_revision) %>
<% assignments << assignment %>
<% end %>
<% end %>
<h3><%= l(:label_my_open_approvals)%> (<%= assignments.count %>)</h3>
<h3><%= l(:open_approvals)%> (<%= assignments.count %>)</h3>
<% if assignments.any? %>
<%= form_tag({}) do %>
<table class="list">
@ -46,8 +48,8 @@
<% assignments.each do |assignment| %>
<tr id="assignment-<%= assignment.id %>" class="<%= cycle('odd', 'even') %>">
<td class="project">
<% if assignment.dmsf_file_revision.file.project %>
<%= link_to_project(assignment.dmsf_file_revision.file.project) %>
<% if assignment.dmsf_file_revision.dmsf_file.project %>
<%= link_to_project(assignment.dmsf_file_revision.dmsf_file.project) %>
<% end %>
</td>
<td>
@ -57,18 +59,18 @@
<% end %>
</td>
<td class="title">
<% if assignment.dmsf_file_revision && assignment.dmsf_file_revision.file %>
<% 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.file }) %>
{: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.file.folder %>
<%= link_to(h(assignment.dmsf_file_revision.file.folder.title),
{:controller => 'dmsf', :action => 'show', :id => assignment.dmsf_file_revision.file.project, :folder_id => assignment.dmsf_file_revision.file.folder}) %>
<% elsif assignment.dmsf_file_revision.file.project %>
<%= link_to(l(:link_documents), {:controller => 'dmsf', :action => 'show', :id => assignment.dmsf_file_revision.file.project }) %>
<% 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}) %>
<% 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 }) %>
<% end %>
<% end %>
</td>

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 803 B

After

Width:  |  Height:  |  Size: 739 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 608 B

View File

@ -0,0 +1,17 @@
{
"sProcessing": "Elaborazione...",
"sLengthMenu": "Visualizza _MENU_ elementi",
"sZeroRecords": "La ricerca non ha portato alcun risultato o nessun elemento è presente",
"sInfo": "Vista da _START_ a _END_ di _TOTAL_ elementi",
"sInfoEmpty": "Vista da 0 a 0 di 0 elementi",
"sInfoFiltered": "(filtrati da _MAX_ elementi totali)",
"sInfoPostFix": "",
"sSearch": "Cerca:",
"sUrl": "",
"oPaginate": {
"sFirst": "Inizio",
"sPrevious": "Precedente",
"sNext": "Successivo",
"sLast": "Fine"
}
}

View File

@ -0,0 +1,117 @@
/* encoding: utf-8
*
* Redmine plugin for Document Management System "Features"
*
* Copyright (C) 2011-16 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.
*/
/* Function to allow the projects to show up as a tree */
function dmsf_toggle(EL, PM)
{
var els = document.getElementsByTagName('tr');
var elsLen = els.length;
var pattern = new RegExp("(^|\\s)" + EL + "(\\s|$)");
var cpattern = new RegExp('span');
var expand = new RegExp('dmsf_expanded');
var collapse = new RegExp('dmsf_collapsed');
var hide = new RegExp('dmsf_hidden');
var spanid = PM;
var classid = new RegExp('junk');
var oddeventoggle = 0;
for(i = 0; i < elsLen; i++)
{
if(cpattern.test(els[i].id))
{
var tmpspanid = spanid;
var tmpclassid = classid;
spanid = els[i].id;
classid = spanid;
classid = classid.match(/(\w+)span/)[1];
classid = new RegExp(classid);
if(tmpclassid.test(els[i].className) && (tmpspanid.toString() !== PM.toString()))
{
if(collapse.test(document.getElementById(tmpspanid).className))
{
spanid = tmpspanid;
classid = tmpclassid;
}
}
}
if(pattern.test(els[i].className))
{
var cnames = els[i].className;
cnames = cnames.replace(/dmsf_hidden/g,'');
if(expand.test(document.getElementById(PM).className))
{
cnames += ' dmsf_hidden';
}
else
{
if((spanid.toString() !== PM.toString()) && (classid.test(els[i].className)))
{
if(collapse.test(document.getElementById(spanid).className))
{
cnames += ' dmsf_hidden';
}
}
}
els[i].className = cnames;
}
if(!(hide.test(els[i].className)))
{
var cnames = els[i].className;
cnames = cnames.replace(/odd/g,'');
cnames = cnames.replace(/even/g,'');
if(oddeventoggle === 0)
{
cnames += ' odd';
}
else
{
cnames += ' even';
}
oddeventoggle ^= 1;
els[i].className = cnames;
}
}
if (collapse.test(document.getElementById(PM).className))
{
var cnames = document.getElementById(PM).className;
cnames = cnames.replace(/dmsf_collapsed/,'dmsf_expanded');
document.getElementById(PM).className = cnames;
}
else
{
var cnames = document.getElementById(PM).className;
cnames = cnames.replace(/dmsf_expanded/,'dmsf_collapsed');
document.getElementById(PM).className = cnames;
}
}

File diff suppressed because one or more lines are too long

View File

@ -1,332 +0,0 @@
/*
* Redmine plugin for Document Management System "Features"
*
* Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
* Copyright (C) 2011-15 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.
*/
button {
vertical-align: middle;
margin-top: 1px;
margin-bottom: 1px;
}
/* DMSF entries list */
table.entries tbody td, table.entries tbody tr:hover td {
border-left: solid 1px #D7D7D7;
border-right: solid 1px #D7D7D7;
}
table.entries td.modified {
min-width: 127px;
width: 127px;
}
table.entries td.actions {
min-width: 96px;
width: 96px;
}
table.entries td.title {
width: 40%;
}
table.entries th.check, table.entries td.check {
width: 17px;
padding: 2px;
text-align: left;
}
table.entries th.check div.DataTables_sort_wrapper {
padding: 0;
}
table.display th {
font-weight: bold;
}
table.display tbody tr.even {
background-color: #F8F8F8;
}
table.display tbody tr.odd {
background-color: #FFFFFF;
}
table.display tbody tr:hover {
background-color:#ffffdd;
}
form.dmfs_entries {
margin-bottom: 10px;
display: block;
}
div.dataTables_wrapper div.fg-toolbar {
font-size: 0.9em;
}
div.dataTables_wrapper div.fg-toolbar input, div.dataTables_wrapper div.fg-toolbar button,
div.dataTables_wrapper div.fg-toolbar select {
font-size: 0.9em;
}
input[type="checkbox"] {
margin: 1px;
}
div.filename {
padding: 0 10px 0 10px; float: right; font-size: 0.8em;
white-space: nowrap;
}
td.size {
font-size: 0.8em;
white-space: nowrap;
}
td.modified {
font-size: 0.8em;
}
td.modified img {
vertical-align:text-top;
}
td.author {
font-size: 0.8em;
}
td.version {
font-size: 0.8em;
white-space: nowrap;
}
td.version img {
vertical-align:text-top;
}
td.workflow {
font-size: 0.8em;
white-space: nowrap;
}
/* DMSF entries upload control */
.dmsf_upload textarea {
width: 90%;
}
.dmsf_upload legend {
font-weight: bold;
}
.dmsf_upload .warning {
padding: 4px 4px 4px 30px;
}
#uploader div.flash {
border: none;
}
.invisible {
display: none;
}
div.upload_select {
float: right;
white-space: nowrap;
line-height: 1.4em;
padding-left: 10px;
font-size: 0.9em;
}
div.upload_select input, div.upload_select select {
font-size: 0.9em;
}
.plupload_scroll {
max-height: 1000px;
min-height: 175px;
}
.ui-resizable-s {
bottom: 0px;
}
/* DMSF detail/commit page */
.dmsf_detail .warning {
padding: 4px 4px 4px 30px;
}
.dmsf_detail div.data {
margin-left: 110px;
}
.dmsf_detail label {
font-weight: bold;
width: 100px;
float: left;
text-align: right;
padding-right: 10px;
}
p.no-ident {
margin-bottom: 0;
margin-top: 0;
}
table.access-table tbody td, table.access-table tbody tr:hover td {
border: solid 1px #D7D7D7;
}
/* Custom field */
.dmsf-customfields {
margin: 5px 0px 5px 0px;
}
.dmsf-customfields .customfield label {
font-weight: bold;
width: 100px;
display: block;
float: left;
}
/* Approval workflow */
#admin-menu a.approvalworkflows { background-image: url(../images/ticket_go.png); }
#users_for_delegate {height: 200px; overflow:auto;}
#users_for_delegate label {display: block;}
.revision_box{
padding: 0px 0px 0px 0px;
margin-bottom: 10px;
background-color:#f6f6f6;
color:#505050;
line-height:1.5em;
}
div.revision_box .ui-widget-header {
font-weight: normal;
}
table.list th {
text-align: left;
}
table.list td.note {
width: 20%;
}
table.list td.reorder {
width: 15%;
}
table.list td.step {
text-align: center;
width: 16px;
}
.log_header_box{
padding:6px;
margin-bottom: 10px;
}
.log_header_left {
width: 50%;
float: left;
}
.log_header_box label{
font-weight: bold;
margin-left: 0px;
margin-right: 3px;
padding: 3px 0 3px 0;
}
.modal a, .modal a:link, .modal a:visited{ color: #169; text-decoration: none; }
.modal a:hover, .modal a:active{ color: #c61a1a; text-decoration: underline;}
.modal{ font-size: 12px}
/* Command icons */
.dmsf_icon-narrow { padding-left: 16px }
.icon-link { background-image: url(../images/link.png); }
.icon-notification-on { background-image: url(../images/notify.png); margin-left: 3px; }
.icon-notification-off { background-image: url(../images/notifynot.png); margin-left: 3px; }
.icon-dmsf-lock { background-image: url(../images/lock.png); }
.icon-dmsf-unlock { background-image: url(../images/unlock.png); }
.icon-dmsf-locked { background-image: url(../images/locked.png); margin-left: 2px }
/* File types */
tr.gray .icon-folder { background-image: url(../images/folder_gray.png); }
.icon-file.filetype-doc, .icon-file.filetype-docx { background-image: url(../images/filetypes/doc.png); }
.icon-file.filetype-xls, .icon-file.filetype-xlsx { background-image: url(../images/filetypes/xls.png); }
.icon-file.filetype-ppt, .icon-file.filetype-pptx { background-image: url(../images/filetypes/ppt.png); }
.icon-file.filetype-vsd, .icon-file.filetype-vsdx { background-image: url(../images/filetypes/vsd.png); }
.icon-file.filetype-mpp { background-image: url(../images/filetypes/mpp.png); }
.icon-file.filetype-odt { background-image: url(../images/filetypes/odt.png); }
.icon-file.filetype-ods { background-image: url(../images/filetypes/ods.png); }
.icon-file.filetype-odp { background-image: url(../images/filetypes/odp.png); }
.icon-file.filetype-odg { background-image: url(../images/filetypes/odg.png); }
tr.gray .icon-file.filetype-doc { background-image: url(../images/filetypes/doc_gray.png); }
tr.gray .icon-file.filetype-docx { background-image: url(../images/filetypes/doc_gray.png); }
tr.gray .icon-file.filetype-xls { background-image: url(../images/filetypes/xls_gray.png); }
tr.gray .icon-file.filetype-xlsx { background-image: url(../images/filetypes/xls_gray.png); }
tr.gray .icon-file.filetype-ppt { background-image: url(../images/filetypes/ppt_gray.png); }
tr.gray .icon-file.filetype-pptx { background-image: url(../images/filetypes/ppt_gray.png); }
tr.gray .icon-file.filetype-vsd { background-image: url(../images/filetypes/vsd_gray.png); }
tr.gray .icon-file.filetype-vsdx { background-image: url(../images/filetypes/vsd_gray.png); }
tr.gray .icon-file.filetype-mpp { background-image: url(../images/filetypes/mpp_gray.png); }
tr.gray .icon-file.filetype-odt { background-image: url(../images/filetypes/odt_gray.png); }
tr.gray .icon-file.filetype-ods { background-image: url(../images/filetypes/ods_gray.png); }
tr.gray .icon-file.filetype-odp { background-image: url(../images/filetypes/odp_gray.png); }
tr.gray .icon-file.filetype-odg { background-image: url(../images/filetypes/odg_gray.png); }
tr.gray .icon-file.text-x-c { background-image: url(../images/filetypes/c_gray.png); }
tr.gray .icon-file.text-x-csharp { background-image: url(../images/filetypes/csharp_gray.png); }
tr.gray .icon-file.text-x-java { background-image: url(../images/files/filetypes/java_gray.png); }
tr.gray .icon-file.text-x-javascript { background-image: url(../images/filetypes/js_gray.png); }
tr.gray .icon-file.text-x-php { background-image: url(../images/filetypes/php_gray.png); }
tr.gray .icon-file.text-x-ruby { background-image: url(../images/filetypes/ruby_gray.png); }
tr.gray .icon-file.text-xml { background-image: url(../images/filetypes/xml_gray.png); }
tr.gray .icon-file.text-css { background-image: url(../images/filetypes/css_gray.png); }
tr.gray .icon-file.text-html { background-image: url(../images/filetypes/html_gray.png); }
tr.gray .icon-file.image-gif { background-image: url(../images/filetypes/image_gray.png); }
tr.gray .icon-file.image-jpeg { background-image: url(../images/filetypes/image_gray.png); }
tr.gray .icon-file.image-png { background-image: url(../images/filetypes/image_gray.png); }
tr.gray .icon-file.image-tiff { background-image: url(../images/filetypes/image_gray.png); }
tr.gray .icon-file.application-pdf { background-image: url(../images/filetypes/pdf_gray.png); }
tr.gray .icon-file.application-zip { background-image: url(../images/filetypes/zip_gray.png); }
tr.gray .icon-file.application-x-gzip { background-image: url(../images/filetypes/zip_gray.png); }
/* Links */
.gray { color: #AAA }
.gray a, .gray a:link, .gray a:visited{ color: #484848; text-decoration: none; }
label.required:after {
content: " *";
color: #bb0000;
}
/* Search results */
dt.dmsf-file { background-image: url(../../../images/document.png); }
dt.dmsf-folder { background-image: url(../../../images/folder.png); }
.select2-selection{height: 100% !important; min-height: 30px;}
.select2-selection__rendered{overflow: visible !important; min-height: 30px;}
.select2-results__options {max-height: 600px !important;}

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -43,7 +43,7 @@
.plupload_logo {
width: 40px;
height: 40px;
background: url('../img/plupload.png') no-repeat 0 0;
background: url('../images/plupload.png') no-repeat 0 0;
position: absolute;
top: 8px;
left: 8px;
@ -119,7 +119,7 @@
}
.plupload_thumb_loading {
background: #eee url(../img/loading.gif) center no-repeat;
background: #eee url(../images/loading.gif) center no-repeat;
}
.plupload_thumb_loading .plupload_file_dummy,

View File

@ -0,0 +1,248 @@
/*
* Redmine plugin for Document Management System "Features"
*
* Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
* Copyright (C) 2011-16 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.
*/
/* DMSF table.list modifications */
table.dmsf_list th.dmsf_th {
border: none;
}
table.list td.dmsf_modified {
min-width: 127px;
width: 127px;
font-size: 0.8em;
text-align: left;
}
td.dmsf_modified img {
vertical-align:text-top;
}
table.list td.dmsf_title {
width: 40%;
text-align: left;
}
table.list td.dmsf_buttons {
min-width: 96px;
width: 96px;
text-align: left;
}
table.list th.dmsf_checkbox,
table.list td.dmsf_checkbox {
width: 15px;
padding: 2px 0 0 0;
}
table.list th.dmsf_checkbox input {
padding:0px;
}
table.list th.dmsf_checkbox div.DataTables_sort_wrapper {
padding: 0;
}
form.dmsf_entries {
margin-bottom: 10px;
display: block;
}
div.dmsf_controls,
div.dmsf_controls input,
div.dmsf_controls select,
form.dmsf_entries #browser_filter.dataTables_filter,
form.dmsf_entries #browser_filter.dataTables_filter input{
font-size: 0.9em;
}
div.dmsf_filename {
padding: 0 10px 0 10px;
float: right;
font-size: 0.8em;
white-space: nowrap;
}
td.dmsf_size {
font-size: 0.8em;
white-space: nowrap;
}
td.dmsf_author {
font-size: 0.8em;
white-space: nowrap;
}
td.dmsf_version {
font-size: 0.8em;
white-space: nowrap;
}
td.dmsf_version img {
vertical-align:text-top;
}
td.dmsf_workflow {
font-size: 0.8em;
white-space: nowrap;
}
.dmsf_invisible {
display: none;
}
div.dmsf_upload_select {
float: right;
font-size: 0.9em;
}
div.dmsf_upload_select input, div.dmsf_upload_select select {
font-size: 0.9em;
}
/* Approval workflow */
#admin-menu a.dmsf-approvalworkflows { background-image: url(../../../images/ticket_go.png); }
#dmsf_users_for_delegate { height: 200px; overflow:auto; }
#dmsf_users_for_delegate label { display: block; }
tr.dmsf_workflow.locked a { color: #aaa; }
.dmsf_revision_box {
padding: 0px 0px 0px 0px;
margin-bottom: 10px;
background-color:#f6f6f6;
color:#505050;
line-height:1.5em;
}
.dmsf_revision_inner_box {
border: 1px solid #e4e4e4;
}
.dmsf_id_box {
float: right;
white-space: nowrap;
line-height: 1.5em;
color: #505050;
margin-top: 5px;
padding-left: 10px;
}
div.dmsf_revision_box .ui-widget-header {
font-weight: normal;
}
.dmsf_log_header_box{
padding:6px;
margin-bottom: 10px;
}
.dmsf_log_header_left {
width: 50%;
float: left;
}
.dmsf_log_header_box label{
font-weight: bold;
margin-left: 0px;
margin-right: 3px;
padding: 3px 0 3px 0;
}
/* Command icons */
.dmsf_icon-link { background-image: url(../images/link.png); }
.dmsf_icon-notification-on { background-image: url(../images/notify.png); margin-left: 3px; }
.dmsf_icon-notification-off { background-image: url(../images/notifynot.png); margin-left: 3px; }
.dmsf_icon-lock { background-image: url(../images/lock.png); }
.dmsf_icon-unlock { background-image: url(../images/unlock.png); }
/* File types */
tr.dmsf_gray .icon-folder { background-image: url(../images/folder_gray.png); }
.icon-file.filetype-doc, .icon-file.filetype-docx { background-image: url(../images/filetypes/doc.png); }
.icon-file.filetype-xls, .icon-file.filetype-xlsx { background-image: url(../images/filetypes/xls.png); }
.icon-file.filetype-ppt, .icon-file.filetype-pptx { background-image: url(../images/filetypes/ppt.png); }
.icon-file.filetype-vsd, .icon-file.filetype-vsdx { background-image: url(../images/filetypes/vsd.png); }
.icon-file.filetype-mpp { background-image: url(../images/filetypes/mpp.png); }
.icon-file.filetype-odt { background-image: url(../images/filetypes/odt.png); }
.icon-file.filetype-ods { background-image: url(../images/filetypes/ods.png); }
.icon-file.filetype-odp { background-image: url(../images/filetypes/odp.png); }
.icon-file.filetype-odg { background-image: url(../images/filetypes/odg.png); }
tr.dmsf_gray .icon-file.filetype-doc { background-image: url(../images/filetypes/doc_gray.png); }
tr.dmsf_gray .icon-file.filetype-docx { background-image: url(../images/filetypes/doc_gray.png); }
tr.dmsf_gray .icon-file.filetype-xls { background-image: url(../images/filetypes/xls_gray.png); }
tr.dmsf_gray .icon-file.filetype-xlsx { background-image: url(../images/filetypes/xls_gray.png); }
tr.dmsf_gray .icon-file.filetype-ppt { background-image: url(../images/filetypes/ppt_gray.png); }
tr.dmsf_gray .icon-file.filetype-pptx { background-image: url(../images/filetypes/ppt_gray.png); }
tr.dmsf_gray .icon-file.filetype-vsd { background-image: url(../images/filetypes/vsd_gray.png); }
tr.dmsf_gray .icon-file.filetype-vsdx { background-image: url(../images/filetypes/vsd_gray.png); }
tr.dmsf_gray .icon-file.filetype-mpp { background-image: url(../images/filetypes/mpp_gray.png); }
tr.dmsf_gray .icon-file.filetype-odt { background-image: url(../images/filetypes/odt_gray.png); }
tr.dmsf_gray .icon-file.filetype-ods { background-image: url(../images/filetypes/ods_gray.png); }
tr.dmsf_gray .icon-file.filetype-odp { background-image: url(../images/filetypes/odp_gray.png); }
tr.dmsf_gray .icon-file.filetype-odg { background-image: url(../images/filetypes/odg_gray.png); }
tr.dmsf_gray .icon-file.text-x-c { background-image: url(../images/filetypes/c_gray.png); }
tr.dmsf_gray .icon-file.text-x-csharp { background-image: url(../images/filetypes/csharp_gray.png); }
tr.dmsf_gray .icon-file.text-x-java { background-image: url(../images/files/filetypes/java_gray.png); }
tr.dmsf_gray .icon-file.text-x-javascript { background-image: url(../images/filetypes/js_gray.png); }
tr.dmsf_gray .icon-file.text-x-php { background-image: url(../images/filetypes/php_gray.png); }
tr.dmsf_gray .icon-file.text-x-ruby { background-image: url(../images/filetypes/ruby_gray.png); }
tr.dmsf_gray .icon-file.text-xml { background-image: url(../images/filetypes/xml_gray.png); }
tr.dmsf_gray .icon-file.text-css { background-image: url(../images/filetypes/css_gray.png); }
tr.dmsf_gray .icon-file.text-html { background-image: url(../images/filetypes/html_gray.png); }
tr.dmsf_gray .icon-file.image-gif { background-image: url(../images/filetypes/image_gray.png); }
tr.dmsf_gray .icon-file.image-jpeg { background-image: url(../images/filetypes/image_gray.png); }
tr.dmsf_gray .icon-file.image-png { background-image: url(../images/filetypes/image_gray.png); }
tr.dmsf_gray .icon-file.image-tiff { background-image: url(../images/filetypes/image_gray.png); }
tr.dmsf_gray .icon-file.application-pdf { background-image: url(../images/filetypes/pdf_gray.png); }
tr.dmsf_gray .icon-file.application-zip { background-image: url(../images/filetypes/zip_gray.png); }
tr.dmsf_gray .icon-file.application-x-gzip { background-image: url(../images/filetypes/zip_gray.png); }
/* Links */
.dmsf_gray { color: #AAA }
.dmsf_gray a, .dmsf_gray a:link, .dmsf_gray a:visited{ color: #484848; text-decoration: none; }
/* Search results */
dt.dmsf-file { background-image: url(../../../images/document.png); }
dt.dmsf-folder { background-image: url(../../../images/folder.png); }
/* DMSF tree view */
tr.dmsf_hidden { display:none; }
tr.dmsf_tree span.dmsf_expander { cursor: pointer; }
tr.dmsf_tree.dmsf_expanded td.dmsf_title span {
background: url(../images/bullet_arrow_down.png) no-repeat 0 50%;
padding-left: 16px;
}
tr.dmsf_tree.dmsf_child td.dmsf_title span { padding-left: 16px; }
tr.dmsf_tree.dmsf_collapsed td.dmsf_title span {
background: url(../../../images/bullet_arrow_right.png) no-repeat 0 50%;
padding-left: 16px;
}
tr.dmsf_tree.idnt-1 td.dmsf_title {padding-left: 1.5em;}
tr.dmsf_tree.idnt-2 td.dmsf_title {padding-left: 2em;}
tr.dmsf_tree.idnt-3 td.dmsf_title {padding-left: 2.5em;}
tr.dmsf_tree.idnt-4 td.dmsf_title {padding-left: 3em;}
tr.dmsf_tree.idnt-5 td.dmsf_title {padding-left: 3.5em;}
tr.dmsf_tree.idnt-6 td.dmsf_title {padding-left: 4em;}
tr.dmsf_tree.idnt-7 td.dmsf_title {padding-left: 4.5em;}
tr.dmsf_tree.idnt-8 td.dmsf_title {padding-left: 5em;}
tr.dmsf_tree.idnt-9 td.dmsf_title {padding-left: 5.5em;}
.dmsf_odd {background-color:#f6f7f8;}
.dmsf_even {background-color: #fff;}

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
#
#
# This program is free software; you can redistribute it and/or
@ -26,7 +26,7 @@ cs:
label_dmsf_file_revision_plural: Revize dokumentů
label_dmsf_file_revision_access_plural: Přístupy k dokumentům
warning_no_entries_selected: Není nic vybráno
error_email_to_must_be_entered: Musí být zadán adresát
error_email_to_must_be_entered: Musí být zadán příjemce
warning_file_already_locked: Soubor je již zamčen
notice_file_locked: Soubor byl zamčen
warning_file_not_locked: Soubor není zamčen
@ -34,14 +34,14 @@ cs:
error_only_user_that_locked_file_can_unlock_it: Soubor může být odemčen pouze uživatelem, který ho zamkl
error_max_files_exceeded: "Limit pro %{number} najednou stažených souborů je překročen"
error_entry_project_does_not_match_current_project: Zadaný projekt neodpovídá aktuálnímu projektu
notice_folder_created: Adresář byl vytvořen
notice_folder_created: Složka byla vytvořena
error_folder_creation_failed: Vytváření složky selhalo
error_folder_title_must_be_entered: Musí být zadán název
notice_folder_deleted: Adresář byl smazán
error_folder_is_not_empty: Adresář není prázdný
notice_folder_deleted: Složka byla smazána
error_folder_is_not_empty: Složka není prázdná
error_folder_title_is_already_used: Název již existuje
notice_folder_details_were_saved: Detaily složky byly uloženy
error_folder_is_locked: Adresář je zamčen
error_folder_is_locked: Složka je zamčena
error_file_is_locked: Soubor je zamčen
notice_file_deleted: Soubor byl smazán
error_at_least_one_revision_must_be_present: Musí existovat alespoň jedna revize
@ -94,11 +94,7 @@ cs:
label_email_body: Obsah
label_email_send: Odesláno
title_notifications_active: Notifikace jsou aktivní
label_file_size: Velikost souboru
heading_file_upload: Nahrát
note_uploaded_maximum_files_at_once: "Maximálně může být nahráno %{number} souborů najednou."
note_upload_files_greater_than_two_gb: Nahrání souborů větších než 2GB vyžaduje 64b prohlížeč.
submit_upload_files: Nahrání
label_upload_upload: Nahrát
heading_new_folder: Nová složka
label_title: Název
label_description: Popis
@ -109,7 +105,7 @@ cs:
select_option_deactivated: Deaktivováno
select_option_activated: Aktivováno
label_title_format: Formát názvu
text_title_format: "Formát názvu souboru pro stažení (%t - název, %d - datum, %v - verze, %i - ID, %r - revize). Např.: %t_%v"
text_title_format: "Formát názvu souboru pro stažení (%t - název, %f - soubor, %d - datum, %v - verze, %i - ID, %r - revize). Např.: %t_%v"
title_save_preferences: Uložit nastavení
heading_revisions: Revize
title_download: Stáhnout
@ -185,18 +181,18 @@ cs:
heading_access_last: Poslední
label_dmsf_updated: Změněno
label_dmsf_downloaded: Staženo
title_total_size_of_all_files: Celková velikost všech souborů v adresáři
title_total_size_of_all_files: Celková velikost všech souborů ve složce
project_module_dmsf: DMSF
warning_no_project_to_copy_file_to: Neexistuje projekt, do kterého můžete kopírovat
comment_copied_from: "Zkopírováno z %{source}"
notice_file_copied: Soubor zkopírován
notice_file_moved: Soubor přesunut
field_target_project: Cílový projekt
field_target_folder: Cílový adresář
field_target_folder: Cílová složka
title_copy_or_move: Kopírovat/Přesunout
label_dmsf_folder_plural: Složky
comment_moved_from: "Přesunuto z %{source}"
error_target_folder_same: Cílový adresář a projekt jsou stejné jako aktuální
error_target_folder_same: Cílový složka a projekt jsou stejné jako aktuální
error_file_cannot_be_moved: Soubor nemůže být přesunut
error_file_cannot_be_copied: Soubor nemůže být zkopírován
warning_no_project_to_copy_folder_to: Neexistuje projekt, do kterého můžete kopírovat
@ -209,7 +205,7 @@ cs:
label_maximum_email_filesize: Maximální velikost souboru emailu
header_minimum_filesize: Chyba souboru.
error_minimum_filesize: "Soubor %{file} má nulovou velikost a nebude přiložen."
parent_directory: Nadřazený adresář
parent_directory: Nadřazená složka
note_webdav: "Webdav je po aktivaci k dispozici na %{protocol}://%{domain}/dmsf/webdav/[identifikátor projektu]"
label_webdav: Webdav functionalita
label_dmsf_plural: "Kopíruj dokumenty a složky (%{files} souborů v %{folders} složkách)"
@ -219,7 +215,6 @@ cs:
warning_folder_not_locked: Složku nelze zamknout
notice_folder_unlocked: Složka byla odemčena
error_only_user_that_locked_folder_can_unlock_it: Nemáte oprávnění k odemknutí této složky
title_folder_parent_locked: "Nadřazená složka %{name} je zamčená"
title_unlock_folder: Odemknout
title_lock_folder: Zamknout
@ -268,12 +263,12 @@ cs:
info_revision: "r%{rev}"
link_workflow: Schvalovací proces
notice_workflow_started: Schvalovací proces byl úspěšně zahájen
text_email_subject_approved: "Schvalovací proces %{name} schválen"
text_email_subject_rejected: "Schvalovací proces %{name} zamítnut"
text_email_subject_delegated: "Schvalovací proces %{name} delegován"
text_email_subject_requires_approval: "Schvalovací proces %{name} očekává Vaše schválení"
text_email_subject_updated: "Schvalovací proces %{name} aktualizován"
text_email_subject_started: "Schvalovací proces %{name} spuštěn"
text_email_subject_approved: schválen
text_email_subject_rejected: zamítnut
text_email_subject_delegated: delegován
text_email_subject_requires_approval: očekává Vaše schválení
text_email_subject_updated: aktualizován
text_email_subject_started: spuštěn
text_email_finished_approved: "Schvalovací proces '%{name}' přiřazený k dokumentu '%{filename}' byl právě ukončen a dokument je schválen."
text_email_finished_rejected: "Schvalovací proces '%{name}' přiřazený k dokumentu '%{filename}' byl dokončen a dokument byl zamítnut, protože '%{notice}'."
text_email_finished_delegated: "Schvalovací proces '%{name}' přiřazený k dokumentu '%{filename}' byl delegován, protože '%{notice}' a od Vás se očekává schválení v aktuálním schvalovacím kroku."
@ -297,15 +292,15 @@ cs:
label_link_name: Název odkazu
label_link_external_url: URL
label_target_folder: Cílový adresář
label_source_folder: Zdrojový adresář
label_target_folder: Cílová složka
label_source_folder: Zdrojová složka
label_target_project: Cílový projekt
label_source_project: Zdrojový projekt
text_email_doc_updated_subject: "Dokumenty projektu %{project} aktualizovány"
text_email_doc_updated_subject: Dokumenty aktualizovány
text_email_doc_updated: právě aktualizoval dokumenty projektu
text_email_doc_follows: takto
text_email_doc_deleted_subject: "Dokumenty projektu %{project} smazány"
text_email_doc_deleted_subject: Dokumenty smazány
text_email_doc_deleted: právě smazal dokumety projektu
label_links_only: pouze odkazy
@ -316,10 +311,10 @@ cs:
link_trash_bin: Koš
title_restore: Obnovit
notice_dmsf_file_restored: Document byl úspěšně obnoven
notice_dmsf_folder_restored: Adresář byl úspěšně obnoven
notice_dmsf_folder_restored: Složka byla úspěšně obnovena
notice_dmsf_link_restored: Odkaz byl úspěšně obnoven
title_restore_checked: Obnov vybrané
error_parent_folder: Nadřazený adresář neexistuje
error_parent_folder: Nadřazená složka neexistuje
error_resource_or_parent_locked: Nelze zamknout - zdrojový nebo nadřazený objekt je zamčený
error_parent_locked: Nelze zamknout - nadřazený objekt je zamčený
@ -327,10 +322,13 @@ cs:
error_lock_exclusively: Nelze zamknout již zamčený objekt
error_unlock_parent_locked: Nelze odemknout - nadřazený objekt je zamčený
my:
blocks:
field_dmsf_tree_view: Zobrazit složky jako stromovou strukturu
label_dmsf_version: Verze
locked_documents: Zamčené dokumenty
open_approvals: Procesy ke schválení
label_maximum_ajax_upload_filesize: Maximální velikost souboru nahratelná přes AJAX
note_maximum_ajax_upload_filesize: Omezuje velikost souboru, který může být nahrán přes standardní rozhraní AJAX, jinak se použije standarní rozhraní Redminu. Číslo je MB.
note_maximum_ajax_upload_filesize: Omezuje velikost souboru, který může být nahrán přes standardní rozhraní AJAX, jinak se použije standardní rozhraní Redminu. Číslo je v MB.
label_classic: Klasický
label_drag_drop: "Drag&Drop"

View File

@ -4,7 +4,7 @@
#
# Copyright (C) 2011 Terrence Miller
# Copyright (C) 2013 Christian Wetting <christian.wetting@kontron.com>
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -94,11 +94,7 @@ de:
label_email_body: Text
label_email_send: Senden
title_notifications_active: Benachrichtigungen sind aktiv
label_file_size: Dateigröße
heading_file_upload: Upload
note_uploaded_maximum_files_at_once: "Es können maximal %{number} Dateien auf einmal hochgeladen werden."
note_upload_files_greater_than_two_gb: Um Dateien größer 2GB hochzuladen, brauchst du einen 64bit-Browser.
submit_upload_files: Upload
label_upload: Upload
heading_new_folder: Neuer Ordner
label_title: Titel
label_description: Beschreibung
@ -109,7 +105,7 @@ de:
select_option_deactivated: Aus
select_option_activated: Ein
label_title_format: Title format
text_title_format: "Format des Dokumente-Titels für Speichern (%t - Titel, %d - Datum, %v - Version, %i - ID, %r - Revision). z.B.: %t_%v"
text_title_format: "Format des Dokumente-Titels für Speichern (%t - Titel, %f - Datei, %d - Datum, %v - Version, %i - ID, %r - Revision). z.B.: %t_%v"
title_save_preferences: Einstellungen speichern
heading_revisions: Versionen
title_download: Download
@ -219,7 +215,6 @@ de:
warning_folder_not_locked: Der Ordner konnte nicht gesperrt werden
notice_folder_unlocked: Der Ordner wurde erfolgreich entsperrt
error_only_user_that_locked_folder_can_unlock_it: Sie haben keine Berechtigung zur Entsperrung des Ordners
title_folder_parent_locked: "Übergeordnetes Verzeichnis %{name} ist gesperrt"
title_unlock_folder: Ordner zur Bearbeitung durch andere Benutzer entsperren
title_lock_folder: Ordner zum Schutz vor Bearbeitung durch andere Benutzer sperren
@ -268,12 +263,12 @@ de:
info_revision: "r%{rev}"
link_workflow: Workflow
notice_workflow_started: Genehmigungs-Workflow gestartet
text_email_subject_approved: "Genehmigungs-Workflow %{name} genehmigt"
text_email_subject_rejected: "Genehmigungs-Workflow %{name} abgelehnt"
text_email_subject_delegated: "Genehmigungs-Workflow %{name} deligiert"
text_email_subject_requires_approval: "Genehmigungs-Workflow %{name} benötigt deine Genehmigung"
text_email_subject_updated: "Genehmigungs-Workflow %{name} bearbeitet"
text_email_subject_started: "Genehmigungs-Workflow %{name} gestartet"
text_email_subject_approved: genehmigt
text_email_subject_rejected: abgelehnt
text_email_subject_delegated: deligiert
text_email_subject_requires_approval: benötigt deine Genehmigung
text_email_subject_updated: bearbeitet
text_email_subject_started: gestartet
text_email_finished_approved: "Der Genehmigungs-Workflow '%{name}' zugewiesen an die Datei '%{filename}' ist abgeschlossen und die Datei wurde genehmigt."
text_email_finished_rejected: "Der Genehmigungs-Workflow '%{name}' zugewiesen an die Datei '%{filename}' ist abgeschlossen, aber die Datei wurde abgelehnt, weil: '%{notice}'."
text_email_finished_delegated: "Der Genehmigungs-Workflow '%{name}' zugewiesen an die Datei '%{filename}' wurde an dich deligiert, weil: '%{notice}' und weil deine Zustimmung im aktuellen Genehmigungsschritt benötigt wird."
@ -302,10 +297,10 @@ de:
label_target_project: Zielprojekt
label_source_project: Quellprojekt
text_email_doc_updated_subject: "Dokumente im Projekt %{project} wurden aktualisiert"
text_email_doc_updated_subject: Dokumente wurden aktualisiert
text_email_doc_updated: hat folgende Dokumente bearbeitet
text_email_doc_follows: wie folgt
text_email_doc_deleted_subject: "Dokumente im Projekt %{project} wurden gelöscht"
text_email_doc_deleted_subject: Dokumente wurden gelöscht
text_email_doc_deleted: hat folgende Dokumente gelöscht
label_links_only: nur Verknüpfungen
@ -324,13 +319,16 @@ de:
error_resource_or_parent_locked: Unable to complete lock - resource (or parent) is locked
error_parent_locked: Unable to complete lock - resource parent is locked
error_resource_locked: Unable to complete lock - resource is locked
error_lock_exclusively: unable to lock exclusively an already-locked resource
error_lock_exclusively: Unable to lock exclusively an already-locked resource
error_unlock_parent_locked: Unlock failed - resource parent is locked
my:
blocks:
field_dmsf_tree_view: Navigate folders in a tree
label_dmsf_version: Version
locked_documents: Gesperrte Dateien
open_approvals: Offene Genehmigungs-Workflows
label_maximum_ajax_upload_filesize: Maximale Dateigröße für den Upload via AJAX
note_maximum_ajax_upload_filesize: Maximale Dateigröße für den Upload über die AJAX-Schnittstelle. Für größere Dateien muss der Standard-Uploader von Redmine verwendet werden. Angabe in MB.
label_classic: Klassisch
label_drag_drop: "Drag&Drop"

View File

@ -4,7 +4,7 @@
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -94,11 +94,7 @@ en:
label_email_body: Body
label_email_send: Send
title_notifications_active: Notifications active
label_file_size: File size
heading_file_upload: Upload
note_uploaded_maximum_files_at_once: "There can be uploaded maximum of %{number} files at once."
note_upload_files_greater_than_two_gb: To upload files greater than 2GB you must have 64b browser.
submit_upload_files: Upload
label_upload: Upload
heading_new_folder: New Folder
label_title: Title
label_description: Description
@ -109,7 +105,7 @@ en:
select_option_deactivated: Deactivated
select_option_activated: Activated
label_title_format: Title format
text_title_format: "Document title format for download (%t - title, %d - date, %v - version, %i - ID, %r - revision). Example: %t_%v"
text_title_format: "Document title format for download (%t - title, %f - file, %d - date, %v - version, %i - ID, %r - revision). Example: %t_%v"
title_save_preferences: Save preferences
heading_revisions: Revisions
title_download: Download
@ -219,7 +215,6 @@ en:
warning_folder_not_locked: Unfortunately, the folder could not be locked
notice_folder_unlocked: The folder was successfully unlocked
error_only_user_that_locked_folder_can_unlock_it: You are not authorised to unlock this folder
title_folder_parent_locked: "Parent folder %{name} is locked"
title_unlock_folder: Unlock to allow changes for other members
title_lock_folder: Lock to prevent changes for other members
@ -268,12 +263,12 @@ en:
info_revision: "r%{rev}"
link_workflow: Workflow
notice_workflow_started: Approval workflow successfully started
text_email_subject_approved: "Approval workflow %{name} approved"
text_email_subject_rejected: "Approval workflow %{name} rejected"
text_email_subject_delegated: "Approval workflow %{name} delegated"
text_email_subject_requires_approval: "Approval workflow %{name} requires your approval"
text_email_subject_updated: "Approval workflow %{name} updated"
text_email_subject_started: "Approval workflow %{name} started"
text_email_subject_approved: approved
text_email_subject_rejected: rejected
text_email_subject_delegated: delegated
text_email_subject_requires_approval: requires your approval
text_email_subject_updated: updated
text_email_subject_started: started
text_email_finished_approved: "The approval workflow '%{name}' assigned to '%{filename}' document has just been finished and the document has been approved."
text_email_finished_rejected: "The approval workflow '%{name}' assigned to '%{filename}' document has just been finished and the document has been rejected because of '%{notice}'."
text_email_finished_delegated: "The approval workflow '%{name}' assigned to '%{filename}' document has just been delegated because of '%{notice}' and you are expected to do an approval in the current approval step."
@ -302,10 +297,10 @@ en:
label_target_project: Target project
label_source_project: Source project
text_email_doc_updated_subject: "Documents of %{project} updated"
text_email_doc_updated_subject: Documents updated
text_email_doc_updated: has just actualized documents of
text_email_doc_follows: as follows
text_email_doc_deleted_subject: "Documents of %{project} deleted"
text_email_doc_deleted_subject: Documents deleted
text_email_doc_deleted: has just deleted documents of
label_links_only: links only
@ -324,13 +319,16 @@ en:
error_resource_or_parent_locked: Unable to complete lock - resource (or parent) is locked
error_parent_locked: Unable to complete lock - resource parent is locked
error_resource_locked: Unable to complete lock - resource is locked
error_lock_exclusively: unable to lock exclusively an already-locked resource
error_lock_exclusively: Unable to lock exclusively an already-locked resource
error_unlock_parent_locked: Unlock failed - resource parent is locked
my:
blocks:
field_dmsf_tree_view: Navigate folders in a tree
label_dmsf_version: Version
locked_documents: Locked documents
openap_provals: Open approvals
open_approvals: Open approvals
label_maximum_ajax_upload_filesize: Maximum file size uploadable via AJAX
note_maximum_ajax_upload_filesize: Limits maximum file size that can uploaded via standard AJAX interface otherwise Redmine standard upload form must be used. Number is in MB.
label_classic: Classic
label_drag_drop: "Drag&Drop"

View File

@ -4,7 +4,7 @@
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2015 Agustin Ivorra <agustinivorra@gmail.com>
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -94,11 +94,7 @@ es:
label_email_body: Cuerpo de Mensaje
label_email_send: Enviar
title_notifications_active: Activar Notificaciones
label_file_size: Tamaño de Archivo
heading_file_upload: Subir
note_uploaded_maximum_files_at_once: "El número máximo de una subida de archivos es %{number}."
note_upload_files_greater_than_two_gb: Para subir archivos mayores a 2GB debe tener un navegador web de 64bits.
submit_upload_files: Subir
label_upload: Subir
heading_new_folder: Nuevo directorio
label_title: Título
label_description: Descripción
@ -109,7 +105,7 @@ es:
select_option_deactivated: Desactivado
select_option_activated: Activado
label_title_format: Title format
text_title_format: "Document title format for download (%t - title, %d - date, %v - version, %i - ID, %r - revision). Example: %t_%v"
text_title_format: "Document title format for download (%t - title, %f - file, %d - date, %v - version, %i - ID, %r - revision). Example: %t_%v"
title_save_preferences: Guardar Preferencias
heading_revisions: Revisiones
title_download: Descargar
@ -219,7 +215,6 @@ es:
warning_folder_not_locked: Desafortunadamente, el directorio no se pudo bloquear
notice_folder_unlocked: El directorio se desbloqueó exitosamente
error_only_user_that_locked_folder_can_unlock_it: No está autorizado para desbloquearel directorio
title_folder_parent_locked: "Directorio padre %{name} está bloqueado"
title_unlock_folder: Desbloquear para que sea editado por otros miembros
title_lock_folder: Bloquear para evitar que sea editado por otros miembros
@ -268,12 +263,12 @@ es:
info_revision: "r%{rev}"
link_workflow: Flujo de Trabajo
notice_workflow_started: "Flujo de trabajo de aprobación iniciado satisfactoriamente"
text_email_subject_approved: "Flujo de trabajo de aprobación %{name} aprobado"
text_email_subject_rejected: "Flujo de trabajo de aprobación %{name} rechazado"
text_email_subject_delegated: "Flujo de trabajo de aprobación %{name} delegado"
text_email_subject_requires_approval: "Flujo de trabajo de aprobación %{name} requiere su aprobación"
text_email_subject_updated: "Flujo de trabajo de aprobación %{name} actualizado"
text_email_subject_started: "Flujo de trabajo de aprobación %{name} comenzado"
text_email_subject_approved: aprobado
text_email_subject_rejected: rechazado
text_email_subject_delegated: delegado
text_email_subject_requires_approval: requiere su aprobación
text_email_subject_updated: actualizado
text_email_subject_started: comenzado
text_email_finished_approved: "El flujo de trabajo de aprobación '%{name}' asignado al documento '%{filename}' acaba de ser terminado y él ha sido aprobado."
text_email_finished_rejected: "El flujo de trabajo de aprobación '%{name}' asignado al documento '%{filename}' acaba de ser terminado y él ha sido rechazado por el siguiente motivo '%{notice}'."
text_email_finished_delegated: "El flujo de trabajo de aprobación '%{name}' asignado al documento '%{filename}' acaba de ser delegado por '%{notice}' y se espera que haga una aprobación en la etapa de aprobación actual."
@ -302,10 +297,10 @@ es:
label_target_project: Proyecto destino
label_source_project: Proyecto fuente
text_email_doc_updated_subject: "Documentos de %{project} actualizados"
text_email_doc_updated_subject: Documentos actualizados
text_email_doc_updated: acaba de actualizar los ducumentos de
text_email_doc_follows: lo siguiente
text_email_doc_deleted_subject: "Documentos de %{project} eliminados"
text_email_doc_deleted_subject: Documentos eliminados
text_email_doc_deleted: acaba de eliminar documentos de
label_links_only: Solo enlaces
@ -324,13 +319,16 @@ es:
error_resource_or_parent_locked: Unable to complete lock - resource (or parent) is locked
error_parent_locked: Unable to complete lock - resource parent is locked
error_resource_locked: Unable to complete lock - resource is locked
error_lock_exclusively: unable to lock exclusively an already-locked resource
error_lock_exclusively: Unable to lock exclusively an already-locked resource
error_unlock_parent_locked: Unlock failed - resource parent is locked
my:
blocks:
field_dmsf_tree_view: Navigate folders in a tree
label_dmsf_version: Versión
locked_documents: Documentos bloqueados
open_approvals: Aprobaciones abiertas
label_maximum_ajax_upload_filesize: "El máximo tamaño de archivo para subir por AJAX"
note_maximum_ajax_upload_filesize: "El límite máximo de tamaño de archivo que puede ser subido por la interfaz AJAX estandar, de lo contrario se debe utilizar el formulario estandar de Redmine. El número es en MB."
label_classic: Classic
label_drag_drop: "Drag&Drop"

View File

@ -5,7 +5,7 @@
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2014 Atmis
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -94,11 +94,7 @@ fr:
label_email_body: Message
label_email_send: Envoyer
title_notifications_active: Notifications actives
label_file_size: Taille du fichier
heading_file_upload: Déposer des fichiers
note_uploaded_maximum_files_at_once: "Seulement %{number} fichiers peuvent être déposés à la fois."
note_upload_files_greater_than_two_gb: "Afin de transmettre des fichiers de plus de 2Go, l'utilisation d'un navigateur de 64Bits est nécessaire."
submit_upload_files: Transmission
label_upload: Transmission
heading_new_folder: Nouveau Dossier
label_title: Titre
label_description: Description
@ -109,7 +105,7 @@ fr:
select_option_deactivated: Désactivé
select_option_activated: Activé
label_title_format: Title format
text_title_format: "Document title format for download (%t - title, %d - date, %v - version, %i - ID, %r - revision). Example: %t_%v"
text_title_format: "Document title format for download (%t - title, %f - file, %d - date, %v - version, %i - ID, %r - revision). Example: %t_%v"
title_save_preferences: Enregistrer les préférences
heading_revisions: Révisions
title_download: Télécharger
@ -219,7 +215,6 @@ fr:
warning_folder_not_locked: Echec du verrouillage du dossier
notice_folder_unlocked: Le dossier a été déverrouillé
error_only_user_that_locked_folder_can_unlock_it: "Vous n'êtes autorisé à déverrouiller ce dossier"
title_folder_parent_locked: "Le dossier parent %{name} verrouillé"
title_unlock_folder: Déverrouiller afin de permettre la modification par les membres du projet
title_lock_folder: "Verrouiller afin d'empêcher les modifications du dossier"
@ -268,12 +263,12 @@ fr:
info_revision: "r%{rev}"
link_workflow: Flux
notice_workflow_started: Flux de validation démarré avec succès
text_email_subject_approved: "Flux de validation %{name} approuvé"
text_email_subject_rejected: "Flux de validation %{name} rejeté"
text_email_subject_delegated: "Flux de validation %{name} délégué"
text_email_subject_requires_approval: "Flux de validation %{name} requiert votre approbation"
text_email_subject_updated: "Flux de validation %{name} mis à jour"
text_email_subject_started: "Flux de validation %{name} démarré"
text_email_subject_approved: approuvé
text_email_subject_rejected: rejeté
text_email_subject_delegated: délégué
text_email_subject_requires_approval: requiert votre approbation
text_email_subject_updated: mis à jour
text_email_subject_started: démarré
text_email_finished_approved: "Le flux de validation '%{name}' assigné au document '%{filename}' vient de se terminer et le document a été approuvé."
text_email_finished_rejected: "Le flux de validation '%{name}' assigné au document '%{filename}' vient de se terminer et le document a été rejeté pour la raison '%{notice}'."
text_email_finished_delegated: "Le flux de validation '%{name}' assigné au document '%{filename}' a été délégué pour la raison '%{notice}' et vous êtes tenu d'approuver l'étape actuelle."
@ -302,10 +297,10 @@ fr:
label_target_project: Projet cible
label_source_project: Projet source
text_email_doc_updated_subject: "Documents de %{project} mis à jour"
text_email_doc_updated_subject: Documents mis à jour
text_email_doc_updated: a mis à jour des documents de
text_email_doc_follows: comme suit
text_email_doc_deleted_subject: "Documents de %{project} supprimés"
text_email_doc_deleted_subject: Documents supprimés
text_email_doc_deleted: a supprimé des documents de
label_links_only: liens seulement
@ -324,13 +319,16 @@ fr:
error_resource_or_parent_locked: Unable to complete lock - resource (or parent) is locked
error_parent_locked: Unable to complete lock - resource parent is locked
error_resource_locked: Unable to complete lock - resource is locked
error_lock_exclusively: unable to lock exclusively an already-locked resource
error_lock_exclusively: Unable to lock exclusively an already-locked resource
error_unlock_parent_locked: Unlock failed - resource parent is locked
my:
blocks:
field_dmsf_tree_view: Navigate folders in a tree
label_dmsf_version: Version
locked_documents: Documents verrouillés
open_approvals: Approbations en attente
label_maximum_ajax_upload_filesize: Taille maximale de fichier pour téléversement via AJAX
note_maximum_ajax_upload_filesize: "Taille maximale, en méga octets, de fichier pour téléversement via l'interface standard AJAX. Sinon l'interface standard de Redmine doit être utilisée."
label_classic: Classic
label_drag_drop: "Drag&Drop"

334
config/locales/it.yml Normal file
View File

@ -0,0 +1,334 @@
# encoding: utf-8
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-15 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.
it: # Italian strings thx 2 Matteo Arceci!
dmsf: DMSF
label_dmsf_file_plural: Documenti
label_dmsf_file_revision_plural: Revisioni al documento
label_dmsf_file_revision_access_plural: Accessi al documento
warning_no_entries_selected: Nessun documento selezionato
error_email_to_must_be_entered: Deve essere inserito l'indirizzo email
warning_file_already_locked: Documento già bloccato
notice_file_locked: Documento bloccato
warning_file_not_locked: Documento non bloccato
notice_file_unlocked: Documento sbloccato
error_only_user_that_locked_file_can_unlock_it: Solo chi ha bloccato il documento può sbloccarlo
error_max_files_exceeded: "Superato il limite di %{number} documenti per il download simultaneo"
error_entry_project_does_not_match_current_project: "Il progetto non corrisponde al progetto corrente"
notice_folder_created: Cartella creata
error_folder_creation_failed: Creazione cartella fallita
error_folder_title_must_be_entered: Deve essere inserito il titolo
notice_folder_deleted: Cartella cancellata
error_folder_is_not_empty: La cartella non è vuota
error_folder_title_is_already_used: Il titolo è già in uso
notice_folder_details_were_saved: I dettagli della cartella sono stati salvati
error_folder_is_locked: La cartella è bloccata
error_file_is_locked: Il documento è bloccato
notice_file_deleted: Il documento è stato cancellato
error_at_least_one_revision_must_be_present: Deve essere presente almeno una revisione
notice_revision_deleted: Revisione cancellata
warning_one_of_files_locked: Uno dei documenti è bloccato
notice_file_unlocked: Documento sbloccato
notice_file_revision_created: Revisione del documento creata
notice_your_preferences_were_saved: Le tue preferenze sono state salvate
notice_your_preferences_were_not_saved: Le tue preferenze non sono state salvate
warning_folder_notifications_already_activated: La notifica su cartella è già attiva
notice_folder_notifications_activated: La notifica su cartella è stata attivata
warning_folder_notifications_already_deactivated: La notifica su cartella è già disattiva
notice_folder_notifications_deactivated: La notifica su cartella è stat disattivata
warning_file_notifications_already_activated: La notifica su documento è già attiva
notice_file_notifications_activated: La notifica su documento è stata attivata
warning_file_notifications_already_deactivated: La notifica su documento è già disattiva
notice_file_notifications_deactivated: La notifica su documento è disattiva
link_details: "%{title} dettagli"
link_edit: "Modifica %{title}"
submit_create: Creato
link_create_folder: Creata cartella
title_check_uncheck_all_for_zip_download_or_email: Seleziona/Deseleziona tutto per lo zip, download o email
title_check_uncheck_all_for_restore_or_delete: Seleziona/Deseleziona tutto per ripristinare o cancellare
link_title: Nome documento
link_size: Dimensioni
link_modified: Modificato
link_ver: Ver.
link_author: Autore
title_check_for_zip_download_or_email: Seleziona per zip, download o email
title_check_for_restore_or_delete: Seleziona per ripristinare o cancellare
title_delete: Cancella
title_notifications_active_deactivate: "Notifiche attive: Disattiva"
title_notifications_not_active_activate: "Notifiche disattivate: Attiva"
title_title_version_version_download: "%{title} versione %{version} download"
title_locked_by_user: "Bloccato da %{user}"
title_locked_by_you: Bloccato da te
title_waiting_for_approval: In attesa di Approvazione
title_approved: Approvato
title_unlock_file: Sblocca per consentire modifiche degli altri membri
title_lock_file: Blocca per evitare modifiche degli altri membri
title_download_checked: Download selezionati in archivio Zip
title_send_checked_by_email: Selezionati spediti per email
link_user_preferences: Le tue preferenze DMSF di progetto
heading_send_documents_by_email: Documenti spediti per email
label_email_from: Da
label_email_to: A
label_email_cc: CC
label_email_subject: Oggetto
label_email_documents: Documenti
label_email_body: Corpo
label_email_send: Spedisci
title_notifications_active: Notifiche attive
label_upload: Carica
heading_new_folder: Nuova cartella
label_title: Titolo
label_description: Descrizione
submit_save: Salva
info_file_locked: Documento bloccato!
label_notifications: Notifiche
select_option_default: Default
select_option_deactivated: Disattivato
select_option_activated: Attivato
label_title_format: Titolo formattato
text_title_format: "Titolo del documento formattato per il download (%t - titolo, %d - data, %v - versione, %i - ID, %r - revisione). Esempio: %t_%v"
title_save_preferences: Salva preferenze
heading_revisions: Revisioni
title_download: Download
title_delete_revision: Cancella revisione
label_created: Creato
label_changed: Modificato
info_changed_by_user: "%{changed} da"
label_filename: Nome file
label_mime: Mime
label_size: Dimensioni
heading_new_revision: Nuova revisione
option_version_same: Stessa
option_version_minor: Miniore
option_version_major: Maggiore
option_version_custom: Personalizzata
label_new_content: Nuovo contenuto
label_maximum_files_upload: Limite di caricamento
note_maximum_number_of_files_uploaded: Limita il numero massimo di documenti caricati alla volta. 0 significa senza limiti.
label_maximum_files_download: Numero massimo di documenti scaricabili
note_maximum_number_of_files_downloaded: Limita il numero massimo di documenti scaricabili in archivio zip o spediti via email. 0 significa senza limiti.
label_file_storage_directory: Cartella dei documenti
label_index_database: Indice database
label_stemming_language: Linguaggio di Stemming
note_possible_values: Valori possibili
note_pass_none_to_disable_stemming: "passa 'nulla' per disabilitare lo stemming"
label_stem_strategy: Strategia dello Stem
option_stem_none: Stem nulla (default)
option_stem_some: Stem qualcosa
option_stem_all: Stem tutto
label_stemming_description: Questo controlla come il parser delle query applica l'algoritmo di Stemming. Il valore di default è STEM_NONE. I valori possibili sono
note_do_not_stem: "Non fare alcun stemming."
note_stem_some: Cerca per termini 'Stemmed' ad eccezione di quelli che iniziano con la lettera maiuscola, o sono seguiti da alcuni caratteri, o vengono utilizzati con gli operatori che hanno bisogno di informazioni di posizione. I termini 'Stemmed' hanno il prefisso 'Z'.
note_stem_all: "Cerca per termini 'Stemmed' di tutte le parole (nota: non viene aggiunto alcun prefisso 'Z')."
note_stemming_applied: Si noti che l'algoritmo di 'Stemming' viene applicato solo alle parole nei campi probabilistici - termini con filtro booleano non sono compresi.
label_default_notifications: Notifica di default dei documenti
heading_uploaded_files: Documenti caricati
submit_commit: Invia/Salva
link_documents: Documenti
permission_view_dmsf_file_revision_accesses: Visualizza i download nel flusso di attività
permission_view_dmsf_file_revisions: Visualizza le revisioni nel flusso di attività
permission_view_dmsf_folders: Sfoglia i documenti
permission_user_preferences: Preferenze
permission_view_dmsf_files: Visualizza i documenti
permission_folder_manipulation: Modifica la cartella
permission_file_manipulation: Modifica il documento
permission_force_file_unlock: Forza lo sblocco del documento
permission_manage_workflows: Gestisci i flussi di lavoro
permission_file_delete: Elimina i documenti
label_file: Documento
field_folder: Cartella
error_create_cycle_in_folder_dependency: crea un ciclo nella dipendenza della cartella
error_contains_invalid_character: contiene carattere(i) non validi
error_file_commit_require_uploaded_file: L'aggiornamento del documento richiede un documento già caricato in precedenza
warning_some_files_were_not_commited: "Alcuni documenti non sono stati aggiornati a causa di errori di validazione: %{files}"
error_user_has_not_right_delete_folder: "L'utente non ha i diritti per eliminare le cartelle"
error_user_has_not_right_delete_file: "L'utente non ha i diritti per eliminare il documento"
notice_entries_deleted: Voci eliminate
warning_some_entries_were_not_deleted: "Alcune voci non sono state eliminate: %{entries}"
title_delete_checked: Elimina i selezionati
title_items: elementi
title_filename_for_download: Nome file utilizzato per il download o nell'archivio Zip
label_number_of_folders: Cartelle
label_number_of_documents: Documenti
error_file_storage_directory_does_not_exist: "La cartella di archiviazione non esiste e non può essere creata"
error_file_can_not_be_created: "Il documento non può essere creato nella cartella di archiviazione"
error_wrong_zip_encoding: Errato encoding dello Zip
warning_xapian_not_available: Xapian non disponibile
menu_dmsf: Documenti
label_physical_file_delete: File fisico eliminato
user_is_not_project_member: Non sei un membro del progetto
heading_access_downloads_emails: Downloads/Emails
heading_access_first: Primo
heading_access_last: Ultimo
label_dmsf_updated: Aggiornato
label_dmsf_downloaded: Scaricato
title_total_size_of_all_files: Dimensione totale di tutti i files in questa cartella
project_module_dmsf: DMSF
warning_no_project_to_copy_file_to: Nessun progetto nel quale copiare il documento
comment_copied_from: "Copiato da %{source}"
notice_file_copied: Documento copiato
notice_file_moved: Documento spostato
field_target_project: Progetto di destinazione
field_target_folder: Cartella di destinazione
title_copy_or_move: Copia/Sposta
label_dmsf_folder_plural: Cartelle
comment_moved_from: "Spostato da %{source}"
error_target_folder_same: La cartella di destinazione ed il progetto sono gli stessi di adesso
error_file_cannot_be_moved: "Il documento non può essere spostato"
error_file_cannot_be_copied: "Il documento non può essere copiato"
warning_no_project_to_copy_folder_to: Nessun progetto dove copiare la cartella
title_copy: Copia
error_folder_cannot_be_copied: "La cartella non può essere copiata"
notice_folder_copied: Cartella copiata
error_max_email_filesize_exceeded: "Hai superato la dimensione massima del file per l'invio tramite e-mail. (%{number} MB)"
note_maximum_email_filesize: Limiti di dimensione massima dei file che possono essere inviati via e-mail. 0 significa illimitato. Il numero è in MB.
label_maximum_email_filesize: Dimensione massima degli allegati delle e-mail
header_minimum_filesize: Errore file.
error_minimum_filesize: "Il file %{file} è 0 bytes e non sarà allegato."
parent_directory: Cartella superiore
note_webdav: "Una volta abilitato il Webdav può essere contattato sul percorso %{protocol}://%{domain}/dmsf/webdav/[project identifier]"
label_webdav: Funzionalità Webdav
label_dmsf_plural: "Copia documenti e cartelle (%{files} documenti in %{folders} cartelle)"
warning_folder_already_locked: Questa cartella è già bloccata
notice_folder_locked: La cartella è stata bloccata
warning_folder_not_locked: Purtroppo la cartella non può essere bloccata
notice_folder_unlocked: La cartella è stata sbloccata
error_only_user_that_locked_folder_can_unlock_it: Non sei autorizzato a sbloccare questa cartella
title_unlock_folder: Sblocca per consentire modifiche agli altri membri
title_lock_folder: Blocca per evitare modifiche da parte di altri membri
select_option_webdav_readonly: Sola lettura
select_option_webdav_readwrite: Lettura/Scrittura
label_webdav_strategy: Strategia Webdav
note_webdav_strategy: Abilita l'amministratore a decidere se Webdav è di sola lettura oppure lettura-scrittura per gli utenti finali.
error_unable_delete_dmsf_workflow: Impossibile eliminare il flusso di lavoro
error_empty_note: "La nota non può essere vuota"
error_workflow_assign: C'è stato un errore durante l'assegnazione
error_cannot_start_workflow: "Il flusso di lavoro non può partire"
error_cannot_renumber_steps: "I passi non possono essere numerati"
label_dmsf_workflow_new: Nuova 'approvazione di flusso di lavoro'
field_label_dmsf_workflow: Approvazione di flusso di lavoro
field_label_dmsf_workflow_name: Nome per l'approvazione di flusso di lavoro
label_dmsf_workflow_plural: Approvazioni flusso di lavoro
label_dmsf_workflow_plural_num: Approvazioni flusso di lavoro (%{count})
label_dmsf_workflow_step: Passo
label_dmsf_workflow_step_plural: Passi
label_dmsf_workflow_approval: Approvazione
label_dmsf_workflow_approval_plural: Approvazioni
label_dmsf: DMSF
label_dmsf_wokflow_action_approve: Approva
label_dmsf_wokflow_action_reject: Rifiuta
label_dmsf_wokflow_action_delegate: Delega a
label_dmsf_wokflow_action_assign: Assegna un 'approvazione di flusso di lavoro'
label_dmsf_wokflow_action_start: Inizia un flusso di lavoro
label_dmsf_workflow_add_approver: "Aggiungi un nuovo approvatore con funzioni logiche:"
label_or: oppure
label_action: Azione
label_note: Note
title_none: Nessuno
title_rejection: Rifiuto
title_delegation: Delega
title_assignment: Assegnazione
title_start: Inizio
title_dmsf_workflow_log: Log di approvazione di flusso di lavoro
title_assigned: Assegnato
title_approval: Approvazione
title_rejected: Rifiutato
dmsf_and: AND
dmsf_or: OR
dmsf_new_step: Nuovo passo
message_dmsf_wokflow_note: La tua nota...
info_revision: "r%{rev}"
link_workflow: Flusso di lavoro
notice_workflow_started: Approvazione di flusso di lavoro inizializzato
text_email_subject_approved: "Approvazione di flusso di lavoro %{name} approvato"
text_email_subject_rejected: "Approvazione di flusso di lavoro %{name} rifiutato"
text_email_subject_delegated: "Approvazione di flusso di lavoro %{name} delegato"
text_email_subject_requires_approval: "Approvazione di flusso di lavoro %{name} richiede la tua approvazione"
text_email_subject_updated: "Approvazione di flusso di lavoro %{name} aggiornato"
text_email_subject_started: "Approvazione di flusso di lavoro %{name} inizializzato"
text_email_finished_approved: "L'approvazione di flusso di lavoro '%{name}' assegnato a '%{filename}' è stata completata ed il documento è stato approvato."
text_email_finished_rejected: "L'approvazione di flusso di lavoro '%{name}' assegnato a '%{filename}' è stata completata ma il documento è stato rifiutato a causa di '%{notice}'."
text_email_finished_delegated: "L'approvazione di flusso di lavoro '%{name}' assegnato a '%{filename}' è stata delegata a causa di '%{notice}' e sei tenuto ad approvare nel passo corrente."
text_email_finished_step: "L'approvazione di flusso di lavoro '%{name}' assegnato a '%{filename}' ha completato uno dei passi di approvazione e sei tenuto ad approvare il prossimo passo."
text_email_finished_step_short: "L'approvazione di flusso di lavoro '%{name}' assegnato a '%{filename}' ha completato uno dei passi di approvazione."
text_email_started: "L'approvazione di flusso di lavoro '%{name}' assegnato a '%{filename}' è stato inizializzato e sei tenuto ad approvare il passo corrente."
text_email_to_proceed: Per proseguire clicca sull'icona checkbox a fianco del documento
text_email_to_see_history: Per vedere la storia di approvazione clicca sullo stato del flusso di lavoro del documento
text_email_to_see_status: Per vedere lo stato attuale del flusso di lavoro di approvazione clicca sullo stato del flusso di lavoro del documento
label_my_open_approvals: Le mie approvazioni aperte
label_my_locked_documents: I miei documenti bloccati
title_create_link: Crea un collegamento
label_link_from: Collegamento da
label_link_to: Collegamento a
label_notifications_on: Attiva notifiche
label_notifications_off: Disattiva notifiche
field_target_file: Scarica sorgente
title_download_entries: Scarica documenti
label_external: Esterno
label_link_name: Nome del collegamento
label_link_external_url: URL
label_target_folder: Cartella di destinazione
label_source_folder: Cartella sorgente
label_target_project: Progetto di destinazione
label_source_project: Progetto sorgente
text_email_doc_updated_subject: "Documenti del progetto %{project} caricati"
text_email_doc_updated: ha documenti appena attualizzati
text_email_doc_follows: come segue
text_email_doc_deleted_subject: "Documenti del progetto %{project} cancellati"
text_email_doc_deleted: ha documenti appena eliminati
label_links_only: solo colegamenti
label_display_notified_recipients: Visualizza i destinatari notificati
note_display_notified_recipients: L'utente sarà informato di tutti i destinatari appena inviato la notifica e-mail.
warning_email_notifications: "Notifica email inviata a %{to}"
link_trash_bin: Cestino
title_restore: Ripristina
notice_dmsf_file_restored: Il documento è stato ripristinato correttamente
notice_dmsf_folder_restored: La cartella è stata ripristinata correttamente
notice_dmsf_link_restored: Il collegamento è stato ripristinato correttamente
title_restore_checked: Ripristina selezionati
error_parent_folder: "La cartella padre non esiste"
error_resource_or_parent_locked: Impossibile completare il blocco - la risorsa (o superiore) è bloccata
error_parent_locked: Impossibile completare il blocco - la risorsa superiore è bloccata
error_resource_locked: Impossibile completare il blocco - la risorsa è bloccata
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
open_approvals: Approvazioni aperte
label_maximum_ajax_upload_filesize: Dimensione massima dei documenti caricabili tramite AJAX
note_maximum_ajax_upload_filesize: Limita la dimensione massima dei documenti che possono essere caricati tramite interfaccia standard AJAX altrimenti sarà necessario utilizzare il modulo standard di Redmine. Il numero è espresso in MB.
label_classic: Classic
label_drag_drop: "Drag&Drop"

View File

@ -3,7 +3,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
#
#
# This program is free software; you can redistribute it and/or
@ -94,11 +94,7 @@ ja:
label_email_body: 本文
label_email_send: 送信
title_notifications_active: 通知は有効です
label_file_size: ファイルサイズ
heading_file_upload: アップロード
note_uploaded_maximum_files_at_once: "最大 %{number} ファイルを一度にアップロードすることができます。"
note_upload_files_greater_than_two_gb: 2GB より大きいファイルをアップロードするには 64bit 対応ブラウザが必要です。
submit_upload_files: アップロード
label_upload: アップロード
heading_new_folder: 新規フォルダ
label_title: タイトル
label_description: 説明
@ -109,7 +105,7 @@ ja:
select_option_deactivated: 無効
select_option_activated: 有効
label_title_format: Title format
text_title_format: "Document title format for download (%t - title, %d - date, %v - version, %i - ID, %r - revision). Example: %t_%v"
text_title_format: "Document title format for download (%t - title, %f - file, %d - date, %v - version, %i - ID, %r - revision). Example: %t_%v"
title_save_preferences: 設定を保存します
heading_revisions: リビジョン
title_download: ダウンロードします
@ -158,7 +154,6 @@ ja:
permission_force_file_unlock: ファイルの強制ロック解除
permission_manage_workflows: ワークフロー管理
permission_file_delete: ファイルの削除
permission_file_approval: ファイルの承認
label_file: ファイル
field_folder: フォルダ
error_create_cycle_in_folder_dependency: フォルダの依存関係が循環しています
@ -220,7 +215,6 @@ ja:
warning_folder_not_locked: "フォルダをロックすることができませんでした"
notice_folder_unlocked: "フォルダのロックを解除しました"
error_only_user_that_locked_folder_can_unlock_it: "このフォルダのロックを解除する権限がありません"
title_folder_parent_locked: "親フォルダ %{name} はロックされています"
title_unlock_folder: "ロックを解除し他メンバが更新できるようにします"
title_lock_folder: "ロックし他メンバとの競合を回避します"
@ -269,12 +263,12 @@ ja:
info_revision: "r%{rev}"
link_workflow: ワークフロー
notice_workflow_started: 承認ワークフローが開始されました
text_email_subject_approved: "承認ワークフロー '%{name}' は承認されました"
text_email_subject_rejected: "承認ワークフロー '%{name}' は否認されました"
text_email_subject_delegated: "承認ワークフロー '%{name}' は代理承認が設定されました"
text_email_subject_requires_approval: "承認ワークフロー '%{name}' はあなたの承認待ちです"
text_email_subject_updated: "承認ワークフロー '%{name}' が更新されました"
text_email_subject_started: "承認ワークフロー '%{name}' が開始されました"
text_email_subject_approved: は承認されました
text_email_subject_rejected: は否認されました
text_email_subject_delegated: は代理承認が設定されました
text_email_subject_requires_approval: はあなたの承認待ちです
text_email_subject_updated: が更新されました
text_email_subject_started: が開始されました"
text_email_finished_approved: "承認ワークフロー '%{name}' において '%{filename}' が承認されました。"
text_email_finished_rejected: "承認ワークフロー '%{name}' において '%{filename}' が否認されました。理由:'%{notice}'。"
text_email_finished_delegated: "承認ワークフロー '%{name}' において代理承認が依頼されました。承認対象 '%{filename}' の内容をご確認の上、承認・否認のご判断をお願い致します(依頼主コメント:'%{notice}')。"
@ -294,18 +288,19 @@ ja:
label_notifications_off: 通知オフ
field_target_file: リンク元ファイル
title_download_entries: ダウンロード記録
label_external: 外部
label_link_name: リンク名
label_link_external_url: URL
label_target_folder: リンク先フォルダ
label_source_folder: リンク元フォルダ
label_target_project: リンク先プロジェクト
label_source_project: リンク元プロジェクト
label_external: 外部
text_email_doc_updated_subject: "プロジェクト'%{project}'のファイルが更新されました"
text_email_doc_updated_subject: プロジェクトのファイルが更新されました
text_email_doc_updated: が次のファイルを更新しました。
text_email_doc_follows: 対象ファイル:
text_email_doc_deleted_subject: "プロジェクト'%{project}'のファイルが削除されました"
text_email_doc_deleted_subject: プロジェクトのファイルが削除されました
text_email_doc_deleted: が次のプロジェクトのファイルを削除しました。
label_links_only: リンクのみ
@ -324,14 +319,16 @@ ja:
error_resource_or_parent_locked: Unable to complete lock - resource (or parent) is locked
error_parent_locked: Unable to complete lock - resource parent is locked
error_resource_locked: Unable to complete lock - resource is locked
error_lock_exclusively: unable to lock exclusively an already-locked resource
error_lock_exclusively: Unable to lock exclusively an already-locked resource
error_unlock_parent_locked: Unlock failed - resource parent is locked
my:
blocks:
field_dmsf_tree_view: Navigate folders in a tree
label_dmsf_version: バージョン
locked_documents: ロック中
open_approvals: 未承認
label_maximum_ajax_upload_filesize: アップロードファイルサイズ上限
note_maximum_ajax_upload_filesize: アップロード可能なファイルサイズの上限。AjaxおよびRedmineの仕様に制限される2ギガバイト程度までは確認済み単位はMB。
label_classic: Classic
label_drag_drop: "Drag&Drop"

View File

@ -4,9 +4,8 @@
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
# Polish translation created by Sebastian Białas <sbialas@bs-it.pl> www.bs-it.pl
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
@ -95,11 +94,7 @@ pl:
label_email_body: Treść
label_email_send: Wyślij
title_notifications_active: Powiadomienia aktywne
label_file_size: Rozmiar pliku
heading_file_upload: Prześlij
note_uploaded_maximum_files_at_once: "Można przesłać maksymalnie %{number} plików jednocześnie."
note_upload_files_greater_than_two_gb: Aby przesyłać pliki większe niż 2GB musisz posiadać 64bitową przeglądarkę.
submit_upload_files: Prześlij
label_upload: Prześlij
heading_new_folder: Nowy Folder
label_title: Tytuł
label_description: Opis
@ -109,7 +104,7 @@ pl:
select_option_default: Domyślny
select_option_deactivated: Wyłączono
label_title_format: Title format
text_title_format: "Document title format for download (%t - title, %d - date, %v - version, %i - ID, %r - revision). Example: %t_%v"
text_title_format: "Document title format for download (%t - title, %f - file, %d - date, %v - version, %i - ID, %r - revision). Example: %t_%v"
select_option_activated: Aktywowano
title_save_preferences: Zapisz ustawienia
heading_revisions: Wersje
@ -220,7 +215,6 @@ pl:
warning_folder_not_locked: Niestety folder nie może zostać zablokowany
notice_folder_unlocked: Folder został odblokowany
error_only_user_that_locked_folder_can_unlock_it: Nie posiadasz uprawnień do odblokowania tego folderu
title_folder_parent_locked: "Folder nadrzędny %{name} jest zablokowany"
title_unlock_folder: Odblokuj w celu umożliwienia wprowadzania zmian innym użytkownikom
title_lock_folder: Zablokuj aby zabezpieczyć przed wprowadzaniem zmian przez innych użytkowników
@ -238,6 +232,7 @@ pl:
field_label_dmsf_workflow: Proces akceptacji
field_label_dmsf_workflow_name: Nazwa procesu akceptacji
label_dmsf_workflow_plural: Procesy akceptacji
label_dmsf_workflow_plural_num: Procesy akceptacji (%{count})
label_dmsf_workflow_step: Krok
label_dmsf_workflow_step_plural: Kroki
label_dmsf_workflow_approval: Akceptacja
@ -268,12 +263,12 @@ pl:
info_revision: "r%{rev}"
link_workflow: Proces akceptacji
notice_workflow_started: Proces akceptacji został uruchomiony
text_email_subject_approved: "Proces akceptacji %{name} został zakończony akceptacją"
text_email_subject_rejected: "Proces akceptacji %{name} został odrzucony"
text_email_subject_delegated: "Proces akceptacji %{name} został delegowany"
text_email_subject_requires_approval: "Proces akceptacji %{name} wymaga Twojej akceptacji"
text_email_subject_updated: "Proces akceptacji %{name} został zaktualizowany"
text_email_subject_started: "Proces akceptacji %{name} został uruchomiony"
text_email_subject_approved: został zakończony akceptacją
text_email_subject_rejected: został odrzucony
text_email_subject_delegated: został delegowany
text_email_subject_requires_approval: wymaga Twojej akceptacji
text_email_subject_updated: został zaktualizowany
text_email_subject_started: został uruchomiony
text_email_finished_approved: "Proces akceptacji '%{name}' dokumentu '%{filename}' został właśnie zakończony. Dokument został zaakceptowany."
text_email_finished_rejected: "Proces akceptacji '%{name}' dokumentu '%{filename}' został właśnie zakończony. Dokument został odrzucony z powodu '%{notice}'."
text_email_finished_delegated: "Proces akceptacji '%{name}' dokumentu '%{filename}' został właśnie delegowany z powodu '%{notice}'. Zostałeś wskazany jako akceptujący w bieżącym kroku zatwierdzania."
@ -302,10 +297,10 @@ pl:
label_target_project: Projekt docelowy
label_source_project: Projekt źródłowy
text_email_doc_updated_subject: "Dokumenty projektu %{project} zostały zaktualizowane"
text_email_doc_updated_subject: Dokumenty zostały zaktualizowane
text_email_doc_updated: dokumenty zostały zaktualizowane
text_email_doc_follows: następujące
text_email_doc_deleted_subject: "Dokumenty projektu %{project} zostały usunięte"
text_email_doc_deleted_subject: Dokumenty zostały usunięte
text_email_doc_deleted: dokumenty zostały usunięte
label_links_only: odnośniki
@ -324,13 +319,16 @@ pl:
error_resource_or_parent_locked: Unable to complete lock - resource (or parent) is locked
error_parent_locked: Unable to complete lock - resource parent is locked
error_resource_locked: Unable to complete lock - resource is locked
error_lock_exclusively: unable to lock exclusively an already-locked resource
error_lock_exclusively: Unable to lock exclusively an already-locked resource
error_unlock_parent_locked: Unlock failed - resource parent is locked
my:
blocks:
field_dmsf_tree_view: Navigate folders in a tree
label_dmsf_version: Wersja
locked_documents: Dokumenty zablokowane
openap_provals: Otwarte procesy akceptacji
open_approvals: Otwarte procesy akceptacji
label_maximum_ajax_upload_filesize: Maximum file size uploadable via AJAX
note_maximum_ajax_upload_filesize: Limits maximum file size that can uploaded via standard AJAX interface otherwise Redmine standard upload form must be used. Number is in MB.
label_classic: Classic
label_drag_drop: "Drag&Drop"

View File

@ -4,7 +4,7 @@
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 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
@ -94,11 +94,7 @@ pt-BR:
label_email_body: Descrição
label_email_send: Enviar
title_notifications_active: Notificações Ativas
label_file_size: Tamanho do Arquivo
heading_file_upload: Envio
note_uploaded_maximum_files_at_once: "Não pode ser carregado o máximo de %{number} arquivo de apenas uma vez."
note_upload_files_greater_than_two_gb: Para fazer o upload maiores que 2GB você deve possuir sistema 64b.
submit_upload_files: Envio
label_upload: Envio
heading_new_folder: Nova Pasta
label_title: Taxonomia
label_description: Descrição
@ -109,7 +105,7 @@ pt-BR:
select_option_deactivated: Desativado
select_option_activated: Ativado
label_title_format: Title format
text_title_format: "Document title format for download (%t - title, %d - date, %v - version, %i - ID, %r - revision). Example: %t_%v"
text_title_format: "Document title format for download (%t - title, %f - file, %d - date, %v - version, %i - ID, %r - revision). Example: %t_%v"
title_save_preferences: Salvar preferências
heading_revisions: Revisões
title_download: Download
@ -219,7 +215,6 @@ pt-BR:
warning_folder_not_locked: A pasta não pode ser bloqueada
notice_folder_unlocked: A pasta foi desbloqueada com sucesso
error_only_user_that_locked_folder_can_unlock_it: Você não está autorizado a desbloquear esta pasta
title_folder_parent_locked: "A pasta %{name} está bloqueada"
title_unlock_folder: Clique aqui para desbloquear e permitir alterações por outros usuários
title_lock_folder: Clique aqui para impedir alterações por outros usuários
@ -268,12 +263,12 @@ pt-BR:
info_revision: "r%{rev}"
link_workflow: Workflow
notice_workflow_started: Workflow de aprovação foi iniciado com êxito
text_email_subject_approved: "Workflow de aprovação %{name}: aprovado"
text_email_subject_rejected: "Workflow de aprovação %{name} reprovado"
text_email_subject_delegated: "Workflow de aprovação %{name} atribuído para"
text_email_subject_requires_approval: "Workflow de aprovação %{name} requer sua aprovação"
text_email_subject_updated: "Workflow de aprovação %{name}: atualizado"
text_email_subject_started: "Workflow de aprovação %{name}: iniciado"
text_email_subject_approved: aprovado
text_email_subject_rejected: reprovado
text_email_subject_delegated: atribuído para
text_email_subject_requires_approval: requer sua aprovação
text_email_subject_updated: atualizado
text_email_subject_started: iniciado
text_email_finished_approved: "O workflow de aprovação'%{name}' definido para o documento '%{filename}' foi finalizado e o documento foi aprovado."
text_email_finished_rejected: "O workflow de aprovação '%{name}' definido para o documento '%{filename}' foi finalizado e o documento foi reprovado devido a '%{notice}'."
text_email_finished_delegated: "O workflow de aprovação '%{name}' definido para o documento '%{filename}' foi atribuido pois '%{notice}' e está aguardando a sua aprovação na etapa atual."
@ -302,10 +297,10 @@ pt-BR:
label_target_project: Target project
label_source_project: Source project
text_email_doc_updated_subject: "%{project} : Documentos atualizados"
text_email_doc_updated_subject: Documentos atualizados
text_email_doc_updated: atualizou os documentos da área
text_email_doc_follows: as follows
text_email_doc_deleted_subject: "%{project} : Exclusão de documentos"
text_email_doc_deleted_subject: Exclusão de documentos
text_email_doc_deleted: deletou os documentos da área
label_links_only: links only
@ -324,13 +319,16 @@ pt-BR:
error_resource_or_parent_locked: Unable to complete lock - resource (or parent) is locked
error_parent_locked: Unable to complete lock - resource parent is locked
error_resource_locked: Unable to complete lock - resource is locked
error_lock_exclusively: unable to lock exclusively an already-locked resource
error_lock_exclusively: Unable to lock exclusively an already-locked resource
error_unlock_parent_locked: Unlock failed - resource parent is locked
my:
blocks:
field_dmsf_tree_view: Navigate folders in a tree
label_dmsf_version: Versão
locked_documents: Documentos bloqueados
open_approvals: Aprovações abertas
label_maximum_ajax_upload_filesize: Maximum file size uploadable via AJAX
note_maximum_ajax_upload_filesize: Limits maximum file size that can uploaded via standard AJAX interface otherwise Redmine standard upload form must be used. Number is in MB.
label_classic: Classic
label_drag_drop: "Drag&Drop"

View File

@ -3,7 +3,7 @@
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
#
#
# This program is free software; you can redistribute it and/or
@ -94,11 +94,7 @@ ru:
label_email_body: Содержание
label_email_send: Отправить
title_notifications_active: Уведомления активны
label_file_size: Размер файла
heading_file_upload: Закачать
note_uploaded_maximum_files_at_once: "За один раз можно загрузить только %{number} файлов."
note_upload_files_greater_than_two_gb: Чтобы загружать файлы размером больше чем 2 Гб у вас должен быть 64-битный браузер.
submit_upload_files: Загрузить
label_upload: Закачать
heading_new_folder: Новая папка
label_title: Заголовок
label_description: Описание
@ -109,7 +105,7 @@ ru:
select_option_deactivated: Отключено
select_option_activated: Включено
label_title_format: Title format
text_title_format: "Document title format for download (%t - title, %d - date, %v - version, %i - ID, %r - revision). Example: %t_%v"
text_title_format: "Document title format for download (%t - title, %f - file, %d - date, %v - version, %i - ID, %r - revision). Example: %t_%v"
title_save_preferences: Сохранить настройки
heading_revisions: Редакции
title_download: Скачать
@ -219,7 +215,6 @@ ru:
warning_folder_not_locked: "К сожалению, папка не может быть заблокирована"
notice_folder_unlocked: "Папка была успешно разблокирована"
error_only_user_that_locked_folder_can_unlock_it: "Только пользователь, который заблокировал папку, может её разблокировать"
title_folder_parent_locked: "Родительская папка %{name} заблокирована"
title_unlock_folder: "Разблокируйте папку, чтобы разрешить изменение её другими участниками"
title_lock_folder: "Заблокируйте папку, чтобы запретить ёё изменение другими участниками"
@ -268,12 +263,12 @@ ru:
info_revision: "r%{rev}"
link_workflow: Согласование
notice_workflow_started: Процесс согласования успешно запущен
text_email_subject_approved: "Процесс согласования %{name} успешно завершен"
text_email_subject_rejected: "Процесс согласования %{name} отклонен"
text_email_subject_delegated: "Процесс согласования %{name} делегирован"
text_email_subject_requires_approval: "Процесс согласования %{name} требует вашего участия"
text_email_subject_updated: "Процесс согласования %{name} обновлен"
text_email_subject_started: "Процесс согласования %{name} запущен"
text_email_subject_approved: успешно завершен
text_email_subject_rejected: отклонен
text_email_subject_delegated: делегирован
text_email_subject_requires_approval: ребует вашего участия
text_email_subject_updated: обновлен
text_email_subject_started: запущен
text_email_finished_approved: "Процесс согласования '%{name}' документа '%{filename}' только что завершился и документ был согласован."
text_email_finished_rejected: "Процесс согласования '%{name}' документа '%{filename}' только что завершился и документ был отклонен по причине '%{notice}'."
text_email_finished_delegated: "Процесс согласования '%{name}' документа '%{filename}' только что был делегирован по причине '%{notice}' и от Вас ожидается согласование."
@ -302,10 +297,10 @@ ru:
label_target_project: Целевой проект
label_source_project: Исходный проект
text_email_doc_updated_subject: "Документы проекта %{project} обновлены"
text_email_doc_updated_subject: Документы обновлены
text_email_doc_updated: только что обновил документы
text_email_doc_follows: следующим образом
text_email_doc_deleted_subject: "Документы проекта %{project} удалены"
text_email_doc_deleted_subject: Документы удалены
text_email_doc_deleted: только что удалил документы
label_links_only: только ссылки
@ -324,13 +319,16 @@ ru:
error_resource_or_parent_locked: Невозможно выполнить блокировку - ресурс (или родительская запись) заблокированы
error_parent_locked: Невозможно выполнить блокировку - родительская запись заблокирована
error_resource_locked: Невозможно выполнить блокировку - ресурс заблокирован
error_lock_exclusively: невозможно эксклюзивно заблокировать уже забловированный ресурс
error_lock_exclusively: Невозможно эксклюзивно заблокировать уже забловированный ресурс
error_unlock_parent_locked: Разблокировка не удалась - родительская запись заблокирована
my:
blocks:
field_dmsf_tree_view: Navigate folders in a tree
label_dmsf_version: Версия
locked_documents: Заблокированные документы
open_approvals: Открытые согласования
label_maximum_ajax_upload_filesize: Максимальный размер файла, загружаемого посредством AJAX
note_maximum_ajax_upload_filesize: Превышает максимальный размер файла, загружаемого посредством интерфейса AJAX, для загрузки можно использовать стандартную форму Redmine. Размер указан в MB.
label_classic: Classic
label_drag_drop: "Drag&Drop"

View File

@ -2,8 +2,8 @@
#
# Redmine plugin for Document Management System "Features"
#
# Copyright (C) 2011 <zdravko.balorda@mks.si>
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
# Copyright (C) 2011 Zdravko Balorda <zdravko.balorda@mks.si>
# Copyright (C) 2011-16 Karel Pičman <karel.picman@kontron.com>
#
#
# This program is free software; you can redistribute it and/or
@ -94,11 +94,7 @@ sl:
label_email_body: Vsebina
label_email_send: Pošlji
title_notifications_active: Obveščanje aktivno
label_file_size: Velikost datoteke
heading_file_upload: Naloži
note_uploaded_maximum_files_at_once: "Naenkrat lahko prenesete največ %{number} datotek."
note_upload_files_greater_than_two_gb: Za datoteke večje od 2GB rabite 64bitni brskalnik.
submit_upload_files: Naloži
label_upload: Naloži
heading_new_folder: Nova mapa
label_title: Naziv mape
label_description: Opis
@ -109,7 +105,7 @@ sl:
select_option_deactivated: Deaktivirano
select_option_activated: Aktivirano
label_title_format: Title format
text_title_format: "Document title format for download (%t - title, %d - date, %v - version, %i - ID, %r - revision). Example: %t_%v"
text_title_format: "Document title format for download (%t - title, %f - file, %d - date, %v - version, %i - ID, %r - revision). Example: %t_%v"
title_save_preferences: Save preferences
heading_revisions: Verzije
title_download: Prenesi dol
@ -219,7 +215,6 @@ sl:
warning_folder_not_locked: Ne, ta mapa ne more biti zaklenjena
notice_folder_unlocked: Mapa je uspešno odklenjena
error_only_user_that_locked_folder_can_unlock_it: Nimate privilegijev, da bi odklenili to mapo
title_folder_parent_locked: "Nadrejena mapa %{name} je zaklenjena"
title_unlock_folder: Odkleni, da bi drugim članom omogočil spreminjanje
title_lock_folder: Zakleni, da bi drugim članom preprečil spreminjanje
@ -268,12 +263,12 @@ sl:
info_revision: "r%{rev}"
link_workflow: Workflow
notice_workflow_started: Approval workflow successfully started
text_email_subject_approved: "Approval workflow %{name} approved"
text_email_subject_rejected: "Approval workflow %{name} rejected"
text_email_subject_delegated: "Approval workflow %{name} delegated"
text_email_subject_requires_approval: "Approval workflow %{name} requires your approval"
text_email_subject_updated: "Approval workflow %{name} updated"
text_email_subject_started: "Approval workflow %{name} started"
text_email_subject_approved: approved
text_email_subject_rejected: rejected
text_email_subject_delegated: delegated
text_email_subject_requires_approval: requires your approval
text_email_subject_updated: updated
text_email_subject_started: started
text_email_finished_approved: "The approval workflow '%{name}' assigned to '%{filename}' document has just been finished and the document has been approved."
text_email_finished_rejected: "The approval workflow '%{name}' assigned to '%{filename}' document has just been finished and the document has been rejected because of '%{notice}'."
text_email_finished_delegated: "The approval workflow '%{name}' assigned to '%{filename}' document has just been delegated because of '%{notice}' and you are expected to do an approval in the current approval step."
@ -302,10 +297,10 @@ sl:
label_target_project: Target project
label_source_project: Source project
text_email_doc_updated_subject: "Documents of %{project} updated"
text_email_doc_updated_subject: Documents updated
text_email_doc_updated: has just actualized documents of
text_email_doc_follows: as follows
text_email_doc_deleted_subject: "Documents of %{project} deleted"
text_email_doc_deleted_subject: Documents deleted
text_email_doc_deleted: has just deleted documents of
label_links_only: links only
@ -324,13 +319,16 @@ sl:
error_resource_or_parent_locked: Unable to complete lock - resource (or parent) is locked
error_parent_locked: Unable to complete lock - resource parent is locked
error_resource_locked: Unable to complete lock - resource is locked
error_lock_exclusively: unable to lock exclusively an already-locked resource
error_lock_exclusively: Unable to lock exclusively an already-locked resource
error_unlock_parent_locked: Unlock failed - resource parent is locked
my:
blocks:
field_dmsf_tree_view: Navigate folders in a tree
label_dmsf_version: Verzija
locked_documents: Locked documents
open_approvals: Open approvals
label_maximum_ajax_upload_filesize: Maximum file size uploadable via AJAX
note_maximum_ajax_upload_filesize: Limits maximum file size that can uploaded via standard AJAX interface otherwise Redmine standard upload form must be used. Number is in MB.
label_classic: Classic
label_drag_drop: "Drag&Drop"

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