参赛作品发布人不能打分和评论;

匿名用户隐藏打分功能
This commit is contained in:
wanglinchun 2014-05-23 10:51:07 +08:00
parent e52886cf46
commit 4081ef93a3
2 changed files with 21 additions and 18 deletions

View File

@ -28,22 +28,23 @@
</div> </div>
<% if User.current.logged? %> <% if User.current.logged? %>
<table border="0" width="525px" align="center" > <% unless User.current.id == @softapplication.user_id %>
<tr> <table border="0" width="525px" align="center" >
<td><%= f.text_area 'message', :rows => 3, :cols => 65, :placeholder => l(:label_my_respond), :style => "resize: none;", :class => 'noline'%></td> <tr>
</tr> <td><%= f.text_area 'message', :rows => 3, :cols => 65, :placeholder => l(:label_my_respond), :style => "resize: none;", :class => 'noline'%></td>
</table> </tr>
</table>
<%= f.text_field :reference_user_id, :style=>"display:none"%> <!--what function?-->
<%= f.text_field :reference_user_id, :style=>"display:none"%> <!--what function?-->
<!-- modified by bai -->
<table border="0" width="518px" align="center"> <!-- modified by bai -->
<tr> <table border="0" width="518px" align="center">
<td align="right"> <%= submit_tag l(:label_button_ok), :name => nil , :class => "softapplication_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'"%> <tr>
<%= 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'" %> </td> <td align="right"> <%= submit_tag l(:label_button_ok), :name => nil , :class => "softapplication_btn", :onmouseout => "this.style.backgroundPosition = 'left top'", :onmouseover => "this.style.backgroundPosition = 'left -31px'"%>
</tr> <%= 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'" %> </td>
</table> </tr>
<!-- end --> </table>
<% end %>
<% else %> <% else %>
<div style="font-size: 14px;margin:10px;"> <div style="font-size: 14px;margin:10px;">
<%= l(:label_user_login_score_and_comment) %> <%= l(:label_user_login_score_and_comment) %>

View File

@ -120,8 +120,10 @@
<div style="height: 50px"> <div style="height: 50px">
<div style="font-size: 15px"><strong>作品评论:</strong></div> <div style="font-size: 15px"><strong>作品评论:</strong></div>
<div style="padding-left: 210px">评分: <%= rating_for @softapplication, dimension: :quality, class: 'rateable div_inline' %> <% if (User.current.logged? and User.current.id != @softapplication.user_id) %>
<span style="font-size: 11px">(您可以重新打分,打分结果以最后一次打分为主!)</span></div> <div style="padding-left: 210px">评分: <%= rating_for @softapplication, dimension: :quality, class: 'rateable div_inline' %>
<span style="font-size: 11px">(您可以重新打分,打分结果以最后一次打分为主!)</span></div>
<% end %>
</div> </div>