From 4cfae9c107f2dfbf6a3b19b1c509197819815496 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 18 Jan 2012 21:34:26 +0800 Subject: [PATCH] announcement widget query --- app/controllers/application_controller.rb | 2 +- lib/fraisier/layout.html | 1 + .../back_end/bulletins_controller.rb | 6 +- .../widget/bulletins_controller.rb | 30 +++++++++ .../announcement/app/models/bulletin.rb | 36 ++++++++++- .../back_end/bulletins/index.html.erb | 4 +- .../front_end/bulletins/index.html.erb | 19 +++--- .../front_end/bulletins/show.html.erb | 63 ++++++++++++------- .../widget/bulletins/index.html.erb | 20 ++++++ .../announcement/config/routes.rb | 4 +- 10 files changed, 141 insertions(+), 44 deletions(-) create mode 100644 vendor/built_in_modules/announcement/app/controllers/panel/announcement/widget/bulletins_controller.rb create mode 100644 vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/index.html.erb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 6bdac5ee..e4e94c12 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -9,7 +9,7 @@ class ApplicationController < ActionController::Base def front_end_available(module_app_title='') app_controller = ModuleApp.first(conditions: {:title => module_app_title} ) unless app_controller.enable_frontend? - render :nothing + render :nothing => true end end diff --git a/lib/fraisier/layout.html b/lib/fraisier/layout.html index ebab851a..f6fb9942 100644 --- a/lib/fraisier/layout.html +++ b/lib/fraisier/layout.html @@ -28,6 +28,7 @@
+