If a folder or file is locked, we can't activate or deactivate notifications #501

This commit is contained in:
Karel Picman 2016-02-19 13:16:18 +01:00
parent c887e76af5
commit 6fcfc7c460
26 changed files with 236 additions and 262 deletions

View File

@ -298,6 +298,7 @@ class DmsfController < ApplicationController
def edit def edit
@parent = @folder.folder @parent = @folder.folder
@pathfolder = copy_folder(@folder) @pathfolder = copy_folder(@folder)
@force_file_unlock_allowed = User.current.allowed_to?(:force_file_unlock, @project)
end end
def save def save

View File

@ -98,6 +98,7 @@ class DmsfFilesController < ApplicationController
@revision = @file.last_revision @revision = @file.last_revision
@file_delete_allowed = User.current.allowed_to?(:file_delete, @project) @file_delete_allowed = User.current.allowed_to?(:file_delete, @project)
@file_manipulation_allowed = User.current.allowed_to?(:file_manipulation, @project)
@revision_pages = Paginator.new @file.revisions.visible.count, params['per_page'] ? params['per_page'].to_i : 25, params['page'] @revision_pages = Paginator.new @file.revisions.visible.count, params['per_page'] ? params['per_page'].to_i : 25, params['page']
respond_to do |format| respond_to do |format|

View File

@ -153,11 +153,7 @@ class DmsfUploadController < ApplicationController
file.notification = Setting.plugin_redmine_dmsf[:dmsf_default_notifications].present? file.notification = Setting.plugin_redmine_dmsf[:dmsf_default_notifications].present?
new_revision.minor_version = 0 new_revision.minor_version = 0
new_revision.major_version = 0 new_revision.major_version = 0
else else
if file.locked_for_user?
failed_uploads.push(commited_file)
next
end
if file.last_revision if file.last_revision
last_revision = file.last_revision last_revision = file.last_revision
new_revision.source_revision = last_revision new_revision.source_revision = last_revision
@ -168,6 +164,11 @@ class DmsfUploadController < ApplicationController
new_revision.major_version = 0 new_revision.major_version = 0
end end
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(/[\/\\]/,'')}" commited_disk_filepath = "#{DmsfHelper.temp_dir}/#{commited_file[:disk_filename].gsub(/[\/\\]/,'')}"
@ -186,16 +187,6 @@ class DmsfUploadController < ApplicationController
end end
new_revision.mime_type = Redmine::MimeType.of(new_revision.name) new_revision.mime_type = Redmine::MimeType.of(new_revision.name)
new_revision.size = File.size(commited_disk_filepath) 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
# Need to save file first to generate id for it in case of creation. # Need to save file first to generate id for it in case of creation.
# File id is needed to properly generate revision disk filename # File id is needed to properly generate revision disk filename

View File

@ -3,7 +3,7 @@
# #
# Redmine plugin for Document Management System "Features" # 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 # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
@ -56,14 +56,24 @@
<td class="author"><%= h(subfolder.user) if subfolder %></td> <td class="author"><%= h(subfolder.user) if subfolder %></td>
<td class="buttons"> <td class="buttons">
<% if @folder_manipulation_allowed %> <% if @folder_manipulation_allowed %>
<% unless locked %> <% unless locked_for_user %>
<%= link_to(image_tag('edit.png'), <%= link_to(image_tag('edit.png'),
edit_dmsf_path(:id => project, :folder_id => subfolder), edit_dmsf_path(:id => project, :folder_id => subfolder),
:title => l(:link_edit, :title => subfolder ? h(subfolder.title) : project.name)) %> :title => l(:link_edit, :title => subfolder ? h(subfolder.title) : project.name)) %>
<% if subfolder %> <% if subfolder %>
<%= link_to(image_tag('lock.png', :plugin => 'redmine_dmsf'), <% if locked %>
lock_dmsf_path(:id => project, :folder_id => subfolder), <% if subfolder.unlockable? %>
:title => l(:title_lock_file)) %> <%= 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 %> <% else %>
<span class="icon"></span> <span class="icon"></span>
<% end %> <% end %>
@ -77,11 +87,9 @@
:title => l(:title_notifications_not_active_activate)) %> :title => l(:title_notifications_not_active_activate)) %>
<% end %> <% end %>
<% if link %> <% if link %>
<%= link_to(image_tag('delete.png'), <%= link_to(image_tag('delete.png'), dmsf_link_path(link),
dmsf_link_path(link),
:data => {:confirm => l(:text_are_you_sure)}, :data => {:confirm => l(:text_are_you_sure)},
:method => :delete, :method => :delete, :title => l(:title_delete)) %>
:title => l(:title_delete)) %>
<% else %> <% else %>
<%= link_to(image_tag('delete.png'), <%= link_to(image_tag('delete.png'),
delete_dmsf_path(:id => project, :folder_id => subfolder), delete_dmsf_path(:id => project, :folder_id => subfolder),

View File

@ -3,7 +3,7 @@
# #
# Redmine plugin for Document Management System "Features" # 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 # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
@ -20,8 +20,6 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # 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) %> <% wf = DmsfWorkflow.find_by_id(file.last_revision.dmsf_workflow_id) %>
<td class="check"><%= check_box_tag(name, id, false, <td class="check"><%= check_box_tag(name, id, false,
@ -30,7 +28,7 @@
<% file_view_url = url_for({:controller => :dmsf_files, :action => 'view', :id => file}) %> <% file_view_url = url_for({:controller => :dmsf_files, :action => 'view', :id => file}) %>
<%= link_to(h(title), <%= link_to(h(title),
file_view_url, file_view_url,
:target => "_blank", :target => '_blank',
:class => "icon icon-file #{DmsfHelper.filetype_css(file.name)}", :class => "icon icon-file #{DmsfHelper.filetype_css(file.name)}",
:title => l(:title_title_version_version_download, :title => h(file.title), :version => file.version), :title => l(:title_title_version_version_download, :title => h(file.title), :version => file.version),
'data-downloadurl' => "#{file.last_revision.detect_content_type}:#{h(file.name)}:#{file_view_url}") %> 'data-downloadurl' => "#{file.last_revision.detect_content_type}:#{h(file.name)}:#{file_view_url}") %>
@ -39,7 +37,7 @@
<td class="size"><%= number_to_human_size(file.last_revision.size) %></td> <td class="size"><%= number_to_human_size(file.last_revision.size) %></td>
<td class="modified"> <td class="modified">
<%= format_time(file.last_revision.updated_at) %> <%= format_time(file.last_revision.updated_at) %>
<% if locked_for_user %> <% if file.locked_for_user? %>
<% if file.lock.reverse[0].user %> <% if file.lock.reverse[0].user %>
<%= link_to(image_tag(link ? 'locked_gray.png' : 'locked.png', :plugin => 'redmine_dmsf'), <%= link_to(image_tag(link ? 'locked_gray.png' : 'locked.png', :plugin => 'redmine_dmsf'),
user_path(file.lock.reverse[0].user), user_path(file.lock.reverse[0].user),
@ -48,7 +46,7 @@
<%= content_tag(:span, image_tag(link ? 'locked_gray.png' : 'locked.png', :plugin => 'redmine_dmsf'), <%= content_tag(:span, image_tag(link ? 'locked_gray.png' : 'locked.png', :plugin => 'redmine_dmsf'),
:title => l(:notice_account_unknown_email)) %> :title => l(:notice_account_unknown_email)) %>
<% end %> <% end %>
<% elsif locked %> <% elsif file.locked? %>
<%= content_tag(:span, image_tag(link ? 'lockedbycurrent_gray.png' : 'lockedbycurrent.png', :plugin => 'redmine_dmsf'), <%= content_tag(:span, image_tag(link ? 'lockedbycurrent_gray.png' : 'lockedbycurrent.png', :plugin => 'redmine_dmsf'),
:title => l(:title_locked_by_you)) %> :title => l(:title_locked_by_you)) %>
<% end %> <% end %>
@ -69,106 +67,111 @@
<% end %> <% end %>
</td> </td>
<td class="author"><%= h(file.last_revision.user) %></td> <td class="author"><%= h(file.last_revision.user) %></td>
<td class="buttons"> <td class="buttons">
<% if @file_manipulation_allowed || @file_approval_allowed %> <% if @file_manipulation_allowed %>
<% if @file_manipulation_allowed %> <%= link_to(image_tag('filedetails.png', :plugin => 'redmine_dmsf'),
<% unless locked %> dmsf_file_path(:id => file),
<%= link_to(image_tag('filedetails.png', :plugin => 'redmine_dmsf'), :title => l(:link_details, :title => h(file.last_revision.title))) %>
dmsf_file_path(:id => file), <% unless file.locked_for_user? %>
:title => l(:link_details, :title => h(file.last_revision.title))) %> <% if !file.locked? %>
<%= link_to(image_tag('lock.png', :plugin => 'redmine_dmsf'), <%= link_to(image_tag('lock.png', :plugin => 'redmine_dmsf'),
lock_dmsf_files_path(:id => file), lock_dmsf_files_path(:id => file),
:title => l(:title_lock_file)) %> :title => l(:title_lock_file)) %>
<% if file.notification %> <% elsif file.unlockable? %>
<%= link_to(image_tag('notify.png', :plugin => 'redmine_dmsf'), <%= link_to(image_tag('unlock.png', :plugin => 'redmine_dmsf'),
notify_deactivate_dmsf_files_path(:id => file), unlock_dmsf_files_path(:id => file),
:title => l(:title_notifications_active_deactivate)) %> :title => l(:title_unlock_file))%>
<% else %>
<%= link_to(image_tag('notifynot.png', :plugin => 'redmine_dmsf'),
notify_activate_dmsf_files_path(:id => file),
:title => l(:title_notifications_not_active_activate)) %>
<% end %>
<% if link %>
<%= link_to(image_tag('delete.png'),
dmsf_link_path(link),
:data => {:confirm => l(:text_are_you_sure)},
:method => :delete,
:title => l(:title_delete)) %>
<% else %>
<% if @file_delete_allowed %>
<%= link_to(image_tag('delete.png'),
dmsf_file_path(:id => file),
:data => {:confirm => l(:text_are_you_sure)},
:method => :delete,
:title => l(:title_delete)) unless locked_for_user %>
<% else %>
<span class="icon"></span>
<% end %>
<% end %>
<% else %> <% else %>
<span class="icon"></span> <span class="icon"></span>
<% if (!locked_for_user || @force_file_unlock_allowed) && file.unlockable? %> <% end %>
<%= link_to(image_tag('unlock.png', :plugin => 'redmine_dmsf'), <% if file.notification %>
unlock_dmsf_files_path(:id => file), <%= link_to(image_tag('notify.png', :plugin => 'redmine_dmsf'),
:title => l(:title_unlock_file))%> notify_deactivate_dmsf_files_path(:id => file),
:title => l(:title_notifications_active_deactivate)) %>
<% else %>
<%= link_to(image_tag('notifynot.png', :plugin => 'redmine_dmsf'),
notify_activate_dmsf_files_path(:id => file),
:title => l(:title_notifications_not_active_activate)) %>
<% end %>
<% if link %>
<%= link_to(image_tag('delete.png'),
dmsf_link_path(link),
:data => {:confirm => l(:text_are_you_sure)},
:method => :delete,
:title => l(:title_delete)) %>
<% else %>
<% if @file_delete_allowed %>
<%= link_to(image_tag('delete.png'),
dmsf_file_path(:id => file),
:data => {:confirm => l(:text_are_you_sure)},
:method => :delete,
:title => l(:title_delete)) unless file.locked_for_user? %>
<% else %> <% else %>
<span class="icon"></span> <span class="icon"></span>
<% end %> <% end %>
<% end %>
<% else %>
<% 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))%>
<% else %>
<span class="icon"></span> <span class="icon"></span>
<span class="icon dmsf_icon-narrow"></span> <% end %>
<% end %> <span class="icon"></span>
<span class="icon"></span>
<% end %> <% end %>
<% if @file_approval_allowed %> <% end %>
<% case file.last_revision.workflow %> <% if @file_approval_allowed %>
<% when DmsfWorkflow::STATE_WAITING_FOR_APPROVAL %> <% case file.last_revision.workflow %>
<% if wf %> <% when DmsfWorkflow::STATE_WAITING_FOR_APPROVAL %>
<% assignments = wf.next_assignments(file.last_revision.id) %> <% if wf %>
<% index = assignments.find_index{|assignment| assignment.user_id == User.current.id} if assignments %> <% assignments = wf.next_assignments(file.last_revision.id) %>
<% if index %> <% index = assignments.find_index{|assignment| assignment.user_id == User.current.id} if assignments %>
<%= link_to(image_tag('waiting_for_approval.png', :plugin => 'redmine_dmsf'), <% if index %>
action_dmsf_workflow_path( <%= link_to(image_tag('waiting_for_approval.png', :plugin => 'redmine_dmsf'),
:project_id => project.id, action_dmsf_workflow_path(
:id => wf.id, :project_id => project.id,
:dmsf_workflow_step_assignment_id => assignments[index].id, :id => wf.id,
:dmsf_file_revision_id => file.last_revision.id), :dmsf_workflow_step_assignment_id => assignments[index].id,
:title => l(:title_waiting_for_approval), :dmsf_file_revision_id => file.last_revision.id),
:remote => true) %> :title => l(:title_waiting_for_approval),
<% else %> :remote => true) %>
<%= content_tag(:span, image_tag('waiting_for_approval.png', :plugin => 'redmine_dmsf'), <% else %>
:title => "#{l(:label_dmsf_wokflow_action_approve)} #{l(:label_dmsf_wokflow_action_reject)} #{l(:label_dmsf_wokflow_action_delegate)}") %>
<% end %>
<% else %>
<%= content_tag(:span, image_tag('waiting_for_approval.png', :plugin => 'redmine_dmsf'), <%= content_tag(:span, image_tag('waiting_for_approval.png', :plugin => 'redmine_dmsf'),
:title => "#{l(:label_dmsf_wokflow_action_approve)} #{l(:label_dmsf_wokflow_action_reject)} #{l(:label_dmsf_wokflow_action_delegate)}") %> :title => "#{l(:label_dmsf_wokflow_action_approve)} #{l(:label_dmsf_wokflow_action_reject)} #{l(:label_dmsf_wokflow_action_delegate)}") %>
<% end %> <% end %>
<% when DmsfWorkflow::STATE_APPROVED %> <% else %>
<%= content_tag(:span, image_tag('approved.png', :plugin => 'redmine_dmsf'), <%= content_tag(:span, image_tag('waiting_for_approval.png', :plugin => 'redmine_dmsf'),
:title => l(:title_approved)) %> :title => "#{l(:label_dmsf_wokflow_action_approve)} #{l(:label_dmsf_wokflow_action_reject)} #{l(:label_dmsf_wokflow_action_delegate)}") %>
<% when DmsfWorkflow::STATE_ASSIGNED %> <% end %>
<% if User.current && (file.last_revision.dmsf_workflow_assigned_by == User.current.id) && wf %> <% when DmsfWorkflow::STATE_APPROVED %>
<%= link_to(image_tag('assigned.png', :plugin => 'redmine_dmsf'), <%= content_tag(:span, image_tag('approved.png', :plugin => 'redmine_dmsf'),
start_dmsf_workflow_path( :title => l(:title_approved)) %>
:id => file.last_revision.dmsf_workflow_id, <% when DmsfWorkflow::STATE_ASSIGNED %>
:dmsf_file_revision_id => file.last_revision.id), <% if User.current && (file.last_revision.dmsf_workflow_assigned_by == User.current.id) && wf %>
:title => l(:label_dmsf_wokflow_action_start)) %> <%= link_to(image_tag('assigned.png', :plugin => 'redmine_dmsf'),
<% else %> start_dmsf_workflow_path(
<%= content_tag(:span, image_tag('assigned.png', :plugin => 'redmine_dmsf'), :id => file.last_revision.dmsf_workflow_id,
title => l(:label_dmsf_wokflow_action_start)) %> :dmsf_file_revision_id => file.last_revision.id),
<% end %> :title => l(:label_dmsf_wokflow_action_start)) %>
<% when DmsfWorkflow::STATE_REJECTED %> <% else %>
<%= content_tag(:span, image_tag('assigned.png', :plugin => 'redmine_dmsf'), <%= content_tag(:span, image_tag('assigned.png', :plugin => 'redmine_dmsf'),
:title => l(:title_rejected)) %> title => l(:label_dmsf_wokflow_action_start)) %>
<% else %> <% end %>
<% if @workflows_available %> <% when DmsfWorkflow::STATE_REJECTED %>
<%= link_to(image_tag('none.png', :plugin => 'redmine_dmsf'), <%= content_tag(:span, image_tag('assigned.png', :plugin => 'redmine_dmsf'),
assign_dmsf_workflow_path( :title => l(:title_rejected)) %>
:project_id => project.id, <% else %>
:dmsf_file_revision_id => file.last_revision.id), <% if @workflows_available && !file.locked_for_user? %>
:title => l(:label_dmsf_wokflow_action_assign), <%= link_to(image_tag('none.png', :plugin => 'redmine_dmsf'),
:remote => true) %> assign_dmsf_workflow_path(
<% end %> :project_id => project.id,
<% end %> :dmsf_file_revision_id => file.last_revision.id),
<% end %> :title => l(:label_dmsf_wokflow_action_assign),
:remote => true) %>
<% end %>
<% end %>
<% end %> <% end %>
</td> </td>
<td class="invisible">1</td> <td class="invisible">1</td>

View File

@ -3,7 +3,7 @@
# #
# Redmine plugin for Document Management System "Features" # 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 # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
@ -22,11 +22,13 @@
<td class="check"></td> <td class="check"></td>
<td class="title"> <td class="title">
<%= link_to(h(title), <%= link_to(h(title),
link.external_url, link.external_url,
:target => "_blank", :target => '_blank',
:class => 'icon icon-link') %> :class => 'icon icon-link') %>
<div class="filename" title="<%= l(:label_target_folder)%>"><%= link.external_url %></div> <div class="filename" title="<%= l(:label_target_folder)%>">
<%= link.external_url %>
</div>
</td> </td>
<td class="size"></td> <td class="size"></td>
<td class="modified"><%= format_time(link.updated_at) %></td> <td class="modified"><%= format_time(link.updated_at) %></td>
@ -34,25 +36,20 @@
<td class="workflow"></td> <td class="workflow"></td>
<td class="author"><%= h(link.user) %></td> <td class="author"><%= h(link.user) %></td>
<td class="buttons"> <td class="buttons">
<span class="icon"></span>
<span class="icon"></span>
<span class="icon"></span>
<% if @file_manipulation_allowed %> <% if @file_manipulation_allowed %>
<% if @file_manipulation_allowed %> <%= link_to(image_tag('delete.png'),
<span class="icon"></span> dmsf_link_path(link),
<span class="icon"></span> :data => {:confirm => l(:text_are_you_sure)},
<span class="icon"></span> :method => :delete,
<%= link_to(image_tag('delete.png'), :title => l(:title_delete)) %>
dmsf_link_path(link), <% else %>
:data => {:confirm => l(:text_are_you_sure)}, <span class="icon"></span>
:method => :delete, <% end %>
: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>
<td class="invisible">1</td> <td class="invisible">1</td>
<td class="invisible"></td> <td class="invisible"></td>
<td class="invisible">link.updated_at.to_i</td> <td class="invisible">link.updated_at.to_i</td>
<td class="invisible"></td> <td class="invisible"></td>

View File

@ -1,7 +1,11 @@
<%# Redmine plugin for Document Management System "Features" <%#
# encoding: utf-8
# #
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com> # Redmine plugin for Document Management System "Features"
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk> #
# 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 # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
@ -20,12 +24,17 @@
<% html_title(l(:dmsf)) %> <% html_title(l(:dmsf)) %>
<div class="contextual"> <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) %>
<% unless @folder.locked? %> <% if !@folder.locked_for_user? %>
<%= link_to(l(:button_lock), <% unless @folder.locked? %>
<%= link_to(l(:button_lock),
lock_dmsf_path(:id => @project, :folder_id => @folder), lock_dmsf_path(:id => @project, :folder_id => @folder),
:title => l(:title_lock_file), :title => l(:title_lock_file), :class => 'icon icon-dmsf-lock') %>
:class => 'icon icon-dmsf-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 icon-dmsf-unlock')%>
<% end %>
<% if @folder.notification %> <% if @folder.notification %>
<%= link_to(l(:label_notifications_off), <%= link_to(l(:label_notifications_off),
notify_deactivate_dmsf_path(:id => @project, :folder_id => @folder), notify_deactivate_dmsf_path(:id => @project, :folder_id => @folder),
@ -39,22 +48,17 @@
<% end %> <% end %>
<%= link_to(l(:label_link_to), <%= link_to(l(:label_link_to),
new_dmsf_link_path(:project_id => @project.id, :dmsf_folder_id => @folder.id, :type => 'link_to'), new_dmsf_link_path(:project_id => @project.id, :dmsf_folder_id => @folder.id, :type => 'link_to'),
:title => l(:title_create_link), :title => l(:title_create_link), :class => 'icon icon-link') %>
:class => 'icon icon-link') %>
<%= link_to(l(:button_copy), copy_folder_path(:id => @folder), <%= link_to(l(:button_copy), copy_folder_path(:id => @folder),
:title => l(:title_copy), :class => 'icon icon-copy') %> :title => l(:title_copy), :class => 'icon icon-copy') %>
<%= link_to(l(:button_delete), <%= link_to(l(:button_delete),
delete_dmsf_path(:id => @project, :folder_id => @folder), delete_dmsf_path(:id => @project, :folder_id => @folder),
:data => {:confirm => l(:text_are_you_sure)}, :data => {:confirm => l(:text_are_you_sure)},
:title => l(:title_delete), :title => l(:title_delete), :class => 'icon icon-del') %>
:class => 'icon icon-del') %> <% elsif @force_file_unlock_allowed %>
<% else %> <%= link_to_if(@folder.unlockable?, l(:button_unlock),
<% if (!@folder.locked_for_user? || User.current.allowed_to?(:force_file_unlock, @project)) && @folder.unlockable? %> unlock_dmsf_path(:id => @project, :folder_id => @folder),
<%= link_to(l(:button_unlock), :title => l(:title_unlock_file), :class => 'icon icon-dmsf-unlock')%>
unlock_dmsf_path(:id => @project, :folder_id => @folder),
:title => l(:title_unlock_file),
:class => 'icon icon-dmsf-unlock')%>
<% end %>
<% end %> <% end %>
<% end %> <% end %>
</div> </div>

View File

@ -5,7 +5,7 @@
# #
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com> # Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk> # 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 # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # 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. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%> %>
<% html_title(l(:dmsf)) %> <% html_title l(:dmsf) %>
<div class="contextual"> <div class="contextual">
<% if @folder_manipulation_allowed %> <% if @folder_manipulation_allowed %>
<% if @folder.nil? %> <% if @folder.nil? %>
<%= link_to(l(:button_edit), <%= link_to(l(:button_edit), edit_root_dmsf_path(:id => @project),
edit_root_dmsf_path(:id => @project),
:title => l(:link_edit, :title => l(:link_documents)), :title => l(:link_edit, :title => l(:link_documents)),
:class => 'icon icon-edit') %> :class => 'icon icon-edit') %>
<% elsif !@locked_for_user %> <% elsif !@locked_for_user %>
@ -37,54 +36,31 @@
:class => 'icon icon-edit') %> :class => 'icon icon-edit') %>
<% end %> <% end %>
<% if @folder && (!@locked_for_user || User.current.allowed_to?(:force_file_unlock, @project)) %> <% if @folder && (!@locked_for_user || User.current.allowed_to?(:force_file_unlock, @project)) %>
<% if @folder.locked? %> <% if @folder.locked? %>
<% unless @folder.unlockable? %> <%= link_to_if(@folder.unlockable?, l(:button_unlock),
<%= link_to(l(:button_unlock), unlock_dmsf_path(:id => @project, :folder_id => @folder, :current => request.url),
:title => l(:title_folder_parent_locked, :name => @folder.folder.lock.reverse[0].folder.title), :title => l(:title_unlock_folder), :class => 'icon icon-dmsf-unlock') %>
:class => 'icon icon-dmsf-unlock') if @folder %>
<% else %>
<%= link_to(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 %>
<% else %> <% else %>
<%= link_to(l(:button_lock), <%= link_to(l(:button_lock),
lock_dmsf_path(:id => @project, :folder_id => @folder, :current => request.url), lock_dmsf_path(:id => @project, :folder_id => @folder, :current => request.url),
:title => l(:title_lock_folder), :title => l(:title_lock_folder), :class => 'icon icon-dmsf-lock') %>
:class => 'icon icon-dmsf-lock') if @folder %>
<% end %> <% end %>
<% end %> <% end %>
<% unless @folder %> <% if !@locked_for_user && ((@folder && @folder.notification) || (!@filder && @project.dmsf_notification)) %>
<% if @project.dmsf_notification %> <%= link_to(l(:label_notifications_off),
<%= link_to(l(:label_notifications_off), notify_deactivate_dmsf_path(:id => @project, :folder_id => @folder),
notify_deactivate_dmsf_path(:id => @project), :title => l(:title_notifications_active_deactivate),
:title => l(:title_notifications_active_deactivate), :class => 'icon icon-notification-on') %>
: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 %> <% else %>
<% if @folder.notification %> <%= link_to(l(:label_notifications_on),
<%= link_to(l(:label_notifications_off), notify_activate_dmsf_path(:id => @project, :folder_id => @folder),
notify_deactivate_dmsf_path(:id => @project, :folder_id => @folder), :title => l(:title_notifications_not_active_activate),
:title => l(:title_notifications_active_deactivate), :class => 'icon icon-notification-off') %>
:class => 'icon icon-notification-on') %> <% end %>
<% else %> <% if @file_manipulation_allowed && !@locked_for_user %>
<%= 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') %>
<% end %>
<% end %>
<% if @file_manipulation_allowed %>
<%= link_to(l(:label_link_from), <%= link_to(l(:label_link_from),
new_dmsf_link_path(:project_id => @project.id, :dmsf_folder_id => @folder ? @folder.id : @folder, :type => '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), :title => l(:title_create_link), :class => 'icon icon-link') %>
:class => 'icon icon-link') unless @locked_for_user %>
<% end %> <% end %>
<%= link_to(l(:link_create_folder), <%= link_to(l(:link_create_folder),
new_dmsf_path(:id => @project, :parent_id => @folder), new_dmsf_path(:id => @project, :parent_id => @folder),
@ -288,4 +264,6 @@
</script> </script>
<% end %> <% 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

@ -26,11 +26,14 @@
<div class="contextual"> <div class="contextual">
<% if User.current.allowed_to?(:file_manipulation, @project) %> <% if User.current.allowed_to?(:file_manipulation, @project) %>
<% unless @file.locked? %> <% unless @file.locked_for_user? %>
<%= link_to(l(:button_lock), <% unless @file.locked? %>
lock_dmsf_files_path(:id => @file), <%= link_to(l(:button_lock), lock_dmsf_files_path(:id => @file),
:title => l(:title_lock_file), :title => l(:title_lock_file), :class => 'icon icon-dmsf-lock') %>
:class => 'icon icon-dmsf-lock') %> <% else %>
<%= link_to_if(@file.unlockable?, l(:button_unlock), unlock_dmsf_files_path(:id => @file),
:title => l(:title_unlock_file), :class => 'icon icon-dmsf-unlock') %>
<% end %>
<% if @file.notification %> <% if @file.notification %>
<%= link_to(l(:label_notifications_off), <%= link_to(l(:label_notifications_off),
notify_deactivate_dmsf_files_path(:id => @file), notify_deactivate_dmsf_files_path(:id => @file),
@ -50,11 +53,9 @@
:title => l(:title_copy), :class => 'icon icon-copy') %> :title => l(:title_copy), :class => 'icon icon-copy') %>
<%= delete_link @file if @file_delete_allowed %> <%= delete_link @file if @file_delete_allowed %>
<% else %> <% else %>
<% if (!@file.locked_for_user? || User.current.allowed_to?(:force_file_unlock, @project)) && @file.unlockable? %> <% if User.current.allowed_to?(:force_file_unlock, @project) %>
<%= link_to(l(:button_unlock), <%= link_to_if(@file.unlockable?, l(:button_unlock), unlock_dmsf_files_path(:id => @file),
unlock_dmsf_files_path(:id => @file), :title => l(:title_unlock_file), :class => 'icon icon-dmsf-unlock')%>
:title => l(:title_unlock_file),
:class => 'icon icon-dmsf-unlock')%>
<% end %> <% end %>
<% end %> <% end %>
<% end %> <% end %>
@ -62,9 +63,11 @@
<%= render(:partial => '/dmsf/path', :locals => {:folder => @file.folder, :filename => @file.title}) %> <%= render(:partial => '/dmsf/path', :locals => {:folder => @file.folder, :filename => @file.title}) %>
<%= error_messages_for('file') %> <% if User.current.allowed_to?(:file_manipulation, @file.project) && !@file.locked_for_user? %>
<%= error_messages_for('revision') %> <%= error_messages_for('file') %>
<%= render(:partial => 'file_new_revision') if User.current.allowed_to?(:file_manipulation, @file.project) %> <%= error_messages_for('revision') %>
<%= render(:partial => 'file_new_revision') %>
<% end %>
<h3><%= l(:heading_revisions) %></h3> <h3><%= l(:heading_revisions) %></h3>
<% @file.revisions.visible[@revision_pages.offset,@revision_pages.per_page].each do |revision| %> <% @file.revisions.visible[@revision_pages.offset,@revision_pages.per_page].each do |revision| %>

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

@ -208,7 +208,7 @@ table.access-table tbody td, table.access-table tbody tr:hover td {
} }
/* Approval workflow */ /* Approval workflow */
#admin-menu a.approvalworkflows { background-image: url(../images/ticket_go.png); } #admin-menu a.approvalworkflows { background-image: url(../../../images/ticket_go.png); }
#users_for_delegate {height: 200px; overflow:auto;} #users_for_delegate {height: 200px; overflow:auto;}
#users_for_delegate label {display: block;} #users_for_delegate label {display: block;}
tr.workflow.locked a { color: #aaa; } tr.workflow.locked a { color: #aaa; }
@ -263,7 +263,6 @@ table.list td.step {
.modal{ font-size: 12px} .modal{ font-size: 12px}
/* Command icons */ /* Command icons */
.dmsf_icon-narrow { padding-left: 16px }
.icon-link { background-image: url(../images/link.png); } .icon-link { background-image: url(../images/link.png); }
.icon-notification-on { background-image: url(../images/notify.png); margin-left: 3px; } .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-notification-off { background-image: url(../images/notifynot.png); margin-left: 3px; }

View File

@ -3,7 +3,7 @@
# Redmine plugin for Document Management System "Features" # Redmine plugin for Document Management System "Features"
# #
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com> # 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 # This program is free software; you can redistribute it and/or
@ -219,7 +219,6 @@ cs:
warning_folder_not_locked: Složku nelze zamknout warning_folder_not_locked: Složku nelze zamknout
notice_folder_unlocked: Složka byla odemčena 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 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_unlock_folder: Odemknout
title_lock_folder: Zamknout title_lock_folder: Zamknout

View File

@ -4,7 +4,7 @@
# #
# Copyright (C) 2011 Terrence Miller # Copyright (C) 2011 Terrence Miller
# Copyright (C) 2013 Christian Wetting <christian.wetting@kontron.com> # 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 # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
@ -219,7 +219,6 @@ de:
warning_folder_not_locked: Der Ordner konnte nicht gesperrt werden warning_folder_not_locked: Der Ordner konnte nicht gesperrt werden
notice_folder_unlocked: Der Ordner wurde erfolgreich entsperrt 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 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_unlock_folder: Ordner zur Bearbeitung durch andere Benutzer entsperren
title_lock_folder: Ordner zum Schutz vor Bearbeitung durch andere Benutzer sperren title_lock_folder: Ordner zum Schutz vor Bearbeitung durch andere Benutzer sperren

View File

@ -4,7 +4,7 @@
# #
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com> # Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk> # 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 # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
@ -219,7 +219,6 @@ en:
warning_folder_not_locked: Unfortunately, the folder could not be locked warning_folder_not_locked: Unfortunately, the folder could not be locked
notice_folder_unlocked: The folder was successfully unlocked 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 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_unlock_folder: Unlock to allow changes for other members
title_lock_folder: Lock to prevent changes for other members title_lock_folder: Lock to prevent changes for other members

View File

@ -4,7 +4,7 @@
# #
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com> # Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2015 Agustin Ivorra <agustinivorra@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 # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
@ -219,7 +219,6 @@ es:
warning_folder_not_locked: Desafortunadamente, el directorio no se pudo bloquear warning_folder_not_locked: Desafortunadamente, el directorio no se pudo bloquear
notice_folder_unlocked: El directorio se desbloqueó exitosamente notice_folder_unlocked: El directorio se desbloqueó exitosamente
error_only_user_that_locked_folder_can_unlock_it: No está autorizado para desbloquearel directorio 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_unlock_folder: Desbloquear para que sea editado por otros miembros
title_lock_folder: Bloquear para evitar que sea editado por otros miembros title_lock_folder: Bloquear para evitar que sea editado por otros miembros

View File

@ -2,10 +2,10 @@
# #
# Redmine plugin for Document Management System "Features" # Redmine plugin for Document Management System "Features"
# #
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com> # Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk> # Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
# Copyright (C) 2014 Atmis # 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 # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2 # as published by the Free Software Foundation; either version 2
@ -219,7 +219,6 @@ fr:
warning_folder_not_locked: Echec du verrouillage du dossier warning_folder_not_locked: Echec du verrouillage du dossier
notice_folder_unlocked: Le dossier a été déverrouillé 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" 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_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" title_lock_folder: "Verrouiller afin d'empêcher les modifications du dossier"
@ -333,4 +332,4 @@ fr:
open_approvals: Approbations en attente open_approvals: Approbations en attente
label_maximum_ajax_upload_filesize: Taille maximale de fichier pour téléversement via AJAX 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." 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."

View File

@ -3,7 +3,7 @@
# Redmine plugin for Document Management System "Features" # Redmine plugin for Document Management System "Features"
# #
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com> # 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 # This program is free software; you can redistribute it and/or
@ -157,8 +157,7 @@ ja:
permission_file_manipulation: ファイルの操作 permission_file_manipulation: ファイルの操作
permission_force_file_unlock: ファイルの強制ロック解除 permission_force_file_unlock: ファイルの強制ロック解除
permission_manage_workflows: ワークフロー管理 permission_manage_workflows: ワークフロー管理
permission_file_delete: ファイルの削除 permission_file_delete: ファイルの削除
permission_file_approval: ファイルの承認
label_file: ファイル label_file: ファイル
field_folder: フォルダ field_folder: フォルダ
error_create_cycle_in_folder_dependency: フォルダの依存関係が循環しています error_create_cycle_in_folder_dependency: フォルダの依存関係が循環しています
@ -219,8 +218,7 @@ ja:
notice_folder_locked: "フォルダをロックしました" notice_folder_locked: "フォルダをロックしました"
warning_folder_not_locked: "フォルダをロックすることができませんでした" warning_folder_not_locked: "フォルダをロックすることができませんでした"
notice_folder_unlocked: "フォルダのロックを解除しました" notice_folder_unlocked: "フォルダのロックを解除しました"
error_only_user_that_locked_folder_can_unlock_it: "このフォルダのロックを解除する権限がありません" error_only_user_that_locked_folder_can_unlock_it: "このフォルダのロックを解除する権限がありません"
title_folder_parent_locked: "親フォルダ %{name} はロックされています"
title_unlock_folder: "ロックを解除し他メンバが更新できるようにします" title_unlock_folder: "ロックを解除し他メンバが更新できるようにします"
title_lock_folder: "ロックし他メンバとの競合を回避します" title_lock_folder: "ロックし他メンバとの競合を回避します"
@ -294,13 +292,14 @@ ja:
label_notifications_off: 通知オフ label_notifications_off: 通知オフ
field_target_file: リンク元ファイル field_target_file: リンク元ファイル
title_download_entries: ダウンロード記録 title_download_entries: ダウンロード記録
label_external: 外部
label_link_name: リンク名 label_link_name: リンク名
label_link_external_url: URL label_link_external_url: URL
label_target_folder: リンク先フォルダ label_target_folder: リンク先フォルダ
label_source_folder: リンク元フォルダ label_source_folder: リンク元フォルダ
label_target_project: リンク先プロジェクト label_target_project: リンク先プロジェクト
label_source_project: リンク元プロジェクト label_source_project: リンク元プロジェクト
label_external: 外部
text_email_doc_updated_subject: "プロジェクト'%{project}'のファイルが更新されました" text_email_doc_updated_subject: "プロジェクト'%{project}'のファイルが更新されました"
text_email_doc_updated: が次のファイルを更新しました。 text_email_doc_updated: が次のファイルを更新しました。
@ -333,5 +332,4 @@ ja:
open_approvals: 未承認 open_approvals: 未承認
label_maximum_ajax_upload_filesize: アップロードファイルサイズ上限 label_maximum_ajax_upload_filesize: アップロードファイルサイズ上限
note_maximum_ajax_upload_filesize: アップロード可能なファイルサイズの上限。AjaxおよびRedmineの仕様に制限される2ギガバイト程度までは確認済み単位はMB。 note_maximum_ajax_upload_filesize: アップロード可能なファイルサイズの上限。AjaxおよびRedmineの仕様に制限される2ギガバイト程度までは確認済み単位はMB。

View File

@ -4,9 +4,8 @@
# #
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com> # Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk> # 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 # 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 # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2 # as published by the Free Software Foundation; either version 2
@ -220,7 +219,6 @@ pl:
warning_folder_not_locked: Niestety folder nie może zostać zablokowany warning_folder_not_locked: Niestety folder nie może zostać zablokowany
notice_folder_unlocked: Folder został odblokowany notice_folder_unlocked: Folder został odblokowany
error_only_user_that_locked_folder_can_unlock_it: Nie posiadasz uprawnień do odblokowania tego folderu 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_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 title_lock_folder: Zablokuj aby zabezpieczyć przed wprowadzaniem zmian przez innych użytkowników
@ -238,6 +236,7 @@ pl:
field_label_dmsf_workflow: Proces akceptacji field_label_dmsf_workflow: Proces akceptacji
field_label_dmsf_workflow_name: Nazwa procesu akceptacji field_label_dmsf_workflow_name: Nazwa procesu akceptacji
label_dmsf_workflow_plural: Procesy akceptacji label_dmsf_workflow_plural: Procesy akceptacji
label_dmsf_workflow_plural_num: Procesy akceptacji (%{count})
label_dmsf_workflow_step: Krok label_dmsf_workflow_step: Krok
label_dmsf_workflow_step_plural: Kroki label_dmsf_workflow_step_plural: Kroki
label_dmsf_workflow_approval: Akceptacja label_dmsf_workflow_approval: Akceptacja

View File

@ -4,7 +4,7 @@
# #
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com> # Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk> # 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 # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
@ -219,7 +219,6 @@ pt-BR:
warning_folder_not_locked: A pasta não pode ser bloqueada warning_folder_not_locked: A pasta não pode ser bloqueada
notice_folder_unlocked: A pasta foi desbloqueada com sucesso 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 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_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 title_lock_folder: Clique aqui para impedir alterações por outros usuários

View File

@ -2,8 +2,8 @@
# #
# Redmine plugin for Document Management System "Features" # Redmine plugin for Document Management System "Features"
# #
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com> # 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 # This program is free software; you can redistribute it and/or
@ -219,7 +219,6 @@ ru:
warning_folder_not_locked: "К сожалению, папка не может быть заблокирована" warning_folder_not_locked: "К сожалению, папка не может быть заблокирована"
notice_folder_unlocked: "Папка была успешно разблокирована" notice_folder_unlocked: "Папка была успешно разблокирована"
error_only_user_that_locked_folder_can_unlock_it: "Только пользователь, который заблокировал папку, может её разблокировать" error_only_user_that_locked_folder_can_unlock_it: "Только пользователь, который заблокировал папку, может её разблокировать"
title_folder_parent_locked: "Родительская папка %{name} заблокирована"
title_unlock_folder: "Разблокируйте папку, чтобы разрешить изменение её другими участниками" title_unlock_folder: "Разблокируйте папку, чтобы разрешить изменение её другими участниками"
title_lock_folder: "Заблокируйте папку, чтобы запретить ёё изменение другими участниками" title_lock_folder: "Заблокируйте папку, чтобы запретить ёё изменение другими участниками"

View File

@ -2,8 +2,8 @@
# #
# Redmine plugin for Document Management System "Features" # Redmine plugin for Document Management System "Features"
# #
# Copyright (C) 2011 <zdravko.balorda@mks.si> # Copyright (C) 2011 Zdravko Balorda <zdravko.balorda@mks.si>
# 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 # This program is free software; you can redistribute it and/or
@ -219,7 +219,6 @@ sl:
warning_folder_not_locked: Ne, ta mapa ne more biti zaklenjena warning_folder_not_locked: Ne, ta mapa ne more biti zaklenjena
notice_folder_unlocked: Mapa je uspešno odklenjena notice_folder_unlocked: Mapa je uspešno odklenjena
error_only_user_that_locked_folder_can_unlock_it: Nimate privilegijev, da bi odklenili to mapo 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_unlock_folder: Odkleni, da bi drugim članom omogočil spreminjanje
title_lock_folder: Zakleni, da bi drugim članom preprečil spreminjanje title_lock_folder: Zakleni, da bi drugim članom preprečil spreminjanje

View File

@ -2,9 +2,9 @@
# #
# Redmine plugin for Document Management System "Features" # Redmine plugin for Document Management System "Features"
# #
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com> # 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>
# Copyright (C) 2013 Aecho Liu <aecho1028@gmail.com> # Copyright (C) 2013 Aecho Liu <aecho1028@gmail.com>
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
@ -219,7 +219,6 @@ zh-TW:
warning_folder_not_locked: 不好意思,這個資料夾無法被鎖定。 warning_folder_not_locked: 不好意思,這個資料夾無法被鎖定。
notice_folder_unlocked: 這個資料夾己經成功地解除鎖定了。 notice_folder_unlocked: 這個資料夾己經成功地解除鎖定了。
error_only_user_that_locked_folder_can_unlock_it: 您未被授權,解除這個資料夾的鎖定狀態。 error_only_user_that_locked_folder_can_unlock_it: 您未被授權,解除這個資料夾的鎖定狀態。
title_folder_parent_locked: "上層資料夾 %{name} 被鎖定了。"
title_unlock_folder: 解除鎖定。允許其它使用者修改。 title_unlock_folder: 解除鎖定。允許其它使用者修改。
title_lock_folder: 鎖定資料夾。禁止其它使用者修改。 title_lock_folder: 鎖定資料夾。禁止其它使用者修改。

View File

@ -2,8 +2,8 @@
# #
# Redmine plugin for Document Management System "Features" # Redmine plugin for Document Management System "Features"
# #
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com> # 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 # This program is free software; you can redistribute it and/or
@ -219,7 +219,6 @@ zh:
warning_folder_not_locked: Unfortunately, the folder could not be locked warning_folder_not_locked: Unfortunately, the folder could not be locked
notice_folder_unlocked: The folder was successfully unlocked 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 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_unlock_folder: Unlock to allow changes for other members
title_lock_folder: Lock to prevent changes for other members title_lock_folder: Lock to prevent changes for other members

View File

@ -93,7 +93,9 @@ Redmine::Plugin.register :redmine_dmsf do
# Administration menu extension # Administration menu extension
Redmine::MenuManager.map :admin_menu do |menu| Redmine::MenuManager.map :admin_menu do |menu|
menu.push :approvalworkflows, {:controller => 'dmsf_workflows', :action => 'index'}, :caption => :label_dmsf_workflow_plural menu.push :approvalworkflows,
{:controller => 'dmsf_workflows', :action => 'index'},
:caption => :label_dmsf_workflow_plural
end end
Redmine::WikiFormatting::Macros.register do Redmine::WikiFormatting::Macros.register do