2013-11-26 16:32:08 +08:00
|
|
|
<!-- <h1>New memo</h1> -->
|
2014-09-25 16:10:31 +08:00
|
|
|
<% @replying = !@memo.parent.nil? %>
|
2015-06-17 17:01:03 +08:00
|
|
|
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
|
2013-11-26 16:32:08 +08:00
|
|
|
<h3><%=l(:label_memo_edit)%></h3>
|
|
|
|
<%= labelled_form_for(@memo, :url => forum_memo_path(@memo.forum_id, @memo)) do |f| %>
|
|
|
|
<% if @memo.errors.any? %>
|
|
|
|
<div id="error_explanation">
|
2014-11-20 15:55:43 +08:00
|
|
|
<h2>
|
|
|
|
<%= pluralize(@memo.errors.count, "error") %>
|
|
|
|
prohibited this memo from being saved:
|
|
|
|
</h2>
|
2013-11-26 16:32:08 +08:00
|
|
|
<ul>
|
|
|
|
<% @memo.errors.full_messages.each do |msg| %>
|
2014-11-20 15:55:43 +08:00
|
|
|
<li>
|
|
|
|
<%= msg %>
|
|
|
|
</li>
|
2013-11-26 16:32:08 +08:00
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<div class="actions">
|
2013-12-11 08:52:55 +08:00
|
|
|
<p>
|
2015-01-26 16:54:46 +08:00
|
|
|
<% if @memo.parent.nil? && @memo.children.first.nil? %>
|
2015-06-19 11:42:07 +08:00
|
|
|
<%#= f.text_field :subject, :required => true, :size => 96 ,:readonly => false, :maxlength => 50%>
|
2015-01-26 16:54:46 +08:00
|
|
|
<% else %>
|
2015-06-19 11:42:07 +08:00
|
|
|
<%#= f.text_field :subject, :required => true, :size => 96 ,:readonly => true, :style => "border: 1px solid gray", :maxlength => 50%>
|
2015-01-26 16:54:46 +08:00
|
|
|
<% end %>
|
|
|
|
</p>
|
2014-11-20 15:55:43 +08:00
|
|
|
<% if User.current.admin?%>
|
|
|
|
<p>
|
|
|
|
<% unless @replying %>
|
|
|
|
<% if @memo.safe_attribute? 'sticky' %>
|
|
|
|
<%= f.check_box :sticky %>
|
|
|
|
<%= label_tag 'memo_sticky', l(:label_board_sticky) %>
|
|
|
|
<% end %>
|
|
|
|
<% if @memo.safe_attribute? 'lock' %>
|
|
|
|
<%= f.check_box :lock %> <%= label_tag 'memo_locked', l(:label_board_locked) %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
<p>
|
2015-03-26 15:46:35 +08:00
|
|
|
<%= f.kindeditor :content, :required => true, :size => 80,:owner_id => @memo.id,:owner_type => 1 %>
|
2013-12-11 08:52:55 +08:00
|
|
|
</p>
|
2015-03-26 15:46:35 +08:00
|
|
|
<!-- <script type="text/javascript">var ckeditor=CKEDITOR.replace('editor01');</script> -->
|
2015-04-23 16:19:23 +08:00
|
|
|
<p style="float: left;margin-top: 5px;">
|
2014-11-20 15:55:43 +08:00
|
|
|
<%= l(:label_attachment_plural) %>
|
|
|
|
<br />
|
2014-10-08 15:36:58 +08:00
|
|
|
<%= render :partial => 'attachments/form', :locals => {:container => @memo} %>
|
|
|
|
</p>
|
2013-11-26 16:32:08 +08:00
|
|
|
<br/>
|
2015-04-23 16:19:23 +08:00
|
|
|
<div class="cl"></div>
|
2014-09-17 14:55:36 +08:00
|
|
|
<%= f.submit :value => l(:button_change) %> <%= link_to l(:button_back), back_url ,:class => "button-canel",:style => "color: #ffffff;"%>
|
2013-11-26 16:32:08 +08:00
|
|
|
</div>
|
|
|
|
<% end %>
|