2014-09-15 10:58:14 +08:00
|
|
|
<!-- added by fq -->
|
2014-09-22 10:35:18 +08:00
|
|
|
<div id="add-memo" class='lz' style="<% unless @memo.errors.any?%>display: none;<% end %> padding: 20px;">
|
2014-11-20 15:55:43 +08:00
|
|
|
<h3>
|
|
|
|
<%=l(:label_memo_new)%>
|
|
|
|
</h3>
|
2014-09-15 10:58:14 +08:00
|
|
|
<% if User.current.logged? %>
|
|
|
|
<%= labelled_form_for(@memo, :url => create_memo_forum_path(@forum), :html => {:multipart => true} ) do |f| %>
|
|
|
|
<div class="actions" style="max-width:680px">
|
2015-03-26 16:18:34 +08:00
|
|
|
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
|
2014-11-20 15:55:43 +08:00
|
|
|
<p>
|
|
|
|
<%= f.text_field :subject, :required => true, :maxlength => 50%>
|
|
|
|
</p>
|
|
|
|
<p style="max-width:680px">
|
2015-03-26 16:18:34 +08:00
|
|
|
<%= f.kindeditor :content, :required => true %>
|
2014-11-20 15:55:43 +08:00
|
|
|
</p>
|
2015-03-26 16:18:34 +08:00
|
|
|
<!--<script type="text/javascript">var ckeditor=CKEDITOR.replace('editor02');</script>-->
|
2014-11-20 15:55:43 +08:00
|
|
|
<p style="color: #ff0000">
|
|
|
|
(<%= l(:label_memos_max_length) %>)
|
|
|
|
</p>
|
2015-04-23 11:56:59 +08:00
|
|
|
<p class="fl" style="margin-top: 5px;">
|
2014-11-20 15:55:43 +08:00
|
|
|
<%= l(:label_attachment_plural) %>
|
|
|
|
<br />
|
|
|
|
<%= render :partial => 'attachments/form', :locals => {:container => @memo} %>
|
2014-09-15 10:58:14 +08:00
|
|
|
</p>
|
2015-04-23 10:47:54 +08:00
|
|
|
<div class="cl"></div>
|
2014-09-15 10:58:14 +08:00
|
|
|
<%= f.submit :value => l(:label_memo_create) %>
|
|
|
|
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-memo").hide(); return false;' %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<!--modified by huang-->
|
|
|
|
<% #= link_to '发布帖子', new_forum_memo_path(@forum), :class => 'icon icon-add' %>
|
|
|
|
<span 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) %>
|
|
|
|
</span>
|
|
|
|
<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>
|
|
|
|
|
|
|
|
<%= render :partial => 'forums/show_topics', :locals => {:memos => @memos} %>
|