Cannot create a document workflow #368
This commit is contained in:
parent
7158dcaba0
commit
34f68d1718
@ -1,3 +1,5 @@
|
|||||||
|
# encoding: utf-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>
|
||||||
@ -31,6 +33,7 @@ class DmsfFile < ActiveRecord::Base
|
|||||||
include RedmineDmsf::Lockable
|
include RedmineDmsf::Lockable
|
||||||
|
|
||||||
attr_accessor :event_description
|
attr_accessor :event_description
|
||||||
|
attr_accessible :project
|
||||||
|
|
||||||
belongs_to :project
|
belongs_to :project
|
||||||
belongs_to :folder, :class_name => 'DmsfFolder', :foreign_key => 'dmsf_folder_id'
|
belongs_to :folder, :class_name => 'DmsfFolder', :foreign_key => 'dmsf_folder_id'
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
|
# encoding: utf-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-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
|
# 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
|
||||||
@ -30,6 +32,7 @@ class DmsfFileRevision < ActiveRecord::Base
|
|||||||
accepts_nested_attributes_for :access, :dmsf_workflow_step_assignment, :file, :user
|
accepts_nested_attributes_for :access, :dmsf_workflow_step_assignment, :file, :user
|
||||||
end
|
end
|
||||||
|
|
||||||
|
attr_accessible :file
|
||||||
|
|
||||||
# Returns a list of revisions that are not deleted here, or deleted at parent level either
|
# Returns a list of revisions that are not deleted here, or deleted at parent level either
|
||||||
if (Rails::VERSION::MAJOR > 3)
|
if (Rails::VERSION::MAJOR > 3)
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
|
# encoding: utf-8
|
||||||
|
#
|
||||||
# Redmine plugin for Document Management System "Features"
|
# Redmine plugin for Document Management System "Features"
|
||||||
#
|
#
|
||||||
# Copyright (C) 2013 Karel Picman <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
|
# 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
|
||||||
@ -24,6 +26,8 @@ class DmsfWorkflowStepAssignment < ActiveRecord::Base
|
|||||||
validates :dmsf_workflow_step_id, :dmsf_file_revision_id, :presence => true
|
validates :dmsf_workflow_step_id, :dmsf_file_revision_id, :presence => true
|
||||||
validates_uniqueness_of :dmsf_workflow_step_id, :scope => [:dmsf_file_revision_id]
|
validates_uniqueness_of :dmsf_workflow_step_id, :scope => [:dmsf_file_revision_id]
|
||||||
|
|
||||||
|
attr_accessible :dmsf_workflow_step_id, :user_id, :dmsf_file_revision_id
|
||||||
|
|
||||||
def add?(dmsf_file_revision_id)
|
def add?(dmsf_file_revision_id)
|
||||||
if self.dmsf_file_revision_id == dmsf_file_revision_id
|
if self.dmsf_file_revision_id == dmsf_file_revision_id
|
||||||
add = true
|
add = true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user