Custom field in DMS Columns #1388
This commit is contained in:
parent
0217c51b67
commit
b413656092
@ -82,6 +82,15 @@ class DmsfFile < ActiveRecord::Base
|
|||||||
@@previews_storage_path = File.join(Rails.root, 'tmp', 'dmsf_previews')
|
@@previews_storage_path = File.join(Rails.root, 'tmp', 'dmsf_previews')
|
||||||
|
|
||||||
before_create :default_values
|
before_create :default_values
|
||||||
|
|
||||||
|
def visible?
|
||||||
|
if self.respond_to?(:type)
|
||||||
|
if /^folder/.match?(type)
|
||||||
|
return DmsfFolder.visible.where(id: self.id).exists?
|
||||||
|
end
|
||||||
|
end
|
||||||
|
true
|
||||||
|
end
|
||||||
|
|
||||||
def default_values
|
def default_values
|
||||||
if Setting.plugin_redmine_dmsf['dmsf_default_notifications'].present? && (!dmsf_folder || !dmsf_folder.system)
|
if Setting.plugin_redmine_dmsf['dmsf_default_notifications'].present? && (!dmsf_folder || !dmsf_folder.system)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user