<%=l(:label_excellent_courses_list)%>
@@ -33,12 +33,14 @@
资源数
-
+
帖子数
-
+
动态数
+
+
@@ -74,6 +76,9 @@
<%= course.course_activities.count%>
+
+ <%= link_to( course.is_excellent == 1 || course.excellent_option == 1 ? "取消精品" : "设为精品", { :controller => 'admin', :action => 'cancel_excellent_course', :id => course.id }, :class => 'icon-del') %>
+
<% end %>
diff --git a/app/views/admin/leave_messages.html.erb b/app/views/admin/leave_messages.html.erb
index dee8b7443..986823faa 100644
--- a/app/views/admin/leave_messages.html.erb
+++ b/app/views/admin/leave_messages.html.erb
@@ -59,12 +59,12 @@
<%= format_date(journal.created_on) %>
-
+
<%case journal.jour_type %>
<% when 'Principal' %>
- <%= link_to(journal.notes.html_safe, feedback_path(journal.jour_id)) %>
+ <%= link_to(strip_html(journal.notes), feedback_path(journal.jour_id)) %>
<% when 'Course' %>
- <%= link_to(journal.notes.html_safe, course_feedback_path(journal.jour_id)) %>
+ <%= link_to(strip_html(journal.notes), course_feedback_path(journal.jour_id)) %>
<% end %>
diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb
index 78f44aa31..eaea6c553 100644
--- a/app/views/courses/show.html.erb
+++ b/app/views/courses/show.html.erb
@@ -1,3 +1,4 @@
+
-
-
+
<% is_current_user = User.current.logged? && User.current == @user%>
<% if User.current.logged? %>
diff --git a/app/views/layouts/new_base_user.html.erb b/app/views/layouts/new_base_user.html.erb
index d67b2d3f3..8455d5693 100644
--- a/app/views/layouts/new_base_user.html.erb
+++ b/app/views/layouts/new_base_user.html.erb
@@ -284,7 +284,7 @@
- 访问计数 <%= @user.visits.to_i %>
+ 访问计数 <%= @user.visits.to_i %> (自2016年5月)
- <% unless acts[6..19].nil? %>
+ <% unless acts[5..16].nil? %>
- <% acts[6..19].each do |activity| %>
+ <% acts[6..16].each do |activity| %>
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
<% document = activity.org_act %>
<%= link_to " #{document.title}".html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hidden_w270 link-black', :target => "_blank" %>
diff --git a/app/views/organizations/_org_custom_right3.html.erb b/app/views/organizations/_org_custom_right3.html.erb
index a461a38dc..a7f819ca2 100644
--- a/app/views/organizations/_org_custom_right3.html.erb
+++ b/app/views/organizations/_org_custom_right3.html.erb
@@ -33,9 +33,6 @@
名师风采
-
- 学生英雄榜
-
@@ -65,29 +62,6 @@
<% end %>
-
-
- <% excellent_students.each do |student| %>
-
- <%= link_to image_tag(url_to_avatar(student), :width => "43", :height => "43", :class => "por_teachers_img fl mr15"), user_path(student), :alt => "用户头像", :target => '_blank', :class => "fl" %>
-
- <%=link_to student.try(:realname) ? student.try(:realname) :student.try(:login), user_path(student), :class => "por_teachers_name link-black fl", :target => '_blank' %>
-
<%= student.my_workplace %>
-
-
- <% unless student.my_blogs_count == 0 %>
- 博客 <%= student.my_blogs_count %>
- <% end %>
- <% unless student.courses.count == 0 %>
- 课程 <%= student.courses.count %>
- <% end %>
-
-
-
-
- <% end %>
-
-
<% end %>
\ No newline at end of file
diff --git a/app/views/student_work/_no_teacher_score_notice.html.erb b/app/views/student_work/_no_teacher_score_notice.html.erb
index 5a8c768cc..0926e3c74 100644
--- a/app/views/student_work/_no_teacher_score_notice.html.erb
+++ b/app/views/student_work/_no_teacher_score_notice.html.erb
@@ -1,7 +1,8 @@
- 当前作品未进行评分,是否确定提交?
+ <%#A if work.teacher_score.nil? || work. %>
+ 您当次评阅未对作品进行评分,分数将取上次的评分结果,若没有评分记录则不评分,是否确定提交?
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/app/views/student_work/_student_work_list.html.erb b/app/views/student_work/_student_work_list.html.erb
index eaf6b9304..cc078bf9c 100644
--- a/app/views/student_work/_student_work_list.html.erb
+++ b/app/views/student_work/_student_work_list.html.erb
@@ -4,14 +4,21 @@
(<%= @student_work_count%>人已交)
- <% my_work = @homework.student_works.where("user_id = #{User.current.id}").first %>
+ <%# my_work = @homework.student_works.where("user_id = #{User.current.id}").first %>
+ <% my_work = cur_user_works_for_homework @homework %>
<% if !@is_teacher && my_work.nil? && User.current.member_of_course?(@course) %>
您尚未提交作品
- <%=link_to "提交作品", new_student_work_url_without_domain(@homework.id),:class => 'blueCir ml5 f12' %>
+ <% unless @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
+ <%=link_to "提交作品", new_student_work_url_without_domain(@homework.id),:class => 'blueCir ml5 f12' %>
+ <% end %>
<% elsif !@is_teacher && my_work &&Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(Time.now.to_s).strftime("%Y-%m-%d") && !@stundet_works.empty?%>
-
您已提交且不可再修改,因为截止日期已过
+
已提交且不可再修改,因为截止日期已过
<% elsif !@is_teacher && my_work &&Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.parse(Time.now.to_s).strftime("%Y-%m-%d") && !@stundet_works.empty?%>
-
您已提交,您还可以修改
+ <% if @homework.homework_type == 3 %>
+
组长已提交,组长还可修改
+ <% else %>
+
您已提交,您还可以修改
+ <% end %>
<% end %>
<%if @is_teacher || @homework.homework_detail_manual.comment_status == 3 || @homework.is_open == 1%>
diff --git a/app/views/student_work/edit.html.erb b/app/views/student_work/edit.html.erb
index 8e1a2a546..ed0b369e8 100644
--- a/app/views/student_work/edit.html.erb
+++ b/app/views/student_work/edit.html.erb
@@ -103,21 +103,11 @@
}
function popupRegex(){
- if($("#group_member_ids").length > 0) {
- if(regexStudentWorkMember(parseInt($.trim($("#min_num_member").html())),parseInt($.trim($("#max_num_member").html())))) {
- $('#ajax-modal').html("
");
- showModal('ajax-modal', '500px');
- $('#ajax-modal').siblings().remove();
- $('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
- $('#ajax-modal').parent().addClass("anonymos");
- }
- } else {
- $('#ajax-modal').html("
");
- showModal('ajax-modal', '500px');
- $('#ajax-modal').siblings().remove();
- $('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
- $('#ajax-modal').parent().addClass("anonymos");
- }
+ $('#ajax-modal').html("
");
+ showModal('ajax-modal', '500px');
+ $('#ajax-modal').siblings().remove();
+ $('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
+ $('#ajax-modal').parent().addClass("anonymos");
}
function nh_check_field(params){
@@ -140,6 +130,12 @@
params.contentmsg.html('');
}
}
+ if(!result) {
+ return result;
+ }
+ }
+ if($("#group_member_ids").length > 0) {
+ result=regexStudentWorkMember(parseInt($.trim($("#min_num_member").html())),parseInt($.trim($("#max_num_member").html())));
}
return result;
}
diff --git a/app/views/student_work/new.html.erb b/app/views/student_work/new.html.erb
index 453f717c9..dfddea306 100644
--- a/app/views/student_work/new.html.erb
+++ b/app/views/student_work/new.html.erb
@@ -62,21 +62,11 @@
}
// 作品校验
function popupRegex(){
- if($("#group_member_ids").length > 0) {
- if(regexStudentWorkMember(parseInt($.trim($("#min_num_member").html())),parseInt($.trim($("#max_num_member").html())))) {
- $('#ajax-modal').html("
");
- showModal('ajax-modal', '500px');
- $('#ajax-modal').siblings().remove();
- $('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
- $('#ajax-modal').parent().addClass("anonymos");
- }
- } else {
- $('#ajax-modal').html("
");
- showModal('ajax-modal', '500px');
- $('#ajax-modal').siblings().remove();
- $('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
- $('#ajax-modal').parent().addClass("anonymos");
- }
+ $('#ajax-modal').html("
");
+ showModal('ajax-modal', '500px');
+ $('#ajax-modal').siblings().remove();
+ $('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
+ $('#ajax-modal').parent().addClass("anonymos");
}
function nh_check_field(params){
@@ -99,6 +89,12 @@
params.contentmsg.html('');
}
}
+ if(!result) {
+ return result;
+ }
+ }
+ if($("#group_member_ids").length > 0) {
+ result=regexStudentWorkMember(parseInt($.trim($("#min_num_member").html())),parseInt($.trim($("#max_num_member").html())));
}
return result;
}
diff --git a/app/views/student_work/retry_work.js.erb b/app/views/student_work/retry_work.js.erb
index c6f354875..c15b81e09 100644
--- a/app/views/student_work/retry_work.js.erb
+++ b/app/views/student_work/retry_work.js.erb
@@ -1,2 +1,3 @@
hideModal('#popbox02');
-$("#homework_attachments").html("<%= escape_javascript(render :partial => 'users/user_homework_attachment', :locals => {:container => @student_work, :has_program=>false,:has_group=>false})%>");
\ No newline at end of file
+$("#homework_attachments").html("<%= escape_javascript(render :partial => 'users/user_homework_attachment', :locals => {:container => @student_work, :has_program=>false,:has_group=>false})%>");
+$("#group_member_ids").val("<%=User.current.id %>");
\ No newline at end of file
diff --git a/app/views/student_work/search_course_students.js.erb b/app/views/student_work/search_course_students.js.erb
index c7aa982b9..2ac4eeaab 100644
--- a/app/views/student_work/search_course_students.js.erb
+++ b/app/views/student_work/search_course_students.js.erb
@@ -7,7 +7,8 @@ $("#all_students_list").empty();
link += "";
$("#all_students_list").append(link);
- var str = "";
+ var str = $("#group_member_ids").val();
+ /*var str = "";
var lists = $("#choose_students_list li");
if(lists.length > 0) {
for(var i=0; i
if (str.indexOf(<%=user.id.to_s %>) < 0) {
$("#student_<%=user.id %>").one("click",function choose_student() {
diff --git a/app/views/users/_course_journalsformessage.html.erb b/app/views/users/_course_journalsformessage.html.erb
index 658e14c53..9ed7e6e76 100644
--- a/app/views/users/_course_journalsformessage.html.erb
+++ b/app/views/users/_course_journalsformessage.html.erb
@@ -14,13 +14,23 @@
<% course=Course.find(activity.jour_id) %>
<%= link_to course.name.to_s+" | 课程留言", course_feedback_path(course), :class => "newsBlue ml15" %>
-
- <% if activity.parent %>
- <%= link_to activity.parent.notes.html_safe, course_feedback_path(course), :class => "postGrey" %>
- <% else %>
- <%= link_to activity.notes.html_safe, course_feedback_path(course), :class => "postGrey" %>
- <% end %>
-
+
+ <% if activity.parent %>
+ <% content = activity.parent.notes %>
+ <% else %>
+ <% content = activity.notes %>
+ <% end %>
+ <%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>content} %>
+
+
+
+
留言时间:<%= format_time(activity.created_on) %>
diff --git a/app/views/users/_user_at_message.html.erb b/app/views/users/_user_at_message.html.erb
index 8f0c6acaf..81139ab8e 100644
--- a/app/views/users/_user_at_message.html.erb
+++ b/app/views/users/_user_at_message.html.erb
@@ -1,4 +1,4 @@
-<% if AtMessage === ma && ma.at_valid? %>
+<% if ma.class == AtMessage && ma.at_valid? %>
<%=link_to image_tag(url_to_avatar(ma.author), :width => "30", :height => "30"),user_path(ma.author) %>
diff --git a/app/views/users/_user_group_attr.html.erb b/app/views/users/_user_group_attr.html.erb
index 681f158e7..952a3396e 100644
--- a/app/views/users/_user_group_attr.html.erb
+++ b/app/views/users/_user_group_attr.html.erb
@@ -3,11 +3,14 @@
每组最小人数:
人
+
每组最大人数:
人
+
+
diff --git a/app/views/users/_user_journalsformessage.html.erb b/app/views/users/_user_journalsformessage.html.erb
index fb7abafaa..b84adf5fe 100644
--- a/app/views/users/_user_journalsformessage.html.erb
+++ b/app/views/users/_user_journalsformessage.html.erb
@@ -16,22 +16,26 @@
<% end %>
<% end %>
- <% if is_activity.to_i == 1 %>
-
- <% if activity.parent %>
- <%= link_to activity.parent.notes.html_safe, feedback_path(activity.jour, :host=> Setting.host_user), :class => "postGrey" %>
- <% else %>
- <%= link_to activity.notes.html_safe, feedback_path(activity.jour, :host=> Setting.host_user), :class => "postGrey" %>
- <% end %>
-
- <% else %>
+ <%# if is_activity.to_i == 1 %>
+
+ <%# else %>
<% if activity.parent %>
<% content = activity.parent.notes %>
<% else %>
<% content = activity.notes %>
<% end %>
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>user_activity_id, :content=>content} %>
- <% end %>
+
+
+
+
+ <%# end %>
留言时间:<%= format_time(activity.created_on) %>
diff --git a/app/views/users/_user_jours_list.html.erb b/app/views/users/_user_jours_list.html.erb
index afd498d06..6211aac7d 100644
--- a/app/views/users/_user_jours_list.html.erb
+++ b/app/views/users/_user_jours_list.html.erb
@@ -5,7 +5,7 @@
<%if jours %>
<% jours.each do |jour|%>
- <% unless jour.private == 1 && (!User.current || (User.current && jour.jour_id != User.current.id && jour.user_id != User.current.id)) %>
+ <% unless jour.private == 1 && (!User.current || (User.current && jour.jour_id != User.current.id && jour.user_id != User.current.id && !User.current.admin?)) %>
diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb
index 391709b52..1ff8adc57 100644
--- a/app/views/users/user_messages.html.erb
+++ b/app/views/users/user_messages.html.erb
@@ -4,8 +4,9 @@
<% if (!@message_alls.nil? && @message_alls.count >0) %>
<% if params[:type].nil? || params[:type] == "unviewed" %>
diff --git a/config/locales/account/zh.yml b/config/locales/account/zh.yml
index c6a23b964..532806356 100644
--- a/config/locales/account/zh.yml
+++ b/config/locales/account/zh.yml
@@ -37,7 +37,7 @@ zh:
label_password_lost: "忘记密码?"
button_login: 登录
# account_controller中判断用户名或密码输入有误的提示信息
- notice_account_invalid_creditentials: "无效的用户名或密码,注意登录名区分大小写,谢谢!"
+ notice_account_invalid_creditentials: "无效的用户名或密码,注意登录名区分大小写。"
# account_controller中判断未激活的提示信息
notice_account_invalid_creditentials_new: "您还未到邮箱激活。如果您丢失帐户,电子邮件验证帮助我们的支持团队验证帐户的所有权,并允许您接收所有您要求的通知。"
diff --git a/config/routes.rb b/config/routes.rb
index 10c3cb870..ec8fa2337 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -330,6 +330,7 @@ RedmineApp::Application.routes.draw do
post 'last_codecomparetime'
post 'set_score_rule'
get 'work_canrepeat'
+ get 'get_user_infor'
end
end
@@ -1020,6 +1021,7 @@ RedmineApp::Application.routes.draw do
get 'admin/excellent_courses', as: :excellent_courses
get 'admin/excellent_all_courses', as: :excellent_all_courses
match 'admin/set_excellent_course/:id', :to => 'admin#set_excellent_course'
+ match 'admin/cancel_excellent_course/:id', :to => 'admin#cancel_excellent_course'
get 'admin/course_resource_list'
get 'admin/project_resource_list'
match 'admin/users', :via => :get
diff --git a/db/migrate/20160613064914_create_syllabuses.rb b/db/migrate/20160613064914_create_syllabuses.rb
new file mode 100644
index 000000000..a9a926d7e
--- /dev/null
+++ b/db/migrate/20160613064914_create_syllabuses.rb
@@ -0,0 +1,12 @@
+class CreateSyllabuses < ActiveRecord::Migration
+ def change
+ create_table :syllabuses do |t|
+ t.string :title
+ t.text :description
+ t.references :user
+
+ t.timestamps
+ end
+ add_index :syllabuses, :user_id
+ end
+end
diff --git a/db/migrate/20160613065840_add_syllabus_to_course.rb b/db/migrate/20160613065840_add_syllabus_to_course.rb
new file mode 100644
index 000000000..b40d187d0
--- /dev/null
+++ b/db/migrate/20160613065840_add_syllabus_to_course.rb
@@ -0,0 +1,6 @@
+class AddSyllabusToCourse < ActiveRecord::Migration
+ def change
+ add_column :courses, :syllabus_id, :integer
+ add_index :courses, :syllabus_id
+ end
+end
diff --git a/public/images/login/bg_login.jpg b/public/images/login/bg_login.jpg
new file mode 100644
index 000000000..274dcb6f6
Binary files /dev/null and b/public/images/login/bg_login.jpg differ
diff --git a/public/images/login/bg_register.jpg b/public/images/login/bg_register.jpg
new file mode 100644
index 000000000..c1a027a86
Binary files /dev/null and b/public/images/login/bg_register.jpg differ
diff --git a/public/images/login/icons_login.png b/public/images/login/icons_login.png
new file mode 100644
index 000000000..9d1ba136d
Binary files /dev/null and b/public/images/login/icons_login.png differ
diff --git a/public/javascripts/course.js b/public/javascripts/course.js
index 9f6b6aabd..6fbf9f8c4 100644
--- a/public/javascripts/course.js
+++ b/public/javascripts/course.js
@@ -550,7 +550,7 @@ function check_late_penalty(id)
}
else
{
- obj.val("0");
+ obj.val("");
}
}
diff --git a/public/javascripts/homework.js b/public/javascripts/homework.js
index e9ef7ad6c..1578d72df 100644
--- a/public/javascripts/homework.js
+++ b/public/javascripts/homework.js
@@ -194,9 +194,11 @@ $(function(){
$("#GroupPopupBox").dialog("open");
$(".ui-dialog-titlebar").hide();
$("a.popClose").on('click', function(){
+ reset_group_attr();
$("#GroupPopupBox" ).dialog("close");
});
$("#cancel_group").on('click', function(){
+ reset_group_attr();
$("#GroupPopupBox" ).dialog("close");
});
$('#min_num').focus();
@@ -351,29 +353,67 @@ $(function(){
$("#GroupPopupBox").dialog("open");
$(".ui-dialog-titlebar").hide();
$("a.popClose").on('click', function () {
+ reset_group_attr();
$("#GroupPopupBox").dialog("close");
});
$("#cancel_group").on('click', function () {
+ reset_group_attr();
$("#GroupPopupBox").dialog("close");
});
$('#min_num').focus();
}
});
+ var reset_group_attr = function() {
+ $("#min_num_notice").hide();
+ $("#min_max_num_notice").hide();
+ $("#max_num_notice").hide();
+ if($("input[name=min_num]").length > 0 && $("input[name=max_num]").length > 0) {
+ $("#min_num").val($("input[name=min_num]").val());
+ $("#max_num").val($("input[name=max_num]").val());
+ } else {
+ $("#min_num").val(2);
+ $("#max_num").val(10);
+ }
+ };
var saveGroupAttr = function() {
var valid = true;
var base_on_project = 0;
var min = $.trim($("#min_num").val());
var max = $.trim($("#max_num").val());
- if(min.length <= 0) {
+ var regex = /^\d+$/;
+ if(!regex.test(min) || parseInt(min) <= 0) {
+ $("#min_num_notice").html("请输入正整数");
+ $("#max_num_notice").html("");
+ $("#min_max_num_notice").html("");
+ $("#min_num_notice").show();
$("#min_num").focus();
- valid = false;
return false;
+ } else {
+ $("#min_num_notice").html("");
+ $("#min_num_notice").hide();
+ }
+ if(!regex.test(max) || parseInt(max) <= 0) {
+ $("#max_num_notice").html("请输入正整数");
+ $("#min_num_notice").html("");
+ $("#min_max_num_notice").html("");
+ $("#max_num_notice").show();
+ $("#max_num").focus();
+ return false;
+ } else {
+ $("#max_num_notice").html("");
+ $("#max_num_notice").hide();
}
- if(max.length <= 0) {
+ if(parseInt(min) > parseInt(max)) {
+ $("#min_max_num_notice").html("最小人数不得大于最大人数");
+ $("#min_num_notice").html("");
+ $("#max_num_notice").html("");
+ $("#min_max_num_notice").show();
$("#max_num").focus();
- valid = false;
return false;
+ } else {
+ $("#min_max_num_notice").html("");
+ $("#min_max_num_notice").hide();
}
if ($("#base_on_project").is(":checked")) {
base_on_project = 1;
diff --git a/public/javascripts/new_user.js b/public/javascripts/new_user.js
index b6301afad..8db3fbc20 100644
--- a/public/javascripts/new_user.js
+++ b/public/javascripts/new_user.js
@@ -259,6 +259,24 @@ function regex_evaluation_end(){
}
}
+//处理迟交、缺评扣分
+function check_late_penalty(id)
+{
+ var obj = $("#" + id);
+ var regex = /^\d+$/;
+ if(regex.test(obj.val()))
+ {
+ if(obj.val() > 50)
+ {
+ obj.val("50");
+ }
+ }
+ else
+ {
+ obj.val("");
+ }
+}
+
//验证匿评数量
function regex_evaluation_num(){
var evaluation_num = $.trim($("#evaluation_num").val());
@@ -627,4 +645,52 @@ var autoTextarea2 = function (elem,elem2, extra, maxHeight) {
addEvent(elem2, 'input', change);
addEvent(elem2, 'focus', change);
change();
-};
\ No newline at end of file
+};
+
+function user_name_keypress(e){
+ if (e.keyCode == '13') {
+ $('#main_login_form').submit();
+ }
+}
+
+function changeRegisterBtn(checkbox){
+ if(checkbox.checked == true){
+ $("#loginUpButton").removeClass('new_login_submit_disable');
+ $("#loginUpButton").addClass('new_login_submit');
+ }else{
+ $("#loginUpButton").removeClass('new_login_submit')
+ $("#loginUpButton").addClass('new_login_submit_disable');
+ }
+}
+
+function clearInfo(id, content) {
+ var text = $('#' + id);
+ if (text.val() == content) {
+ $('#' + id).val('');
+ }
+}
+
+function showInfo(id, content) {
+ var text = $('#' + id);
+ if (text.val() == '') {
+ $('#' + id).val(content);
+ }
+}
+
+function login(){
+ $('#main_login_form').submit(); //表单提交没有任何反应的原因:js冲突
+}
+
+function register(){
+ if($("#loginUpButton").hasClass('new_login_submit_disable')){
+ return;
+ }
+ if($login_correct && $mail_correct && $passwd_correct && $passwd_comfirm_correct && $("#read_and_confirm").attr("checked") == 'checked'){
+ $("#main_reg_form").submit();
+ }else{
+ $('#user_login').blur();
+ $('#user_mail').blur();
+ $('#user_password').blur();
+ $('#user_password_confirmation').blur();
+ }
+}
diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css
index 38d58a126..dcd275d92 100644
--- a/public/stylesheets/new_user.css
+++ b/public/stylesheets/new_user.css
@@ -747,8 +747,8 @@ a:hover .gz_btn{color:#ff5722;}
.homepageCoursesType {width:75px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-65px; font-size:12px; color:#4b4b4b; line-height:2; z-index:9999; display:none;}
/*注册登陆页面*/
-#loginInBox {display:block; margin-top:143px;}
-#signUpBox {display:none; margin-top:79px;}
+#loginInBox {display:block;}
+#signUpBox {display:none;}
#loginSignButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;}
#loginInButton {height:54px; padding-left:10px; padding-right:10px; text-align:center; line-height:54px; vertical-align:middle; color:#ffffff; font-size:16px;}
#loginSignButton:hover {background-color:#297fb8;}
@@ -1628,7 +1628,170 @@ ul.wlist li a:hover{ background:#15bccf; color:#fff; text-decoration:none;}
span.shadowbox_news_user{ color:#3b94d6;}
a.shadowbox_news_all{ display:block; width:305px; height:40px; line-height:40px; color:#3b94d6; text-align:center;border-top:1px solid #eee;}
-/*未登录回复提示*/
-.visitor-box {width:620px; height:33px; line-height:33px; text-align:center; vertical-align: middle; border:1px solid #ccc; background-color: #fff;}
+/* 新版登录注册 */
+.mr45{ margin-right:45px;}
+.mt100{ margin-top:100px;}
+.mt50{ margin-top:50px;}
+.new_login{
+ width:100%;
+ height:524px;
+ background-color:#3b94d6;
+}
+.new_login_con{
+ width:1000px;
+ height:524px;
+ margin:0 auto;
+ background:url(../images/login/bg_login.jpg) 0 0 no-repeat;
+}
+.new_login_box{
+ background:#FFF;
+ width:265px;
+ padding:20px 15px;
+ -webkit-border-radius:5px;
+ -moz-border-radius:5px;
+ -o-border-radius:5px;
+ border-radius:5px;
+ background-color: rgba(255,255,255,0.3);
+}
+.new_login_h2{
+ font-size:18px;
+ color:#fff;
+ border-bottom:1px solid #fff;
+ font-weight:normal;
+ padding-bottom:5px;
+ margin-bottom:30px;
+}
+.new_login_h2 a{
+ font-size:12px;
+ color:#fff;
+ background:url(../images/login/icons_login.png) 0 -69px no-repeat;
+ padding-left:10px;
+}
+input.new_register_input{
+ -webkit-box-shadow: 0 0 0px 1000px white inset;
+ margin-left:5px;
+ width:250px;
+ height:45px;
+ border:none;
+ outline: none;
+}
+input.new_loggin_input{
+ -webkit-box-shadow: 0 0 0px 1000px white inset;
+ outline: none;
+ width:205px;
+ height:45px;
+ border:none;
+ margin-left:50px;
+}
+.new_loggin_users{
+ width:265px;
+ height:45px;
+ -webkit-border-radius:5px;
+ -moz-border-radius:5px;
+ -o-border-radius:5px;
+ border-radius:5px;
+ border:none;
+ background:#fff url(../images/login/icons_login.png) 8px 9px no-repeat;
+
+}
+.new_login_lock{
+ background:#fff url(../images/login/icons_login.png) 8px -28px no-repeat;
+ width:265px;
+ height:45px;
+ -webkit-border-radius:5px;
+ -moz-border-radius:5px;
+ -o-border-radius:5px;
+ border-radius:5px;
+ border:none;
+}
+.new_register_li{
+ background:#fff;
+ width:265px;
+ height:45px;
+ -webkit-border-radius:5px;
+ -moz-border-radius:5px;
+ -o-border-radius:5px;
+ border-radius:5px;
+ border:none;
+}
+.new_login_form ul li{
+ margin-bottom:20px;
+}
+.new_login_error{
+ color:#c00202;
+}
+.new_login_submit_disable{
+ width:265px;
+ height:40px;
+ line-height: 40px;
+ background:#ccc;
+ color:#fff;
+ font-size:14px;
+ -webkit-border-radius:5px;
+ -moz-border-radius:5px;
+ -o-border-radius:5px;
+ border-radius:5px;
+ border:none;
+ text-align:center;
+ cursor:pointer;
+ vertical-align: middle;
+}
+.new_login_submit{
+ width:265px;
+ height:40px;
+ line-height: 40px;
+ background:#f27d0d;
+ color:#fff;
+ font-size:14px;
+ -webkit-border-radius:5px;
+ -moz-border-radius:5px;
+ -o-border-radius:5px;
+ border-radius:5px;
+ border:none;
+ text-align:center;
+ cursor:pointer;
+ vertical-align: middle;
+}
+.new_login_check{
+ width:15px;
+ height:15px;
+ border:1px solid #fff;
+ border-style:none;
+ margin-right:5px;
+ vertical-align: -2px;
+}
+.new_login_form label{ color:#fff;}
+.new_login_form a{ color:#fff; text-decoration:underline;}
+.new_register{
+ width:100%;
+ height:579px;
+ background-color:#3b94d6;
+}
+.new_register_con{
+ width:1000px;
+ height:580px;
+ margin:0 auto;
+ background:url(../images/login/bg_register.jpg) 0 0 no-repeat;
+}
+.new_login_txt{
+ width:282px;
+ height:140px;
+ padding:30px 12px 0;
+ color:#fff;
+ margin:235px 0 0 165px;
+}
+.new_login_txt h3{
+ font-size:18px;
+ text-align:center;
+ margin-bottom:20px;
+}
+.new_login_txt p{
+ line-height:2.0;
+}
+.new_register_left{
+ margin-top:250px;
+}
+/*未登录回复提示*/
+.visitor-box {width:620px; height:33px; line-height:33px; text-align:center; vertical-align: middle; border:1px solid #ccc; background-color: #fff;}
diff --git a/public/stylesheets/org2.css b/public/stylesheets/org2.css
index 9e19fb5cb..23e53fd7b 100644
--- a/public/stylesheets/org2.css
+++ b/public/stylesheets/org2.css
@@ -197,7 +197,7 @@ a.sn-reply-username { color:#24366e; margin-right:15px; }
.topnav_login_list{ border:1px solid #eaeaea; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-7px; position:absolute; z-index:9999; line-height:2; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); margin-top: 1px;}
.topnav_login_list a{color:#269ac9;}
.topnav_login_list li{ }
-.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block; line-height:0;}
+.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:50px; position:relative; display:inline-block; line-height:0;}
.homepageLeft {width:240px; float:left; margin-right:10px; margin-bottom:10px;}
.none {display: none;}
.user-img,.user-img img{ margin-right:10px; -moz-border-radius: 50px; -webkit-border-radius: 50px;border-radius: 50px; display:block; width:40px; height:40px;}
diff --git a/public/stylesheets/org_custom.css b/public/stylesheets/org_custom.css
index 0bdc8a670..95df98738 100644
--- a/public/stylesheets/org_custom.css
+++ b/public/stylesheets/org_custom.css
@@ -1,64 +1,64 @@
/* 门户首页 */
#por_header{ width:100%; }
-.por_header_top{ width:100%; height:70px; background:#3b94d6; }
-.por_header_con{ width:1000px; margin:0 auto; height:70px; }
-.por_logo{ margin-top:5px;}
+.por_header_top{ width:100%; height:55px; background:#3b94d6; }
+.por_header_con{ width:1000px; margin:0 auto; height:55px; }
+.por_logo img{ margin-top:2px; height:51px;}
.por_login li{ float:left;}
-.por_login li a{ display:block; padding:0 15px; height:70px; line-height:70px;font-size:16px; color:#fff; }
+.por_login li a{ display:block; padding:0 15px; height:55px; line-height:55px;font-size:16px; color:#fff; }
.por_login li a:hover{ background-color:#1173bc;}
-.por_search{ margin-top:15px; margin-right:20px;}
+.por_search{ margin-top:10px; margin-right:20px;}
.pro_input_search{ background-color:#daeefc; height:36px; width:355px; border:none; padding:0 5px; color:#3b94d6;}
-a.por_search_btn{ display:block;background:#daeefc url(../images/org_custom/icons_por.png) 0 8px no-repeat; width:25px; height:36px;}
-a:hover.por_search_btn{background:#daeefc url(../images/org_custom/icons_por.png) -35px 8px no-repeat; }
-.por_nav{ width:1000px; height:70px; overflow:hidden; margin: 0 auto; position:relative; }
-a.por_edit_index{ position:absolute; font-size:14px; right:5px; top:20px;}
-.por_nav ul{ border-bottom:7px solid #ccc; height:63px;}
+a.por_search_btn{ display:block;background:#daeefc url(../images/icons_por.png) 0 8px no-repeat; width:25px; height:36px;}
+a:hover.por_search_btn{background:#daeefc url(../images/icons_por.png) -35px 8px no-repeat; }
+.por_nav{ width:100%; height:50px; background-color:#eeefef; }
+.por_nav ul{ width:1000px;height:50px; overflow:hidden; margin: 0 auto; position:relative;}
+a.por_edit_index{ position:absolute; font-size:14px; right:5px; top:15px;}
.por_nav ul li{ float:left; }
-.por_nav ul li a{ display: block; height:63px; padding:0 20px; line-height:63px; font-size:18px; color:#333; }
-.por_nav ul li a:hover{ border-bottom:7px solid #3b94d6; }
-.por_index_act{border-bottom:7px solid #3b94d6; }
+.por_nav ul li a{ display: block; height:63px; padding:0 20px; line-height:50px; font-size:16px; color:#333; }
+.por_nav ul li a:hover{ color:#3b94d6; }
+.por_nav ul li a.por_index_act{color:#3b94d6; }
#por_container{ width:1000px; margin:10px auto;}
.por_left{ width:685px; margin-right:15px; float:left; }
.por_right{ width:300px; float:left;}
.por_icons_hot{ background:url(../images/org_custom/icons_por.png) 0 -78px no-repeat; height:22px; width:55px; padding-left:3px; color:#fff; font-size:12px; line-height:22px; font-weight:normal;}
-.por_h2_index{ font-size:20px; font-weight:normal; color:#3b94d6; width:100%; border-bottom:1px solid #e8e5e5; height:40px; line-height:40px;}
+.por_h2_index{ font-size:18px; font-weight:normal; color:#3b94d6; width:100%; border-bottom:1px solid #e8e5e5; height:40px; line-height:40px;}
a.por_more_index{ font-size:12px; color:#999; }
.por_hotbar_left li{ width:365px; padding:12px 5px 12px 0; border-bottom:1px dashed #e8e5e5;}
a.por_hot_title{ font-size:16px; display:block; font-weight:bold; width:365px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.por_hot_txt{ color:#666; line-height:20px;max-height:60px;overflow:hidden;text-overflow:ellipsis;}
.por_time{ color:#999;}
a.por_hot_name{color:#3b94d6;}
-.por_hotbar_right{ border:1px solid #e8e5e5; padding:5px; margin-top:15px; width:300px;}
+.por_hotbar_right{ padding:5px 0 5px 10px; margin-top:15px; width:300px; }
.por_hotbar_right img{ width:300px; height:246px;}
.por_hot_title_r{ font-size:16px; display:block; font-weight:bold; width:300px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.por_hot_txt_r{color:#666; line-height:20px;max-height:80px;overflow:hidden;text-overflow:ellipsis;}
.por_course{ }
-.por_course_bar{ width:328px; margin:0 7px; padding:20px 0; border-bottom:1px solid #e8e5e5;}
+.por_course_bar{ width:328px; margin:0 7px; padding:20px 0 0px;}
a.por_course_title{font-size:14px; margin-bottom:10px; display:block; font-weight:bold; width:328px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.por_course_bar img{ width:140px; height:100px; }
.por_course_txt { width:180px; margin-left:5px;color:#666; line-height:20px;max-height:80px;overflow:hidden;text-overflow:ellipsis;}
.por_course_time{color:#3b94d6; margin-left:5px;}
-.por_post{ border-bottom:1px solid #e8e5e5; padding-bottom:5px;}
+.por_post{ padding-bottom:5px;}
.por_post_left{ width:394px; margin-top:15px;}
.por_post_leftbar img{ width:377px; height:163px;}
.por_post_leftbar { border-bottom:1px dashed #e8e5e5; padding-bottom:5px; margin-bottom:10px;}
a.por_post_title{font-size:18px; display:block; width:377px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.por_post_txt{color:#666; line-height:20px;max-height:40px;overflow:hidden;text-overflow:ellipsis; }
-.post_icons_grey{ width:5px; height:5px; margin:10px 5px 0 0; background-color:#b3b3b3; display:block; line-height:20px;}
-.por_post_list li{ height:20px; height:30px;}
+.post_icons_grey{ width:4px; height:4px; margin:10px 5px 0 0; background-color:#b3b3b3; display:block; line-height:20px;}
+.por_post_list li{ height:35px;}
.por_post_list li a{ font-size:14px; }
a.por_hidden_w390{ display:block; width:390px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
a.por_hidden_w270{ display:block; width:280px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.por_post_right{ width:280px; border-left:1px solid #e8e5e5; margin-top:15px; padding-left:10px;}
.por_news_list li{ padding:15px 0; border-bottom:1px dashed #e8e5e5;}
-.por_users_img{ width:40px; height:40px; border:1px solid #e8e5e5;}
+.por_users_img{ width:40px; height:40px; -webkit-border-radius:50px;-moz-border-radius:50px;-o-border-radius:50px;border-radius:50px;}
.por_news_txt{ width:245px; margin-left:10px;}
.por_news_p{ line-height:20px;max-height:40px;min-width:240px;overflow:hidden;text-overflow:ellipsis; }
a.por_zan{ background:url(../images/org_custom/icons_por.png) 0 -41px no-repeat; height:15px; width:20px; display:block; padding-left:15px; line-height:20px; color:#999;}
a.por_zan:hover{background:url(../images/org_custom/icons_por.png) -34px -42px no-repeat; color:#3b94d6; }
.por_hidden_w205{ font-size:14px; display:block; width:205px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
-.por_projects{border-bottom:1px solid #e8e5e5; padding-bottom:10px; margin-top:10px;}
+.por_projects{ padding-bottom:10px; margin-top:10px;}
.por_projects ul li{ padding:5px 0;}
.por_projects ul{ margin-top:5px;}
.por_project_p{ line-height:20px;max-height:40px;overflow:hidden;text-overflow:ellipsis; margin-top:5px; margin-left:10px; color:#666; }
@@ -67,8 +67,8 @@ a.por_zan:hover{background:url(../images/org_custom/icons_por.png) -34px -42px n
.por_teachers{ margin-top:20px; }
#por_teachers_nav {border-bottom:1px solid #d0d0d0; height:31px;}
#por_teachers_nav li {float:left; padding:0px 5px; text-align:center; }
-#por_teachers_nav li a{font-size:20px;}
-.por_teachers_hover {border:1px solid #d0d0d0; border-bottom:1px solid #fff; }
+#por_teachers_nav li a{font-size:18px;}
+.por_teachers_hover { }
.por_teachers_hover a{color:#3b94d6;}
.por_teachers_nomal {border-bottom:none; }
.por_teachers_nomal a{color:#999;}
@@ -76,7 +76,7 @@ a.por_zan:hover{background:url(../images/org_custom/icons_por.png) -34px -42px n
.dis {display:block;}
a.por_more_teacher{ font-size:12px; }
.por_teachers_li{ margin-top:10px;}
-.por_teachers_li li{ padding:10px 0;border-bottom:1px solid #e8e5e5;}
+.por_teachers_li li{ padding:10px 0;}
.por_teachers_img{ width:60px; height:60px; -webkit-border-radius:50px;-moz-border-radius:50px;-o-border-radius:50px;border-radius:50px;}
a.por_teachers_name{ display:block; width:75px; font-size:18px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.por_teachers_p{ font-size:14px; color:#999; width:150px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
@@ -88,22 +88,4 @@ a.por_teachers_name{ display:block; width:75px; font-size:18px;overflow:hidden;
.por_footer_con ul li{ float:left; text-align:center;}
.por_footer_con ul li a{ font-size:14px;}
.por_footer_con ul li a span{ color:#999; margin:0 15px ;}
-.por_footer_con p{ text-align:center; margin-top:20px; color:#777;}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+.por_footer_con p{ text-align:center; margin-top:20px; color:#777;}
\ No newline at end of file
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index 333c410ca..ff71bf5c4 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -533,7 +533,7 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-
.homepageNewsIcon {background:url(../images/nav_icon.png) -5px -85px no-repeat; width:30px; height:35px; display:block;}
.newsActive {width:16px; height:16px; border-radius:50%; background-color:#ff0000; position:absolute; left:17px; top:5px; text-align:center;font-size:12px; color:#ffffff !important;padding-bottom: 3px;padding-left: 2px;padding-right: 1px;font-weight: bold;}
.navHomepageProfile {width:65px; display:block; float:right; margin-left:33px;}
-.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:54px; position:relative; display:inline-block;}
+.homepageProfileMenuIcon {background:url(../images/nav_icon.png) 30px -155px no-repeat; width:65px; height:50px; position:relative; display:inline-block;}
.homepageProfileMenuIcon:hover {background:url(../images/nav_icon.png) 30px -122px no-repeat;}
.navHomepageProfile ul li ul {display:none;}
.navHomepageProfile ul li:hover ul {display:block;}
diff --git a/spec/controllers/syllabuses_controller_spec.rb b/spec/controllers/syllabuses_controller_spec.rb
new file mode 100644
index 000000000..72c43dff1
--- /dev/null
+++ b/spec/controllers/syllabuses_controller_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe SyllabusesController, :type => :controller do
+
+end
diff --git a/spec/factories/syllabuses.rb b/spec/factories/syllabuses.rb
new file mode 100644
index 000000000..436972e39
--- /dev/null
+++ b/spec/factories/syllabuses.rb
@@ -0,0 +1,9 @@
+# Read about factories at https://github.com/thoughtbot/factory_girl
+
+FactoryGirl.define do
+ factory :syllabus do
+ title "MyString"
+ description "MyText"
+ user nil
+ end
+end
diff --git a/spec/models/syllabus_spec.rb b/spec/models/syllabus_spec.rb
new file mode 100644
index 000000000..6072c09ce
--- /dev/null
+++ b/spec/models/syllabus_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe Syllabus, :type => :model do
+ pending "add some examples to (or delete) #{__FILE__}"
+end