* fixed Issue 153: Losing revision history across a move
git-svn-id: http://redmine-dmsf.googlecode.com/svn/trunk/redmine_dmsf@249 5e329b0b-a2ee-ea63-e329-299493fc886d
This commit is contained in:
parent
a52382ad8b
commit
73a9b718a3
@ -98,6 +98,11 @@ class DmsfFilesCopyController < ApplicationController
|
||||
|
||||
flash[:notice] = l(:notice_file_copied)
|
||||
log_activity(file, "was copied (is copy)")
|
||||
begin
|
||||
DmsfMailer.deliver_files_updated(User.current, [file])
|
||||
rescue ActionView::MissingTemplate => e
|
||||
Rails.logger.error "Could not send email notifications: " + e
|
||||
end
|
||||
|
||||
redirect_to :controller => "dmsf_files", :action => "show", :id => file
|
||||
end
|
||||
@ -138,9 +143,13 @@ class DmsfFilesCopyController < ApplicationController
|
||||
|
||||
flash[:notice] = l(:notice_file_moved)
|
||||
log_activity(@file, "was moved (is copy)")
|
||||
begin
|
||||
DmsfMailer.deliver_files_updated(User.current, [@file])
|
||||
rescue ActionView::MissingTemplate => e
|
||||
Rails.logger.error "Could not send email notifications: " + e
|
||||
end
|
||||
|
||||
# TODO: implement proper mail notification
|
||||
#DmsfMailer.deliver_files_deleted(User.current, [@file])
|
||||
|
||||
redirect_to :controller => "dmsf_files", :action => "show", :id => @file
|
||||
end
|
||||
|
||||
@ -33,10 +33,19 @@
|
||||
</div>
|
||||
|
||||
<%= submit_tag(l(:button_copy)) %>
|
||||
<%= submit_tag(l(:button_move), :name => 'move') if User.current.allowed_to?(:file_manipulation, @project) %>
|
||||
<% if User.current.allowed_to?(:file_manipulation, @project) %>
|
||||
<button type="button" id="move_button" title="<%=l(:button_move)%>"><%=l(:button_move)%></button>
|
||||
<% end %>
|
||||
<% 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();
|
||||
});
|
||||
</script>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= stylesheet_link_tag "dmsf", :plugin => "redmine_dmsf" %>
|
||||
<%= robot_exclusion_tag %>
|
||||
|
||||
@ -174,4 +174,5 @@ cs:
|
||||
:label_target_folder: "Cílový adresář"
|
||||
:title_copy_or_move: "Kopírovat/Přesunout"
|
||||
:label_dmsf_folder_plural: "Dmsf složky"
|
||||
:comment_moved_from: "Přesunuto z %{source}"
|
||||
|
||||
@ -175,4 +175,5 @@ de:
|
||||
:label_target_folder: "Target folder"
|
||||
:title_copy_or_move: "Copy/Move"
|
||||
:label_dmsf_folder_plural: "Dmsf folders"
|
||||
:comment_moved_from: "Moved from %{source}"
|
||||
|
||||
@ -170,4 +170,5 @@ en-GB:
|
||||
:label_target_folder: "Target folder"
|
||||
:title_copy_or_move: "Copy/Move"
|
||||
:label_dmsf_folder_plural: "Dmsf folders"
|
||||
:comment_moved_from: "Moved from %{source}"
|
||||
|
||||
@ -170,4 +170,5 @@ en-GB:
|
||||
:label_target_folder: "Target folder"
|
||||
:title_copy_or_move: "Copy/Move"
|
||||
:label_dmsf_folder_plural: "Dmsf folders"
|
||||
:comment_moved_from: "Moved from %{source}"
|
||||
|
||||
@ -175,4 +175,5 @@ en:
|
||||
:title_copy_or_move: "Copy/Move"
|
||||
:label_dmsf_folder_plural: "Dmsf folders"
|
||||
|
||||
:comment_moved_from: "Moved from %{source}"
|
||||
|
||||
@ -172,4 +172,5 @@ es:
|
||||
:label_target_folder: "Target folder"
|
||||
:title_copy_or_move: "Copy/Move"
|
||||
:label_dmsf_folder_plural: "Dmsf folders"
|
||||
:comment_moved_from: "Moved from %{source}"
|
||||
|
||||
@ -170,4 +170,5 @@ fr:
|
||||
:label_target_folder: "Target folder"
|
||||
:title_copy_or_move: "Copy/Move"
|
||||
:label_dmsf_folder_plural: "Dmsf folders"
|
||||
:comment_moved_from: "Moved from %{source}"
|
||||
|
||||
@ -174,3 +174,6 @@ ja:
|
||||
:title_copy_or_move: "コピー/移動"
|
||||
:label_dmsf_folder_plural: "Dmsf フォルダ"
|
||||
|
||||
#Not translated
|
||||
:comment_moved_from: "Moved from %{source}"
|
||||
|
||||
@ -174,4 +174,7 @@ ru:
|
||||
:label_target_folder: "Каталог назначения"
|
||||
:title_copy_or_move: "Скопировать/Переместить"
|
||||
:label_dmsf_folder_plural: "Каталоги документооборота"
|
||||
|
||||
#Not translated
|
||||
:comment_moved_from: "Moved from %{source}"
|
||||
|
||||
@ -177,4 +177,5 @@ zh:
|
||||
:label_target_folder: "Target folder"
|
||||
:title_copy_or_move: "Copy/Move"
|
||||
:label_dmsf_folder_plural: "Dmsf folders"
|
||||
:comment_moved_from: "Moved from %{source}"
|
||||
|
||||
2
init.rb
2
init.rb
@ -55,7 +55,7 @@ Redmine::Plugin.register :redmine_dmsf do
|
||||
permission :view_dmsf_folders, {:dmsf => [:show]}
|
||||
permission :user_preferences, {:dmsf_state => [:user_pref_save]}
|
||||
permission :view_dmsf_files, {:dmsf => [:entries_operation, :entries_email],
|
||||
:dmsf_files => [:show], :dmsf_files_copy => [:new, :create]}
|
||||
:dmsf_files => [:show], :dmsf_files_copy => [:new, :create, :move]}
|
||||
permission :folder_manipulation, {:dmsf => [:new, :create, :delete, :edit, :save, :edit_root, :save_root]}
|
||||
permission :file_manipulation, {:dmsf_files => [:create_revision, :delete, :lock, :unlock],
|
||||
:dmsf_upload => [:upload_files, :upload_file, :commit_files]}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user