ntue emailer approval fix and announcement widget add unit field

This commit is contained in:
Spen 2013-08-26 10:43:39 +08:00 committed by chris
parent 1a9a4d0112
commit 88861985c6
7 changed files with 21 additions and 3 deletions

View File

@ -89,6 +89,10 @@ class Bulletin
def bulletin_category_with_title
self.bulletin_category.title
end
def bulletin_create_dept
User.get_member_list_attribute_value(self.create_user_id,"staff","Unit").get_value_by_locale(I18n.locale)
end
def share_item
Item.first(conditions:{name: 'announcement'})

View File

@ -4,8 +4,8 @@
<div class="info1">
<span class="pull-right"><%= dislpay_view_count(@bulletin) %></span>
<span class="date"><%= display_date_time(@bulletin.postdate) %></span>
<% unit = @bulletin.cache_dept[I18n.locale.to_s] rescue nil %>
<span><%= link_to unit,panel_announcement_front_end_index_bulletins_by_unit_path(:name=>unit) unless unit.blank? %></span>
<% unit = User.get_member_list_attribute_value(@bulletin.create_user_id,"staff","Unit").get_value_by_locale(I18n.locale) rescue nil %>
<span><%= t('announcement.default_widget.bulletin_create_dept') + ": " + unit unless unit.blank? %></span>
</div>
</div>
<div class="news_image">

View File

@ -17,6 +17,7 @@ en:
postdate: Post Date
title: Title
subtitle: SubTitle
bulletin_create_dept: Unit
editing_announcement: Edit Announcement
editing_announcement_category: Edit Category
error:

View File

@ -17,6 +17,7 @@ zh_tw:
postdate: 張貼日期
title: 標題
subtitle: 副標題
bulletin_create_dept: 單位
editing_announcement: 編輯類別
editing_announcement_category: 編輯類別
error:

View File

@ -37,6 +37,7 @@ module Announcement
link_field :title,{:method => 'panel_announcement_front_end_bulletin_path',:args=>:self,:preview=>true}
link_field :bulletin_category_with_title,{:method => 'panel_announcement_front_end_bulletins_path',:args=>{:category_id => [:bulletin_category,:id]}}
field :subtitle
field :bulletin_create_dept
link_to_more 'panel_announcement_front_end_bulletins_path',:title_i18n=> 'more_plus'
end

View File

@ -11,6 +11,14 @@
</iframe>
<% if @email_er.email_er_files.size > 0 %>
<%= label_tag t('file_')%>
<% @email_er.email_er_files.each do | efile | %>
<%= link_to (!efile.title.blank? ? efile.title : t('download')), efile.file.url, {:target => '_blank', :title => efile.title} if efile.file.file %>
<% end %>
<br />
<% end %>
<% if !@email_er.email_group.blank? %>
<%= label_tag 'group_mail' %>
<%= @email_er.get_email_group_data(@email_group_data) %>

View File

@ -1 +1,4 @@
<%= @email_er.mail_content.html_safe %>
<ul>
<li><%= label_tag t("er_email.mail_subject") %><%= @email_er.mail_subject %></li>
<li><%= label_tag t("er_email.mail_content") %><%= @email_er.mail_content.html_safe %></li>
</ul>