优化需求结束的展示方式。另外需求的货币奖励方式暂缺。

This commit is contained in:
william 2013-09-28 10:00:40 +08:00
parent 0be9de3a17
commit a8c3808053
9 changed files with 33 additions and 32 deletions

View File

@ -9,27 +9,30 @@
<div style="width: 50px; height: 50px;"> <div style="width: 50px; height: 50px;">
<%= link_to image_tag(url_to_avatar(b_project.project), :class => 'avatar3'), :class => "avatar" %> <%= link_to image_tag(url_to_avatar(b_project.project), :class => 'avatar3'), :class => "avatar" %>
</div></td> </div></td>
<td width="60%" valign="top"> <td width="65%" valign="top">
<table width="100%" valign="top"> <table width="100%" valign="top">
<tr> <tr>
<td colspan="2" valign="top"><strong> <td colspan="2" valign="top" width="50%"><strong>
<%= link_to(b_project.project.name, project_path(b_project.project)) %> <%= link_to(b_project.project.name, project_path(b_project.project)) %>
</strong><a class="font_lighter"><%= l(:label_join_bidding)%></a> </strong><a class="font_lighter"><%= l(:label_join_bidding)%></a>
</td> </td>
<!-- 如果需求到期 并且是该需求的管理员 --> <!-- 如果需求到期 并且是该需求的管理员 -->
<td style="color: red;" align="right"><strong><span id="reward_result_<%=b_project.id%>"> <td style="color: red;" align="right" valign="0.1em" width="35%">
<strong><span id="reward_result_<%=b_project.id%>">
<%if @bid.reward_type == 2%>
<% if get_prize(b_project).nil? or get_prize(b_project) == "" %> <% if get_prize(b_project).nil? or get_prize(b_project) == "" %>
未评奖 未评奖
<% else %> <% else %>
<% case get_prize(b_project) %> <% case get_prize(b_project) %>
<% when '0' %> <% when '0' %>
一等奖 <%= image_tag("/images/bid/first_reward.png")%>
<% when '1' %> <% when '1' %>
二等奖 <%= image_tag("/images/bid/second_reward.png")%>
<% when '2' %> <% when '2' %>
入围奖 <%= image_tag("/images/bid/qualified.png")%>
<%end%>
<% end %> <% end %>
<% end %> <% end %>
</span></strong> </span></strong>
@ -37,14 +40,26 @@
<!-- 评价显隐控制按钮--> <!-- 评价显隐控制按钮-->
<% if User.current.id == @bid.author_id %> <% if User.current.id == @bid.author_id %>
<td align=""> <td valign="top" align="right" width="10%">
<span> <%= toggle_link '评价', b_project.id.to_s %></span> <span> <%= toggle_link '评价', b_project.id.to_s %></span>
<!-- 评价应标项目的表单 -->
<span style="display: none; vertical-align: top " id = '<%= b_project.id %>'>
<%= form_for "set_reward",:remote=>true,:url=>set_reward_path do |f| %>
<%= f.text_field :b_id,:style => "display:none",:value => b_project.id,:size=>"0" %>
<%= f.select :reward,"<option value = '0'>#{l(:label_first_reward)}</option> <option value = '1'>#{l(:label_second_reward)}</option> <option value = '2'>#{l(:label_comfort_reward)}</option>"
.html_safe %>
<%= f.submit "提交",:class=>"submit" %>
<% end %>
</span>
</td> </td>
<% end %> <% end %>
</tr> </tr>
<tr></tr> <tr></tr>
<tr> <tr>
<td valign="top"><%= b_project.project.description %></td> <td valign="top" width="50%" style=" word-wrap: break-word; word-break: break-all"><%= b_project.project.description %></td>
</tr> </tr>
<tr> <tr>
@ -52,24 +67,12 @@
<%= b_project.created_at%> <%= b_project.created_at%>
</a></td> </a></td>
</tr> </tr>
</table></td> </table>
<!-- 评价应标项目的表单 -->
<td align="right">
<span style="display: none" id = '<%= b_project.id %>'>
<%= form_for "set_reward",:remote=>true,:url=>set_reward_path do |f| %>
<%= f.text_field :b_id,:style => "display:none",:value => b_project.id,:size=>"0" %>
<%= f.select :reward,"<option value = '0'>#{l(:label_first_reward)}</option> <option value = '1'>#{l(:label_second_reward)}</option> <option value = '2'>#{l(:label_comfort_reward)}</option>"
.html_safe %>
<%= f.submit "提交",:class=>"submit" %>
<% end %>
</span>
</td> </td>
<td width="30%"> <td width="30%">
<div class="bid-user-message" style="border-left: 1px solid rgb(225, 225, 225); margin-left: 20px; padding-left: 20px;"> <div class="bid-user-message" style="border-left: 1px solid rgb(225, 225, 225); margin-left: 20px; padding-left: 20px;">
<table width="100%"> <table width="100%">

View File

@ -57,19 +57,17 @@
</table> </table>
<% end %> <% end %>
<% else %> <% else %>
<table width="1000px" border="0" style="padding-left: 15px"> <table width="1000px" border="0" style="padding-left: 15px">
<td class="font_lighter" style="font-size: 15px;"><%= l(:label_bidding_project) %>(<%= @bidding_project.count%>)</td> <td class="font_lighter" style="font-size: 15px;"><%= l(:label_bidding_project) %>(<%= @bidding_project.count%>)</td>
<% if User.current.logged? %> <% if User.current.logged? %>
<td> <td>
<% if User.current.logged? && (!Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.nil? && (Member.where('user_id = ? and project_id = ?', User.current.id, @bid.courses.first.id).first.roles&Role.where('id = ? or id = ?', 5, 7)).size >0) %>
<div class='icon icon-add'> <div class='icon icon-add'>
<%= toggle_link l(:button_bidding_homework), 'put-bid-form' %> <%= toggle_link l(:button_bidding_homework), 'put-bid-form' %>
</div> </div>
<% end %>
</td> </td>
<% end %> <% end %>
</table> </table>

View File

@ -5,11 +5,11 @@ $('#reward_result_<%= @biding_project_id %>').html('<%= j(
else else
case get_prize(@b_p) case get_prize(@b_p)
when '0' when '0'
'一等奖' image_tag("/images/bid/first_reward.png")
when '1' when '1'
'二等奖' image_tag("/images/bid/second_reward.png")
when '2' when '2'
'入围奖' image_tag("/images/bid/qualified.png")
else else
'未评奖' '未评奖'
end end

BIN
public/images/bid/award.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB