add announcement widget field

This commit is contained in:
spen 2014-03-10 18:20:51 +08:00
parent bcb6a46a74
commit d9dd08e678
2 changed files with 7 additions and 1 deletions

View File

@ -75,6 +75,11 @@ class Bulletin
self.category.title self.category.title
end 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 def get_bulletin_category
self.category self.category
end end

View File

@ -40,7 +40,8 @@ module Announcement
field :postdate field :postdate
link_field :title,{:method => 'panel_announcement_front_end_bulletin_path',:args=>:self} 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]}} 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' link_to_more 'panel_announcement_front_end_bulletins_path',:title_i18n=> 'more_plus'
end end