- <%= link_to image_tag(url_to_avatar(teacher), :width => "60", :height => "60", :class => "sn-fl", :style => "display:block;"), user_path(teacher), :alt => "用户头像", :target => '_blank' %>
+ <%= link_to image_tag(url_to_avatar(teacher), :width => "60", :height => "60", :class => "sn-fl sn-avatar-circle", :style => "display:block;"), user_path(teacher), :alt => "用户头像", :target => '_blank' %>
<%=link_to teacher.try(:realname) ? teacher.try(:realname) :teacher.try(:login), user_path(teacher), :class => "sn-teacher-name sn-hidden", :title => '', :target => '_blank' %>
diff --git a/public/stylesheets/org2.css b/public/stylesheets/org2.css
index 0ea602976..c2cf0a478 100644
--- a/public/stylesheets/org2.css
+++ b/public/stylesheets/org2.css
@@ -241,8 +241,8 @@ ul.sn-inner-pages li a:hover{ background-color:#24366e; color:#fff; text-decorat
/*名师榜*/
.sn-teacher-list {margin:0 20px; padding:15px 0; border-bottom:1px solid #e9e9e9;}
-a.sn-teacher-name {width:75px; font-size:18px; color:#777; float:left;}
-.sn-teacher-unit {width:154px; font-size:14px; color:#999; float:left; margin-left:15px; margin-top:3px;}
+a.sn-teacher-name {width:60px; font-size:18px; color:#777; float:left;}
+.sn-teacher-unit {width:169px; font-size:14px; color:#999; float:left; margin-left:15px; margin-top:3px;}
.sn-teacher-info {height:30px; line-height:30px; vertical-align:middle; float:left; margin-left:15px;}
.sn-teacher-social {height:30px; line-height:30px; vertical-align:middle; float:left; color:#999; font-size:12px; margin-left:15px;}
.sn-border-none {border:none;}
@@ -250,6 +250,7 @@ a.sn-teacher-name {width:75px; font-size:18px; color:#777; float:left;}
.sn-teacher-avatar2 {margin:0 18px; padding:18px 0;}
.sn-teacher-info2 {color:#666; text-align:center; font-size:16px;}
.sn-info2-hidden {width:153px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; margin:0 auto;}
+.sn-avatar-circle {border-radius:50%;}
/*弹框*/
.upload_con h2 {
From 39d014355b026d6b3adb317f329833987b331f53 Mon Sep 17 00:00:00 2001
From: huang
Date: Fri, 13 May 2016 16:30:45 +0800
Subject: [PATCH 05/44] =?UTF-8?q?=E7=A7=91=E5=A4=A7=E5=90=8D=E5=B8=88?=
=?UTF-8?q?=EF=BC=8C=E5=92=8C=E5=90=8D=E5=B8=88=E5=88=97=E8=A1=A8=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=E6=A0=87=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/organizations_controller.rb | 1 +
.../organizations/_org_left_subfield_list.html.erb | 2 +-
app/views/organizations/teachers.html.erb | 10 ++++++++--
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb
index b48488fb8..c94f734e1 100644
--- a/app/controllers/organizations_controller.rb
+++ b/app/controllers/organizations_controller.rb
@@ -164,6 +164,7 @@ class OrganizationsController < ApplicationController
return
end
q = params[:search].nil? ? "" : "#{params[:search].strip}"
+ @field = OrgSubfield.find(params[:org_subfield_id])
@type = params[:type]
if @type == "courses" || @type.nil?
@org_teachers = User.find_by_sql("select u.*, ue.technical_title, ue.school_id,(select count(*) from courses where courses.tea_id = u.id) as course_count
diff --git a/app/views/organizations/_org_left_subfield_list.html.erb b/app/views/organizations/_org_left_subfield_list.html.erb
index 3fe57d223..4340213a4 100644
--- a/app/views/organizations/_org_left_subfield_list.html.erb
+++ b/app/views/organizations/_org_left_subfield_list.html.erb
@@ -102,7 +102,7 @@
<% end %>
<% else %>
<% if field.field_type == "Comptec" %>
- <%= link_to "#{field.name}", teachers_organization_path(organization), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
+ <%= link_to "#{field.name}", teachers_organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
<% else %>
<%= link_to "#{field.name}", organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
<% end %>
diff --git a/app/views/organizations/teachers.html.erb b/app/views/organizations/teachers.html.erb
index 4b50a2a81..6e06124a4 100644
--- a/app/views/organizations/teachers.html.erb
+++ b/app/views/organizations/teachers.html.erb
@@ -1,5 +1,11 @@
@@ -18,7 +24,7 @@
- <%= link_to "名师列表", teachers_organization_path(@organization, :type => "famous"), :class => "fontGrey" %>
+ <%= link_to "名师列表", teachers_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey" %>
From 6ccb79a210cfc47c752070259db5350aab225c86 Mon Sep 17 00:00:00 2001
From: huang
Date: Fri, 13 May 2016 16:47:56 +0800
Subject: [PATCH 06/44] =?UTF-8?q?=E6=95=99=E5=B8=88=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E9=A2=9C=E8=89=B2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/organizations/teachers.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/organizations/teachers.html.erb b/app/views/organizations/teachers.html.erb
index 6e06124a4..c368adef7 100644
--- a/app/views/organizations/teachers.html.erb
+++ b/app/views/organizations/teachers.html.erb
@@ -24,7 +24,7 @@
- <%= link_to "名师列表", teachers_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey" %>
+ <%= link_to "名师列表", teachers_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %>
From bc39b68bb2180b5e55296611627b206c39e99c9f Mon Sep 17 00:00:00 2001
From: cxt
Date: Fri, 13 May 2016 16:50:41 +0800
Subject: [PATCH 07/44] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E6=B5=8B=E9=AA=8C?=
=?UTF-8?q?=E9=A2=98=E7=9B=AE=E3=80=81=E9=97=AE=E5=8D=B7=E9=A2=98=E7=9B=AE?=
=?UTF-8?q?=E9=98=B2=E6=AD=A2=E5=A4=9A=E6=AC=A1=E6=8F=90=E4=BA=A4=E8=A1=A8?=
=?UTF-8?q?=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/exercise/_exercise_form.html.erb | 9 ++++
app/views/exercise/_new_MC.html.erb | 11 +++-
app/views/exercise/_new_MCQ.html.erb | 11 +++-
app/views/exercise/_new_single.html.erb | 11 +++-
app/views/exercise/_show_MC.html.erb | 5 +-
app/views/exercise/_show_MCQ.html.erb | 5 +-
app/views/exercise/_show_single.html.erb | 5 +-
app/views/poll/_new_MC.html.erb | 13 +++--
app/views/poll/_new_MCQ.html.erb | 13 +++--
app/views/poll/_new_mulit.html.erb | 13 +++--
app/views/poll/_new_single.html.erb | 13 +++--
app/views/poll/_poll_form.html.erb | 60 +++++++++++++++++-----
app/views/poll/create_poll_question.js.erb | 2 +-
13 files changed, 135 insertions(+), 36 deletions(-)
diff --git a/app/views/exercise/_exercise_form.html.erb b/app/views/exercise/_exercise_form.html.erb
index ec099cb09..f8fe7896c 100644
--- a/app/views/exercise/_exercise_form.html.erb
+++ b/app/views/exercise/_exercise_form.html.erb
@@ -87,10 +87,19 @@
var standard_ans = $.trim($("#question_standard_ans").val());
if(title.length == 0 || score.length == 0){
alert("题目标题/分数不能为空");
+ doc.one('click', function(){
+ add_poll_question($(this),quest_type);
+ });
}else if(!/^[1-9][0-9]*$/.test(score)) {
alert("分数必须是非零开头的数字");
+ doc.one('click', function(){
+ add_poll_question($(this),quest_type);
+ });
}else if(quest_type !=3 && standard_ans.length == 0) {
alert("标准答案不能为空");
+ doc.one('click', function(){
+ add_poll_question($(this),quest_type);
+ });
}else{
doc.parent().parent().parent().submit();}
}
diff --git a/app/views/exercise/_new_MC.html.erb b/app/views/exercise/_new_MC.html.erb
index 6fd6c201e..43628f104 100644
--- a/app/views/exercise/_new_MC.html.erb
+++ b/app/views/exercise/_new_MC.html.erb
@@ -54,9 +54,16 @@
-<% end %>
\ No newline at end of file
+<% end %>
+
\ No newline at end of file
diff --git a/app/views/exercise/_new_MCQ.html.erb b/app/views/exercise/_new_MCQ.html.erb
index a24835fc1..875b9ec4c 100644
--- a/app/views/exercise/_new_MCQ.html.erb
+++ b/app/views/exercise/_new_MCQ.html.erb
@@ -54,9 +54,16 @@