From 4081ef93a3c4db2ec16c8fcb62f2b1e21e1c4be6 Mon Sep 17 00:00:00 2001 From: wanglinchun Date: Fri, 23 May 2014 10:51:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E8=B5=9B=E4=BD=9C=E5=93=81=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E4=BA=BA=E4=B8=8D=E8=83=BD=E6=89=93=E5=88=86=E5=92=8C?= =?UTF-8?q?=E8=AF=84=E8=AE=BA=EF=BC=9B=20=E5=8C=BF=E5=90=8D=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E9=9A=90=E8=97=8F=E6=89=93=E5=88=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/softapplications/_new_message.erb | 33 +++++++++++---------- app/views/softapplications/show.html.erb | 6 ++-- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/app/views/softapplications/_new_message.erb b/app/views/softapplications/_new_message.erb index ad7d2a629..710c6f92d 100644 --- a/app/views/softapplications/_new_message.erb +++ b/app/views/softapplications/_new_message.erb @@ -28,22 +28,23 @@ <% if User.current.logged? %> - - - - -
<%= f.text_area 'message', :rows => 3, :cols => 65, :placeholder => l(:label_my_respond), :style => "resize: none;", :class => 'noline'%>
- - <%= f.text_field :reference_user_id, :style=>"display:none"%> - - - - - - -
<%= submit_tag l(:label_button_ok), :name => nil , :class => "softapplication_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'"%> - <%= submit_tag l(:button_clear_requirement), :name => nil, :onclick => "clearMessage('softapplication_message_message');", :type => 'button', :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'" %>
- + <% unless User.current.id == @softapplication.user_id %> + + + + +
<%= f.text_area 'message', :rows => 3, :cols => 65, :placeholder => l(:label_my_respond), :style => "resize: none;", :class => 'noline'%>
+ + <%= f.text_field :reference_user_id, :style=>"display:none"%> + + + + + + +
<%= submit_tag l(:label_button_ok), :name => nil , :class => "softapplication_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'"%> + <%= submit_tag l(:button_clear_requirement), :name => nil, :onclick => "clearMessage('softapplication_message_message');", :type => 'button', :class => "bid_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'" %>
+ <% end %> <% else %>
<%= l(:label_user_login_score_and_comment) %> diff --git a/app/views/softapplications/show.html.erb b/app/views/softapplications/show.html.erb index 9a68d82c1..8b9b3260d 100644 --- a/app/views/softapplications/show.html.erb +++ b/app/views/softapplications/show.html.erb @@ -120,8 +120,10 @@
作品评论:
-
评分: <%= rating_for @softapplication, dimension: :quality, class: 'rateable div_inline' %> - (您可以重新打分,打分结果以最后一次打分为主!)
+ <% if (User.current.logged? and User.current.id != @softapplication.user_id) %> +
评分: <%= rating_for @softapplication, dimension: :quality, class: 'rateable div_inline' %> + (您可以重新打分,打分结果以最后一次打分为主!)
+ <% end %>