class Panel::Announcement::Widget::BulletinsController < ObitWidgetController

  def initialize
    super
    @app_title = NewBlog::MOUDLEAPP_TITLE
  end
  
  # GET /bulletins
  # GET /bulletins.xml
  
  def index
	
	# deadline
  
    @bulletin = Bulletin.where( :postdate.lte => Date.today ).desc(:is_top, :postdate).first

    @bulletins = Bulletin.widget_datas
	
	get_categorys
	
  end
  
  
  protected
  
  def get_categorys
    @bulletin_categorys = BulletinCategory.excludes('disabled' => true)
  end
  
end
