diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index fe41f70..baa00e7 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -36,14 +36,18 @@ class AnnouncementsController < ApplicationController params = OrbitHelper.params announcement = Bulletin.can_display.find_by(:uid=>params[:uid]) + tags = announcement.tags.map{|tag| { "tag" => tag.name } } files = announcement.bulletin_files.map{|file| { "file_url" => file.file.url, "file_title" => file.title } } links = announcement.bulletin_links.map{|link| { "link_url" => link.url, "link_title" => link.title } } { + "tags" => tags, "bulletin_files" => files, "bulletin_links" => links, "data" => { "title" => announcement.title, + "update_user" => announcement.update_user.member_profile.name, + "updated_at" => announcement.updated_at.strftime('%Y-%m-%d %H:%M'), "body" =>announcement.text, "image" => announcement.image.url } diff --git a/lib/announcement/engine.rb b/lib/announcement/engine.rb index 7b424b6..f902bc0 100644 --- a/lib/announcement/engine.rb +++ b/lib/announcement/engine.rb @@ -18,12 +18,12 @@ module Announcement context_link 'announcement.all_articles', :link_path=>"admin_announcements_path" , :priority=>1, - :active_for_action=>{:bulletins=>:index}, + :active_for_action=>{'admin/announcement'=>'index'}, :available_for => [:all] context_link 'announcement.add_new', :link_path=>"new_admin_announcement_path" , :priority=>2, - :active_for_action=>{:bulletins=>:new}, + :active_for_action=>{'admin/announcement'=>'new'}, :available_for => [:sub_manager] # context_link 'announcement.categories', # :link_path=>"admin_announcement_path(get_module_app)" ,