From 36ec204f40d18584242b397ce6c55d652cf4c8a1 Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Mon, 26 Jan 2015 16:54:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=8A=E5=85=AC=E5=85=B1?= =?UTF-8?q?=E8=B4=B4=E5=90=A7=E4=B8=AD=EF=BC=8C=E5=9B=9E=E5=A4=8D=E4=BA=86?= =?UTF-8?q?=E5=B8=96=E5=AD=90=E5=90=8E=EF=BC=8C=E9=87=8D=E6=96=B0=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E7=9A=84=E8=AF=9D=E8=83=BD=E7=BC=96=E8=BE=91=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E3=80=8B=20Signed-off-by:=20alan=20<547533434@qq.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/memos/edit.html.erb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/views/memos/edit.html.erb b/app/views/memos/edit.html.erb index 09e4262fe..008522316 100644 --- a/app/views/memos/edit.html.erb +++ b/app/views/memos/edit.html.erb @@ -1,5 +1,6 @@ <% @replying = !@memo.parent.nil? %> +

<%=l(:label_memo_edit)%>

<%= labelled_form_for(@memo, :url => forum_memo_path(@memo.forum_id, @memo)) do |f| %> <% if @memo.errors.any? %> @@ -19,8 +20,12 @@ <% end %>

- <%= f.text_field :subject, :required => true, :size => 96 ,:readonly => @replying, :maxlength => 50%> -

+ <% if @memo.parent.nil? && @memo.children.first.nil? %> + <%= 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 %> +

<% if User.current.admin?%>

<% unless @replying %>