From 016ef25019f3850ad7c02b7af71d81a36e986ecd Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Fri, 4 Jul 2014 10:22:35 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=B3=A8=E9=87=8A=E6=97=A0=E6=95=88=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=202.=E4=BF=AE=E6=94=B9=E8=BD=AF=E4=BB=B6=E6=80=BB?= =?UTF-8?q?=E5=8C=85=E5=88=97=E8=A1=A8=E5=88=86=E9=A1=B5=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E4=BD=BF=E7=94=A8@bid=5Fcount?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/bids/_bid_homework_show.html.erb | 16 +++++------ app/views/bids/_bid_show.html.erb | 31 ++++++++++++++++++++-- app/views/bids/contest.html.erb | 6 ++--- 3 files changed, 40 insertions(+), 13 deletions(-) diff --git a/app/views/bids/_bid_homework_show.html.erb b/app/views/bids/_bid_homework_show.html.erb index 6f0b35ae9..a67cbd7e3 100644 --- a/app/views/bids/_bid_homework_show.html.erb +++ b/app/views/bids/_bid_homework_show.html.erb @@ -15,7 +15,7 @@ <% if(User.current.logged? && (!Member.where('user_id = ? and course_id = ?', User.current.id, bid.courses.first.id).first.nil? && (Member.where('user_id = ? and course_id = ?', User.current.id, bid.courses.first.id).first.roles&Role.where('id = ? or id = ? or id =?',5, 10, 7)).size >0)) %> <%# 提交作业按钮 %> - + <% cur_user_homework = cur_user_homework_for_bid(bid) %> <% if cur_user_homework!= nil && cur_user_homework.count == 0 %> <%= link_to l(:label_commit_homework),new_homework_attach_path(bid) %> @@ -41,19 +41,19 @@ - <% @bidding_project = bid.biding_projects.all - @temp = [] - @bidding_project.each do |pro| + <% bidding_project = bid.biding_projects.all + temp = [] + bidding_project.each do |pro| if pro.project && pro.project.project_status - @temp << pro + temp << pro end - @temp + temp end %> <% if bid.homework_type == 1%> <%= l(:label_x_homework_project, :count => bid.homeworks.count) %>(<%= link_to bid.homeworks.count, course_for_bid_path(bid.id) %>) <% else %> - <%= l(:label_x_homework_project, :count => @temp.count) %>(<%= link_to @temp.count, course_for_bid_path(bid.id) %>) + <%= l(:label_x_homework_project, :count => temp.count) %>(<%= link_to temp.count, course_for_bid_path(bid.id) %>) <% end %> <%= l(:label_x_responses, :count => bid.commit) %>(<%= link_to bid.commit, respond_path(bid) %>) @@ -74,7 +74,7 @@ <%= bid.budget%> <% elsif bid.reward_type == 2 %> <%= l(:label_bids_reward_method) %><%= bid.budget%> <% else %> - <% end %> + <% end %> diff --git a/app/views/bids/_bid_show.html.erb b/app/views/bids/_bid_show.html.erb index 8d3ffec18..47f1560dd 100644 --- a/app/views/bids/_bid_show.html.erb +++ b/app/views/bids/_bid_show.html.erb @@ -13,7 +13,34 @@ - + <% if bid.reward_type == 3 %> @@ -60,6 +87,6 @@ diff --git a/app/views/bids/contest.html.erb b/app/views/bids/contest.html.erb index dd10f7b1b..bd069c8c8 100644 --- a/app/views/bids/contest.html.erb +++ b/app/views/bids/contest.html.erb @@ -32,13 +32,13 @@
<% if bid.reward_type.nil? or bid.reward_type == 1%> <%= l(:label_bids_reward_method) %><%= l(:label_call_bonus) %> <%= l(:label_RMB_sign) %><%= bid.budget%> <% elsif bid.reward_type == 2%> <%= l(:label_bids_reward_method) %><%= bid.budget%> <% else %> <% end %> + <% if bid.reward_type.nil? or bid.reward_type == 1%> + + <%= l(:label_bids_reward_method) %> + + <%= l(:label_call_bonus) %>  + <%= l(:label_RMB_sign) %> + <%= bid.budget%> + + + <% elsif bid.reward_type == 2%> + + <%= l(:label_bids_reward_method) %> + <%= bid.budget%> + + <% else %> + <% end %> +