系统消息去掉附件

This commit is contained in:
huang 2016-01-04 10:36:27 +08:00
parent 3394af7ad5
commit 9e87e63b82
3 changed files with 1 additions and 20 deletions

View File

@ -42,7 +42,7 @@ class SystemMessagesController < ApplicationController
@system_messages.description = params[:system_message][:description]
@system_messages.subject = params[:system_message][:subject]
@system_messages.user_id = User.current.id
@system_messages.save_attachments(params[:attachments])
# @system_messages.save_attachments(params[:attachments])
respond_to do |format|
if @system_messages.save
format.html {redirect_to user_system_messages_path(User.current)}

View File

@ -19,15 +19,7 @@
<div>
<p id="content_notice_span" class="ml55"></p>
</div>
<div class="mt10">
<div class="fl" id="topic_attachments">
<%= render :partial => 'attachments/form', :locals => {:container => @admin_messages} %>
</div>
</div>
<div class="cl"></div>
<div class="actions">
<%= link_to l(:label_submit), "javascript:void(0)", :class => "btn_message_free", :onclick => "system_message_editor.sync();submit_message();" %>
</div>

View File

@ -18,17 +18,6 @@
</p>
</div>
<div class="cl"></div>
<% if system_message.attachments.any? %>
<div class=" fl" style="width: 600px">
<% if system_message.attachments.any?%>
<%# options = {:author => true, :deletable => @memo.deleted_attach_able_by?(User.current) } %>
<%= link_to_attachment_project system_message, :thumbnails => false %>
<%#= link_to_attachments_course system_message, :author => false %>
<% end %>
</div>
<% end %>
<div class="cl"></div>
<p class="homepagePostDeadline">发布时间:<%= format_time(system_message.created_at) %></p>
</div>
<div class="cl"></div>