2013-11-24 20:02:53 +08:00
|
|
|
<!-- added by fq -->
|
2014-01-02 14:48:01 +08:00
|
|
|
<div id="add-memo" class='lz' style="display: none; padding: 20px;">
|
2013-11-29 18:14:49 +08:00
|
|
|
<h3><%=l(:label_memo_new)%></h3>
|
|
|
|
<% if User.current.logged? %>
|
2014-04-14 10:15:18 +08:00
|
|
|
<%= labelled_form_for(@memo, :url => create_memo_forum_path(@forum), :html => {:multipart => true} ) do |f| %>
|
2014-07-05 14:43:15 +08:00
|
|
|
<!--<#% if @memo.errors.any? %>
|
2013-11-29 18:14:49 +08:00
|
|
|
<div id="error_explanation">
|
2014-07-05 14:43:15 +08:00
|
|
|
<h2><#%= pluralize(@memo.errors.count, "error") %> prohibited this memo from being saved:</h2>
|
2013-11-29 18:14:49 +08:00
|
|
|
|
|
|
|
<ul>
|
2014-07-05 14:43:15 +08:00
|
|
|
<#% @memo.errors.full_messages.each do |msg| %>
|
|
|
|
<li><#%= msg %></li>
|
|
|
|
<#% end %>
|
2013-11-29 18:14:49 +08:00
|
|
|
</ul>
|
|
|
|
</div>
|
2014-07-05 14:43:15 +08:00
|
|
|
<#% end %> -->
|
2013-12-23 16:44:20 +08:00
|
|
|
<div class="actions" style="max-width:680px">
|
2014-01-02 14:48:01 +08:00
|
|
|
<p><%= f.text_field :subject, :required => true%></p>
|
2013-11-29 18:14:49 +08:00
|
|
|
<p style="max-width:680px"><%= f.text_area :content, :required => true, :id => 'editor02' %></p>
|
|
|
|
<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor02');</script>
|
|
|
|
<br/>
|
2014-05-08 17:37:38 +08:00
|
|
|
<p>
|
2013-11-29 18:14:49 +08:00
|
|
|
<%= l(:label_attachment_plural) %><br />
|
|
|
|
<%= render :partial => 'attachments/form', :locals => {:container => @memo} %>
|
|
|
|
</p>
|
|
|
|
<%= f.submit :value => l(:label_memo_create) %>
|
2013-12-23 16:44:20 +08:00
|
|
|
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-memo").hide(); return false;' %>
|
2013-11-29 18:14:49 +08:00
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2013-11-25 21:42:59 +08:00
|
|
|
<!--modified by huang-->
|
2013-11-29 18:14:49 +08:00
|
|
|
<% #= link_to '发布帖子', new_forum_memo_path(@forum), :class => 'icon icon-add' %>
|
|
|
|
<span>
|
|
|
|
<%= link_to l(:label_memo_new_from_forum), new_forum_memo_path(@forum), :class => 'icon icon-add',
|
|
|
|
:onclick => 'showAndScrollTo("add-memo", "memo_subject"); return false;' if User.current.logged? %>
|
|
|
|
</span>
|
2013-12-07 10:15:55 +08:00
|
|
|
|
|
|
|
<div class="contextual-borad">
|
|
|
|
<%= link_to(
|
|
|
|
image_tag('edit.png')+l(:label_forum_edit),
|
|
|
|
{:action => 'edit', :id => @forum},
|
|
|
|
:method => 'get',
|
|
|
|
:title => l(:button_edit)
|
|
|
|
) if @forum.editable_by?(User.current) %>
|
|
|
|
<%= link_to(
|
|
|
|
image_tag('delete.png')+'删除讨论区',
|
|
|
|
{:action => 'destroy', :id => @forum},
|
|
|
|
:method => :delete,
|
|
|
|
:data => {:confirm => l(:text_are_you_sure)},
|
|
|
|
:title => l(:button_delete)
|
|
|
|
) if @forum.destroyable_by?(User.current) %>
|
|
|
|
</div>
|
2013-11-23 20:31:48 +08:00
|
|
|
<%= render :partial => 'forums/show_topics', :locals => {:memos => @memos} %>
|