整理踩、赞页面

Homework
sw 11 years ago
parent 243803cc5e
commit 2ac89fcdbc

@ -3,38 +3,57 @@
<% if horizontal %> <% if horizontal %>
<!-- 横排 --> <!-- 横排 -->
<div id="praise_tread_<%= obj.id %>" style="float:right;"> <div id="praise_tread_<%= obj.id %>" style="float:right;">
<% @is_valuate = is_praise_or_tread(obj,user_id)%> <% @is_valuate = is_praise_or_tread(obj,user_id)%>
<% if @is_valuate.size > 0 %> <!-- 评价过 1代表赞 0代表踩 --> <% if @is_valuate.size > 0 %> <!-- 评价过 1代表赞 0代表踩 -->
<% @flag = @is_valuate.first.praise_or_tread %> <% @flag = @is_valuate.first.praise_or_tread %>
<% if @flag == 1 %> <!-- 顶过 --><!-- modified by bai --> <% if @flag == 1 %> <!-- 顶过 --><!-- modified by bai -->
<table style="line-height: 1px"> <table style="line-height: 1px">
<tr> <tr>
<td ><%= image_tag "/images/praise_tread/praise_false.png" , weight:"22px", height:"22px",:title => l(:label_issue_praise_over) %></td> <td >
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td> <%= image_tag "/images/praise_tread/praise_false.png" , weight:"22px", height:"22px",:title => l(:label_issue_praise_over) %>
<td><%= image_tag "/images/praise_tread/tread_false.png",weight:"22px", height:"22px",:title => l(:label_issue_appraise_over) %></td> </td>
<td align="center">
<strong class="font_small_watch">
<%= get_praise_num(obj)%>
</strong>
</td>
<td>
<%= image_tag "/images/praise_tread/tread_false.png",weight:"22px", height:"22px",:title => l(:label_issue_appraise_over) %>
</td>
</tr> </tr>
</table> </table>
<% elsif @flag == 0 %> <!-- 踩过 0--> <% elsif @flag == 0 %> <!-- 踩过 0-->
<table style="line-height: 1px"> <table style="line-height: 1px">
<tr> <tr>
<td > <%= image_tag "/images/praise_tread/praise_false.png",weight:"22px", height:"22px", :title => l(:label_issue_appraise_over) %></td> <td >
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td> <%= image_tag "/images/praise_tread/praise_false.png",weight:"22px", height:"22px", :title => l(:label_issue_appraise_over) %>
<td><%= image_tag "/images/praise_tread/tread_false.png",weight:"22px", height:"22px",:title => l(:label_issue_tread_over) %> </td> </td>
<td align="center">
<strong class="font_small_watch">
<%= get_praise_num(obj)%>
</strong>
</td>
<td>
<%= image_tag "/images/praise_tread/tread_false.png",weight:"22px", height:"22px",:title => l(:label_issue_tread_over) %>
</td>
</tr> </tr>
</table> </table>
<% end %> <% end %>
<% else %> <% else %>
<% if user_id == obj.author_id %> <% if user_id == obj.author_id %>
<table style="line-height: 1px"> <table style="line-height: 1px">
<tr> <tr>
<td ><%= image_tag "/images/praise_tread/praise_true.png" , weight:"22px", height:"22px",:title => l(:label_issue_not_praise_over) %></td> <td >
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td> <%= image_tag "/images/praise_tread/praise_true.png" , weight:"22px", height:"22px",:title => l(:label_issue_not_praise_over) %>
<td><%= image_tag "/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issue_not_treed_over) %></td> </td>
<td align="center">
<strong class="font_small_watch">
<%= get_praise_num(obj)%>
</strong>
</td>
<td>
<%= image_tag "/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issue_not_treed_over) %>
</td>
</tr> </tr>
</table> </table>
<% else %> <% else %>
@ -42,30 +61,42 @@
<% if OptionNumber.get_user_option_number(user_id).nil? || OptionNumber.get_user_option_number(user_id).total_score < 2 %> <% if OptionNumber.get_user_option_number(user_id).nil? || OptionNumber.get_user_option_number(user_id).total_score < 2 %>
<table style="line-height: 1px"> <table style="line-height: 1px">
<tr> <tr>
<td ><%= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)), <td >
:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %></td> <%= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td> :controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %>
<td><%= image_tag "/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issues_score_not_enough) %></td> </td>
<td align="center">
<strong class="font_small_watch">
<%= get_praise_num(obj)%>
</strong>
</td>
<td>
<%= image_tag "/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issues_score_not_enough) %>
</td>
</tr> </tr>
</table> </table>
<% else %> <% else %>
<table style="line-height: 1px"> <table style="line-height: 1px">
<tr> <tr>
<td > <%= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)), <td >
:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %> </td> <%= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td> :controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %>
<td> <%= link_to image_tag("/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issue_tread)),:controller=>"praise_tread", </td>
:action=>"tread_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %></td> <td align="center">
<strong class="font_small_watch">
<%= get_praise_num(obj)%>
</strong>
</td>
<td>
<%= link_to image_tag("/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issue_tread)),:controller=>"praise_tread",
:action=>"tread_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class,:horizontal => horizontal %>
</td>
</tr> </tr>
</table> </table>
<% end %> <% end %>
<% end %> <% end %>
<!-- end -->
<% end %> <% end %>
</div> </div>
<% else %> <% else %>
<!-- 竖排 --> <!-- 竖排 -->
<div id="praise_tread_<%= obj.id %>" style="float:right;"> <div id="praise_tread_<%= obj.id %>" style="float:right;">
@ -75,80 +106,115 @@
<% if @flag == 1 %> <!-- 顶过 --><!-- modified by bai --> <% if @flag == 1 %> <!-- 顶过 --><!-- modified by bai -->
<table style="line-height: 1px"> <table style="line-height: 1px">
<tr> <tr>
<td ><%= image_tag "/images/praise_tread/praise_false.png" , weight:"22px", height:"22px",:title => l(:label_issue_praise_over) %></td> <td >
<%= image_tag "/images/praise_tread/praise_false.png" , weight:"22px", height:"22px",:title => l(:label_issue_praise_over) %>
</td>
</tr> </tr>
<tr> <tr>
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td> <td align="center">
<strong class="font_small_watch">
<%= get_praise_num(obj)%>
</strong>
</td>
</tr> </tr>
<tr> <tr>
<td><%= image_tag "/images/praise_tread/tread_false.png",weight:"22px", height:"22px",:title => l(:label_issue_appraise_over) %></td> <td>
<%= image_tag "/images/praise_tread/tread_false.png",weight:"22px", height:"22px",:title => l(:label_issue_appraise_over) %>
</td>
</tr> </tr>
</table> </table>
<% elsif @flag == 0 %> <!-- 踩过 0--> <% elsif @flag == 0 %> <!-- 踩过 0-->
<table style="line-height: 1px"> <table style="line-height: 1px">
<tr> <tr>
<td > <%= image_tag "/images/praise_tread/praise_false.png",weight:"22px", height:"22px", :title => l(:label_issue_appraise_over) %></td> <td >
<%= image_tag "/images/praise_tread/praise_false.png",weight:"22px", height:"22px", :title => l(:label_issue_appraise_over) %>
</td>
</tr> </tr>
<tr> <tr>
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td> <td align="center">
<strong class="font_small_watch">
<%= get_praise_num(obj)%>
</strong>
</td>
</tr> </tr>
<tr> <tr>
<td><%= image_tag "/images/praise_tread/tread_false.png",weight:"22px", height:"22px",:title => l(:label_issue_tread_over) %> </td> <td>
<%= image_tag "/images/praise_tread/tread_false.png",weight:"22px", height:"22px",:title => l(:label_issue_tread_over) %>
</td>
</tr> </tr>
</table> </table>
<% end %> <% end %>
<% else %> <% else %>
<% if user_id == obj.author_id %> <% if user_id == obj.author_id %>
<table style="line-height: 1px"> <table style="line-height: 1px">
<tr> <tr>
<td > <%= image_tag "/images/praise_tread/praise_true.png",weight:"22px", height:"22px", :title => l(:label_issue_not_praise_over) %></td> <td >
<%= image_tag "/images/praise_tread/praise_true.png",weight:"22px", height:"22px", :title => l(:label_issue_not_praise_over) %>
</td>
</tr> </tr>
<tr> <tr>
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td> <td align="center">
<strong class="font_small_watch">
<%= get_praise_num(obj)%>
</strong>
</td>
</tr> </tr>
<tr> <tr>
<td><%= image_tag "/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issue_not_treed_over) %> </td> <td>
<%= image_tag "/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issue_not_treed_over) %>
</td>
</tr> </tr>
</table> </table>
<% else %> <% else %>
<% if OptionNumber.get_user_option_number(user_id).nil? || OptionNumber.get_user_option_number(user_id).total_score < 2 %> <% if OptionNumber.get_user_option_number(user_id).nil? || OptionNumber.get_user_option_number(user_id).total_score < 2 %>
<table style="line-height: 1px"> <table style="line-height: 1px">
<tr> <tr>
<td > <%= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)), <td >
:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class ,:horizontal => horizontal %></td> <%= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),
:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class ,:horizontal => horizontal %>
</td>
</tr> </tr>
<tr> <tr>
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td> <td align="center">
<strong class="font_small_watch">
<%= get_praise_num(obj)%>
</strong>
</td>
</tr> </tr>
<tr> <tr>
<td><%= image_tag "/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issues_score_not_enough) %> </td> <td>
<%= image_tag "/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issues_score_not_enough) %>
</td>
</tr> </tr>
</table> </table>
<% else %> <% else %>
<table style="line-height: 1px"> <table style="line-height: 1px">
<tr> <tr>
<td > <%= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)), <td >
:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class ,:horizontal => horizontal %> </td> <%= link_to image_tag("/images/praise_tread/praise_true.png",weight:"22px", height:"22px",:title => l(:label_issue_praise)),
:controller=>"praise_tread",:action=>"praise_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class ,:horizontal => horizontal %>
</td>
</tr> </tr>
<tr> <tr>
<td align="center"><strong class="font_small_watch"><%= get_praise_num(obj)%></strong></td> <td align="center">
<strong class="font_small_watch">
<%= get_praise_num(obj)%>
</strong>
</td>
</tr> </tr>
<tr> <tr>
<td> <%= link_to image_tag("/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issue_tread)),:controller=>"praise_tread", <td>
:action=>"tread_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class ,:horizontal => horizontal %></td> <%= link_to image_tag("/images/praise_tread/tread_true.png",weight:"22px", height:"22px",:title => l(:label_issue_tread)),:controller=>"praise_tread",
:action=>"tread_plus",:remote=>true,:obj_id => obj.id,:obj_type => obj.class ,:horizontal => horizontal %>
</td>
</tr> </tr>
</table> </table>
<% end %> <% end %>
<% end %> <% end %>
<!-- end --> <!-- end -->
<% end %> <% end %>
</div> </div>

Loading…
Cancel
Save