Cannot create a document workflow #368
This commit is contained in:
parent
919de630ec
commit
7158dcaba0
@ -83,7 +83,7 @@ class DmsfController < ApplicationController
|
||||
end
|
||||
@file_links = []
|
||||
DmsfLink.where(:project_id => @project.id, :target_type => DmsfFile.model_name).visible.each do |l|
|
||||
r = l.target_file.last_revision
|
||||
r = l.target_file.last_revision if l.target_file
|
||||
if r
|
||||
r.custom_field_values.each do |v|
|
||||
if v.custom_field_id == params[:custom_field_id].to_i
|
||||
@ -97,7 +97,7 @@ class DmsfController < ApplicationController
|
||||
end
|
||||
@url_links = []
|
||||
DmsfLink.where(:project_id => @project.id, :target_type => 'DmsfUrl').visible.each do |l|
|
||||
r = l.target_file.last_revision
|
||||
r = l.target_file.last_revision if l.target_file
|
||||
if r
|
||||
r.custom_field_values.each do |v|
|
||||
if v.custom_field_id == params[:custom_field_id].to_i
|
||||
|
||||
@ -101,9 +101,9 @@ class DmsfFilesController < ApplicationController
|
||||
flash[:error] = l(:error_file_is_locked)
|
||||
else
|
||||
if (Rails::VERSION::MAJOR > 3)
|
||||
aparams = frev_params
|
||||
aparams = frev_params[:dmsf_file_revision]
|
||||
else
|
||||
aparams = params
|
||||
aparams = params[:dmsf_file_revision]
|
||||
end
|
||||
revision = DmsfFileRevision.new(aparams)
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ class DmsfFolder < ActiveRecord::Base
|
||||
cattr_reader :invalid_characters
|
||||
@@invalid_characters = /\A[^\/\\\?":<>]*\z/
|
||||
|
||||
attr_accessible :title, :description, :dmsf_folder_id
|
||||
attr_accessible :title, :description, :dmsf_folder_id, :project
|
||||
|
||||
belongs_to :project
|
||||
belongs_to :folder, :class_name => 'DmsfFolder', :foreign_key => 'dmsf_folder_id'
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<%# Redmine plugin for Document Management System "Features"
|
||||
#
|
||||
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
||||
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
||||
# Copyright (C) 2014 Karel Pičman <karel.picman@kontron.com>
|
||||
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
||||
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
||||
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
@ -18,8 +18,8 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
|
||||
|
||||
<%= link_to User.current, user_path(User.current, :only_path => false) %> <%= l(:text_email_doc_deleted) %>
|
||||
<%= link_to @project, project_path(@project, :only_path => false) %> <%= l(:text_email_doc_follows) %>
|
||||
<%= link_to User.current, user_url(User.current) %> <%= l(:text_email_doc_deleted) %>
|
||||
<%= link_to @project, project_url(@project) %> <%= l(:text_email_doc_follows) %>
|
||||
<% @files.each do |file| %>
|
||||
<p>
|
||||
<%= h(file.dmsf_path_str) %> (<%= file.name %>)
|
||||
@ -27,4 +27,4 @@
|
||||
, <%= number_to_human_size(file.last_revision.size) %>, <%= l(:label_version) %> <%= file.last_revision.major_version %>.<%= file.last_revision.minor_version %>
|
||||
<% end %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@ -1,8 +1,8 @@
|
||||
<%# Redmine plugin for Document Management System "Features"
|
||||
#
|
||||
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
||||
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
||||
# Copyright (C) 2014 Karel Pičman <karel.picman@kontron.com>
|
||||
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
||||
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
||||
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<%# Redmine plugin for Document Management System "Features"
|
||||
#
|
||||
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
||||
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
||||
# Copyright (C) 2014 Karel Pičman <karel.picman@kontron.com>
|
||||
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
||||
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
||||
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
@ -18,21 +18,20 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.%>
|
||||
|
||||
<%= link_to User.current, user_path(User.current, :only_path => false) %> <%= l(:text_email_doc_updated) %>
|
||||
<%= link_to @project, project_path(@project, :only_path => false) %> <%= l(:text_email_doc_follows) %>
|
||||
<%= link_to User.current, user_url(User.current) %> <%= l(:text_email_doc_updated) %>
|
||||
<%= link_to @project, project_url(@project) %> <%= l(:text_email_doc_follows) %>
|
||||
<% @files.each do |file| %>
|
||||
<p>
|
||||
<%= link_to(h(file.dmsf_path_str),
|
||||
dmsf_file_path(file, :download => '', :only_path => false)) %>
|
||||
dmsf_file_url(file, :download => '')) %>
|
||||
(<%= file.name %>),
|
||||
<%= number_to_human_size(file.last_revision.size) %>,
|
||||
<%= l(:label_version) %> <%= file.last_revision.major_version %>.<%= file.last_revision.minor_version %>,
|
||||
<%= "#{file.last_revision.workflow_str(true)}," if file.last_revision.workflow_str(true) != l(:title_none) %>
|
||||
<%= link_to(l(:link_details, :title => h(file.title)),
|
||||
dmsf_file_path(file, :only_path => false)) %>
|
||||
dmsf_file_url(file)) %>
|
||||
<% if file.last_revision.comment.present? %>
|
||||
<br/><span style="font-size: 0.9em"> <em><%= h(file.last_revision.comment) %></em></span>
|
||||
<% end %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
@ -1,8 +1,8 @@
|
||||
<%# Redmine plugin for Document Management System "Features"
|
||||
#
|
||||
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
||||
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
||||
# Copyright (C) 2014 Karel Pičman <karel.picman@kontron.com>
|
||||
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
||||
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
||||
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
@ -25,7 +25,7 @@
|
||||
<%= number_to_human_size(file.last_revision.size) %>,
|
||||
<%= l(:label_version) %> <%= file.last_revision.major_version %>.<%= file.last_revision.minor_version %>,
|
||||
<%= "#{file.last_revision.workflow_str(true)}," if file.last_revision.workflow_str(true) != l(:title_none) %>
|
||||
<%= dmsf_file_path(file, :only_path => false) %>
|
||||
<%= dmsf_file_url(file) %>
|
||||
<% if file.last_revision.comment.present? %>
|
||||
<%= l(:label_comment) %> <%= h(file.last_revision.comment) %>
|
||||
<% end %>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
||||
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
||||
# Copyright (C) 2011-14 Karel Pičman <karel.picman@kontron.com>
|
||||
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
@ -32,8 +32,8 @@
|
||||
<%= link_to(h(dir.dmsf_path_str), dmsf_folder_path(:id => dir.project_id, :folder_id => dir.id, :only_path => false)) %>
|
||||
<br/><br/>
|
||||
<% dir.files.each do |file| %>
|
||||
<%= link_to(h(file.title), dmsf_file_path(file, :only_path => false)) %>
|
||||
(<%= link_to(h(file.name), dmsf_file_path(file, :download => '', :only_path => false)) %>)
|
||||
<%= link_to(h(file.title), dmsf_file_url(file)) %>
|
||||
(<%= link_to(h(file.name), dmsf_file_url(file, :download => '')) %>)
|
||||
<br/>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@ -46,8 +46,8 @@
|
||||
<% JSON.parse(@files).each do |id| %>
|
||||
<% file = DmsfFile.find_by_id id %>
|
||||
<% if file %>
|
||||
<%= link_to(h(file.title), dmsf_file_path(file, :only_path => false)) %>
|
||||
(<%= link_to(h(file.name), dmsf_file_path(file, :download => '', :only_path => false)) %>)
|
||||
<%= link_to(h(file.title), dmsf_file_url(file)) %>
|
||||
(<%= link_to(h(file.name), dmsf_file_url(file, :download => '')) %>)
|
||||
<br/>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#
|
||||
# Copyright (C) 2011 Vít Jonáš <vit.jonas@gmail.com>
|
||||
# Copyright (C) 2012 Daniel Munn <dan.munn@munnster.co.uk>
|
||||
# Copyright (C) 2011-14 Karel Pičman <karel.picman@kontron.com>
|
||||
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
@ -30,7 +30,7 @@
|
||||
<% if dir %>
|
||||
<%= dir.dmsf_path_str %>
|
||||
<% dir.files.each do |file| %>
|
||||
<%= dmsf_file_path(file, :download => '', :only_path => false) %>
|
||||
<%= dmsf_file_url(file, :download => '') %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
@ -41,7 +41,7 @@
|
||||
<% JSON.parse(@files).each do |id| %>
|
||||
<% file = DmsfFile.find_by_id id %>
|
||||
<% if file %>
|
||||
<%= dmsf_file_path(file, :download => '', :only_path => false) %>
|
||||
<%= dmsf_file_url(file, :download => '') %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<%# Redmine plugin for Document Management System "Features"
|
||||
#
|
||||
# Copyright (C) 2013 Karel Pičman <karel.picman@kontron.com>
|
||||
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
@ -24,10 +24,9 @@
|
||||
<%= @text2 %>
|
||||
<% unless @revision.file.folder %>
|
||||
<%= link_to l(:link_documents),
|
||||
dmsf_folder_path(:id => @revision.file.project, :only_path => false) %>
|
||||
dmsf_folder_url(:id => @revision.file.project) %>
|
||||
<% else %>
|
||||
<%= link_to @revision.file.folder.title,
|
||||
dmsf_folder_path(:id => @revision.file.project, :folder_id => @revision.file.folder, :only_path => false) %>
|
||||
dmsf_folder_url(:id => @revision.file.project, :folder_id => @revision.file.folder) %>
|
||||
<% end %>.
|
||||
</p>
|
||||
|
||||
</p>
|
||||
@ -1,6 +1,6 @@
|
||||
<%# Redmine plugin for Document Management System "Features"
|
||||
#
|
||||
# Copyright (C) 2013 Karel Pičman <karel.picman@kontron.com>
|
||||
# Copyright (C) 2011-15 Karel Pičman <karel.picman@kontron.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
@ -19,7 +19,7 @@
|
||||
<%= @user.name %>,
|
||||
<%= @text1 %>
|
||||
<% unless @revision.file.folder %>
|
||||
<%= @text2 %> <%= dmsf_folder_path(:id => @revision.file.project, :only_path => false) %>.
|
||||
<%= @text2 %> <%= dmsf_folder_url(:id => @revision.file.project) %>.
|
||||
<% else %>
|
||||
<%= @text2 %> <%= dmsf_folder_path(:id => @revision.file.project, :folder_id => @revision.file.folder, :only_path => false) %>.
|
||||
<% end %>
|
||||
<%= @text2 %> <%= dmsf_folder_url(:id => @revision.file.project, :folder_id => @revision.file.folder) %>.
|
||||
<% end %>
|
||||
Loading…
x
Reference in New Issue
Block a user