From 96626eeb6b1c40b0c76d67c732619f2db182eb7c Mon Sep 17 00:00:00 2001 From: z9hang Date: Sun, 2 Nov 2014 10:20:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=81=A2=E5=A4=8Drespond=5Fpath=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E5=B9=B6=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86respond?= =?UTF-8?q?=5Fpath=20=E6=81=A2=E5=A4=8Dhomework=5Flist.html.erb=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/bids_controller.rb | 2 +- app/helpers/stores_helper.rb | 2 +- .../homework_attach/_homeworks_list.html.erb | 81 ++----------------- app/views/test/courselist.html.erb | 2 +- app/views/users/_my_create_homework.html.erb | 2 +- config/routes.rb | 2 +- 6 files changed, 11 insertions(+), 80 deletions(-) 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 @@