fix display for announcement and remove ut field

This commit is contained in:
Matthew K. Fu JuYuan 2012-05-10 10:27:01 +08:00 committed by Christophe Vilayphiou
parent 99c4e94729
commit 07815eee8f
5 changed files with 8 additions and 5 deletions

View File

@ -61,6 +61,9 @@ Orbit::Application.routes.draw do
end end
end end
resources :module_apps do resources :module_apps do
match 'manager_auth_proc' => "new_interface_module_apps#setting" ,:as => :manager_auth_proc,:via => :get
match 'manager_auth_proc' => "new_interface_module_apps#update_setting" ,:as => :manager_auth_proc,:via => :post
match 'manager_auth_proc' => "new_interface_module_apps#user_list" ,:as => :manager_auth_show,:via => :put
resources :app_auths do resources :app_auths do
member do member do
match 'remove/:type/:target_id' ,:action=> 'remove',:via => "delete",:as =>:remove match 'remove/:type/:target_id' ,:action=> 'remove',:via => "delete",:as =>:remove

View File

@ -319,7 +319,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
def get_categorys(id = nil) def get_categorys(id = nil)
@bulletin_categorys = [] @bulletin_categorys = []
@unit_list_for_anc = UnitListForAnc.all #@unit_list_for_anc = UnitListForAnc.all
if(is_manager? || is_admin?) if(is_manager? || is_admin?)
@bulletin_categorys = (id ? BulletinCategory.find(id).to_a : BulletinCategory.excludes('disabled' => true)) @bulletin_categorys = (id ? BulletinCategory.find(id).to_a : BulletinCategory.excludes('disabled' => true))
elsif is_sub_manager? elsif is_sub_manager?

View File

@ -33,7 +33,7 @@ class Bulletin
mount_uploader :image, ImageUploader mount_uploader :image, ImageUploader
belongs_to :bulletin_category belongs_to :bulletin_category
belongs_to :unit_list_for_anc # belongs_to :unit_list_for_anc
# embeds_many :bulletin_links, :cascade_callbacks => true # embeds_many :bulletin_links, :cascade_callbacks => true
# embeds_many :bulletin_files, :cascade_callbacks => true # embeds_many :bulletin_files, :cascade_callbacks => true

View File

@ -126,8 +126,8 @@
<div id="post-body"> <div id="post-body">
<div id="post-body-content" class="clear"> <div id="post-body-content" class="clear">
<%= f.label :unit_list_for_anc%> <%#= f.label :unit_list_for_anc%>
<%= f.select :unit_list_for_anc_id,@unit_list_for_anc.collect{|t| [ t.title[I18n.locale], t.id ]}, {}, :class => "input-medium" %> <%#= f.select :unit_list_for_anc_id,@unit_list_for_anc.collect{|t| [ t.title[I18n.locale], t.id ]}, {}, :class => "input-medium" %>
<%= f.label :category %> <%= f.label :category %>
<%= f.select :bulletin_category_id, @bulletin_categorys.collect{|t| [ t.i18n_variable[I18n.locale], t.id ]}, {}, :class => "input-medium" %> <%= f.select :bulletin_category_id, @bulletin_categorys.collect{|t| [ t.i18n_variable[I18n.locale], t.id ]}, {}, :class => "input-medium" %>

View File

@ -4,7 +4,7 @@
<div class="info1"> <div class="info1">
<span class="date"><%= @bulletin.postdate %></span> <span class="date"><%= @bulletin.postdate %></span>
&nbsp;|&nbsp; &nbsp;|&nbsp;
<a href="" class="unit"><%= @bulletin.unit_list_for_anc.title[I18n.locale] rescue '' %></a> <a href="" class="unit"><%= User.find(@bulletin.create_user_id).sub_roles.collect{|t| t.key}.join(" ") rescue '' %></a>
</div> </div>
</div> </div>
<div class="news_image"> <div class="news_image">