修改《公共贴吧中,回复了帖子后,重新编辑的话能编辑标题》

Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
alan 2015-01-26 16:54:46 +08:00
parent f1495686e9
commit 36ec204f40
1 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,6 @@
<!-- <h1>New memo</h1> --> <!-- <h1>New memo</h1> -->
<% @replying = !@memo.parent.nil? %> <% @replying = !@memo.parent.nil? %>
<h3><%=l(:label_memo_edit)%></h3> <h3><%=l(:label_memo_edit)%></h3>
<%= labelled_form_for(@memo, :url => forum_memo_path(@memo.forum_id, @memo)) do |f| %> <%= labelled_form_for(@memo, :url => forum_memo_path(@memo.forum_id, @memo)) do |f| %>
<% if @memo.errors.any? %> <% if @memo.errors.any? %>
@ -19,8 +20,12 @@
<% end %> <% end %>
<div class="actions"> <div class="actions">
<p> <p>
<%= f.text_field :subject, :required => true, :size => 96 ,:readonly => @replying, :maxlength => 50%> <% if @memo.parent.nil? && @memo.children.first.nil? %>
</p> <%= f.text_field :subject, :required => true, :size => 96 ,:readonly => false, :maxlength => 50%>
<% else %>
<%= f.text_field :subject, :required => true, :size => 96 ,:readonly => true, :style => "border: 1px solid gray", :maxlength => 50%>
<% end %>
</p>
<% if User.current.admin?%> <% if User.current.admin?%>
<p> <p>
<% unless @replying %> <% unless @replying %>