<%= l(:label_tags_search_result) %>
-
+
<%= l(:label_tags_numbers) %>:
<%= l(:label_issue_plural) %>(<%= @issues_tags_num %>) |
<%= l(:label_project_plural) %>(<%= @projects_tags_num %>) |
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index d6026537e..1df2a2ece 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -1428,4 +1428,5 @@ a.pages-big{ width:50px;}
.W300 {width:300px !important;}
.W600{ width:600px;}
-.syllabus_input {width: 290px; border: 1px solid #64bdd9; height: 30px;}
+.syllabus_input {width: 290px; border: 1px solid #64bdd9; height: 30px;}
+.syllabus_input option {max-width:260px;}
From 1bfb2918f077f8801d13134f1a3236b6ff7a545d Mon Sep 17 00:00:00 2001
From: yuanke <249218296@qq.com>
Date: Fri, 1 Jul 2016 20:06:12 +0800
Subject: [PATCH 11/43] =?UTF-8?q?KE=E9=97=B4=E8=B7=9D=E6=94=B9=E5=9B=9E?=
=?UTF-8?q?=E5=8E=9F=E6=9D=A5=E7=9A=84=EF=BC=8C=E4=BF=AE=E6=94=B9=E8=AF=BE?=
=?UTF-8?q?=E7=A8=8B=E5=A4=A7=E7=BA=B2=E9=99=84=E4=BB=B6=E5=88=A0=E9=99=A4?=
=?UTF-8?q?=E4=B8=8B=E8=BD=BD=E9=97=AE=E9=A2=98=EF=BC=8C=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E5=8D=9A=E5=AE=A2=E6=A0=87=E9=A2=98=E4=B8=8E=E7=BD=AE=E9=A1=B6?=
=?UTF-8?q?=E6=A0=B7=E5=BC=8F=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/attachments_controller.rb | 2 +-
app/views/attachments/_form_course.html.erb | 12 ++++++------
public/stylesheets/courses.css | 3 +--
public/stylesheets/new_user.css | 1 -
public/stylesheets/project.css | 1 -
public/stylesheets/public.css | 3 +--
public/stylesheets/syllabus.css | 2 +-
7 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb
index 960bc61e6..a6b5f09cf 100644
--- a/app/controllers/attachments_controller.rb
+++ b/app/controllers/attachments_controller.rb
@@ -612,7 +612,7 @@ class AttachmentsController < ApplicationController
@attachment.container.board.course)
@course = @attachment.container.board.course
else
- unless @attachment.container_type == 'Bid' || @attachment.container_type == 'Organization' || @attachment.container_type == 'HomeworkAttach' || @attachment.container_type == 'Memo' || @attachment.container_type == 'Softapplication' || @attachment.container_type == 'PhoneAppVersion' || @attachment.container_type == 'StudentWorksScore'|| @attachment.container_type == 'StudentWork'
+ unless @attachment.container_type == 'Syllabus' || @attachment.container_type == 'Bid' || @attachment.container_type == 'Organization' || @attachment.container_type == 'HomeworkAttach' || @attachment.container_type == 'Memo' || @attachment.container_type == 'Softapplication' || @attachment.container_type == 'PhoneAppVersion' || @attachment.container_type == 'StudentWorksScore'|| @attachment.container_type == 'StudentWork'
@project = @attachment.project
end
end
diff --git a/app/views/attachments/_form_course.html.erb b/app/views/attachments/_form_course.html.erb
index 6d921903d..1d51e951a 100644
--- a/app/views/attachments/_form_course.html.erb
+++ b/app/views/attachments/_form_course.html.erb
@@ -2,31 +2,31 @@
<% if defined?(container) && container && container.saved_attachments %>
<% if isReply %>
<% container.saved_attachments.each_with_index do |attachment, i| %>
-
+
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'upload_filename readonly', :readonly=>'readonly')%>
<%#= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 255, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
<%#= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false, :class => 'is_public_checkbox')%>
- <%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %>
+ <%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "#{i+1}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload', :containerid => "2") %>
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
-
+
<% end %>
<% else %>
<% container.attachments.each_with_index do |attachment, i| %>
-
+
<%= text_field_tag("attachments[p#{i}][filename]", attachment.filename, :class => 'upload_filename readonly', :readonly=>'readonly')%>
<%#= text_field_tag("attachments[p#{i}][description]", attachment.description, :maxlength => 255, :placeholder => l(:label_optional_description), :class => 'description', :style=>"display: inline-block;") %>
<%#= check_box_tag("attachments[p#{i}][is_public_checkbox]", attachment.is_public,attachment.is_public == 1 ? true : false, :class => 'is_public_checkbox')%>
- <%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "p#{i}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload') %>
+ <%= link_to(' '.html_safe, attachment_path(attachment, :attachment_id => "#{i+1}", :format => 'js'), :method => 'delete', :remote => true, :class => 'remove-upload', :containerid => "2") %>
<%#= render :partial => 'tags/tag', :locals => {:obj => attachment, :object_flag => "6"} %>
<%= hidden_field_tag "attachments[p#{i}][token]", "#{attachment.token}" %>
-
+
<% end %>
<% end %>
<% end %>
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index 96c9947b1..178e9bb5d 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -152,7 +152,6 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
.homepagePostIntro a{color: #136ec2;}
-.homepagePostIntro p{line-height: 1;}
.homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;}
.homepagePostDate {font-size:12px; color:#888888;margin-bottom: 5px;}
.homepagePostReply {width:710px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;}
@@ -1429,4 +1428,4 @@ a.pages-big{ width:50px;}
.W300 {width:300px !important;}
.W600{ width:600px;}
-.syllabus_input {width: 290px; border: 1px solid #64bdd9; height: 30px;}
+.syllabus_input {width: 290px; border: 1px solid #64bdd9; height: 30px;}
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index a65edc490..b931dff6b 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -683,7 +683,6 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
.homepagePostIntro a{color: #136ec2;}
-.homepagePostIntro p{line-height: 1;}
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;}
.borderBottomNone {border-bottom:none !important;}
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;}
diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css
index 354c0f1ac..bde560613 100644
--- a/public/stylesheets/project.css
+++ b/public/stylesheets/project.css
@@ -969,7 +969,6 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
color: #484848;
overflow: hidden;
}
-.homepagePostIntro p{line-height: 1;}
.homepagePostReply {
width: 710px;
margin: 10px auto 0px;
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index 7cfb7f9e0..c86e0f42d 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -633,7 +633,6 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
.homepagePostIntro a{color: #136ec2;}
-.homepagePostIntro p{line-height: 1;}
.homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;}
.homepagePostDate {font-size:12px; color:#888888;margin-bottom: 5px;}
.homepagePostReplyBanner {width:708px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;}
@@ -1184,4 +1183,4 @@ a.shadowbox_news_all{ display:block; width:305px; height:40px; line-height:40px;
.reply_iconup{ position:absolute; top:21px; left:13px; color:#d4d4d4; font-size:16px; background:#f1f1f1; line-height:13px;}
/*20160622代码分析弹窗*/
-.analysis-option-box {width:100%; border:1px solid #ccc; padding:3px 5px;}
+.analysis-option-box {width:100%; border:1px solid #ccc; padding:3px 5px;}
diff --git a/public/stylesheets/syllabus.css b/public/stylesheets/syllabus.css
index 6218f52e0..2abbffda7 100644
--- a/public/stylesheets/syllabus.css
+++ b/public/stylesheets/syllabus.css
@@ -138,7 +138,7 @@ a.sortupbtn{ background: url(../images/syllabus/icons_syllabus.png) 0 3px no-rep
a.sortdownbtn{ background: url(../images/syllabus/icons_syllabus.png) 0 -12px no-repeat; width:12px; height:17px; display:block;cursor:pointer; }
a.sort_no{ background: url(../images/syllabus/icons_syllabus.png) -16px -12px no-repeat; width:12px; height:17px; display:block;cursor:pointer; }
.item_list{ display:block; width:5px; height:5px;-webkit-border-radius: 25px;border-radius:25px; background-color:#adadad; margin:10px 10px 0 0;}
-a.list-title{ font-size:14px; font-weight: bold; color:#000;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block; width:708px;}
+a.list-title{ font-size:14px; font-weight: bold; color:#000;white-space:nowrap; overflow:hidden; text-overflow:ellipsis; display:block;}
a:hover.list-title{ color:#269ac9;}
.c_red{ font-weight:normal; font-size:12px;}
.list-file{ padding:10px 0; border-bottom:1px dashed #ddd;}
From 70e26927cba70f4f81cf2091ad4fbd035f51ee5e Mon Sep 17 00:00:00 2001
From: yuanke <249218296@qq.com>
Date: Fri, 1 Jul 2016 20:38:33 +0800
Subject: [PATCH 12/43] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E4=B8=AD=E7=9A=84?=
=?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=AD=97=E6=A0=B7=E6=94=B9=E4=B8=BA=E7=8F=AD?=
=?UTF-8?q?=E7=BA=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/services/courses_service.rb | 12 ++++++------
app/views/courses/join.js.erb | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/app/services/courses_service.rb b/app/services/courses_service.rb
index f6bf59af0..f59beb7e5 100644
--- a/app/services/courses_service.rb
+++ b/app/services/courses_service.rb
@@ -324,15 +324,15 @@ class CoursesService
define_error [
0, '加入成功',
1, '密码错误',
- 2, '课程已过期 请联系课程管理员重启课程。',
- 3, '您已经加入了课程',
- 4, '您加入的课程不存在',
+ 2, '班级已过期 请联系班级管理员重启班级。',
+ 3, '您已经加入了班级',
+ 4, '您加入的班级不存在',
5, '您还未登录',
6, '申请成功,请等待审核完毕',
7, '您已经发送过申请了,请耐心等待',
- 8, '您已经是该课程的教师了',
- 9, '您已经是该课程的教辅了',
- 10, '您已经是该课程的管理员了',
+ 8, '您已经是该班级的教师了',
+ 9, '您已经是该班级的教辅了',
+ 10, '您已经是该班级的管理员了',
'未知错误,请稍后再试'
]
end
diff --git a/app/views/courses/join.js.erb b/app/views/courses/join.js.erb
index 04a77f87b..ac8b717d1 100644
--- a/app/views/courses/join.js.erb
+++ b/app/views/courses/join.js.erb
@@ -10,12 +10,12 @@ window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/co
<% elsif @state == 1 %>
alert("密码错误");
<% elsif @state == 2 %>
-alert("课程已过期\n请联系课程管理员重启课程。(在配置课程处)");
+alert("班级已过期\n请联系班级管理员重启班级。(在配置班级处)");
<% elsif @state == 3 %>
-alert("您已经加入了课程");
+alert("您已经加入了班级");
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
<% elsif @state == 4 %>
-alert("您加入的课程不存在");
+alert("您加入的班级不存在");
<% elsif @state == 5 %>
alert("您还未登录");
<% elsif @state == 6 %>
@@ -25,15 +25,15 @@ hidden_join_course_form();
alert("您已经发送过申请了,请耐心等待");
hidden_join_course_form();
<% elsif @state == 8%>
-alert("您已经是该课程的教师了");
+alert("您已经是该班级的教师了");
hidden_join_course_form();
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
<% elsif @state == 9%>
-alert("您已经是该课程的教辅了");
+alert("您已经是该班级的教辅了");
hidden_join_course_form();
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
<% elsif @state == 10%>
-alert("您已经是该课程的管理员了");
+alert("您已经是该班级的管理员了");
hidden_join_course_form();
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/courses/" + "<%= @course.id%>"
<% else %>
From 447e624f3640ad870e695661628c78836a49fa11 Mon Sep 17 00:00:00 2001
From: yuanke <249218296@qq.com>
Date: Fri, 1 Jul 2016 21:38:37 +0800
Subject: [PATCH 13/43] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=A4=A7=E7=BA=B2bug?=
=?UTF-8?q?=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/helpers/syllabuses_helper.rb | 12 ++++++------
app/views/courses/private_or_public.js.erb | 4 ++--
app/views/layouts/_syllabus_base_info.html.erb | 6 +++---
app/views/syllabuses/_syllabus_course_list.html.erb | 2 +-
app/views/users/_user_course_list.html.erb | 2 +-
app/views/users/_user_syllabus_list.html.erb | 2 +-
6 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/app/helpers/syllabuses_helper.rb b/app/helpers/syllabuses_helper.rb
index 00331e0dc..7e815950b 100644
--- a/app/helpers/syllabuses_helper.rb
+++ b/app/helpers/syllabuses_helper.rb
@@ -48,17 +48,17 @@ module SyllabusesHelper
option6 = []
option1 << "请选择"
- option1 << 1
+ option1 << 0
option2 << "公共必修课"
- option2 << 2
+ option2 << 1
option3 << "学科必修课"
- option3 << 3
+ option3 << 2
option4 << "专业选修课"
- option4 << 4
+ option4 << 3
option5 << "实践必修课"
- option5 << 5
+ option5 << 4
option6 << "实践选修课"
- option6 << 6
+ option6 << 5
type << option1
type << option2
diff --git a/app/views/courses/private_or_public.js.erb b/app/views/courses/private_or_public.js.erb
index 4e512a6a0..82180c452 100644
--- a/app/views/courses/private_or_public.js.erb
+++ b/app/views/courses/private_or_public.js.erb
@@ -9,9 +9,9 @@
}
<% else %>
<% if @course.is_public? %>
- $("#show_course_<%= @course.id %>").attr("title","公开课程:<%= @course.name %>(<%= @course.time.to_s+ @course.term %>)");
+ $("#show_course_<%= @course.id %>").attr("title","公开班级:<%= @course.name %>(<%= @course.time.to_s+ @course.term %>)");
<% else %>
- $("#show_course_<%= @course.id %>").attr("title","私有课程:<%= @course.name %>(<%= @course.time.to_s+ @course.term %>)");
+ $("#show_course_<%= @course.id %>").attr("title","私有班级:<%= @course.name %>(<%= @course.time.to_s+ @course.term %>)");
<% end %>
$("#set_course_public_<%= @course.id %>").replaceWith('<%= escape_javascript(link_to @course.is_public == 0 ? "设为公开" : "设为私有", {:controller => "courses", :action => "private_or_public", :id => @course,:user_page => true},
:id => "set_course_public_#{@course.id.to_s}",:remote=>true,:confirm=>"您确定要设置为"+(@course.is_public == 0 ? "公开" : "私有")+"吗") %>');
diff --git a/app/views/layouts/_syllabus_base_info.html.erb b/app/views/layouts/_syllabus_base_info.html.erb
index cf4926d82..ae6da2ac3 100644
--- a/app/views/layouts/_syllabus_base_info.html.erb
+++ b/app/views/layouts/_syllabus_base_info.html.erb
@@ -4,7 +4,7 @@
<% end %>
创建教师: <%=syllabus.user.show_name %>
- <% unless syllabus.syllabus_type.nil? || syllabus.syllabus_type == 0 %>
+ <% unless syllabus.syllabus_type.nil? || syllabus.syllabus_type == 0 || syllabus.syllabus_type == '' %>
课程性质: <%=syllabus.syllabus_type_str %>
<% end %>
<% unless syllabus.credit.nil? || syllabus.credit == '' %>
@@ -26,7 +26,7 @@
先修课程: <%=syllabus.pre_course %>
<% end %>
- <% if syllabus.syllabus_type.nil? || syllabus.syllabus_type == '' %>
+ <% if syllabus.syllabus_type.nil? || syllabus.syllabus_type == 0 || syllabus.syllabus_type == '' %>
课程性质: 空
<% end %>
<% if syllabus.credit.nil? || syllabus.credit == '' %>
@@ -48,7 +48,7 @@
先修课程: 空
<% end %>
-<% if User.current.logged? && (User.current == syllabus.user || User.current.admin?)&&(syllabus.syllabus_type.nil? || syllabus.syllabus_type == ''||syllabus.credit.nil? || syllabus.credit == ''||syllabus.hours.nil? || syllabus.hours == ''||syllabus.theory_hours.nil? || syllabus.theory_hours == ''||syllabus.practice_hours.nil? || syllabus.practice_hours == ''||syllabus.applicable_major.nil? || syllabus.applicable_major == ''||syllabus.pre_course.nil? || syllabus.pre_course == '')%>
+<% if User.current.logged? && (User.current == syllabus.user || User.current.admin?)&&(syllabus.syllabus_type.nil? || syllabus.syllabus_type == 0 || syllabus.syllabus_type == ''||syllabus.credit.nil? || syllabus.credit == ''||syllabus.hours.nil? || syllabus.hours == ''||syllabus.theory_hours.nil? || syllabus.theory_hours == ''||syllabus.practice_hours.nil? || syllabus.practice_hours == ''||syllabus.applicable_major.nil? || syllabus.applicable_major == ''||syllabus.pre_course.nil? || syllabus.pre_course == '')%>
<% end %>
-
-
- <%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
-
-
-
- <% if reply.try(:author).try(:realname) == ' ' %>
- <%= link_to reply.try(:author), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
- <% else %>
- <%= link_to reply.try(:author).try(:realname), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
- <% end %>
-
-
- <%= reply.content.html_safe%>
-
-
- <%= format_time(reply.created_on) %>
-
-
-
-
-
+ <% all_comments = []%>
+ <% comments = get_all_children(all_comments, @topic) %>
+
+ <% comments.each_with_index do |reply,i| %>
+
+
+
+ <%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
+
+
+
+ <%= link_to reply.creator_user.show_name, user_url_in_org(reply.creator_user.id), :class => "newsBlue mr10 f14" %>
+ <%= time_from_now(reply.created_on) %>
- <% end %>
-
+ <% if !reply.parent.nil? && !reply.parent.parent.nil? %>
+ <%= render :partial => 'users/message_contents', :locals => {:comment => reply}%>
+ <% end %>
+
+ <%= reply.content.html_safe%>
+
+
+
+
+
+ <%= render :partial => "praise_tread/praise", :locals => {:activity => reply, :user_activity_id => reply.id, :type => "reply"} %>
+
+
+ <%= link_to(
+ l(:button_reply),
+ {:action => 'quote', :id => reply},
+ :remote => true,
+ :method => 'get',
+ :title => l(:button_reply)) if !@topic.locked? && authorize_for('messages', 'reply') %>
+ ︿
+
+ <%= link_to(
+ l(:button_delete),
+ {:action => 'destroy', :id => reply},
+ :method => :post,
+ :class => 'fr mr20',
+ :data => {:confirm => l(:text_are_you_sure)},
+ :title => l(:button_delete)
+ ) if reply.course_destroyable_by?(User.current) %>
+
- <% end %>
+
+
+
+
+
+
+
+ <% end %>
+
<% if !@topic.locked? && authorize_for('messages', 'reply') %>
diff --git a/app/views/messages/_reply_message.html.erb b/app/views/messages/_reply_message.html.erb
index d4d9d77a0..923734001 100644
--- a/app/views/messages/_reply_message.html.erb
+++ b/app/views/messages/_reply_message.html.erb
@@ -4,11 +4,12 @@
- <% count=0 %>
- <% if activity.parent %>
- <% count=activity.parent.children.count%>
- <% else %>
- <% count=activity.children.count%>
- <% end %>
+ <% all_comments = []%>
+ <% count=get_all_children(all_comments, activity).count %>
+ <%# allow_delete = (activity.user == User.current || User.current.admin? || User.current.allowed_to?(:as_teacher,activity.course)) %>
+ <%# count = fetch_user_leaveWord_reply(activity).count %>
- <%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
+ <%= render :partial => 'users/message_reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id,:is_course => is_course,:is_board =>is_board} %>
- <% activity= activity.parent ? activity.parent : activity%>
- <% comments = activity.children.reorder("created_on desc").limit(3) %>
- <% if count > 0 %>
+ <% all_comments = []%>
+ <% comments = get_all_children(all_comments, activity)[0..2] %>
+ <% if count > 0 %>
- <%= render :partial => 'users/all_replies', :locals => {:comments => comments}%>
+ <%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'Message', :activity_id =>activity.id, :is_course => is_course, :is_board =>is_board}%>
<% end %>
diff --git a/app/views/users/_message_contents.html.erb b/app/views/users/_message_contents.html.erb
new file mode 100644
index 000000000..eab125006
--- /dev/null
+++ b/app/views/users/_message_contents.html.erb
@@ -0,0 +1,23 @@
+<% parents_rely = [] %>
+<% parents_rely = get_reply_parents_no_root parents_rely, comment %>
+<% length = parents_rely.length %>
+
\ No newline at end of file
diff --git a/app/views/users/_message_replies.html.erb b/app/views/users/_message_replies.html.erb
new file mode 100644
index 000000000..c6f9d91b0
--- /dev/null
+++ b/app/views/users/_message_replies.html.erb
@@ -0,0 +1,61 @@
+
+ <% comments.each do |comment| %>
+
+
+
+ <%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
+
+
+
+ <%= link_to comment.creator_user.show_name, user_url_in_org(comment.creator_user.id), :class => "newsBlue mr10 f14" %>
+ <%= time_from_now(comment.created_on) %>
+
+ <% if !comment.parent.nil? && !comment.parent.parent.nil? %>
+ <%= render :partial => 'users/message_contents', :locals => {:comment => comment}%>
+ <% end %>
+ <% if !comment.content_detail.blank? %>
+
+
+
+
+
+
+ <%= link_to(
+ l(:button_reply),
+ {:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => type, :user_activity_id => user_activity_id, :activity_id => activity_id, :is_course => is_course, :is_board => is_board},
+ :remote => true,
+ :method => 'get',
+ :title => l(:button_reply)) %>
+
+
+ <% if comment.course_destroyable_by?(User.current) %>
+ <%= link_to(
+ l(:button_delete),
+ delete_board_message_path(comment,:board_id =>comment.board.id, :user_activity_id => user_activity_id, :activity_id => activity_id, :is_course => is_course, :is_board => is_board),
+ :method => :post,
+ :remote => true,
+ :class => 'fr mr20',
+ :data => {:confirm => l(:text_are_you_sure)},
+ :title => l(:button_delete)
+ ) %>
+ <% end %>
+
+
+
+
+
+ <% end %>
+
+
+
+ <% end %>
+
\ No newline at end of file
diff --git a/app/views/users/_message_reply_banner.html.erb b/app/views/users/_message_reply_banner.html.erb
new file mode 100644
index 000000000..0c8cda379
--- /dev/null
+++ b/app/views/users/_message_reply_banner.html.erb
@@ -0,0 +1,18 @@
+
+
+ 回复
+ ︿
+ <%= count>0 ? "(#{count})" : "" %> ▪
+
+ <%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
+
+
+
<%#= format_date(activity.updated_on) %>
+ <%if count>3 %>
+
+ <% end %>
+
\ No newline at end of file
diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb
index 1abc36a31..d1bb99296 100644
--- a/app/views/users/_project_message.html.erb
+++ b/app/views/users/_project_message.html.erb
@@ -77,20 +77,18 @@
- <% count = 0 %>
- <% if activity.parent %>
- <% count=activity.parent.children.count%>
- <% else %>
- <% count=activity.children.count%>
- <% end %>
+ <% all_comments = []%>
+ <% count=get_all_children(all_comments, activity).count %>
+ <%# allow_delete = (activity.user == User.current || User.current.admin? || User.current.allowed_to?(:as_teacher,activity.course)) %>
+ <%# count = fetch_user_leaveWord_reply(activity).count %>
- <%= render :partial => 'users/reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id} %>
+ <%= render :partial => 'users/message_reply_banner', :locals => {:count => count, :activity => activity, :user_activity_id => user_activity_id,:is_course => is_course,:is_board =>is_board} %>
- <% activity= activity.parent_id.nil? ? activity : activity.parent %>
- <% comments = activity.children.reorder("created_on desc").limit(3) %>
+ <% all_comments = []%>
+ <% comments = get_all_children(all_comments, activity)[0..2] %>
<% if count > 0 %>
- <%= render :partial => 'users/all_replies', :locals => {:comments => comments}%>
+ <%= render :partial => 'users/message_replies', :locals => {:comments => comments, :user_activity_id => user_activity_id, :type => 'Message', :activity_id =>activity.id, :is_course => is_course, :is_board =>is_board}%>
<% end %>
diff --git a/app/views/users/_reply_to.html.erb b/app/views/users/_reply_to.html.erb
index 621b56fbd..8a2909ad4 100644
--- a/app/views/users/_reply_to.html.erb
+++ b/app/views/users/_reply_to.html.erb
@@ -16,7 +16,7 @@
<% end%>
<% elsif @type == 'JournalsForMessage' %>
- <%= form_for('new_form',:url => {:controller => 'words', :action => 'create_reply', :id => reply.id}, :method => "post", :remote => true) do |f|%>
+ <%= form_for('new_form',:url => {:controller => 'words', :action => 'create_reply', :id => reply.id}, :method => "post", :remote => true) do |f|%>
<%= hidden_field_tag 'reference_id', params[:reference_id], :value => reply.id %>
<%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => reply.user.id %>
<%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => reply.id %>
@@ -28,6 +28,22 @@
发送
<% end%>
+ <% elsif @type == 'Message' %>
+ <%= form_for('new_form',:url => {:controller => 'messages', :action => 'reply', :id => reply.id, :board_id => reply.board.id}, :method => "post", :remote => true) do |f|%>
+ <%= hidden_field_tag 'is_course', params[:is_course], :value => @is_course %>
+ <%= hidden_field_tag 'is_board', params[:is_board], :value => @is_board %>
+ <%= hidden_field_tag 'parent_id', params[:parent_id], :value => reply.id %>
+ <%= hidden_field_tag 'reply_id', params[:reply_id], :value => reply.author.id %>
+ <%= hidden_field_tag 'activity_id',params[:activity_id],:value =>@activity_id %>
+ <%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>@user_activity_id %>
+
+
+
+
发送
+
+
+ <% end%>
<% end %>
diff --git a/app/views/users/all_journals.js.erb b/app/views/users/all_journals.js.erb
index 6d227e93b..d03e13742 100644
--- a/app/views/users/all_journals.js.erb
+++ b/app/views/users/all_journals.js.erb
@@ -2,6 +2,8 @@
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/homework_replies', :locals => {:comments => @journals, :is_in_course =>@is_in_course,:course_activity=>@course_activity, :is_teacher => @is_teacher, :user_activity_id => @user_activity_id}) %>');
<% elsif params[:type] == 'JournalsForMessage' %>
$('#reply_div_<%= @user_activity_id %>').html('<%=escape_javascript(render :partial => 'users/journal_replies', :locals => {:comments => @journals,:user_activity_id => @user_activity_id, :type => @type, :allow_delete => @allow_delete, :activity_id =>params[:id].to_i}) %>');
+<% elsif params[:type] == 'Message' %>
+$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/message_replies', :locals => {:comments => @journals,:user_activity_id => @user_activity_id, :type => @type, :activity_id =>params[:id].to_i,:is_course => @is_course, :is_board => @is_board}) %>');
<% else %>
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/all_replies', :locals => {:comments => @journals}) %>');
<% end %>
diff --git a/app/views/users/show_all_replies.js.erb b/app/views/users/show_all_replies.js.erb
index 5f5ea6c3f..ae8803653 100644
--- a/app/views/users/show_all_replies.js.erb
+++ b/app/views/users/show_all_replies.js.erb
@@ -1,6 +1,8 @@
<% unless @comment.parent.nil? %>
<% if params[:type] == 'JournalsForMessage' && (@comment.jour_type == 'Principal' || @comment.jour_type == 'Course') %>
$('#comment_reply_<%=@comment.id %>').html("<%= escape_javascript(render :partial => 'users/journal_comment_reply', :locals => {:comment => @comment.parent})%>");
+ <% elsif @comment.class.to_s == 'Message' %>
+ $('#comment_reply_<%=@comment.id %>').html("<%= escape_javascript(render :partial => 'users/journal_comment_reply', :locals => {:comment => @comment.parent})%>");
<% else %>
$('#comment_reply_<%=@comment.id %>').html("<%= escape_javascript(render :partial => 'users/comment_reply', :locals => {:comment => @comment.parent})%>");
<% end %>
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index 016526512..91467cca4 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -1374,6 +1374,41 @@ function expand_journal_reply(container, btnid, id, type, div_id, allow_delete)
}
}
+function expand_message_reply(container, btnid, id, type, div_id, is_course, is_board) {
+ var target = $(container);
+ var btn = $(btnid);
+ if (btn.data('init') == '0') {
+ btn.data('init', 1);
+ $.get(
+ '/users/all_journals',
+ {
+ type: type,
+ id: id,
+ div_id: div_id,
+ is_course: is_course,
+ is_board: is_board
+ },
+ function(data) {
+
+ }
+ );
+ btn.html('收起回复');
+ //target.show();
+ } else if(btn.data('init') == '1') {
+ btn.data('init', 3);
+ btn.html('展开更多');
+ target.hide();
+ target.eq(0).show();
+ target.eq(1).show();
+ target.eq(2).show();
+ }
+ else {
+ btn.data('init', 1);
+ btn.html('收起回复');
+ target.show();
+ }
+}
+
function expand_reply_homework(container, btnid, id, type, div_id, is_in_course, course_activity, user_activity_id) {
var target = $(container);
var btn = $(btnid);
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index 96c9947b1..9f7aeeafc 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -190,7 +190,7 @@ a.postOptionLink2:hover {color:#ffffff; background-color:#269ac9;}
.imageFuzzy {filter:alpha(opacity=50); -moz-opacity:0.5; -khtml-opacity:0.5;opacity: 0.5;}
.homepagePostReplyDes {float:left; width:632px; margin-left:15px;}
.homepagePostReplyPublisher {font-size:12px; color:#888888; margin-bottom:5px;}
-.homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;}
+.homepagePostReplyContent {font-size:12px; color:#484848; margin:3px 5px 12px 5px;}
.homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 20px;}
.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 20px;}
.homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
@@ -1429,4 +1429,4 @@ a.pages-big{ width:50px;}
.W300 {width:300px !important;}
.W600{ width:600px;}
-.syllabus_input {width: 290px; border: 1px solid #64bdd9; height: 30px;}
+.syllabus_input {width: 290px; border: 1px solid #64bdd9; height: 30px;}
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index 7cfb7f9e0..154cda201 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -666,7 +666,7 @@ a.postReplyCancel:hover {color:#ffffff;}
.homepagePostReplyPortrait {float:left; width:45px;}
.homepagePostReplyDes {float:left; width:620px; margin-left:15px;}
.homepagePostReplyPublisher {font-size:12px; color:#484848; margin-bottom:5px;}
-.homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;}
+.homepagePostReplyContent {font-size:12px; color:#484848; margin:3px 5px 12px 5px;}
.homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 40px;}
.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 40px;}
.homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
@@ -1184,4 +1184,46 @@ a.shadowbox_news_all{ display:block; width:305px; height:40px; line-height:40px;
.reply_iconup{ position:absolute; top:21px; left:13px; color:#d4d4d4; font-size:16px; background:#f1f1f1; line-height:13px;}
/*20160622代码分析弹窗*/
-.analysis-option-box {width:100%; border:1px solid #ccc; padding:3px 5px;}
+.analysis-option-box {width:100%; border:1px solid #ccc; padding:3px 5px;}
+
+/* 二级回复 */
+.clearfix:after { content:"."; display:block; height:0; visibility:hidden; clear:both; }
+.clearfix { zoom:1; }
+.clearit { clear:both; height:0; font-size:0; overflow:hidden; }
+.comment_item{ width:720px; background-color:#f1f1f1; color:#888;}
+.comment_top{ height:15px; border: 1px solid #e4e4e4; padding:10px; position:relative;}
+.reply_iconup{ position:absolute; top:21px; left:13px; color:#d4d4d4; font-size:16px; background:#f1f1f1; line-height:13px;}
+.fl{ float:left;}
+.fr{ float:right;}
+.comment_item_cont{ padding:15px; border-bottom:1px solid #e3e3e3;}
+.J_Comment_Face img{ width:40px; height:40px; }
+.t_content{ width:92%; margin-left:15px;}
+a.content-username { color:#269ac9; font-size:14px; margin-right:15px;}
+a.content-username:hover{ color:#297fb8;}
+.orig_user img{width:32px; height:32px;}
+.reply-right{ float:right; position:relative;}
+.reply_iconup02{ position:absolute; top:16px; left:4px; color:#d4d4d4; font-size:16px; background:#f1f1f1; line-height:13px;}
+.comment_orig_content{margin:10px 0; color:#999;}
+.comment_orig_content .comment_orig_content{margin-top:0;}
+.orig_cont{ border:solid 1px #F3DDB3; background:#FFFEF4; padding:4px;color:#999;margin-top:-1px;}
+.orig_cont_sub{ border-top:0}
+.orig_index{ float:right; color:#666; font-family:Arial; padding-right:5px;line-height:30px;}
+.orig_user{ margin:10px 15px 10px 5px;}
+.orig_user span{ color:#999; padding-right:5px;}
+.orig_content{padding:5px 0px 5px 0px;line-height:24px; color:#333; }
+.orig_right{ width:80%; margin-top:5px;}
+a.comment_ding_link{ height:24px;line-height:24px;display:inline-block;padding-left:2px;vertical-align:middle; color:#333; }
+a:hover.comment_ding_link{ color:#269ac9;}
+.comment_ding_link span{display: inline-block;padding: 0 0px 0 8px;}
+.comment_ding_link em{font-style: normal;font-family: arial;}
+.comment_reply_link{ display:inline-block; width:50px; height:24px;line-height: 24px; vertical-align:middle;text-align: center;}
+.comment_reply_link:link,.comment_reply_link:visited{color:#333;text-decoration: none;}
+.comment_content{ color:#333;}
+.t_txt{ margin-top:10px;}
+.orig_reply_box{border-top:1px solid #e3e3e3; width:95%; padding:15px 0px 15px 25px;}
+.orig_reply_box2{border-top:1px solid #e3e3e3; width:95%; padding:10px 25px 10px 0;}
+.orig_textarea{width:90%; margin-bottom:10px;}
+.orig_sub{ float:right; background-color:#269ac9; color:#fff; height:25px; line-height:25px; text-align:center; width:80px; border:none;}
+.orig_sub:hover{ background:#297fb8;}
+.orig_cont_hide{ text-align:center; width:624px; display:block; font-size:14px; color:#333; border-bottom:1px solid #F3DDB3; padding:8px 0;}
+.orig_icon{ color:#888; margin-right:10px; font-size:14px; font-weight:bold;}
From 0dd7ef4460b794fcd66f74f554a5e892e4015c5a Mon Sep 17 00:00:00 2001
From: cxt
Date: Mon, 4 Jul 2016 14:45:50 +0800
Subject: [PATCH 15/43] =?UTF-8?q?=E5=B8=96=E5=AD=90=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E7=9A=84=E5=9B=9E=E5=A4=8D=E6=95=B0=E4=B8=8E=E5=AE=9E=E9=99=85?=
=?UTF-8?q?=E4=B8=8D=E7=AC=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/boards_controller.rb | 4 +++-
app/views/users/_course_boardlist.html.erb | 8 ++------
app/views/users/_project_boardlist.html.erb | 8 ++------
3 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb
index 9a72bb4df..ceb63d7b0 100644
--- a/app/controllers/boards_controller.rb
+++ b/app/controllers/boards_controller.rb
@@ -125,7 +125,9 @@ class BoardsController < ApplicationController
if @order.to_i == 2
@type = 2
@topics.each do |topic|
- topic[:infocount] = get_praise_num(topic) + (topic.parent ? topic.parent.children.count : topic.children.count)
+ all_comments = []
+ count=get_all_children(all_comments, topic).count
+ topic[:infocount] = get_praise_num(topic) + count
if topic[:infocount] < 0
topic[:infocount] = 0
end
diff --git a/app/views/users/_course_boardlist.html.erb b/app/views/users/_course_boardlist.html.erb
index 5cb2c27a7..bdff80d33 100644
--- a/app/views/users/_course_boardlist.html.erb
+++ b/app/views/users/_course_boardlist.html.erb
@@ -46,12 +46,8 @@
发帖人: <%=(u.try(:realname) != " " ? u.lastname + u.firstname : u.try(:login)) %>
更新:<%= format_time(activity.children.any? ? activity.children.last[:created_on] : activity[:created_on] ) %>
- <% count=0 %>
- <% if activity.parent %>
- <% count=activity.parent.children.count%>
- <% else %>
- <% count=activity.children.count%>
- <% end %>
+ <% all_comments = []%>
+ <% count=get_all_children(all_comments, activity).count %>
<%= count>0 ? "#{count}" : "0" %> 回复 | <%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "0" %> 赞
diff --git a/app/views/users/_project_boardlist.html.erb b/app/views/users/_project_boardlist.html.erb
index fe7bc03f2..3ba0244d9 100644
--- a/app/views/users/_project_boardlist.html.erb
+++ b/app/views/users/_project_boardlist.html.erb
@@ -46,12 +46,8 @@
发帖人:<%=(u.try(:realname) != " " ? u.lastname + u.firstname : u.try(:login)) %>
更新:<%= format_time(activity.children.any? ? activity.children.last[:created_on] : activity[:created_on] ) %>
- <% count=0 %>
- <% if activity.parent %>
- <% count=activity.parent.children.count%>
- <% else %>
- <% count=activity.children.count%>
- <% end %>
+ <% all_comments = []%>
+ <% count=get_all_children(all_comments, activity).count %>
<%= count>0 ? "#{count}" : "0" %> 回复 | <%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "0" %> 赞
From da19bbd3a0d043d4f8e0f30e01edcdb914efe108 Mon Sep 17 00:00:00 2001
From: yuanke <249218296@qq.com>
Date: Tue, 5 Jul 2016 09:02:34 +0800
Subject: [PATCH 16/43] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=86=E4=B8=8B?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B5=84=E6=96=99=E7=95=8C=E9=9D=A2=E7=9A=84?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/school_controller.rb | 26 ++--
app/models/apply_add_schools.rb | 1 +
app/views/my/_apply_add_school.html.erb | 187 ------------------------
app/views/my/account.html.erb | 185 -----------------------
public/javascripts/application.js | 186 +++++++++++++++++++++++
5 files changed, 202 insertions(+), 383 deletions(-)
diff --git a/app/controllers/school_controller.rb b/app/controllers/school_controller.rb
index 44f4378fe..dab752afb 100644
--- a/app/controllers/school_controller.rb
+++ b/app/controllers/school_controller.rb
@@ -155,47 +155,51 @@ class SchoolController < ApplicationController
def apply_add_school
data = {result:0,name:params[:name],school_id:0}
- #0 成功 1参数错误 2名称已存在
+ #0 成功 1参数错误 2名称已存在 3.失败
data[:result] = 0
#检验参数
if params[:name] == "" || params[:province] == "" || params[:city] == "" || params[:address] == ""
data[:result] = 1
else
- school_id = School.find_by_sql("select id from schools where name='#{params[:name]}'").first
- if school_id
+ school = School.where("name = '#{params[:name]}'").first
+ if school
data[:result] = 2
else
school = School.new
school.name = params[:name].strip
school.pinyin = Pinyin.t(params[:name].strip, splitter: '')
- school.save
#status 0未处理 1通过 2拒绝
applyschool = ApplyAddSchools.new
- applyschool.school_id = school.id
+
+ #用belongs_to 可以一起存数据库
+ applyschool.school = school
applyschool.name = school.name
applyschool.province = params[:province]
applyschool.city = params[:city]
applyschool.address = params[:address]
applyschool.remarks = params[:remarks]
- applyschool.save
- data[:school_id] = school.id
+ if applyschool.save
+ data[:school_id] = school.id
+ else
+ data[:result] = 3
+ end
end
end
render :json =>data
end
def search_repeat_schoolname
- status = 0
+ status = 0 #没有重复的
name = params[:name]
if name
- school_id = School.find_by_sql("select id from schools where name='#{name}'").first
+ school = School.where("name = '#{name}'").first
- if school_id
- status = 1
+ if school
+ status = 1 #有重复的
end
end
diff --git a/app/models/apply_add_schools.rb b/app/models/apply_add_schools.rb
index 2082c0012..efa56e808 100644
--- a/app/models/apply_add_schools.rb
+++ b/app/models/apply_add_schools.rb
@@ -1,3 +1,4 @@
class ApplyAddSchools < ActiveRecord::Base
attr_accessible :address, :city, :name, :province, :remarks, :school_id, :status
+ belongs_to :school
end
diff --git a/app/views/my/_apply_add_school.html.erb b/app/views/my/_apply_add_school.html.erb
index 1449fa1f1..c7b08e305 100644
--- a/app/views/my/_apply_add_school.html.erb
+++ b/app/views/my/_apply_add_school.html.erb
@@ -120,193 +120,6 @@
});
}
- function showcity(province, cityField) {
- $("#provincenotice").hide();
- switch (province) {
- case "北京" :
- var cityOptions = new Array(
- "东城", "西城", "朝阳", "丰台", "石景山", "海淀", "门头沟",
- "房山", "通州", "顺义", "昌平", "大兴", "平谷", "怀柔", "密云", "延庆");
- break;
- case "上海" :
- var cityOptions = new Array(
- "崇明", "黄浦", "卢湾", "徐汇", "长宁", "静安", "普陀", "闸北", "虹口", "杨浦", "闵行",
- "宝山", "嘉定", "浦东", "金山", "松江", "青浦", "南汇", "奉贤");
- break;
- case "广东" :
- var cityOptions = new Array(
- "广州", "深圳", "珠海", "东莞", "中山", "佛山", "惠州", "河源", "潮州", "江门", "揭阳", "茂名",
- "梅州", "清远", "汕头", "汕尾", "韶关", "顺德", "阳江", "云浮", "湛江", "肇庆");
- break;
- case "江苏" :
- var cityOptions = new Array(
- "南京", "常熟", "常州", "海门", "淮安", "江都", "江阴", "昆山", "连云港", "南通",
- "启东", "沭阳", "宿迁", "苏州", "太仓", "泰州", "同里", "无锡", "徐州", "盐城",
- "扬州", "宜兴", "仪征", "张家港", "镇江", "周庄");
- break;
- case "重庆" :
- var cityOptions = new Array(
- "万州", "涪陵", "渝中", "大渡口", "江北", "沙坪坝", "九龙坡", "南岸", "北碚", "万盛",
- "双挢", "渝北", "巴南", "黔江", "长寿", "綦江", "潼南", "铜梁", "大足", "荣昌", "壁山",
- "梁平", "城口", "丰都", "垫江", "武隆", "忠县", "开县", "云阳", "奉节", "巫山", "巫溪",
- "石柱", "秀山", "酉阳", "彭水", "江津", "合川", "永川", "南川");
- break;
- case "安徽" :
- var cityOptions = new Array(
- "合肥", "安庆", "蚌埠", "亳州", "巢湖", "滁州", "阜阳", "贵池", "淮北", "淮化", "淮南",
- "黄山", "九华山", "六安", "马鞍山", "宿州", "铜陵", "屯溪", "芜湖", "宣城");
- break;
- case "福建" :
- var cityOptions = new Array(
- "福州", "厦门", "泉州", "漳州", "龙岩", "南平", "宁德", "莆田", "三明");
- break;
- case "甘肃" :
- var cityOptions = new Array(
- "兰州", "白银", "定西", "敦煌", "甘南", "金昌", "酒泉", "临夏", "平凉", "天水",
- "武都", "武威", "西峰", "张掖");
- break;
- case "广西" :
- var cityOptions = new Array(
- "南宁", "百色", "北海", "桂林", "防城港", "贵港", "河池", "贺州", "柳州", "钦州", "梧州", "玉林");
- break;
- case "贵州" :
- var cityOptions = new Array(
- "贵阳", "安顺", "毕节", "都匀", "凯里", "六盘水", "铜仁", "兴义", "玉屏", "遵义");
- break;
- case "海南" :
- var cityOptions = new Array(
- "海口", "儋县", "陵水", "琼海", "三亚", "通什", "万宁");
- break;
- case "河北" :
- var cityOptions = new Array(
- "石家庄", "保定", "北戴河", "沧州", "承德", "丰润", "邯郸", "衡水", "廊坊", "南戴河", "秦皇岛",
- "唐山", "新城", "邢台", "张家口");
- break;
- case "黑龙江" :
- var cityOptions = new Array(
- "哈尔滨", "北安", "大庆", "大兴安岭", "鹤岗", "黑河", "佳木斯", "鸡西", "牡丹江", "齐齐哈尔",
- "七台河", "双鸭山", "绥化", "伊春");
- break;
- case "河南" :
- var cityOptions = new Array(
- "郑州", "安阳", "鹤壁", "潢川", "焦作", "济源", "开封", "漯河", "洛阳", "南阳", "平顶山",
- "濮阳", "三门峡", "商丘", "新乡", "信阳", "许昌", "周口", "驻马店");
- break;
- case "香港" :
- var cityOptions = new Array(
- "香港", "九龙", "新界");
- break;
- case "湖北" :
- var cityOptions = new Array(
- "武汉", "恩施", "鄂州", "黄冈", "黄石", "荆门", "荆州", "潜江", "十堰", "随州", "武穴",
- "仙桃", "咸宁", "襄阳", "襄樊", "孝感", "宜昌");
- break;
- case "湖南" :
- var cityOptions = new Array(
- "长沙", "常德", "郴州", "衡阳", "怀化", "吉首", "娄底", "邵阳", "湘潭", "益阳", "岳阳",
- "永州", "张家界", "株洲");
- break;
- case "江西" :
- var cityOptions = new Array(
- "南昌", "抚州", "赣州", "吉安", "景德镇", "井冈山", "九江", "庐山", "萍乡",
- "上饶", "新余", "宜春", "鹰潭");
- break;
- case "吉林" :
- var cityOptions = new Array(
- "长春", "吉林", "白城", "白山", "珲春", "辽源", "梅河", "四平", "松原", "通化", "延吉");
- break;
- case "辽宁" :
- var cityOptions = new Array(
- "沈阳", "鞍山", "本溪", "朝阳", "大连", "丹东", "抚顺", "阜新", "葫芦岛", "锦州",
- "辽阳", "盘锦", "铁岭", "营口");
- break;
- case "澳门" :
- var cityOptions = new Array("澳门");
- break;
- case "内蒙古" :
- var cityOptions = new Array(
- "呼和浩特", "阿拉善盟", "包头", "赤峰", "东胜", "海拉尔", "集宁", "临河", "通辽", "乌海",
- "乌兰浩特", "锡林浩特");
- break;
- case "宁夏" :
- var cityOptions = new Array(
- "银川", "固源", "石嘴山", "吴忠");
- break;
- case "青海" :
- var cityOptions = new Array(
- "西宁", "德令哈", "格尔木", "共和", "海东", "海晏", "玛沁", "同仁", "玉树");
- break;
- case "山东" :
- var cityOptions = new Array(
- "济南", "滨州", "兖州", "德州", "东营", "菏泽", "济宁", "莱芜", "聊城", "临沂",
- "蓬莱", "青岛", "曲阜", "日照", "泰安", "潍坊", "威海", "烟台", "枣庄", "淄博");
- break;
- case "山西" :
- var cityOptions = new Array(
- "太原", "长治", "大同", "候马", "晋城", "离石", "临汾", "宁武", "朔州", "忻州",
- "阳泉", "榆次", "运城");
- break;
- case "陕西" :
- var cityOptions = new Array(
- "西安", "安康", "宝鸡", "汉中", "渭南", "商州", "绥德", "铜川", "咸阳", "延安", "榆林");
- break;
- case "四川" :
- var cityOptions = new Array(
- "成都", "巴中", "达川", "德阳", "都江堰", "峨眉山", "涪陵", "广安", "广元", "九寨沟",
- "康定", "乐山", "泸州", "马尔康", "绵阳", "眉山", "南充", "内江", "攀枝花", "遂宁",
- "汶川", "西昌", "雅安", "宜宾", "自贡", "资阳");
- break;
- case "台湾" :
- var cityOptions = new Array(
- "台北", "基隆", "台南", "台中", "高雄", "屏东", "南投", "云林", "新竹", "彰化", "苗栗",
- "嘉义", "花莲", "桃园", "宜兰", "台东", "金门", "马祖", "澎湖");
- break;
- case "天津" :
- var cityOptions = new Array(
- "天津", "和平", "东丽", "河东", "西青", "河西", "津南", "南开", "北辰", "河北", "武清", "红挢",
- "塘沽", "汉沽", "大港", "宁河", "静海", "宝坻", "蓟县");
- break;
- case "新疆" :
- var cityOptions = new Array(
- "乌鲁木齐", "阿克苏", "阿勒泰", "阿图什", "博乐", "昌吉", "东山", "哈密", "和田", "喀什",
- "克拉玛依", "库车", "库尔勒", "奎屯", "石河子", "塔城", "吐鲁番", "伊宁");
- break;
- case "西藏" :
- var cityOptions = new Array(
- "拉萨", "阿里", "昌都", "林芝", "那曲", "日喀则", "山南");
- break;
- case "云南" :
- var cityOptions = new Array(
- "昆明", "大理", "保山", "楚雄", "大理", "东川", "个旧", "景洪", "开远", "临沧", "丽江",
- "六库", "潞西", "曲靖", "思茅", "文山", "西双版纳", "玉溪", "中甸", "昭通");
- break;
- case "浙江" :
- var cityOptions = new Array(
- "杭州", "安吉", "慈溪", "定海", "奉化", "海盐", "黄岩", "湖州", "嘉兴", "金华", "临安",
- "临海", "丽水", "宁波", "瓯海", "平湖", "千岛湖", "衢州", "江山", "瑞安", "绍兴", "嵊州",
- "台州", "温岭", "温州", "余姚", "舟山");
- break;
- case "海外" :
- var cityOptions = new Array(
- "美国", "日本", "英国", "法国", "德国", "其他");
- break;
- default:
- var cityOptions = new Array("");
- break;
- }
-
- cityField.options.length = 0;
- for (var i = 0; i < cityOptions.length; i++) {
- cityField.options[i] = new Option(cityOptions[i], cityOptions[i]);
- /*
- if (cityField.options[i].value==city)
- {
- //alert("here put City ok!");
- document.oblogform["city"].selectedIndex = i;
- }*/
- }
- }
-
function ifNameRepeat(){
//名称不能为空也不能重复
diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb
index 589541c39..d356756c1 100644
--- a/app/views/my/account.html.erb
+++ b/app/views/my/account.html.erb
@@ -249,191 +249,6 @@
<% end %>
<% html_title(l(:label_course_all)) -%>
diff --git a/app/views/admin/create_syllabus.js.erb b/app/views/admin/create_syllabus.js.erb
new file mode 100644
index 000000000..ac37abd78
--- /dev/null
+++ b/app/views/admin/create_syllabus.js.erb
@@ -0,0 +1,10 @@
+hideModal();
+<%courses = Course.where("tea_id = #{@user.id}") %>
+<% unless courses.empty? %>
+ <% courses.each do |course|%>
+ $("#course_<%=course.id %>").html("<%=escape_javascript(render :partial => 'courselist_detail_tr', :locals => {:course => course}) %>");
+ <% end %>
+<% end %>
+<% if @flag == 1 %>
+ $("#course_<%=@course.id %>").html("");
+<% end %>
\ No newline at end of file
diff --git a/app/views/admin/excellent_courses.html.erb b/app/views/admin/excellent_courses.html.erb
index c107713a0..0418ebf30 100644
--- a/app/views/admin/excellent_courses.html.erb
+++ b/app/views/admin/excellent_courses.html.erb
@@ -16,7 +16,7 @@
序号