Add Brief intro. for all personal plugins
Add Share Setting for Personal Plugins ( if have old data must be add default value "field: is_hidden => false " ) Apply New UI to Member Plugin Edit Page Personal Plugin Summary fix Academic Info. list fix
This commit is contained in:
1 parent
b487740035
commit
a067bcd304
159 files changed
+5145
-3453
No files matched your search
@@ -0,0 +1,28 @@
|
||||
class PersonalPluginIntro
|
||||
|
||||
include Mongoid::Document
|
||||
include Mongoid::Timestamps
|
||||
# include OrbitCoreLib::ObjectAuthable
|
||||
# include OrbitCoreLib::ObjectDisable
|
||||
|
||||
# has_and_belongs_to_many :users
|
||||
belongs_to :user
|
||||
|
||||
field :text, localize: true
|
||||
field :brief_intro, :type => Boolean, :default => false
|
||||
field :complete_list, :type => Boolean, :default => true
|
||||
|
||||
|
||||
def pp_object
|
||||
brief_intro
|
||||
end
|
||||
|
||||
def self.from_id(id)
|
||||
PersonalPluginIntro.find(id) rescue nil
|
||||
end
|
||||
|
||||
def self.is_localized?(field_name)
|
||||
self.fields[field_name.to_s].localized?
|
||||
end
|
||||
|
||||
end
|
||||
@@ -38,12 +38,15 @@ class User
|
||||
has_and_belongs_to_many :sub_role_tags
|
||||
|
||||
has_many :user_actions, :dependent => :destroy
|
||||
|
||||
has_many :personal_plugin_intro
|
||||
|
||||
# has_and_belongs_to_many :statuses
|
||||
has_and_belongs_to_many :roles
|
||||
has_and_belongs_to_many :sub_roles
|
||||
has_and_belongs_to_many :role_statuses
|
||||
has_and_belongs_to_many :role_categorys
|
||||
|
||||
accepts_nested_attributes_for :attribute_values, :allow_destroy => true
|
||||
|
||||
before_create :initialize_desktop
|
||||
|
||||
Reference in new issue
Block a user