1.Remove category column when category is specified
2.Showing category if not in category browsing 3.Redirect to home and show error if app page is not available for user language 4.Showing no context to display if object has no language for it. 5.Browse new and announcement by unit is now applicable.
This commit is contained in:
1 parent
80887ace3c
commit
cbf7ccc13b
21 files changed
+126
-56
No files matched your search
+4
-1
@@ -23,7 +23,10 @@ class Item
|
||||
before_destroy :destroy_children
|
||||
after_rearrange :rebuild_path, :if => "parent_id_changed?"
|
||||
|
||||
|
||||
def enabled_for_lang(lang)
|
||||
enabled_for.include?(lang)
|
||||
end
|
||||
|
||||
def self.find_by_name(item_name)
|
||||
Item.first(:conditions => { :name => item_name, :is_published => true })
|
||||
end
|
||||
|
||||
+2
-2
@@ -6,8 +6,8 @@ class Page < Item
|
||||
field :content
|
||||
field :app_frontend_url
|
||||
field :theme_id, :type => BSON::ObjectId, :default => nil
|
||||
field :category
|
||||
field :tag
|
||||
field :category, :default => ''
|
||||
field :tag, :default => ''
|
||||
field :view_count, :type => Integer, :default => 0
|
||||
field :page_title, localize: true
|
||||
|
||||
|
||||
@@ -31,12 +31,7 @@ class User
|
||||
|
||||
VALID_LOCALES.each do |loc|
|
||||
locale = loc.to_sym
|
||||
# debugger
|
||||
# if(self.cache_dept.nil?)
|
||||
# self.build_cache_dept key: "dept_cache_user_#{self.id}"
|
||||
# end
|
||||
dept_hash[locale] = sub_roles.collect{|sr| sr.title}.join(',')
|
||||
# self.cache_dept[locale] = sub_roles.collect{|sr| sr.title}.join(',')
|
||||
end
|
||||
self.cache_dept = dept_hash
|
||||
self.save!
|
||||
|
||||
Reference in new issue
Block a user