diff --git a/app/views/dmsf_files/_link.html.erb b/app/views/dmsf_files/_link.html.erb index 0278770e..fa69519a 100644 --- a/app/views/dmsf_files/_link.html.erb +++ b/app/views/dmsf_files/_link.html.erb @@ -51,9 +51,9 @@ <% end %> <% # Email %> - <%= link_to('', entries_operations_dmsf_path(:id => dmsf_file.project, :email_entries => 'email', :files => [dmsf_file.id]), :method => :post, - :title => l(:heading_send_documents_by_email), - :class => 'icon-only icon-email-disabled') %> + <%= link_to('', entries_operations_dmsf_path(:id => dmsf_file.project_id, :email_entries => 'email', + :files => [dmsf_file.id]), :method => :post, :title => l(:heading_send_documents_by_email), + :class => 'icon-only icon-email-disabled') %> <% # Lock %> <% if !dmsf_file.locked? %> <%= link_to('', lock_dmsf_files_path(:id => dmsf_file), @@ -95,7 +95,7 @@ <%= render(:partial => 'dmsf_files/approval_workflow_button', :locals => {:file => dmsf_file, :file_approval_allowed => User.current.allowed_to?(:file_approval, dmsf_file.project), - :workflows_available => DmsfWorkflow.where(['project_id = ? OR project_id IS NULL', dmsf_file.project.id]).exists?, + :workflows_available => DmsfWorkflow.where(['project_id = ? OR project_id IS NULL', dmsf_file.project_id]).exists?, :project => dmsf_file.project, :wf => wf, :dmsf_link_id => nil }) %>

diff --git a/app/views/dmsf_workflows/_assign.html.erb b/app/views/dmsf_workflows/_assign.html.erb index 9f9bea55..33479413 100644 --- a/app/views/dmsf_workflows/_assign.html.erb +++ b/app/views/dmsf_workflows/_assign.html.erb @@ -17,11 +17,13 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%> +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +%>

<%= l(:field_label_dmsf_workflow) %>

+<% remote = params[:dmsf_link_id] || params[:attachment_id] %> <%= form_tag({:controller => 'dmsf_workflows', :action => 'assignment'}, - :method => :post, :id => 'assignment-form', :remote => params[:dmsf_link_id] || params[:attachment_id]) do %> + :method => :post, :id => 'assignment-form', :remote => remote) do %> <%= hidden_field_tag :dmsf_file_revision_id, params[:dmsf_file_revision_id] %> <%= hidden_field_tag :dmsf_link_id, params[:dmsf_link_id] %> <%= hidden_field_tag :attachment_id, params[:attachment_id] %> @@ -31,9 +33,10 @@ 'dmsf_workflow_id', dmsf_workflows_for_select(@project, nil))%>

- <% if User.current.allowed_to?(:manage_workflows, @project) %> + <% if (!remote) && User.current.allowed_to?(:manage_workflows, @project) %>

- <%= link_to l(:label_dmsf_workflow_new), new_dmsf_workflow_path(:project_id => @project.id), :class => 'icon icon-add' %> + <%= link_to l(:label_dmsf_workflow_new), new_dmsf_workflow_path(:project_id => @project.id), + :class => 'icon icon-add' %>

<% end %>

diff --git a/app/views/dmsf_workflows/assign.js.erb b/app/views/dmsf_workflows/assign.js.erb index b9793691..3866062b 100644 --- a/app/views/dmsf_workflows/assign.js.erb +++ b/app/views/dmsf_workflows/assign.js.erb @@ -1,7 +1,9 @@ <% +# encoding: utf-8 +# # Redmine plugin for Document Management System "Features" # -# Copyright (C) 2011-15 Karel Pičman +# Copyright (C) 2011-17 Karel Pičman # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License