New UI changes(tags, categories, authorisations, module index…)

To run:
  - ruby lib/remove_old_tags.rb DB_NAME
  - rake new_ui:migrate_tags
  - rake new_ui:migrate_categories['APP_KEY,''MODEL_NAME'] (check new_ui.rake for more details)
This commit is contained in:
chris committed 2013-07-02 16:46:44 +08:00
1 parent 07b3857465
commit 856898016b
1495 files changed
+52132 -9876

No files matched your search

@@ -1,10 +0,0 @@
class Panel::PersonalJournal::BackEnd::TagsController < Admin::TagsController
include OrbitControllerLib::DivisionForDisable
def initialize
super
@app_title = 'personal_journal'
end
end
@@ -1,7 +0,0 @@
class PersonalJournalTag < Tag
has_and_belongs_to_many :writing_journals
def get_visible_links(sort = :title)
self.writing_journals.where(:is_hidden => false).desc(:is_top, sort)
end
end
@@ -3,8 +3,9 @@ class WritingJournal
include Mongoid::Timestamps
include Mongoid::MultiParameterAttributes
include OrbitModel::LanguageRestrict
include OrbitModel::Status
include OrbitTag::Taggable
taggable
LANGUAGE_TYPES = [ "English", "Chinese" ]
@@ -79,20 +80,6 @@ class WritingJournal
where( :is_hidden => false ).desc(:is_top, :created_at)
end
def is_top?
self.is_top
end
def update_avliable_language
VALID_LOCALES.each do |locale|
if (title_translations[locale].blank? rescue true)
self["available_for_#{locale}".to_sym] = false
else
self["available_for_#{locale}".to_sym] = true
end
end
end
def save_writing_journal_files
self.writing_journal_files.each do |t|
if t.should_destroy