Remove useless tag controllers and models
This commit is contained in:
parent
49d0d83810
commit
41dadfb4e9
|
@ -1,15 +0,0 @@
|
|||
class AnnouncementTag < Tag
|
||||
|
||||
has_and_belongs_to_many :bulletins
|
||||
field :order,:default => 0
|
||||
|
||||
def get_visible_bulletins(sort = :title)
|
||||
date_now = Time.now
|
||||
self.bulletins.where(:is_hidden => false).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc(:is_top, sort)
|
||||
end
|
||||
|
||||
def bulletins
|
||||
Bulletin.all.any_in(:_id => bulletin_ids)
|
||||
end
|
||||
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
class Panel::Archive::BackEnd::TagsController < Admin::TagsController
|
||||
|
||||
def initialize
|
||||
super
|
||||
@app_title = 'archive'
|
||||
end
|
||||
|
||||
end
|
|
@ -1,10 +0,0 @@
|
|||
class ArchiveTag < Tag
|
||||
|
||||
has_and_belongs_to_many :archive_files
|
||||
|
||||
|
||||
def get_visible_links(sort = :name)
|
||||
self.archive_files.where(:is_hidden => false).desc(:is_top, sort)
|
||||
end
|
||||
|
||||
end
|
|
@ -1,6 +0,0 @@
|
|||
class Panel::Calendar::BackEnd::TagsController < Admin::TagsController
|
||||
def initialize
|
||||
super
|
||||
@app_title = 'calendar'
|
||||
end
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
class Panel::Faq::BackEnd::TagsController < Admin::TagsController
|
||||
|
||||
def initialize
|
||||
super
|
||||
@app_title = 'faq'
|
||||
end
|
||||
|
||||
end
|
|
@ -1,10 +0,0 @@
|
|||
class FaqTag < Tag
|
||||
|
||||
has_and_belongs_to_many :qas
|
||||
|
||||
|
||||
def get_visible_links(sort = :title)
|
||||
self.qas.where(:is_hidden => false).desc(:is_top, sort)
|
||||
end
|
||||
|
||||
end
|
|
@ -1,6 +0,0 @@
|
|||
class GalleryTag < Tag
|
||||
|
||||
has_and_belongs_to_many :gallery_albums
|
||||
has_and_belongs_to_many :gallery_images
|
||||
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
class Panel::PersonalBook::BackEnd::TagsController < Admin::TagsController
|
||||
|
||||
def initialize
|
||||
super
|
||||
@app_title = 'personal_book'
|
||||
end
|
||||
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class PersonalBookTag < Tag
|
||||
|
||||
has_and_belongs_to_many :writing_books
|
||||
|
||||
def get_visible_links(sort = :title)
|
||||
self.writing_books.where(:is_hidden => false).desc(:is_top, sort)
|
||||
end
|
||||
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
class Panel::PersonalConference::BackEnd::TagsController < Admin::TagsController
|
||||
|
||||
def initialize
|
||||
super
|
||||
@app_title = 'personal_conference'
|
||||
end
|
||||
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class PersonalConferenceTag < Tag
|
||||
|
||||
has_and_belongs_to_many :writing_conferences
|
||||
|
||||
def get_visible_links(sort = :title)
|
||||
self.writing_conferences.where(:is_hidden => false).desc(:is_top, sort)
|
||||
end
|
||||
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
class Panel::PersonalDiploma::BackEnd::TagsController < Admin::TagsController
|
||||
|
||||
def initialize
|
||||
super
|
||||
@app_title = 'personal_diploma'
|
||||
end
|
||||
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class PersonalDiplomaTag < Tag
|
||||
|
||||
has_and_belongs_to_many :diplomas
|
||||
|
||||
def get_visible_links(sort = :title)
|
||||
self.diplomas.where(:is_hidden => false).desc(:is_top, sort)
|
||||
end
|
||||
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
class Panel::PersonalExperience::BackEnd::TagsController < Admin::TagsController
|
||||
|
||||
def initialize
|
||||
super
|
||||
@app_title = 'personal_experience'
|
||||
end
|
||||
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class PersonalExperienceTag < Tag
|
||||
|
||||
has_and_belongs_to_many :experiences
|
||||
|
||||
def get_visible_links(sort = :title)
|
||||
self.experiences.where(:is_hidden => false).desc(:is_top, sort)
|
||||
end
|
||||
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
class Panel::PersonalHonor::BackEnd::TagsController < Admin::TagsController
|
||||
|
||||
def initialize
|
||||
super
|
||||
@app_title = 'personal_honor'
|
||||
end
|
||||
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class PersonalHonorTag < Tag
|
||||
|
||||
has_and_belongs_to_many :honors
|
||||
|
||||
def get_visible_links(sort = :title)
|
||||
self.honors.where(:is_hidden => false).desc(:is_top, sort)
|
||||
end
|
||||
|
||||
end
|
|
@ -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
|
|
@ -1,8 +0,0 @@
|
|||
class Panel::PersonalLab::BackEnd::TagsController < Admin::TagsController
|
||||
|
||||
def initialize
|
||||
super
|
||||
@app_title = 'personal_lab'
|
||||
end
|
||||
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class PersonalLabTag < Tag
|
||||
|
||||
has_and_belongs_to_many :labs
|
||||
|
||||
def get_visible_links(sort = :title)
|
||||
self.labs.where(:is_hidden => false).desc(:is_top, sort)
|
||||
end
|
||||
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
class Panel::PersonalPatent::BackEnd::TagsController < Admin::TagsController
|
||||
|
||||
def initialize
|
||||
super
|
||||
@app_title = 'personal_patent'
|
||||
end
|
||||
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class PersonalPatentTag < Tag
|
||||
|
||||
has_and_belongs_to_many :writing_patents
|
||||
|
||||
def get_visible_links(sort = :title)
|
||||
self.writing_patents.where(:is_hidden => false).desc(:is_top, sort)
|
||||
end
|
||||
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
class Panel::PersonalProject::BackEnd::TagsController < Admin::TagsController
|
||||
|
||||
def initialize
|
||||
super
|
||||
@app_title = 'personal_project'
|
||||
end
|
||||
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class PersonalProjectTag < Tag
|
||||
|
||||
has_and_belongs_to_many :projects
|
||||
|
||||
def get_visible_links(sort = :title)
|
||||
self.projects.where(:is_hidden => false).desc(:is_top, sort)
|
||||
end
|
||||
|
||||
end
|
|
@ -1,10 +0,0 @@
|
|||
class Panel::PersonalResearch::BackEnd::TagsController < Admin::TagsController
|
||||
|
||||
include OrbitControllerLib::DivisionForDisable
|
||||
|
||||
def initialize
|
||||
super
|
||||
@app_title = 'personal_research'
|
||||
end
|
||||
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class PersonalResearchTag < Tag
|
||||
|
||||
has_and_belongs_to_many :researchs
|
||||
|
||||
def get_visible_links(sort = :title)
|
||||
self.researchs.where(:is_hidden => false).desc(:is_top, sort)
|
||||
end
|
||||
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
class Panel::WebResource::BackEnd::TagsController < Admin::TagsController
|
||||
|
||||
def initialize
|
||||
super
|
||||
@app_title = 'web_resource'
|
||||
end
|
||||
|
||||
end
|
|
@ -1,10 +0,0 @@
|
|||
class WebResourceTag < Tag
|
||||
|
||||
has_and_belongs_to_many :web_links
|
||||
|
||||
|
||||
def get_visible_links(sort = :title)
|
||||
self.web_links.where(:is_hidden => false).desc(:is_top, sort)
|
||||
end
|
||||
|
||||
end
|
Loading…
Reference in New Issue