diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index b9f9245c8..ef0be71ac 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -482,7 +482,7 @@ class BidsController < ApplicationController #ended end - if @bid.homework_type == 1 + if @bid.homework_type @homework = HomeworkAttach.new #@homework_list = @bid.homeworks #增加作业按评分排序, diff --git a/app/views/bids/_homework_list.html.erb b/app/views/bids/_homework_list.html.erb index 9f6b45dbd..a8f1f4356 100644 --- a/app/views/bids/_homework_list.html.erb +++ b/app/views/bids/_homework_list.html.erb @@ -86,10 +86,12 @@ - + 开发项目:  <% if homework.project != nil %> + <%= link_to homework.project.name,project_path(homework.project.id)%> + <% else %> 暂无 <% end %> diff --git a/app/views/bids/show_courseEx.html.erb b/app/views/bids/show_courseEx.html.erb index 039de6b7a..992abfd96 100644 --- a/app/views/bids/show_courseEx.html.erb +++ b/app/views/bids/show_courseEx.html.erb @@ -1,4 +1,4 @@ -<% if @bid.homework_type == Bid::HomeworkFile %> +<% if @bid.homework_type %> <%= render :partial => 'homework' %>