If a folder or file is locked, we can't activate or deactivate notifications #501
This commit is contained in:
parent
c887e76af5
commit
6fcfc7c460
@ -298,6 +298,7 @@ class DmsfController < ApplicationController
|
||||
def edit
|
||||
@parent = @folder.folder
|
||||
@pathfolder = copy_folder(@folder)
|
||||
@force_file_unlock_allowed = User.current.allowed_to?(:force_file_unlock, @project)
|
||||
end
|
||||
|
||||
def save
|
||||
|
||||
@ -98,6 +98,7 @@ class DmsfFilesController < ApplicationController
|
||||
|
||||
@revision = @file.last_revision
|
||||
@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']
|
||||
|
||||
respond_to do |format|
|
||||
|
||||
@ -154,10 +154,6 @@ class DmsfUploadController < ApplicationController
|
||||
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,6 +165,11 @@ 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
|
||||
@ -187,16 +188,6 @@ class DmsfUploadController < ApplicationController
|
||||
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
|
||||
|
||||
# Need to save file first to generate id for it in case of creation.
|
||||
# File id is needed to properly generate revision disk filename
|
||||
if commited_file[:dmsf_file_revision].present?
|
||||
|
||||
@ -3,7 +3,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
|
||||
@ -56,14 +56,24 @@
|
||||
<td class="author"><%= h(subfolder.user) if subfolder %></td>
|
||||
<td class="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 +87,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),
|
||||
|
||||
@ -3,7 +3,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
|
||||
@ -20,8 +20,6 @@
|
||||
# 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,
|
||||
@ -30,7 +28,7 @@
|
||||
<% 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),
|
||||
'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="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,7 +46,7 @@
|
||||
<%= 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 %>
|
||||
@ -70,15 +68,22 @@
|
||||
</td>
|
||||
<td class="author"><%= h(file.last_revision.user) %></td>
|
||||
<td class="buttons">
|
||||
<% if @file_manipulation_allowed || @file_approval_allowed %>
|
||||
<% 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 +105,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 +119,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 %>
|
||||
@ -159,7 +163,7 @@
|
||||
<%= content_tag(:span, image_tag('assigned.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,7 +173,6 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="invisible">1</td>
|
||||
<td class="invisible"><%= file.last_revision.size %></td>
|
||||
|
||||
@ -3,7 +3,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
|
||||
@ -24,9 +24,11 @@
|
||||
<td class="title">
|
||||
<%= link_to(h(title),
|
||||
link.external_url,
|
||||
:target => "_blank",
|
||||
:target => '_blank',
|
||||
: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 class="size"></td>
|
||||
<td class="modified"><%= format_time(link.updated_at) %></td>
|
||||
@ -34,11 +36,10 @@
|
||||
<td class="workflow"></td>
|
||||
<td class="author"><%= h(link.user) %></td>
|
||||
<td class="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,10 +47,6 @@
|
||||
: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>
|
||||
|
||||
@ -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
|
||||
@ -20,12 +24,17 @@
|
||||
<% 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 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 %>
|
||||
<%= link_to(l(:label_notifications_off),
|
||||
notify_deactivate_dmsf_path(:id => @project, :folder_id => @folder),
|
||||
@ -39,22 +48,17 @@
|
||||
<% 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 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 icon-dmsf-unlock')%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@ -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) 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,37 +37,16 @@
|
||||
<% 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 icon-dmsf-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 icon-dmsf-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) || (!@filder && @project.dmsf_notification)) %>
|
||||
<%= link_to(l(:label_notifications_off),
|
||||
notify_deactivate_dmsf_path(:id => @project, :folder_id => @folder),
|
||||
:title => l(:title_notifications_active_deactivate),
|
||||
@ -79,12 +57,10 @@
|
||||
:title => l(:title_notifications_not_active_activate),
|
||||
:class => 'icon 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 icon-link') %>
|
||||
<% end %>
|
||||
<%= link_to(l(:link_create_folder),
|
||||
new_dmsf_path(:id => @project, :parent_id => @folder),
|
||||
@ -288,4 +264,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 %>
|
||||
@ -26,11 +26,14 @@
|
||||
|
||||
<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 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 %>
|
||||
<%= link_to(l(:label_notifications_off),
|
||||
notify_deactivate_dmsf_files_path(:id => @file),
|
||||
@ -50,11 +53,9 @@
|
||||
: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 icon-dmsf-unlock')%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@ -62,9 +63,11 @@
|
||||
|
||||
<%= render(:partial => '/dmsf/path', :locals => {:folder => @file.folder, :filename => @file.title}) %>
|
||||
|
||||
<% 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') if User.current.allowed_to?(:file_manipulation, @file.project) %>
|
||||
<%= render(:partial => 'file_new_revision') %>
|
||||
<% end %>
|
||||
|
||||
<h3><%= l(:heading_revisions) %></h3>
|
||||
<% @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 |
@ -208,7 +208,7 @@ table.access-table tbody td, table.access-table tbody tr:hover td {
|
||||
}
|
||||
|
||||
/* 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 label {display: block;}
|
||||
tr.workflow.locked a { color: #aaa; }
|
||||
@ -263,7 +263,6 @@ table.list td.step {
|
||||
.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; }
|
||||
|
||||
@ -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
|
||||
@ -219,7 +219,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
|
||||
|
||||
|
||||
@ -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
|
||||
@ -219,7 +219,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
|
||||
|
||||
|
||||
@ -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
|
||||
@ -219,7 +219,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
|
||||
|
||||
|
||||
@ -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
|
||||
@ -219,7 +219,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
|
||||
|
||||
|
||||
@ -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
|
||||
@ -219,7 +219,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"
|
||||
|
||||
|
||||
@ -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
|
||||
@ -158,7 +158,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 +219,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: "ロックし他メンバとの競合を回避します"
|
||||
|
||||
@ -294,13 +292,14 @@ 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: が次のファイルを更新しました。
|
||||
@ -334,4 +333,3 @@ ja:
|
||||
|
||||
label_maximum_ajax_upload_filesize: アップロードファイルサイズ上限
|
||||
note_maximum_ajax_upload_filesize: アップロード可能なファイルサイズの上限。AjaxおよびRedmineの仕様に制限される(2ギガバイト程度までは確認済み)単位はMB。
|
||||
|
||||
|
||||
@ -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
|
||||
@ -220,7 +219,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 +236,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
|
||||
|
||||
@ -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
|
||||
@ -219,7 +219,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
|
||||
|
||||
|
||||
@ -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
|
||||
@ -219,7 +219,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: "Заблокируйте папку, чтобы запретить ёё изменение другими участниками"
|
||||
|
||||
|
||||
@ -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
|
||||
@ -219,7 +219,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
|
||||
|
||||
|
||||
@ -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>
|
||||
# Copyright (C) 2013 Aecho Liu <aecho1028@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
@ -219,7 +219,6 @@ zh-TW:
|
||||
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: 鎖定資料夾。禁止其它使用者修改。
|
||||
|
||||
|
||||
@ -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
|
||||
@ -219,7 +219,6 @@ zh:
|
||||
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
|
||||
|
||||
|
||||
4
init.rb
4
init.rb
@ -93,7 +93,9 @@ Redmine::Plugin.register :redmine_dmsf do
|
||||
|
||||
# Administration menu extension
|
||||
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
|
||||
|
||||
Redmine::WikiFormatting::Macros.register do
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user