diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb
index 5b17271af..4b1526fa9 100644
--- a/app/controllers/bids_controller.rb
+++ b/app/controllers/bids_controller.rb
@@ -200,7 +200,7 @@ class BidsController < ApplicationController
flash[:notice] = l(:label_bid_succeed)
end
end
- redirect_to respond_path(@homework)
+ redirect_to course_for_bid_path(@homework)
else
@bid.safe_attributes = params[:bid]
@courses = []
diff --git a/app/helpers/stores_helper.rb b/app/helpers/stores_helper.rb
index 5a161dc85..e987367ad 100644
--- a/app/helpers/stores_helper.rb
+++ b/app/helpers/stores_helper.rb
@@ -138,7 +138,7 @@ module StoresHelper
return [link_to('unkown', '#')]
end
bid_list = link_to l(:label_homework), homework_course_path(bid.courses.first)
- bid_item = link_to bid.name, respond_path(bid)
+ bid_item = link_to bid.name, course_for_bid_path(bid)
return project_link(bid.courses.first).push(bid_list, bid_item)
else
xxx
diff --git a/app/views/homework_attach/_homeworks_list.html.erb b/app/views/homework_attach/_homeworks_list.html.erb
index 83d3f35d0..ef2b9a001 100644
--- a/app/views/homework_attach/_homeworks_list.html.erb
+++ b/app/views/homework_attach/_homeworks_list.html.erb
@@ -11,10 +11,10 @@
)
按
- <%= link_to l(:label_work_rating), sort_homework_path(@bid, 'socre', @direction), {:remote => true}%>
- /
- <%= link_to l(:label_time), sort_homework_path(@bid, 'time', @direction), {:remote => true}%>
- <%= l(:label_sort) %>
+ <%= link_to l(:label_work_rating), sort_homework_path(@bid, 'socre', @direction), {:remote => true}%>
+ /
+ <%= link_to l(:label_time), sort_homework_path(@bid, 'time', @direction), {:remote => true}%>
+ <%= l(:label_sort) %>
<% end %>
@@ -43,76 +43,7 @@
<%= render :partial => 'homework_attach/homework',
:locals => {:homework => homework, :is_student_batch_homework => is_student_batch_homework,
- :is_my_homework => is_my_homework, :is_teacher => is_teacher}%>
-
- -
- <%= link_to image_tag(url_to_avatar(homework.user), :width => "40", :height => "40"), user_path(homework.user) %>
-
- <% user_realname = homework.user.lastname.to_s + homework.user.firstname.to_s %>
- <% user_name = is_teacher ? (user_realname.empty? ? homework.user.login : user_realname) : homework.user.login %>
- <%= link_to user_name, user_path(homework.user), :title => user_name %>
-
-
- -
- <% if homework.name == nil || homework.name == "" %>
- <% homework_filename = homework.user.name + "提交的作业" %>
- <% else %>
- <% homework_filename = homework.name %>
- <% end %>
- <%= link_to homework_filename , homework_attach_path(homework), :title => homework_filename, :remote => true%>
-
- -
- 评分:
- <%= rating_for @homework, dimension: :quality, class: 'rateable div_inline' %>
- <%= link_to "(#{homework.attachments.count.to_s}个附件)", zipdown_download_user_homework_path(:homework => homework)%>
-
- -
- <%= l(:label_teacher_score)%>:
-
- <%= homework.t_score.nil? ? l(:label_without_score) : format("%.2f",homework.t_score)%>
-
-
-
- -
- <%= l(:label_student_score)%>:
-
- <%= homework.s_score.nil? ? l(:label_without_score) : format("%.2f",homework.s_score) %>
-
-
- <% if is_teacher %>
-
- -
- <%= link_to l(:label_work_rating),homework_attach_path(homework),:remote => true %>
- <% if Time.parse(bid.deadline.to_s).strftime("%Y-%m-%d") < Time.parse(homework.created_at.to_s).strftime("%Y-%m-%d") %>
- 迟交!
- <% end %>
-
- <% else %>
-
- <% if is_my_homework %>
-
- -
- <%= link_to l(:button_edit), edit_homework_attach_path(homework) %>
- <% if homework.user == User.current || User.current.admin? %>
- <%= link_to(l(:label_bid_respond_delete), homework,
- method: :delete, :confirm => l(:text_are_you_sure), :remote => true ) %>
- <% end %>
-
- <% elsif is_student_batch_homework%>
-
- -
- <%= link_to l(:label_work_rating),homework_attach_path(homework),:remote => true %>
- <% if Time.parse(bid.deadline.to_s).strftime("%Y-%m-%d") < Time.parse(homework.created_at.to_s).strftime("%Y-%m-%d") %>
- 迟交!
- <% end %>
-
- <% else %>
-
- -
- 点赞
-
- <% end %>
- <% end %>
+ :is_my_homework => is_my_homework, :is_teacher => is_teacher}%>
<% end %>
@@ -123,4 +54,4 @@
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => remote, :flag => true%>
-<% end %>
\ No newline at end of file
+<% end %>
diff --git a/app/views/test/courselist.html.erb b/app/views/test/courselist.html.erb
index 195913ed2..3f9f22489 100644
--- a/app/views/test/courselist.html.erb
+++ b/app/views/test/courselist.html.erb
@@ -19,7 +19,7 @@
- <%= link_to homework.name, respond_path(homework) %>(<%=homework.homeworks.count %>)<%#Bid%>
+ <%= link_to homework.name, course_for_bid_path(homework) %>(<%=homework.homeworks.count %>)<%#Bid%>
<%#= link_to "打包下载", zipdown_assort_path(obj_class: homework.class, obj_id: homework.id), :class => "btn btn-primary btn-sm" %>
diff --git a/app/views/users/_my_create_homework.html.erb b/app/views/users/_my_create_homework.html.erb
index 4c7cbe02f..aa102bf85 100644
--- a/app/views/users/_my_create_homework.html.erb
+++ b/app/views/users/_my_create_homework.html.erb
@@ -34,7 +34,7 @@
- <% 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 %> |
diff --git a/config/routes.rb b/config/routes.rb
index 2132d7aba..78f0eeedb 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -748,7 +748,7 @@ RedmineApp::Application.routes.draw do
# added by young
match 'calls', :to => 'bids#index'
- #match 'calls/:id', :to => 'bids#show', :as => 'respond'
+ match 'calls/:id', :to => 'bids#show', :as => 'respond'
# modified by longjun
# bids#contests is not exist
# match 'contest', :to => 'bids#contests', :as => 'contest' #modified @20140403
|