diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 31168f7e..56559cb3 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,7 +1,7 @@ class ApplicationController < ActionController::Base protect_from_forgery - include ParserFrontEnd, ParserBackEnd + include ParserFrontEnd, ParserBackEnd, ApplicationHelper layout :layout_by_resource diff --git a/app/views/admin/assets/_asset.html.erb b/app/views/admin/assets/_asset.html.erb index a45e9a4b..3040f872 100644 --- a/app/views/admin/assets/_asset.html.erb +++ b/app/views/admin/assets/_asset.html.erb @@ -10,8 +10,8 @@ - <%= asset.data.file.content_type %> - <%= number_to_human_size(asset.data.file.file_length) %> + <%= asset.data.file.content_type rescue nil %> + <%= number_to_human_size(asset.data.file.file_length) rescue nil %> <%= asset.description rescue nil %>
diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb index 4097023a..fb3107cd 100644 --- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb +++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb @@ -2,16 +2,14 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController include AdminHelper include OrbitControllerLib::DivisionForDisable - before_filter :only => [ :new,:create,:edit,:update,:create] do |controller| - controller.get_categorys('BulletinCategory') - end - # before_filter :for_admin_only,:only => [:] # before_filter :for_app_manager,:only => [:index,:show,] before_filter :force_order_for_visitor,:only=>[:index,:show,:get_sorted_and_filtered_bulletins] before_filter :force_order_for_user,:except => [:index,:show,:get_sorted_and_filtered_bulletins] before_filter :for_app_sub_manager,:except => [:index,:show,:get_sorted_and_filtered_bulletins] - + before_filter :only => [ :new,:create,:edit,:update,:create] do |controller| + controller.get_categorys('BulletinCategory') + end def index diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb index b0040851..034fa82c 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb @@ -212,17 +212,56 @@

<%= t("sys.limit_of_upload_file_size",:best_size => '3MB') %>

<%= t("sys.preview_only_for_img") %>

+
+ +
+
Drop files here + or + +
+
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + +
File NameChineseEnglish
File Name
+
- <% @bulletin.bulletin_files.each_with_index do |bulletin_file, i| %> + <%# @bulletin.bulletin_files.each_with_index do |bulletin_file, i| %> <%#= fields_for "bulletin[bulletin_files][]", bulletin_file do |f| %> - <%= f.fields_for :bulletin_files, bulletin_file do |f| %> - <%= render :partial => 'form_bulletin_file', :object => bulletin_file, :locals => {:f => f, :i => i} %> - <% end %> - <% end %> + <%#= f.fields_for :bulletin_files do |f| %> + <%#= render :partial => 'form_bulletin_file', :object => bulletin_file, :locals => {:f => f, :i => i} %> + <%# end %> + <%# end %>