From cba678a357009905fd16aef63a8dfc46e16e81d2 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 26 Mar 2015 19:01:22 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E6=98=AF=E5=90=A6=E5=90=AF?= =?UTF-8?q?=E7=94=A8=E5=8C=BF=E8=AF=84=20=E8=AF=BE=E7=A8=8B=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E5=88=97=E8=A1=A8=E6=A0=B7=E5=BC=8F=20=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E4=B8=8E=E9=80=80=E5=87=BA=E8=AF=BE=E7=A8=8B=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/bids_controller.rb | 2 +- app/helpers/courses_helper.rb | 10 +++++----- app/views/bids/_new_homework_form.html.erb | 2 +- app/views/courses/homework.html.erb | 2 +- app/views/layouts/base_courses.html.erb | 2 +- public/stylesheets/leftside.css | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index 9dd64bd7a..be97fdb6e 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -849,7 +849,7 @@ class BidsController < ApplicationController @bid.is_evaluation = params[:bid][:is_evaluation] @bid.proportion = params[:bid][:proportion] @bid.evaluation_num = params[:bid][:evaluation_num] - @bid.open_anonymous_evaluation = params[:bid][:open_anonymous_evaluation] + params[:bid][:open_anonymous_evaluation] ? @bid.open_anonymous_evaluation = 1 : @bid.open_anonymous_evaluation = 0 @bid.reward_type = 3 @bid.deadline = params[:bid][:deadline] @bid.budget = 0 diff --git a/app/helpers/courses_helper.rb b/app/helpers/courses_helper.rb index 49d2ff9b5..4de269b7b 100644 --- a/app/helpers/courses_helper.rb +++ b/app/helpers/courses_helper.rb @@ -682,13 +682,13 @@ module CoursesHelper url = joined ? join_path(:object_id => course.id) : try_join_path(:object_id => course.id) method = joined ? 'delete' : 'post' if joined - link = "#{l(:label_course_join_student)}" + link_to(text, url, :remote => true, :method => method, :class => "pr_join_a", :id => "#{course.id}", :confirm => l(:text_are_you_sure_out)) + link = "#{l(:label_course_join_student)}" + link_to(text, url, :remote => true, :method => method, :class => "pr_join_a", :id => "#{course.id}", :confirm => l(:text_are_you_sure_out)) else - link = link_to(text, url, :remote => true, :method => method, :id => "#{course.id}", :class => "pr_join_a") + "#{l(:label_course_exit_student)}".html_safe + link = link_to(text, url, :remote => true, :method => method, :id => "#{course.id}", :class => "pr_join_a") + "#{l(:label_course_exit_student)}".html_safe end else - link = "#{l(:label_course_join_student)}" + - "#{l(:label_course_exit_student)}" + link = "#{l(:label_course_join_student)}" + + "#{l(:label_course_exit_student)}" end link.html_safe end @@ -702,7 +702,7 @@ module CoursesHelper when 1 link = link_to '关闭匿评', alert_anonymous_comment_bid_path(bid), id: "#{bid.id}_stop_anonymous_comment", remote: true,:class => 'fr mr10 work_edit' when 2 - link = "匿评结束".html_safe + link = "匿评结束".html_safe end else link = "启动匿评".html_safe diff --git a/app/views/bids/_new_homework_form.html.erb b/app/views/bids/_new_homework_form.html.erb index eeaaa602e..6df06b1a6 100644 --- a/app/views/bids/_new_homework_form.html.erb +++ b/app/views/bids/_new_homework_form.html.erb @@ -23,7 +23,7 @@
  • - + >
  • diff --git a/app/views/courses/homework.html.erb b/app/views/courses/homework.html.erb index 4e38a34b2..9317027e2 100644 --- a/app/views/courses/homework.html.erb +++ b/app/views/courses/homework.html.erb @@ -41,7 +41,7 @@ <%= l(:label_end_time)%>:<%= bid.deadline%> <% if betweentime(bid.deadline) < 0 %> - + <%= l(:label_commit_limit)%> <% else %> diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 95384845f..69a0850d2 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -83,7 +83,7 @@
    - + <%= @course.name %> <% if @course.is_public == 0%> diff --git a/public/stylesheets/leftside.css b/public/stylesheets/leftside.css index ccdad0340..4089d0bb2 100644 --- a/public/stylesheets/leftside.css +++ b/public/stylesheets/leftside.css @@ -9,7 +9,7 @@ .pr_info_join{} a.pr_join_a{ color:#fff; display:block; padding:0 5px 0 3px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background-color:#64bdd9; float:left; } .pr_info_join a:hover{ background:#41a8c8;} -.pr_join_span{color: #fff; display:block; padding:0 5px; padding-top:2px; height:20px; margin-right:5px; float:left; text-align:center; background: #CCC;} +.pr_join_span{color: #fff; display:block; padding:0 5px; padding-top:2px; height:20px; float:left; text-align:center; background: #CCC;} .pr_setting{ display:block; background:url(../images/leftside.png) -1px 0 no-repeat; width:11px; height:11px; margin-top:3px; float:left; } .pr_copy{ display:block; background:url(../images/leftside.png) -1px -23px no-repeat; width:11px; height:11px; margin-top:3px; float:left; } .pr_close{ display:block; background:url(../images/leftside.png) -1px -49px no-repeat; width:11px; height:11px; margin-top:3px; float:left; }