diff --git a/app/views/layouts/module_widget.html.erb b/app/views/layouts/module_widget.html.erb index e010355e..3cd028aa 100644 --- a/app/views/layouts/module_widget.html.erb +++ b/app/views/layouts/module_widget.html.erb @@ -4,8 +4,8 @@ - <%= stylesheet_link_tag "widget" %> - <%= javascript_include_tag "widget" %> + <%#= stylesheet_link_tag "widget" %> + <%= javascript_include_tag "module_widget" %> <%= csrf_meta_tag %>
diff --git a/vendor/built_in_modules/announcement/announcement.json b/vendor/built_in_modules/announcement/announcement.json index 605c912e..0751a0e7 100644 --- a/vendor/built_in_modules/announcement/announcement.json +++ b/vendor/built_in_modules/announcement/announcement.json @@ -7,6 +7,6 @@ "update_info": "Some info", "create_date": "11-11-2011", "app_pages": ["bulletins"], - "widgets": ["bulletins","bulletins_list", "bulletins_and_web_links"], + "widgets": ["bulletins", "bulletins_and_web_links"], "enable_frontend": true } diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb index a8ca336e..db43aa8d 100644 --- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb +++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb @@ -19,17 +19,6 @@ class Panel::Announcement::Widget::BulletinsController < ObitWidgetController end - def bulletins_list - - @bulletins = Bulletin.widget_datas.limit(5) - - # get_categorys - - module_app = ModuleApp.first(:conditions => {:key => 'announcement'}) - @tags = Tag.all(:conditions => {:module_app_id => module_app.id}) - - end - def bulletins_and_web_links @tags = AnnouncementTag.all @selected_tag = AnnouncementTag.find(params[:id]) rescue @tags[0] diff --git a/vendor/built_in_modules/announcement/app/models/announcement_tag.rb b/vendor/built_in_modules/announcement/app/models/announcement_tag.rb index b40ace36..9656db7d 100644 --- a/vendor/built_in_modules/announcement/app/models/announcement_tag.rb +++ b/vendor/built_in_modules/announcement/app/models/announcement_tag.rb @@ -4,7 +4,7 @@ class AnnouncementTag < Tag def get_visible_bulletins(sort = :name) - self.bulletins.where(:is_hidden => false).desc(:is_top, sort) + 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 end \ No newline at end of file diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/bulletins_and_web_links.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/bulletins_and_web_links.html.erb index 0d1bc047..c8006636 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/bulletins_and_web_links.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/bulletins_and_web_links.html.erb @@ -6,12 +6,12 @@