fix commit bugs
This commit is contained in:
parent
45ccc315c7
commit
2e9af5d1a8
|
@ -1,7 +1,7 @@
|
||||||
class ApplicationController < ActionController::Base
|
class ApplicationController < ActionController::Base
|
||||||
protect_from_forgery
|
protect_from_forgery
|
||||||
|
|
||||||
include ParserFrontEnd, ParserBackEnd
|
include ParserFrontEnd, ParserBackEnd, ApplicationHelper
|
||||||
|
|
||||||
layout :layout_by_resource
|
layout :layout_by_resource
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td><%= asset.data.file.content_type %></td>
|
<td><%= asset.data.file.content_type rescue nil %></td>
|
||||||
<td><%= number_to_human_size(asset.data.file.file_length) %></td>
|
<td><%= number_to_human_size(asset.data.file.file_length) rescue nil %></td>
|
||||||
<td><%= asset.description rescue nil %></td>
|
<td><%= asset.description rescue nil %></td>
|
||||||
<td>
|
<td>
|
||||||
<div class="label-group">
|
<div class="label-group">
|
||||||
|
|
|
@ -2,16 +2,14 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
|
||||||
include AdminHelper
|
include AdminHelper
|
||||||
include OrbitControllerLib::DivisionForDisable
|
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_admin_only,:only => [:]
|
||||||
# before_filter :for_app_manager,:only => [:index,:show,]
|
# 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_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 :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 :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
|
def index
|
||||||
|
|
|
@ -212,17 +212,56 @@
|
||||||
<p><%= t("sys.limit_of_upload_file_size",:best_size => '3MB') %></p>
|
<p><%= t("sys.limit_of_upload_file_size",:best_size => '3MB') %></p>
|
||||||
<p><%= t("sys.preview_only_for_img") %></p>
|
<p><%= t("sys.preview_only_for_img") %></p>
|
||||||
</div>
|
</div>
|
||||||
|
<fieldset>
|
||||||
|
<input type="hidden" id="MAX_FILE_SIZE" name="MAX_FILE_SIZE" value="300000" />
|
||||||
|
<div id="filedrag">
|
||||||
|
<div class="point">Drop files here
|
||||||
|
<span>or</span>
|
||||||
|
<label class="file-select" for="fileselect">select from a folder
|
||||||
|
<!-- <input type="file" class="upload" id="fileselect" name="fileselect[]" multiple="multiple" /> -->
|
||||||
|
<%= f.fields_for :bulletin_files, @bulletin.bulletin_files.build do |f| %>
|
||||||
|
<%= f.file_field :file, :multiple => true, :class => 'upload', :id => 'fileselect' %>
|
||||||
|
<% end %>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div id="submitbutton">
|
||||||
|
<button type="submit">Upload Files</button>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
<div>
|
||||||
|
<table class="table table-condensed">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>File Name</th>
|
||||||
|
<th class="span2">Chinese</th>
|
||||||
|
<th class="span2">English</th>
|
||||||
|
<th class="span1"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td>File Name</td>
|
||||||
|
<td><input type="checkbox" id="optionsCheckbox" value="true" disabled /></td>
|
||||||
|
<td><input type="checkbox" id="optionsCheckbox" value="true" disabled checked /></td>
|
||||||
|
<td><a class="action" data-toggle="modal" href="#modal-link"><i class="icon-pencil"></i></a><a class="action" href=""><i class="icon-remove"></i></a></td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
<tbody id="messages">
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
|
||||||
<% @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| %>
|
<%#= fields_for "bulletin[bulletin_files][]", bulletin_file do |f| %>
|
||||||
<%= f.fields_for :bulletin_files, bulletin_file do |f| %>
|
<%#= f.fields_for :bulletin_files do |f| %>
|
||||||
<%= render :partial => 'form_bulletin_file', :object => bulletin_file, :locals => {:f => f, :i => i} %>
|
<%#= render :partial => 'form_bulletin_file', :object => bulletin_file, :locals => {:f => f, :i => i} %>
|
||||||
<% end %>
|
<%# end %>
|
||||||
<% end %>
|
<%# end %>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Reference in New Issue