diff --git a/app/models/bulletin.rb b/app/models/bulletin.rb index 7731946..3011b8e 100644 --- a/app/models/bulletin.rb +++ b/app/models/bulletin.rb @@ -74,6 +74,11 @@ class Bulletin def bulletin_category_with_title self.category.title end + + def bulletin_create_dept + unit_field = User.get_member_list_attribute_field("staff","Unit") + User.get_member_list_attribute_value(self.create_user_id,unit_field.id).get_value_by_locale(I18n.locale) rescue nil + end def get_bulletin_category self.category diff --git a/lib/announcement.rb b/lib/announcement.rb index cabf028..85895dc 100644 --- a/lib/announcement.rb +++ b/lib/announcement.rb @@ -40,7 +40,8 @@ module Announcement field :postdate link_field :title,{:method => 'panel_announcement_front_end_bulletin_path',:args=>:self} link_field :bulletin_category_with_title,{:method => 'panel_announcement_front_end_bulletins_path',:args=>{:category_id => [:category,:id]}} - field :subtitle + link_field :subtitle,{:method => 'panel_announcement_front_end_bulletin_path',:args=>:self,:preview=>true} + field :bulletin_create_dept link_to_more 'panel_announcement_front_end_bulletins_path',:title_i18n=> 'more_plus' end