|
|
|
@ -2,14 +2,42 @@
|
|
|
|
|
<p id="notice">
|
|
|
|
|
<%= notice %>
|
|
|
|
|
</p>
|
|
|
|
|
<p>
|
|
|
|
|
<%= %>
|
|
|
|
|
</p>
|
|
|
|
|
<p>
|
|
|
|
|
<%= %>
|
|
|
|
|
</p>
|
|
|
|
|
<div id="add-memo" style="display:none;">
|
|
|
|
|
<h3><%=l(:label_memo_new)%></h3>
|
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
|
<%= labelled_form_for(@memo, :url => forum_memos_path(@forum)) do |f| %>
|
|
|
|
|
<% if @memo.errors.any? %>
|
|
|
|
|
<div id="error_explanation">
|
|
|
|
|
<h2><%= pluralize(@memo.errors.count, "error") %> prohibited this memo from being saved:</h2>
|
|
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
|
<% @memo.errors.full_messages.each do |msg| %>
|
|
|
|
|
<li><%= msg %></li>
|
|
|
|
|
<% end %>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="actions" style="style="max-width:680px"">
|
|
|
|
|
<p><%= f.text_field :subject, :required => true, :size => 95 %></p>
|
|
|
|
|
<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/>
|
|
|
|
|
<p>
|
|
|
|
|
<%= l(:label_attachment_plural) %><br />
|
|
|
|
|
<%= render :partial => 'attachments/form', :locals => {:container => @memo} %>
|
|
|
|
|
</p>
|
|
|
|
|
<%= f.submit :value => l(:label_memo_create) %>
|
|
|
|
|
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-memo").hide(); return false;' %></p>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<!--modified by huang-->
|
|
|
|
|
<%= link_to '发布帖子', new_forum_memo_path(@forum), :class => 'icon icon-add' %>
|
|
|
|
|
<% #= 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>
|
|
|
|
|
<% if User.current.admin?||User.current.login==@forum.creator.login %> |
|
|
|
|
|
<%= link_to '编辑帖子', edit_forum_path(@forum), :class => 'icon icon-edit' %>
|
|
|
|
|
<% end %>
|
|
|
|
|