From e19fe844a23bc6a923a8c74fa40b8a1f629ddaa2 Mon Sep 17 00:00:00 2001 From: huangjingquan Date: Tue, 8 Oct 2013 22:20:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/bids/_contest_show.html.erb | 54 +++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 app/views/bids/_contest_show.html.erb diff --git a/app/views/bids/_contest_show.html.erb b/app/views/bids/_contest_show.html.erb new file mode 100644 index 000000000..adbaf82cf --- /dev/null +++ b/app/views/bids/_contest_show.html.erb @@ -0,0 +1,54 @@ + +<% bids.each do |bid|%> + + + + + +
<%= link_to(image_tag(url_to_avatar(bid.author), :class => 'avatar'), user_path(bid.author), :class => "avatar") %> + + + + + + + + + + + +
<%= link_to(bid.author, user_path(bid.author), :class => 'bid_user') %>:  <%= link_to(bid.name, respond_path(bid), :class => 'bid_path') %>
+ + + + + <% unless bid.reward_type == 3 %> + + + + <% else %> + + + + <% unless bid.courses.empty? %> + <% teacher = Course.find_by_extra(bid.courses.first.identifier).teacher %> + + + + <% end %> + <% 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 %>
<%= l(:label_x_biding_project, :count => bid.biding_projects.count) %>(<%= link_to bid.biding_projects.count, project_for_bid_path(bid) %>)<%= l(:label_x_bids_responses, :count => bid.commit) %>(<%= link_to bid.commit, respond_path(bid) %>) <%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<%= link_to bid.watcher_users.count, respond_path(bid) %>)
<%= l(:label_x_homework_project, :count => bid.biding_projects.count) %>(<%= link_to bid.biding_projects.count, project_for_bid_path(bid) %>) <%= l(:label_x_responses, :count => bid.commit) %>(<%= link_to bid.commit, respond_path(bid) %>) <%= l(:label_x_followers, :count => bid.watcher_users.count) %>(<%= link_to bid.watcher_users.count, respond_path(bid) %>)
课程名称:<%= link_to bid.courses.first.name, project_path(bid.courses.first)%>  教师:<%= link_to teacher.lastname+teacher.firstname, user_path(teacher) %>
<%= format_time bid.created_on %>
+
+ + + + +
<%= bid.description%>
+
+<% end %> + +