Tag functionalities for new UI
This commit is contained in:
1 parent
ff03d66439
commit
bf3d20ea46
25 files changed
+212
-30
No files matched your search
@@ -28,7 +28,7 @@ module OrbitApp
|
||||
end
|
||||
|
||||
class DataSheet
|
||||
attr_reader :name,:key,:base_path,:module_label,:data_count
|
||||
attr_reader :name,:key,:base_path,:module_label,:data_count, :has_tag
|
||||
|
||||
def initialize(name, &block)
|
||||
@name = name
|
||||
@@ -37,6 +37,7 @@ module OrbitApp
|
||||
@front_end_app_pages = nil
|
||||
@module_label = 'rulingcom.errors.init.module_app_noname'
|
||||
@data_count = 1..15 # as default
|
||||
@has_tag = nil
|
||||
block.arity < 1 ? instance_eval(&block) : block.call(self) if block_given?
|
||||
setup_module_app
|
||||
end
|
||||
@@ -148,6 +149,14 @@ module OrbitApp
|
||||
define_method(field){|var| instance_variable_set( "@" + field, var)}
|
||||
end
|
||||
|
||||
def taggable
|
||||
@has_tag = true
|
||||
end
|
||||
|
||||
def get_has_tags
|
||||
@has_tag.nil? ? false : true
|
||||
end
|
||||
|
||||
end # of class DataSheet
|
||||
|
||||
end
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
# require "action_view"
|
||||
|
||||
require "orbit_tag/taggable"
|
||||
@@ -69,9 +69,12 @@ module OrbitTag
|
||||
end
|
||||
|
||||
module Tagging
|
||||
extend OrbitCoreLib::AppBackendUtility
|
||||
def get_tags
|
||||
@module_app ? @module_app.tags : Tag.all
|
||||
@module_app.tags
|
||||
end
|
||||
|
||||
def get_default_tags
|
||||
Tag.where(default: true)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user