Merge branch 'develop' into yuanke

Conflicts:
	public/stylesheets/new_user.css
This commit is contained in:
yuanke 2016-06-17 14:36:12 +08:00
commit d6d9a366f2
66 changed files with 814 additions and 473 deletions

View File

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

View File

@ -0,0 +1,3 @@
// Place all the styles related to the syllabuses controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

View File

@ -67,12 +67,15 @@ class AdminController < ApplicationController
def excellent_all_courses
name = params[:name]
@order = ""
if params[:order] == 'asc'
courses = Course.find_by_sql("SELECT c.*,count(c.id) FROM courses c,course_activities ca WHERE c.id = ca.course_id AND c.name like '%#{name}%' GROUP BY c.id ORDER BY count(c.id) asc, c.id desc")
@sort = ""
if params[:sort] && (params[:order] == 'act')
courses = Course.find_by_sql("SELECT c.*,count(c.id) FROM courses c,course_activities ca WHERE c.id = ca.course_id AND c.name like '%#{name}%' GROUP BY c.id ORDER BY count(c.id) #{params[:sort]}, c.id desc")
@order = params[:order]
elsif params[:order] == 'desc'
courses = Course.find_by_sql("SELECT c.*,count(c.id) FROM courses c,course_activities ca WHERE c.id = ca.course_id AND c.name like '%#{name}%' GROUP BY c.id ORDER BY count(c.id) DESC, c.id desc")
@sort = params[:sort]
elsif params[:sort] && (params[:order] == 'time')
courses = Course.find_by_sql("SELECT * FROM courses WHERE name like '%#{name}%' ORDER BY time #{params[:sort]},id desc")
@order = params[:order]
@sort = params[:sort]
else
courses = Course.like(name).order('created_at desc')
end
@ -99,6 +102,22 @@ class AdminController < ApplicationController
end
end
#取消精品
def cancel_excellent_course
@course = Course.find params[:id]
unless @course.nil?
if @course.is_excellent == 1 || @course.excellent_option == 1
@course.update_column('is_excellent', 0)
@course.update_column('excellent_option', 0)
end
end
respond_to do |format|
format.html{
redirect_to excellent_courses_url
}
end
end
#管理员界面课程资源列表
def course_resource_list

View File

@ -49,6 +49,11 @@ class ExerciseController < ApplicationController
return
end
@exercise = Exercise.find params[:id]
@exercise.course_messages.each do |message|
if User.current.id == message.user_id && message.viewed == 0
message.update_attributes(:viewed => true) if message.viewed == 0
end
end
@is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
exercise_end = @exercise.end_time > Time.now
if @exercise.time == -1

View File

@ -14,10 +14,9 @@ class OrgSubfieldsController < ApplicationController
SubfieldSubdomainDir.create(:org_subfield_id => @subfield.id, :name => params[:sub_dir].downcase)
end
end
#默认类型为帖子
@subfield.update_attributes(:field_type => params[:field_type]||"Post")
@subfield.update_attributes(:field_type => params[:field_type])
# admin配置的类型
update_status_by_type(@subfield, params[:field_type]||"Post")
update_status_by_type(@subfield, params[:field_type])
else
@res = false
end

View File

@ -1096,7 +1096,8 @@ class StudentWorkController < ApplicationController
all_student_ids = "(" + pro.members.map{|member| member.user_id}.join(",") + ")"
end
all_students = User.where("id in #{all_student_ids}")
@commit_student_ids = @homework.student_work_projects.map{|student| student.user_id}
student_work_id = @homework.student_work_projects.where("user_id=?",User.current.id).empty? ? -1 : @homework.student_work_projects.where("user_id=?",User.current.id).first.student_work_id
@commit_student_ids = @homework.student_work_projects.where("student_work_id != #{student_work_id}").map{|student| student.user_id}
@users = searchstudent_by_name all_students,name
respond_to do |format|
format.js
@ -1115,6 +1116,20 @@ class StudentWorkController < ApplicationController
end
end
def get_user_infor
req = Hash.new(false)
user = User.where("id = #{params[:user_id].to_i}").first
if user
req[:id] = user.id
req[:name] = user.show_name
req[:student_id] = user.user_extensions.student_id
req[:valid] = true
else
req[:valid] = false
end
render :json => req
end
private
def searchstudent_by_name users, name
mems = []

View File

@ -0,0 +1,23 @@
class SyllabusesController < ApplicationController
before_filter :is_logged, :only => [:index, :show]
before_filter :find_syllabus, :only => [:show]
def index
user = User.current
@syllabuses = user.syllabuses
end
def show
@courses = @syllabus.courses
end
private
def find_syllabus
@syllabus = Syllabus.find params[:id]
end
def is_logged
redirect_to signin_path unless User.current.logged?
end
end

View File

@ -130,8 +130,11 @@ class UsersController < ApplicationController
onclick_time = User.current.onclick_time.onclick_time
messages.each do |message_all|
# 未读的消息存放在数组
if (message_all.message_type != "SystemMessage"&& !message_all.message.nil? && message_all.message.viewed == 0) || (message_all.message_type == "SystemMessage"&& !message_all.message.nil? && message_all.message.created_at > onclick_time)
@message_alls << message_all.message
mess = message_all.message
if (message_all.message_type != "SystemMessage"&& !mess.nil? && (mess.viewed == 0 || !mess.viewed)) || (message_all.message_type == "SystemMessage"&& !mess.nil? && mess.created_at > onclick_time)
unless (message_all.message_type == 'CourseMessage' && mess && mess.course.is_delete == 1)
@message_alls << mess
end
break if @message_alls.length == 5
end
end
@ -154,33 +157,41 @@ class UsersController < ApplicationController
update_message_viewed(@user)
end
# @new_message_count = forge_querys.count + forum_querys.count + course_querys.count + user_querys.count
courses = @user.courses.where("is_delete = 1")
course_ids = courses.empty? ? "(-1)" : "(" + courses.map{|course| course.id}.join(",") + ")"
case params[:type]
when nil
# 系统消息为管理员发送,我的消息中包含有系统消息
@message_alls = []
messages = MessageAll.where("(user_id =? and message_type !=?) or message_type =?" ,@user.id, "SystemMessage", "SystemMessage").includes(:message).order("created_at desc")
messages.each do |message_all|
@message_alls << message_all.message
mess = message_all.message
unless (message_all.message_type == 'CourseMessage' && mess && mess.course.is_delete == 1)
@message_alls << mess
end
end
when 'unviewed'
@message_alls = []
messages = MessageAll.where("user_id =?", @user.id).includes(:message).order("created_at desc")
messages = MessageAll.where("message_alls.user_id =?", @user.id).includes(:message).order("created_at desc")
messages.each do |message_all|
# 在点击或者刷新消息列表后未读的消息存放在数组
if message_all.message_type != "SystemMessage"&& !message_all.message.nil? && message_all.message.viewed == 0
@message_alls << message_all.message
mess = message_all.message
if message_all.message_type != "SystemMessage"&& !mess.nil? && (mess.viewed == 0 || !mess.viewed)
unless (message_all.message_type == 'CourseMessage' && mess && mess.course.is_delete == 1)
@message_alls << mess
end
end
end
#课程相关消息
when 'homework'
@message_alls = CourseMessage.where("course_message_type in ('HomeworkCommon','StudentWorksScore','JournalsForMessage','StudentWork','Exercise') and user_id =?", @user.id).order("created_at desc")
@message_alls = CourseMessage.where("course_message_type in ('HomeworkCommon','StudentWorksScore','JournalsForMessage','StudentWork','Exercise') and user_id =? and course_id NOT IN #{course_ids}", @user.id).order("created_at desc")
when 'course_message'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Message", @user.id).order("created_at desc")
@message_alls = CourseMessage.where("course_message_type =? and user_id =? and course_id NOT IN #{course_ids}", "Message", @user.id).order("created_at desc")
when 'course_news'
# 课程通知包含发布的通知和回复的通知
@message_alls = CourseMessage.where("course_message_type in ('News', 'Comment') and user_id =?", @user.id).order("created_at desc")
@message_alls = CourseMessage.where("course_message_type in ('News', 'Comment') and user_id =? and course_id NOT IN #{course_ids}", @user.id).order("created_at desc")
when 'poll'
@message_alls = CourseMessage.where("course_message_type =? and user_id =?", "Poll", @user.id).order("created_at desc")
@message_alls = CourseMessage.where("course_message_type =? and user_id =? and course_id NOT IN #{course_ids}", "Poll", @user.id).order("created_at desc")
#项目相关消息
when 'issue'
@message_alls = ForgeMessage.where("forge_message_type in ('Issue', 'Journal') and user_id =?" , @user.id).order("created_at desc")

View File

@ -0,0 +1,2 @@
module SyllabusesHelper
end

View File

@ -147,7 +147,9 @@ module UsersHelper
# 统计未读消息数
def unviewed_message(user)
course_count = CourseMessage.where("user_id =? and viewed =?", user, 0).count
courses = user.courses.where("is_delete = 1")
course_ids = courses.empty? ? "(-1)" : "(" + courses.map{|course| course.id}.join(",") + ")"
course_count = CourseMessage.where("user_id =? and viewed =? and course_id not in #{course_ids}", user, 0).count
forge_count = ForgeMessage.where("user_id =? and viewed =?", user, 0).count
org_count = OrgMessage.where("user_id =? and viewed =?", user, 0).count
user_feedback_count = UserFeedbackMessage.where("user_id =? and viewed =?", user, 0).count

View File

@ -24,6 +24,7 @@ class Course < ActiveRecord::Base
#belongs_to :project, :class_name => 'Course', :foreign_key => :extra, primary_key: :identifier
belongs_to :teacher, :class_name => 'User', :foreign_key => :tea_id # 定义一个方法teacher该方法通过tea_id来调用User表
belongs_to :school, :class_name => 'School', :foreign_key => :school_id #定义一个方法school该方法通过school_id来调用School表
belongs_to :syllabus
# has_many :bid
has_many :members, :include => [:principal, :roles], :conditions => "#{Principal.table_name}.type='User' AND #{Principal.table_name}.status=#{Principal::STATUS_ACTIVE}"
has_many :memberships, :class_name => 'Member'

5
app/models/syllabus.rb Normal file
View File

@ -0,0 +1,5 @@
class Syllabus < ActiveRecord::Base
belongs_to :user
has_many :courses
attr_accessible :description, :title
end

View File

@ -90,6 +90,7 @@ class User < Principal
has_many :homework_users
has_many :homework_attaches, :through => :homework_users
has_many :homework_evaluations
has_many :syllabuses, :dependent => :destroy
#问卷相关关关系
has_many :poll_users, :dependent => :destroy
has_many :poll_votes, :dependent => :destroy

View File

@ -2,32 +2,6 @@
<%= stylesheet_link_tag 'leftside'%>
<script type="text/javascript">
// $(document).ready(function(){
// $("#loginSignButton").click(function(){
// $("#signUpBox").css({display:"block"});
// $("#loginInBox").css({display:"none"});
// });
// $("#loginInButton").click(function(){
// $("#signUpBox").css({display:"none"});
// $("#loginInBox").css({display:"block"});
// });
// });
// $(function(){
// $("#username").keypress(function(e){
// alert(11);
// if (e.keyCode == '13') {
// $('#main_login_form').submit();
// }
// });
//
// $("#password").keypress(function(e){
// if (e.keyCode == '13') {
// $('#main_login_form').submit();
// }
// });
// });
$(document).ready(function(){
$(".homepageSearchIcon").click(function(){
var val=$('input:radio[name="search_type"]:checked').val();
@ -38,10 +12,6 @@
$("#navSearchAlert").css({display:"none"});
}
});
// $("#loginInButton").click(function(){
// $("#signUpBox").css({display:"none"});
// $("#loginInBox").css({display:"block"});
// });
});
$(document).ready(function(){
@ -62,42 +32,6 @@
}
});
// $('#regist_btn').bind('keyup', function(event) {
// if (event.keyCode == "13" && $("#signUpBox").css('display') == 'block')) {
// register();
// }
//});
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('loginUpDisableButton')){
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();
}
}
var $login_correct = false;
var $mail_correct = false;
var $passwd_correct = false;
@ -118,7 +52,7 @@
$('#login_req').html('<span style="color: green">'+data.message+'</span>');
$login_correct = true;
} else {
$('#login_req').html( '<span style="color: red">'+data.message+'</span>');
$('#login_req').html( '<span style="color: #c00202">'+data.message+'</span>');
$login_correct = false;
}
$('#login_req').css('display','block');
@ -129,7 +63,7 @@
$mail.blur(function (event) {
if (/^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/.test(this.value) == false){
$('#mail_req').html( '<span style="color: red">邮件格式不对</span>').show();
$('#mail_req').html( '<span style="color: #c00202">邮件格式不对</span>').show();
$mail_correct = false;
return ;
}
@ -142,7 +76,7 @@
$('#mail_req').html( '<span style="color: green">'+data.message+'</span>' );
$mail_correct = true;
} else {
$('#mail_req').html( '<span style="color: red">'+data.message+'</span>' );
$('#mail_req').html( '<span style="color: #c00202">'+data.message+'</span>' );
$mail_correct = false;
}
$('#mail_req').css('display','block');
@ -158,7 +92,7 @@
$passwd_correct = true;
}
else {
$('#passwd_req').html( '<span style="color: red">'+'<%= l(:setting_password_min_length_limit, :count => Setting.password_min_length.to_i) %>'+'</span>');
$('#passwd_req').html( '<span style="color: #c00202">'+'<%= l(:setting_password_min_length_limit, :count => Setting.password_min_length.to_i) %>'+'</span>');
$passwd_correct = false;
}
$('#passwd_req').css('display','block');
@ -174,7 +108,7 @@
$passwd_comfirm_correct = true;
}
else {
$('#confirm_req').html('<span style="color: red">'+'<%= l(:setting_password_error) %>'+'</span>');
$('#confirm_req').html('<span style="color: #c00202">'+'<%= l(:setting_password_error) %>'+'</span>');
$passwd_comfirm_correct = false;
}
@ -184,121 +118,90 @@
});
});
function user_name_keypress(e){
if (e.keyCode == '13') {
$('#main_login_form').submit();
}
}
function changeRegisterBtn(checkbox){
if(checkbox.checked == true){
$("#loginUpButton").removeClass('loginUpDisableButton');
$("#loginUpButton").addClass('loginUpButton');
}else{
$("#loginUpButton").removeClass('loginUpButton')
$("#loginUpButton").addClass('loginUpDisableButton');
}
}
</script>
<div class="loginContentContainer">
<div class="loginContent">
<div class="loginLeft">
<div class="loginLogo"><img src="images/trustie_big_log.png" width="100" height="88" alt="Trustie Logo" /></div>
<div class="loginInro">&nbsp;&nbsp;欢迎加入Trustie创新实践社区在这里您的创新意识和创新潜力将得到充分发挥目前已有超过200所高校和科研机构在平台中开展在线协同开发、协同学习和协同研究。<br/><br/>&nbsp;&nbsp;Trustie社区的理想是让创新过程变的更美好</div>
<div class="new_login" id = "loginInBox">
<div class="new_login_con">
<div class="new_login_txt fl">
<h3> 欢迎加入Trustie创新实践社区</h3>
<p>在这里您的创新意识和创新潜力将得到充分发挥目前已有超过200所高校和科研机构在平台中开展在线协同开发、协同学习和协同研究。</p>
</div>
<div class="loginRight">
<div id="loginInBox">
<div class="loginChooseBox">
<div class="mb5">
<ul class="loginChooseList">
<li class="loginChoose fl"><span class="loginChooseTab">登录</span></li>
<li class="loginChooseBorder fl"></li>
</ul>
</div>
<div class="loginSignAlert" style="color: red"><%= flash.empty? || flash[:error].nil? ? "" : flash[:error].html_safe %></div>
</div>
<div class="loginIn">
<div class="new_login_box fr mr45 mt100">
<h2 class="new_login_h2">登录
<a href="<%= register_url_without_domain %>" class="fr mt5">立即注册</a><div class="cl"></div>
</h2>
<div class="new_login_form">
<%= form_tag(signin_path,:id=>'main_login_form',:method=>'post') do %>
<%= back_url_hidden_field_tag %>
<ul>
<li class="new_loggin_users">
<%= text_field_tag 'username', params[:username], :tabindex => '1', :class=>'new_loggin_input',:placeholder=>'请输入邮箱地址或登录名', :onkeypress => "user_name_keypress(event);"%>
</li>
<li class="new_login_lock">
<%= password_field_tag 'password', nil, :tabindex => '2', :class => 'new_loggin_input' , :placeholder => '请输入登录密码', :onkeypress => "user_name_keypress(event);"%>
<p class="new_login_error"><%= flash.empty? || flash[:error].nil? ? "" : flash[:error].html_safe %></p>
</li>
<%= form_tag(signin_path,:id=>'main_login_form',:method=>'post') do %>
<%= back_url_hidden_field_tag %>
<div class="mb20">
<%= text_field_tag 'username', params[:username], :tabindex => '1' ,
:class=>'loginSignBox',:placeholder=>'请输入邮箱地址或登录名', :onkeypress => "user_name_keypress(event);"%>
<!--<input type="text" placeholder="请输入邮箱地址或昵称" class="loginSignBox" />-->
</div>
<% if Setting.openid? %>
<div class="mb20">
<%= text_field_tag "openid_url", nil, :tabindex => '3',:placeholder=>'请输入OpenId URL' %>
</div>
<% end %>
<div>
<!--<input type="text" placeholder="请输密码" class="loginSignBox" />-->
<%= password_field_tag 'password', nil, :tabindex => '2',:class=>'loginSignBox' ,:placeholder=>'请输密码', :onkeypress => "user_name_keypress(event);"%>
</div>
<div class="loginSignOption">
<% if Setting.autologin? %>
<div class="fl mt3 mr5">
<%= check_box_tag 'autologin', 1, true, :tabindex => 4 %>
</div>
<%= l(:label_stay_logged_in) %>
<% end %>
<a href="<%= lost_password_path %>" class="newsBlue mr40 fr">
<% if Setting.lost_password? %>
<u>忘记密码?</u>
<% end %>
</a></div>
<li>
<% if Setting.autologin? %>
<label><%= check_box_tag 'autologin', 1, true, :tabindex => 4, :class => "new_login_check" %><%= l(:label_stay_logged_in) %></label>
<% end %>
<a href="<%= lost_password_path %>" class="fr">
<% if Setting.lost_password? %>忘记密码<% end %>
</a>
<div class="cl"></div>
</li>
<li><button type="submit" class="new_login_submit"><a href="javascript:void(0);" id="login_btn" onclick="$('#main_login_form').submit();" style="text-decoration: none;">登录</a></button></li>
</ul>
<% end %>
<div class="loginInButton" >
<a href="javascript:void(0);" id="login_btn" class="c_white db" onclick="$('#main_login_form').submit();">登录</a>
</div>
</div>
</div>
<div id="signUpBox">
<div class="loginChooseBox">
<ul class="loginChooseList">
<li class="loginChoose fl"><span class="loginChooseTab">注册<%= link_to l(:label_login_with_open_id_option), signin_url if Setting.openid? %></a></span>
<li class="loginChooseBorder fl"></li>
</ul>
</div>
<div class="loginIn">
<%= form_for :user, :url => register_path,:method=>'post',:html=>{:id=>'main_reg_form'} do |f| %>
<%= error_messages_for 'user' %>
<div class="loginSignRow">
<!--<input type="text" placeholder="请输入邮箱地址" class="loginSignBox" />-->
<%= f.text_field :mail,:size => 25, :class=>'loginSignBox' ,:placeholder=>"请输入邮箱地址"%>
<div class="loginSignAlert" id="mail_req" style="display: none" >请输入有效邮箱地址</div>
</div>
<div class="loginSignRow">
<!--<input type="text" placeholder="请输入密码" class="loginSignBox" />-->
<%= f.password_field :password, :size => 25,:placeholder=>"请输入密码",:class=>'loginSignBox' %>
<div class="loginSignAlert" id="passwd_req" style="display: none">至少需要 6 个字符</div>
</div>
<div class="loginSignRow">
<!--<input type="text" placeholder="请再次输入密码" class="loginSignBox" />-->
<%= f.password_field :password_confirmation, :size => 25,:placeholder=>"请再次输入密码",:class=>'loginSignBox' %>
<div class="loginSignAlert" id="confirm_req" style="display: none">密码不一致</div>
</div>
<div class="loginSignRow">
<!--<input type="text" placeholder="请输入用户昵称" class="loginSignBox" />-->
<%= f.text_field :login, :size => 25,:placeholder=>"请输入用户登录名",:class=>'loginSignBox'%>
<div class="loginSignAlert" id="login_req" style="display: none">用户登录名为2-18个中英文数字或下划线</div>
</div>
<div class="loginSignOption">
<div class="fl mt3 mr5">
<input type="checkbox" id="read_and_confirm" onchange="changeRegisterBtn(this);"/>
</div>
我已阅读并接受<a href="<%= agreement_path %>" class="newsBlue"><u>Trustie服务协议</u></a>条款</div>
<div class="loginUpDisableButton" id="loginUpButton">
<a href="javascript:void(0);" class="c_white db" id="regist_btn" onclick="register();" >注册</a>
</div>
<% end %>
</div>
</div>
</div>
<div class="cl"></div>
</div>
</div>
<%# 注册 %>
<div class="new_register" id = "signUpBox">
<div class="new_register_con">
<div class="new_login_txt fl new_register_left">
<h3> 欢迎加入Trustie创新实践社区</h3>
<p>在这里您的创新意识和创新潜力将得到充分发挥目前已有超过200所高校和科研机构在平台中开展在线协同开发、协同学习和协同研究。</p>
</div>
<div class="new_login_box fr mr45 mt50">
<h2 class="new_login_h2">注册<a href="<%= signin_url_without_domain %>" class="fr mt5">已有账号 请登录</a><div class="cl"></div></h2>
<div class="new_login_form">
<%= form_for :user, :url => register_path,:method=>'post', :html => {:id=>'main_reg_form'} do |f| %>
<%= error_messages_for 'user' %>
<ul>
<li class="new_register_li">
<%= f.text_field :mail, :size => 25, :class => 'new_register_input' , :placeholder => "请输入邮箱地址"%>
<p class="new_login_error" id="mail_req" style="display: none" >请输入正确的邮箱</p>
</li>
<li class="new_register_li">
<%= f.password_field :password, :size => 25, :placeholder => "请输入密码", :class => 'new_register_input' %>
<p class="new_login_error" id="passwd_req" style="display: none">请输入6-16位密码区分大小写不能使用空格</p>
</li>
<li class="new_register_li">
<%= f.password_field :password_confirmation, :size => 25, :placeholder => "请再次输入密码", :class=> 'new_register_input' %>
<p class="new_login_error" id="confirm_req" style="display: none">两次密码不一致!</p>
</li>
<li class="new_register_li">
<%= f.text_field :login, :size => 25, :placeholder => "请输入用户登录名", :class => 'new_register_input'%>
<p class="new_login_error" id="login_req" style="display: none">用户登录名为2-18个中英文数字或下划线</p>
</li>
<li>
<label><input type="checkbox" checked id="read_and_confirm" onchange="changeRegisterBtn(this);" class=" new_login_check">我已阅读并接受<a href="<%= agreement_path %>" >Trustie服务协议条款</a></label>
</li>
<li>
<div class="new_login_submit" id="loginUpButton">
<a href="javascript:void(0);" id="regist_btn" onclick="register();" class ="db" style="text-decoration: none;">注册</a>
</div>
</ul>
<% end %>
</div>
</div>
<div class="cl"></div>
</div>
</div>

View File

@ -27,6 +27,9 @@
<td class="center">
<%= course.course_activities.count%>
</td>
<td class="center">
<%= course.time %>
</td>
<td class="buttons">
<%= link_to( course.is_excellent == 1 || course.excellent_option == 1 ? "取消精品" : "设为精品", { :controller => 'admin', :action => 'set_excellent_course', :id => course.id },:remote=>true, :class => 'icon-del') %>
</td>

View File

@ -45,11 +45,14 @@
<th style="width: 25px;">
资源数
</th>
<th style="width: 50px;">
<th style="width: 30px;">
帖子数
</th>
<th style="width: 50px;" class = "<%= @order == 'desc' ? 'st_up' : (@order == 'asc' ? 'st_down' : '') %>">
<%=link_to '动态数', excellent_all_courses_path(:order=> @order == "desc" ? 'asc' : 'desc') %>
<th style="width: 30px;" class = "<%= @order == 'act' ? (@sort == 'desc' ? 'st_up' : (@sort == 'asc' ? 'st_down' : '')) : '' %>">
<%=link_to '动态数', excellent_all_courses_path(:sort=> @sort == "desc" ? 'asc' : 'desc', :order => 'act') %>
</th>
<th style="width: 40px;" class = "<%= @order == 'time' ? (@sort == 'desc' ? 'st_up' : (@sort == 'asc' ? 'st_down' : '')) : '' %>">
<%=link_to '开课学期', excellent_all_courses_path(:sort=> @sort == "desc" ? 'asc' : 'desc', :order => 'time') %>
</th>
<th style="width: 40px;">
</tr>

View File

@ -2,7 +2,7 @@
<h3>
<%=l(:label_excellent_courses_list)%>
</h3>
<%= render 'tab_excellent_courses' %>
<%= render 'admin/tab_excellent_courses' %>
<h3>
<%=l(:label_excellent_courses_list)%>
@ -33,12 +33,14 @@
<th style="width: 25px;">
资源数
</th>
<th style="width: 70px;">
<th style="width: 50px;">
帖子数
</th>
<th style="width: 70px;">
<th style="width: 50px;">
动态数
</th>
<th style="width: 40px;">
</tr>
</tr>
</thead>
<tbody>
@ -74,6 +76,9 @@
<td class="center">
<%= course.course_activities.count%>
</td>
<td class="buttons">
<%= link_to( course.is_excellent == 1 || course.excellent_option == 1 ? "取消精品" : "设为精品", { :controller => 'admin', :action => 'cancel_excellent_course', :id => course.id }, :class => 'icon-del') %>
</td>
</tr>
<% end %>
</tbody>

View File

@ -59,12 +59,12 @@
<td class="center">
<%= format_date(journal.created_on) %>
</td>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title='<%=journal.notes %>'>
<td style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" title='<%=strip_html(journal.notes) %>'>
<%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 %>
</td>
<td class="center">

View File

@ -1,3 +1,4 @@
<script src="/javascripts/i18n/jquery.ui.datepicker-zh-CN.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
$("#RSide").removeAttr("id");

View File

@ -63,4 +63,11 @@
<%#end%>
<% end%>
<li class="polls_date fr mr10">截止时间:<%= format_time(exercise.end_time.to_s)%></li>
<% if exercise.show_result == 1 %>
<% if exercise.end_time <= Time.now %>
<li><%= link_to l(:label_statistical_results), student_exercise_list_exercise_path(exercise.id,:course_id => @course.id), :class => "pollsbtn fr mr10"%></li>
<% else %>
<li class="pollsbtn fr mr10 pollsbtn_grey" title="截止时间未到,暂不能查看统计结果">统计结果</li>
<%end%>
<% end %>
<% end%>

View File

@ -20,7 +20,13 @@
<div class="testDesEdit mt5"><%= exercise.exercise_description.nil? ? "" : exercise.exercise_description.html_safe%></div>
<div class="cl"></div>
</div>
<div class="mb5">得分:<span class="c_red"><%=exercise_user.score %>分</span></div>
<div>
<div class="fl mb5">得分:<span class="c_red"><%=exercise_user.score %>分</span></div>
<% if User.current.admin? || User.current.allowed_to?(:as_teacher,exercise.course) || (exercise.exercise_status == 3 && exercise.show_result == 1) %>
<%= link_to '返回统计列表>>',student_exercise_list_exercise_path(exercise.id,:course_id => exercise.course.id) , :class => "fr linkBlue" %>
<% end %>
</div>
<div class="cl"></div>
<% mc_question_list = exercise.exercise_questions.where("question_type=1") %>
<% mcq_question_list = exercise.exercise_questions.where("question_type=2") %>
<% single_question_list = exercise.exercise_questions.where("question_type=3") %>

View File

@ -1,7 +1,6 @@
<%if @save_flag%>
//$('#new_forum_div').slideToggle();$('#create_btn').parent().slideToggle();
//$('#reorder_time').click();
window.location.href= "http://"+"<%= Setting.host_name%>"+"/forums/" + "<%= @forum.id%>"
$('#new_forum_div').slideToggle();$('#create_btn').parent().slideToggle();
$('#reorder_time').click();
<%else%>
$("#error").html("<%= @forum.errors.full_messages[0]%>").show();
<%end %>

View File

@ -84,9 +84,9 @@
<div ><%= link_to User.current.count_new_message , user_message_path(User.current), :class => "newsActive", :target =>"_Blank" %></div>
<% end %>
<%#= link_to User.current.count_new_message, user_message_path(User.current), :class => "homepageNewsIcon" %>
<!--<div class="shadowbox_news undis" id="user_messages_list">
<%#=render :partial => 'layouts/message_loading' %>
</div>-->
<div class="shadowbox_news undis" id="user_messages_list">
<%=render :partial => 'layouts/message_loading' %>
</div>
</div>
</div>
@ -98,15 +98,15 @@
$("#navHomepageSearchType").hide();
});
/*$("#user_messages").mouseenter(function(){
$("#user_messages").mouseenter(function(){
$("#user_messages_list").show();
$.get('<%#=user_messages_unviewed_users_path %>');
$.get('<%=user_messages_unviewed_users_path %>');
$("#ajax-indicator").hide();
}).mouseleave(function(){
$("#user_messages_list").hide();
$("#user_messages_list").html("<%#=escape_javascript(render :partial => 'layouts/message_loading') %>");
$("#user_messages_list").html("<%=escape_javascript(render :partial => 'layouts/message_loading') %>");
});*/
});
$("#navHomepageProfile").mouseenter(function(){
$("#homepageProfileMenuIcon").addClass("homepageProfileMenuIconhover");

View File

@ -1,7 +1,6 @@
<font></font>
<h4 class="shadowbox_news_title">未读消息</h4>
<ul class="shadowbox_news_list">
<%# user_messages = User.current.user_messages_unviewed %>
<% messages.each do |ma| %>
<% if ma.class == SystemMessage %>
<li><a href="<%=user_system_messages_path(User.current) %>" target="_blank" title="Trustie平台 发布新消息:<%= ma.subject.blank? ? (ma.content.nil? ? ma.description.html_safe : ma.content.html_safe) : ma.subject%>"><span class="shadowbox_news_user">Trustie平台 </span>发布新消息:<%= ma.subject.blank? ? (ma.content.nil? ? ma.description.html_safe : ma.content.html_safe) : ma.subject%></a></li>
@ -60,15 +59,77 @@
<% else %>
<li><a href="<%= student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id,:show_work_id => ma.course_message.jour.student_work_id) %>" target="_blank" title="<%=ma.course_message.user.show_name %><%=ma.course_message.user.allowed_to?(:as_teacher, ma.course) ? '老师' : '同学' %> 回复了作品评论:<%= ma.course_message.notes%>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %><%=ma.course_message.user.allowed_to?(:as_teacher, ma.course) ? '老师' : '同学' %> </span>回复了作品评论:<%= ma.course_message.notes%></a></li>
<% end %>
<% elsif ma.course_message_type == "StudentWork" && !ma.course_message.homework_common.nil? && !User.current.allowed_to?(:as_teacher, ma.course_message.homework_common.course) %>
<li><a href="<%=student_work_index_path(:homework => ma.course_message.homework_common_id) %>" target="_blank" title="<%=ma.course_message.homework_common.user.show_name %>老师 发布的作业:<%=ma.course_message.homework_common.name %>,由于迟交作业,您及您的作品都不能参与该作业的匿评"><span class="shadowbox_news_user"><%=ma.course_message.homework_common.user.show_name %>老师 </span>发布的作业:<%=ma.course_message.homework_common.name %>,由于迟交作业,您及您的作品都不能参与该作业的匿评</a></li>
<% elsif ma.course_message_type == "StudentWork" && ma.status == 1 %>
<li><a href="<%=student_work_index_path(:homework => ma.course_message.homework_common_id, :show_work_id => ma.course_message_id) %>" target="_blank" title="<%=ma.course_message.user.show_name %>同学 重新提交了作品:<%=ma.course_message.name %>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %>同学 </span>重新提交了作品:<%=ma.course_message.name %></a></li>
<% elsif ma.course_message_type == "StudentWork" && ma.status == 2 %>
<li><a href="<%=student_work_index_path(:homework => ma.course_message.homework_common_id, :show_work_id => ma.course_message_id) %>" target="_blank" title="<%=ma.course_message.user.show_name %>同学 追加新附件了:作业标题:<%=ma.course_message.homework_common.name %>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %>同学 </span>追加新附件了:作业标题:<%=ma.course_message.homework_common.name %></a></li>
<% elsif ma.course_message_type == "Course" %>
<li><a href="<%=course_path(ma.course_message) %>" target="_blank" title="系统提示 您成功创建了课程:课程名称:<%=ma.course_message.name %>"><span class="shadowbox_news_user">系统提示 </span>您成功创建了课程:课程名称:<%=ma.course_message.name %></a></li>
<% elsif ma.course_message_type == "JoinCourseRequest" %>
<% content = User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content == '9' ? "教师" : "教辅"}" %>
<li><a href="<%=user_path(User.find(ma.course_message_id), :course_id => ma.course_id) %>" target="_blank" title="系统提示 您有了新的课程成员申请:<%=content %>"><span class="shadowbox_news_user">系统提示 </span>您有了新的课程成员申请:<%=content %></a></li>
<% elsif ma.course_message_type == "CourseRequestDealResult" %>
<% content = ma.status == 1 ? '您申请成为课程"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'申请已通过' : '您申请成为课程"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'的申请被拒绝' %>
<li><a href="<%=course_path(Course.find(ma.course_id)) %>" target="_blank" title="系统提示 课程申请进度反馈:<%=content %>"><span class="shadowbox_news_user">系统提示 </span>课程申请进度反馈:<%=content %></a></li>
<% elsif ma.course_message_type == "JoinCourse" and ma.status == 0 %>
<li><a href="<%=course_member_path(ma.course) %>" target="_blank" title="<%=User.find(ma.course_message_id).show_name %> 将您加入了课程:<%=ma.course.name %>"><span class="shadowbox_news_user"><%=User.find(ma.course_message_id).show_name %> </span>将您加入了课程:<%=ma.course.name %></a></li>
<% elsif ma.course_message_type == "JoinCourse" and ma.status == 1 %>
<li><a href="<%=user_path(ma.course_message_id) %>" target="_blank" title="系统提示 您增加了新的课程成员:<%=User.find(ma.course_message_id).login+"("+User.find(ma.course_message_id).show_name+")" %>"><span class="shadowbox_news_user">系统提示 </span>您增加了新的课程成员:<%=User.find(ma.course_message_id).login+"("+User.find(ma.course_message_id).show_name+")" %></a></li>
<% elsif ma.course_message_type == "RemoveFromCourse" %>
<li><a href="<%=member_course_path(ma.course) %>" target="_blank" title="<%=User.find(ma.course_message_id).show_name %> 将您移出了课程:<%=ma.course.name %>"><span class="shadowbox_news_user"><%=User.find(ma.course_message_id).show_name %> </span>将您移出了课程:<%=ma.course.name %></a></li>
<% elsif ma.course_message_type == "Exercise" && ma.status == 2 %>
<li><a href="<%=exercise_path(:id => ma.course_message.id) %>" target="_blank" title="<%=ma.course_message.user.show_name %>老师 发布了课程测验:测验题目:<%=ma.course_message.exercise_name %>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %>老师 </span>发布了课程测验:测验题目:<%=ma.course_message.exercise_name %></a></li>
<% elsif ma.course_message_type == "Exercise" && ma.status == 3 %>
<li><a href="<%=exercise_path(:id => ma.course_message.id) %>" target="_blank" title="<%=ma.course_message.user.show_name %>老师 发布的测验:<%=ma.course_message.exercise_name %> 截止时间快到了"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %>老师 </span>发布的测验:<%=ma.course_message.exercise_name %> 截止时间快到了</a></li>
<% end %>
<% end %>
<% elsif ma.class == ForgeMessage %>
<% if ma.forge_message_type == "AppliedProject" %>
<li><a href="<%=settings_project_path(:id => ma.project, :tab => "members") %>" target="_blank" title="<%=ma.forge_message.user.show_name %> 申请加入项目:<%= ma.project.name%>"><span class="shadowbox_news_user"><%=ma.forge_message.user.show_name %> </span>申请加入项目:<%= ma.project.name%></a></li>
<% elsif ma.forge_message_type == "JoinProject" %>
<li><a href="<%=project_member_path(ma.project) %>" target="_blank" title="<%=User.find(ma.forge_message_id).show_name %> 将您加入了项目:<%= ma.project.name%>"><span class="shadowbox_news_user"><%=User.find(ma.forge_message_id).show_name %> </span>将您加入了项目:<%= ma.project.name%></a></li>
<% elsif ma.forge_message_type == "RemoveFromProject" %>
<li><a href="<%=member_project_path(ma.project) %>" target="_blank" title="<%=User.find(ma.forge_message_id).show_name %> 将您移出了项目:<%= ma.project.name%>"><span class="shadowbox_news_user"><%=User.find(ma.forge_message_id).show_name %> </span>将您移出了项目:<%= ma.project.name%></a></li>
<% elsif ma.forge_message_type == "RemoveFromProject" %>
<li><a href="<%=project_path(ma.project) %>" target="_blank" title="<%=User.find(ma.forge_message_id).show_name %> 邀请你加入项目:<%= ma.project.name%>"><span class="shadowbox_news_user"><%=User.find(ma.forge_message_id).show_name %> </span>邀请你加入项目:<%= ma.project.name%></a></li>
<% elsif ma.forge_message_type == "Issue" && ma.status == 1 %>
<li><a href="<%=issue_path(:id => ma.forge_message.id) %>" target="_blank" title="<%=ma.forge_message.author.show_name %> <%= ma.forge_message.tracker_id == 5 ? "发布的周报:":"指派给你的问题:"%><%= ma.forge_message.subject%> 截止时间快到了!"><span class="shadowbox_news_user"><%=ma.forge_message.author.show_name %> </span><%= ma.forge_message.tracker_id == 5 ? "发布的周报:":"指派给你的问题:"%><%= ma.forge_message.subject%> 截止时间快到了!</a></li>
<% elsif ma.forge_message_type == "Issue" && ma.status != 1 %>
<li><a href="<%=issue_path(:id => ma.forge_message.id) %>" target="_blank" title="<%=ma.forge_message.author.show_name %> <%= ma.forge_message.tracker_id == 5 ? "发布了周报:":"指派了问题给你:"%><%= ma.forge_message.subject%>"><span class="shadowbox_news_user"><%=ma.forge_message.author.show_name %> </span><%= ma.forge_message.tracker_id == 5 ? "发布了周报:":"指派了问题给你:"%><%= ma.forge_message.subject%></a></li>
<% elsif ma.forge_message_type == "Journal" %>
<li><a href="<%=issue_path(:id => ma.forge_message.journalized_id) %>" target="_blank" title="<%=ma.forge_message.user.show_name %> 更新了问题状态:<%= ma.forge_message.journalized.subject%>"><span class="shadowbox_news_user"><%=ma.forge_message.user.show_name %> </span>更新了问题状态:<%= ma.forge_message.journalized.subject%></a></li>
<% elsif ma.forge_message_type == "Message" %>
<li><a href="<%=project_boards_path(ma.forge_message.project,:parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,:topic_id => ma.forge_message.id) %>" target="_blank" title="<%=ma.forge_message.author.show_name %> <%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %><%= ma.forge_message.subject%>"><span class="shadowbox_news_user"><%=ma.forge_message.author.show_name %> </span><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %><%= ma.forge_message.subject%></a></li>
<% elsif ma.forge_message_type == "News" %>
<li><a href="<%=news_path(ma.forge_message.id) %>" target="_blank" title="<%=ma.forge_message.author.show_name %> 发布了新闻:<%= ma.forge_message.title.html_safe%>"><span class="shadowbox_news_user"><%=ma.forge_message.author.show_name %> </span>发布了新闻:<%= ma.forge_message.title.html_safe%></a></li>
<% elsif ma.forge_message_type == "Comment" %>
<li><a href="<%=news_path(ma.forge_message.commented.id) %>" target="_blank" title="<%=ma.forge_message.author.show_name %> 评论了新闻:<%= ma.forge_message.commented.title%>"><span class="shadowbox_news_user"><%=ma.forge_message.author.show_name %> </span>评论了新闻:<%= ma.forge_message.commented.title%></a></li>
<% end %>
<% elsif ma.class == MemoMessage %>
<% if ma.memo_type == "Memo" %>
<li><a href="<%=forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id) %>" target="_blank" title="<%=ma.memo.author.show_name %> <%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %><%= ma.memo.parent_id.nil? ? ma.memo.subject : ma.memo.content.html_safe%>"><span class="shadowbox_news_user"><%=ma.memo.author.show_name %> </span><%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %><%= ma.memo.parent_id.nil? ? ma.memo.subject : ma.memo.content.html_safe%></a></li>
<% end %>
<% elsif ma.class == UserFeedbackMessage %>
<% if ma.journals_for_message_type == "JournalsForMessage" %>
<li><a href="<%=feedback_path(ma.journals_for_message.jour_id) %>" target="_blank" title="<%=ma.journals_for_message.user.show_name %> <%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %><%= ma.journals_for_message.notes.gsub("<p>","").gsub("</p>","").gsub("<br />","").html_safe%>"><span class="shadowbox_news_user"><%=ma.journals_for_message.user.show_name %> </span><%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %><%= ma.journals_for_message.notes.gsub("<p>","").gsub("</p>","").gsub("<br />","").html_safe%></a></li>
<% end %>
<% elsif ma.class == OrgMessage %>
<% if ma.message_type == 'ApplySubdomain' %>
<li><a href="<%=feedback_path(ma.journals_for_message.jour_id) %>" target="_blank" title="<%=ma.organization.name %> 申请子域名:<%= (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count == 0 || (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count > 0 && Secdomain.where("sub_type=2 and pid=?", ma.organization.id).first.subname != ma.content)) ? "同意申请":"申请已批准"%>"><span class="shadowbox_news_user"><%=ma.organization.name %> </span>申请子域名:<%= (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count == 0 || (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count > 0 && Secdomain.where("sub_type=2 and pid=?", ma.organization.id).first.subname != ma.content)) ? "同意申请":"申请已批准"%></a></li>
<% elsif ma.message_type == 'AgreeApplySubdomain' %>
<li><a href="javascript:void(0)" target="_blank" title="系统提示 管理员同意了您的子域名申请:<%= ma.content%>"><span class="shadowbox_news_user">系统提示 </span>管理员同意了您的子域名申请:<%= ma.content%></a></li>
<% end %>
<% elsif AtMessage === ma && ma.at_valid? %>
<% if ma.at_message_type == "Message" && !ma.at_message.course.nil? %>
<% href = course_boards_path(ma.at_message.course,:parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id, :topic_id => ma.at_message.id) %>
<% elsif ma.at_message_type == "Message" && !ma.at_message.project.nil? %>
<% href = project_boards_path(ma.at_message.project,:parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id, :topic_id => ma.at_message.id) %>
<% else %>
<% href = ma.url %>
<% end %>
<li><a href="<%=href %>" target="_blank" title="<%=ma.author.show_name %> 提到了你:<%= ma.subject.html_safe%>"><span class="shadowbox_news_user"><%=ma.author.show_name %> </span>提到了你:<%= ma.subject.html_safe%></a></li>
<% end %>
<% end %>
<!--<li><span class="shadowbox_news_user">教辅测试老师</span><a href="#" target="_blank">发布的作业作业标题0525发布布的作业作业标题0525发布布的作业作业标题0525发布普...</a></li>
<li><a href="#" target="_blank" class="shadowbox_news_user">教辅测试老师</a><a href="#" target="_blank">发布的作业作业标题0525发布布的作业作业标题0525发布布的作业作业标题0525发布普...</a></li>
<li><a href="#" target="_blank" class="shadowbox_news_user">教辅测试老师</a><a href="#" target="_blank">发布的作业作业标题0525发布布的作业作业标题0525发布布的作业作业标题0525发布普...</a></li>
<li><a href="#" target="_blank" class="shadowbox_news_user">教辅测试辅测试老辅测试老老师</a><a href="#" target="_blank">发布的作业作业标题0525发布布的作业作业标题0525发布布的作业作业标题0525发布普...</a></li>
<li><a href="#" target="_blank" class="shadowbox_news_user">教辅测试老师</a><a href="#" target="_blank"><span class="c_red">【课程通知】</span>发布的作业作业标题0525发布布的作业作业标题0525发布布的作业作业标题0525发布普...</a></li>
<li><a href="#" target="_blank" class="shadowbox_news_user">教辅测试老师</a><a href="#" target="_blank">发布的作业作业标题0525发布布的作业作业标题0525发布布的作业作业标题0525发布普...</a></li>
-->
</ul>
<%= link_to '查看全部', user_message_path(User.current), :class => "shadowbox_news_all", :target =>"_Blank" %>

View File

@ -173,7 +173,7 @@
</div><!--项目标签 end-->
<!--课程推荐-->
<%= render :partial => 'courses/recommendation', :locals => {:course => @course} %>
<div class="fontGrey5 mt10 ml10 mb10">访问计数 <%= @course.visits.to_i %></div>
<div class="fontGrey5 mt10 ml10 mb10">访问计数 <%= @course.visits.to_i %> 自2016年5月</div>
</div><!--LSide end-->
<div id="RSide" class="fl">

View File

@ -136,7 +136,7 @@
<%= render :partial => "organizations/org_left_subfield_list", :locals => {:organization => @organization} %>
</div>
<div class="fontGrey5 mt10 ml20">访问计数 <%= @organization.visits.to_i %></div>
<div class="fontGrey5 mt10 ml20">访问计数 <%= @organization.visits.to_i %> 自2016年5月</div>
</div>
<div class="homepageRight" style="margin-top:<%= (params[:show_homepage].nil? && User.current.logged?) ? '10px':'0px' %>;">
<%= render_flash_messages %>

View File

@ -146,7 +146,7 @@
<div class="cl"></div>
</div><!--项目标签 end-->
<div class="fontGrey5 mt10 ml10 mb10">访问计数 <%= @project.visits.to_i %></div>
<div class="fontGrey5 mt10 ml10 mb10">访问计数 <%= @project.visits.to_i %> 自2016年5月</div>
</div>
</div>

View File

@ -14,19 +14,8 @@
<%= heads_for_theme %>
<%= call_hook :view_layouts_base_html_head %>
<%= yield :header_tags -%>
<!-- MathJax的配置 -->
<script type="text/javascript"
src="/javascripts/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<!-- 配置 在生成的公式图片上去掉Math定义的右键菜单$$ $$ \( \) \[ \] 中的公式给予显示-->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
showMathMenu: false,
showMathMenuMSIE: false,
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
</head>
<body style="background-color: #fff">
<div class="navContainer">
<% is_current_user = User.current.logged? && User.current == @user%>
<% if User.current.logged? %>

View File

@ -284,7 +284,7 @@
<div class="cl"></div>
</div>
</div>
<div class="fontGrey5 mt10 ml20">访问计数 <%= @user.visits.to_i %></div>
<div class="fontGrey5 mt10 ml20">访问计数 <%= @user.visits.to_i %> 自2016年5月</div>
</div>
<div class="homepageRight">
<%= yield %>

View File

@ -1,11 +1,9 @@
<% if @res %>
$("#org_subfield_list").html("");
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>");
$("#sub_field_left_lists").html("");
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
$("#org_custom_admin").html("<%= escape_javascript(render :partial => 'organizations/org_custom_admin') %>");
//默认选中第一个
$("input[name='field_type']").get(0).checked=true;
$("#org_subfield_list").html("");
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)}) %>");
$("#sub_field_left_lists").html("");
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
$("#org_custom_admin").html("<%= escape_javascript(render :partial => 'organizations/org_custom_admin') %>");
<% end %>
$("#subfield_name").val("");
$("#sub_dir").val("");
$("#subfield_name").val("");
$("#sub_dir").val("");

View File

@ -1,11 +1,11 @@
<div class="por_header_top">
<div class="por_header_con" >
<%= image_tag(url_to_avatar(@organization), width:"67", height: "61", :id => 'nh_user_tx', :class => "por_logo fl ", :target => "_blank") %>
<%= image_tag(url_to_avatar(@organization), width:"51", height: "51", :id => 'nh_user_tx', :class => "por_logo fl mt1", :target => "_blank") %>
<% if User.current.logged? %>
<div class="navHomepageProfile" id="navHomepageProfile">
<ul>
<li class="homepageProfileMenuIcon fr mt15" id="homepageProfileMenuIcon">
<li class="homepageProfileMenuIcon fr mt5 " id="homepageProfileMenuIcon">
<%= link_to "<div class='user-img' id='user_avatar'>#{image_tag(url_to_avatar(User.current), :width =>"40", :height => "40", :class => "portraitRadius",:alt=>"头像", :id => "nh_user_logo")}</div>".html_safe, user_url_in_org(User.current.id) %>
<ul class="topnav_login_list none sn-f12" id="topnav_login_list" style="text-align:left;">
<li><%= link_to "修改资料", my_account_path, :class => "menuGrey"%></li>
@ -91,10 +91,11 @@
<% end %>
<% end %>
<% end %>
</ul>
<% if User.current.admin_of_org?(@organization) %>
<a href="<%= setting_organization_path(@organization) %>" class="link-black fr por_edit_index" target="_blank">配置</a>
<% end %>
</ul>
<div class="cl"></div>
</div><!--por_nav end-->

View File

@ -8,11 +8,11 @@
</h2>
<ul class="por_hotbar_left fl">
<% if acts.count > 1 %>
<% acts[1..2].each do |activity| %>
<% acts[1..3].each do |activity| %>
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
<% document = activity.org_act %>
<li>
<%= link_to "<span class='por_icons_hot fl'>热门推荐</span>#{document.title}".html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hot_title link-black', :target => "_blank", :title => document.title %>
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hot_title link-black', :target => "_blank", :title => document.title %>
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(document.created_at) %></span>
<%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %>
</p>
@ -25,7 +25,7 @@
<% title = message.parent_id.nil? ? message.subject : message.parent.subject %>
<% if message.board.org_subfield_id %>
<li>
<%= link_to "<span class='por_icons_hot fl'>热门推荐</span>#{title}".html_safe, board_message_url_in_org(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>
<%= link_to document.title, board_message_url_in_org(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(message.created_on) %></span>
<%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
</p>
@ -33,7 +33,7 @@
</li>
<% else %>
<li>
<%= link_to "<span class='por_icons_hot fl'>热门推荐</span>#{title}".html_safe, board_message_path(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>
<%= link_to document.title, board_message_path(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(message.created_on) %></span>
<%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
</p>
@ -44,7 +44,7 @@
<% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
<% news = activity.org_act %>
<li>
<%= link_to "<span class='por_icons_hot fl'>热门推荐</span>#{news.title}".html_safe, news_path(news), class: 'por_hot_title link-black', :target => "_blank", :title => news.title %>
<%= link_to news.title, news_path(news), class: 'por_hot_title link-black', :target => "_blank", :title => news.title %>
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(news.created_on) %></span>
<%= link_to news.author.show_name, user_path(news.author), :class => "por_hot_name link-blue", :target => "_blank" %>
</p>
@ -54,54 +54,6 @@
<% end %>
<% end %>
<% end %>
<% if acts.count > 3 %>
<% activity = acts[3] %>
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
<% document = activity.org_act %>
<li>
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hot_title link-black', :target => "_blank", :title => document.title %>
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(document.created_at) %></span>
<%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %>
</p>
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => document.id, :content=> document.content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
</li>
<% else activity.container_type == 'OrgSubfield' %>
<% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
<% message = activity.org_act %>
<% content = message.parent_id.nil? ? message.content : message.parent.content %>
<% title = message.parent_id.nil? ? message.subject : message.parent.subject %>
<% if message.board.org_subfield_id %>
<li>
<%= link_to title, board_message_url_in_org(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(message.created_on) %></span>
<%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
</p>
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
</li>
<% else %>
<li>
<%= link_to title, board_message_path(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(message.created_on) %></span>
<%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
</p>
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
</li>
<% end %>
<% end %>
<% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
<% news = activity.org_act %>
<li>
<%= link_to news.title, news_path(news), class: 'por_hot_title link-black', :target => "_blank", :title => news.title %>
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(news.created_on) %></span>
<%= link_to news.author.show_name, user_path(news.author), :class => "por_hot_name link-blue", :target => "_blank" %>
</p>
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => news.id, :content=> news.description, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
</li>
<% end %>
<% end %>
<% end %>
</ul>
<%# if acts.count > 3 %>
@ -114,9 +66,11 @@
<% else %>
<%= link_to image_tag("/files/uploads/image#{get_image_path_from_content(document.content)}", :width => "299", :height => "246"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
<% end %>
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :class => 'por_hot_title_r link-black', :target => "_blank", :title => document.title %>
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(document.created_at) %></span><%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %></p>
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => document.id, :content=> document.content, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %>
<div style="background: #f8fafb;">
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :class => 'por_hot_title_r link-black', :target => "_blank", :title => document.title %>
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(document.created_at) %></span><%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %></p>
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => document.id, :content=> document.content, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %>
</div>
</div>
<% else activity.container_type == 'OrgSubfield' %>
<!--发送过来的帖子-->

View File

@ -71,8 +71,8 @@
<% end %>
<% end %>
</div>
<% unless acts[1..5].nil? %>
<% acts[1..5].each do |activity| %>
<% unless acts[1..4].nil? %>
<% acts[1..4].each do |activity| %>
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
<% document = activity.org_act %>
<ul class="por_post_list">
@ -110,10 +110,10 @@
<% end %>
<% end %>
</div>
<% unless acts[6..19].nil? %>
<% unless acts[5..16].nil? %>
<div class="fl">
<ul class="por_post_right por_post_list">
<% 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 %>
<li><%= link_to "<span class='post_icons_grey fl'></span>#{document.title}".html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hidden_w270 link-black', :target => "_blank" %></li>

View File

@ -33,9 +33,6 @@
<li id="por_teachers_nav_1" class="por_teachers_hover" onclick="HoverLi(1);">
<a href="javascript:void(0);" class="por_teachers_type">名师风采</a>
</li>
<li id="por_teachers_nav_2" onclick="HoverLi(2);">
<a href="javascript:void(0);" class="por_teachers_type">学生英雄榜</a>
</li>
<!--<a href="javascript:void(0);" target="_blank" class="f12 fontGrey2 fr mt5">更多></a>-->
<div class="cl"></div>
</ul>
@ -65,29 +62,6 @@
<% end %>
</ul>
</div>
<div id="por_teachers_content_2" class="undis">
<ul class="por_teachers_li">
<% excellent_students.each do |student| %>
<li >
<%= 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" %>
<div class="por_teachers_txt fl mt5">
<%=link_to student.try(:realname) ? student.try(:realname) :student.try(:login), user_path(student), :class => "por_teachers_name link-black fl", :target => '_blank' %>
<p class="por_teachers_p fr" title="<%= student.my_workplace %>"><%= student.my_workplace %></p>
<div class="cl"></div>
<p class="por_teachers_span ">
<% unless student.my_blogs_count == 0 %>
<span class=" mr10">博客 <%= student.my_blogs_count %></span>
<% end %>
<% unless student.courses.count == 0 %>
<span class="mr10">课程 <%= student.courses.count %></span>
<% end %>
</p>
</div>
<div class="cl"></div>
</li>
<% end %>
</ul>
</div>
</div>
<script>

View File

@ -93,18 +93,33 @@
url: '<%= url_for(:controller => 'student_work', :action => 'search_course_students') %>'+'?homework='+<%=@homework.id %>,
type:'get'
});
<% if defined?(edit_mode) && edit_mode %>
<% pro = @homework.student_work_projects.where("user_id = ?",User.current.id).first.project_id.to_i %>
<% members = @homework.student_work_projects.where("project_id = ? and is_leader =?",pro,0) %>
<% members.each do |member| %>
var link = "<li id='choose_student_<%=member.user_id%>' onclick='delete_student(<%=member.user_id %>);'><%=member.user.show_name %>";
<% unless member.user.user_extensions.student_id == "" %>
link += "(<%=member.user.user_extensions.student_id %>)";
<% end %>
link += "</li>";
$("#choose_students_list").append(link);
<% end %>
<% end %>
var ids = $("#group_member_ids").val().split(',');
if (ids.length > 1){
for(var i=1; i<ids.length; i++) {
if($("#choose_student_"+ids[i]).length == 0) {
$.get(
'/student_work/get_user_infor',
{
user_id: ids[i]
},
function (data) {
if (data.valid) {
var link = "<li id='choose_student_"+data.id+"' onclick='delete_student("+data.id+");'>"+data.name;
if (data.student_id != "" ) {
link += "("+data.student_id+")";
}
link += "</li>";
$("#choose_students_list").append(link);
}
else
{
}
}
);
}
}
}
});
</script>
<% end %>

View File

@ -1,7 +1,8 @@
<div id="popbox02">
<div class="ni_con">
<p>
当前作品未进行评分,是否确定提交?
<%#A if work.teacher_score.nil? || work. %>
您当次评阅未对作品进行评分,分数将取上次的评分结果,若没有评分记录则不评分,是否确定提交?
</p>
<div class="ni_btn">
<a href="javascript:" class="tijiao" onclick="submit_teacher_score(<%=work.id %>);" style="margin-bottom: 20px;" >

View File

@ -2,12 +2,14 @@
<span class="uploadText">评分设置</span>
<div class="mt15">
<span class="f14 fontGrey3 mr10">迟交扣分</span>
<input type="text" name="late_penalty" id="late_penalty_num" placeholder="请输入0-50数值" class=" markInput" value="<%= homework.late_penalty%>" onkeyup="check_late_penalty('late_penalty_num')"/>
<input type="text" name="late_penalty" id="late_penalty_num" placeholder="0-50" class=" markInput" value="<%= homework.late_penalty%>" onkeyup="check_late_penalty('late_penalty_num')"/>
<span class="f12 c_red ml10">请输入0-50数值</span>
</div>
<% if homework.anonymous_comment == 0 %>
<div>
<div class="mt10">
<span class="f14 fontGrey3 mr10">缺评扣分</span>
<input type="text" name="absence_penalty" id="absence_penalty_num" placeholder="请输入0-50数值" class="markInput" value="<%= homework.homework_detail_manual.absence_penalty%>" onkeyup="check_late_penalty('absence_penalty_num')"/>
<input type="text" name="absence_penalty" id="absence_penalty_num" placeholder="0-50" class="markInput" value="<%= homework.homework_detail_manual.absence_penalty%>" onkeyup="check_late_penalty('absence_penalty_num')"/>
<span class="f12 c_red ml10">请输入0-50数值</span>
</div>
<% end %>
@ -55,11 +57,23 @@
</div>
<div>
<div class="courseSendSubmit">
<a href="javascript:void(0);" class="sendSourceText" onclick="$('#ajax-modal').find('form').submit();clickCanel();">确定</a>
<a href="javascript:void(0);" class="sendSourceText" onclick="set_score_rule_submit();">确定</a>
</div>
<div class="courseSendCancel">
<a href="javascript:void(0);" class="sendSourceText linkGrey6" onclick="hideModal();">取消</a>
</div>
</div>
<div class="cl"></div>
</div>
</div>
<script type="text/javascript">
function set_score_rule_submit() {
if($("#late_penalty_num").val() == ""){
$("#late_penalty_num").val("0");
}
if($("#absence_penalty_num").val() == ""){
$("#absence_penalty_num").val("0");
}
$('#ajax-modal').find('form').submit();
clickCanel();
}
</script>

View File

@ -4,14 +4,21 @@
<font class="f12 c_red">
(<%= @student_work_count%>人已交)
</font>
<% 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) %>
<span class="f12 c_red">您尚未提交作品</span>
<%=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?%>
<span class="f12 c_red">您已提交且不可再修改,因为截止日期已过</span>
<span class="f12 c_red">已提交且不可再修改,因为截止日期已过</span>
<% 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?%>
<span class="f12 c_red">您已提交,您还可以修改</span>
<% if @homework.homework_type == 3 %>
<span class="f12 c_red">组长已提交,组长还可修改</span>
<% else %>
<span class="f12 c_red">您已提交,您还可以修改</span>
<% end %>
<% end %>
</span>
<%if @is_teacher || @homework.homework_detail_manual.comment_status == 3 || @homework.is_open == 1%>

View File

@ -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("<div><p align='center' style='margin-top: 35px'>作品信息完整性校验中,请稍等...</p></div>");
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("<div><p align='center' style='margin-top: 35px'>作品信息完整性校验中,请稍等...</p></div>");
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("<div><p align='center' style='margin-top: 35px'>作品信息完整性校验中,请稍等...</p></div>");
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;
}

View File

@ -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("<div><p align='center' style='margin-top: 35px'>作品信息完整性校验中,请稍等...</p></div>");
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("<div><p align='center' style='margin-top: 35px'>作品信息完整性校验中,请稍等...</p></div>");
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("<div><p align='center' style='margin-top: 35px'>作品信息完整性校验中,请稍等...</p></div>");
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;
}

View File

@ -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})%>");
$("#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 %>");

View File

@ -7,7 +7,8 @@ $("#all_students_list").empty();
link += "</li>";
$("#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<lists.length; i++) {
@ -17,7 +18,7 @@ $("#all_students_list").empty();
str += ",";
}
}
}
}*/
<% if user.id.to_i != User.current.id.to_i && (@commit_student_ids.find{|e| e.to_i == user.id.to_i}).nil? && user.member_of_course?(@course) %>
if (str.indexOf(<%=user.id.to_s %>) < 0) {
$("#student_<%=user.id %>").one("click",function choose_student() {

View File

@ -14,13 +14,23 @@
<% course=Course.find(activity.jour_id) %>
<%= link_to course.name.to_s+" | 课程留言", course_feedback_path(course), :class => "newsBlue ml15" %>
</div>
<div class="homepagePostTitle break_word list_style upload_img">
<% 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 %>
</div>
<!--<div class="homepagePostTitle break_word list_style upload_img">
<%# 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 %>
</div>-->
<% 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} %>
<div class="cl"></div>
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
<div class="cl"></div>
<div class="homepagePostDate fl">
留言时间:<%= format_time(activity.created_on) %>
</div>

View File

@ -1,4 +1,4 @@
<% if AtMessage === ma && ma.at_valid? %>
<% if ma.class == AtMessage && ma.at_valid? %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.author), :width => "30", :height => "30"),user_path(ma.author) %></a></li>
<li class="homepageNewsPubType fl">

View File

@ -3,11 +3,14 @@
<div class="mt10">
<span class="f14 fontGrey3 mr5">每组最小人数:</span>
<input id="min_num" type="text" name="" class="markInput" value="<%=(edit_mode && homework.is_group_homework?) ? homework.homework_detail_group.min_num : 2 %>" />人
<span class="c_red undis" id="min_num_notice"></span>
</div>
<div class="mt10">
<span class="f14 fontGrey3 mr5">每组最大人数:</span>
<input id="max_num" type="text" name="" class="markInput" value="<%=(edit_mode && homework.is_group_homework?) ? homework.homework_detail_group.max_num : 10 %>" />人
<span class="c_red undis" id="max_num_notice"></span>
</div>
<p class="c_red undis" id="min_max_num_notice"></p>
<div class="mb10 mt10">
<label>
<input type="checkbox" class="mr5" name="base_on_project" value="<%=(edit_mode && homework.is_group_homework?) ? homework.homework_detail_group.base_on_project : 1 %>" id="base_on_project"/>

View File

@ -16,22 +16,26 @@
<% end %>
<% end %>
</div>
<% if is_activity.to_i == 1 %>
<div class="homepagePostTitle break_word list_style upload_img">
<% 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 %>
</div>
<% else %>
<%# if is_activity.to_i == 1 %>
<!--<div class="homepagePostTitle break_word list_style upload_img">
<%# 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 %>
</div>-->
<%# 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 %>
<div class="cl"></div>
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
<div class="cl"></div>
<%# end %>
<div class="homepagePostDate fl">
留言时间:<%= format_time(activity.created_on) %>
</div>

View File

@ -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?)) %>
<script type="text/javascript">
$(function(){
sd_create_editor_from_data(<%= jour.id%>, null, "100%", "<%=jour.class.to_s%>");

View File

@ -7,6 +7,15 @@
$(function(){
$("#RSide").removeAttr("id");
$("#Container").css("width","1000px");
<%if @homework.anonymous_comment == 0 && @homework.homework_detail_manual.comment_status != 1%>
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/new_student_work_alert') %>');
showModal('ajax-modal', '360px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","65%").css("left","60%").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("anonymos_work");
<% end%>
});
</script>
<!-- 模板1开始可以使用scripttype设置为text/html来存放模板片段并且用id标示 -->

View File

@ -4,8 +4,9 @@
<% if (!@message_alls.nil? && @message_alls.count >0) %>
<% if params[:type].nil? || params[:type] == "unviewed" %>
<div class="newsReadSetting">
有&nbsp;<span class="c_red"><%= unviewed_message(@user) %></span>&nbsp;条未读
<% unless (unviewed_message(@user) == 0 || User.current != @user) %>
<% count = unviewed_message(@user) %>
有&nbsp;<span class="c_red"><%= count %></span>&nbsp;条未读
<% unless (count == 0 || User.current != @user) %>
<a href="javascript:void(0);" class="ml15"><%= link_to "全部设为已读", user_message_path(User.current, :viewed => 'all') %></a>
<% end %>
</div>

View File

@ -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: "您还未到邮箱激活。如果您丢失帐户,电子邮件验证帮助我们的支持团队验证帐户的所有权,并允许您接收所有您要求的通知。"

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,6 @@
class AddSyllabusToCourse < ActiveRecord::Migration
def change
add_column :courses, :syllabus_id, :integer
add_index :courses, :syllabus_id
end
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -550,7 +550,7 @@ function check_late_penalty(id)
}
else
{
obj.val("0");
obj.val("");
}
}

View File

@ -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(max.length <= 0) {
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();
valid = false;
return false;
} else {
$("#max_num_notice").html("");
$("#max_num_notice").hide();
}
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();
return false;
} else {
$("#min_max_num_notice").html("");
$("#min_max_num_notice").hide();
}
if ($("#base_on_project").is(":checked")) {
base_on_project = 1;

View File

@ -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();
};
};
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();
}
}

View File

@ -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;}
/* 新版登录注册 */
.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;}

View File

@ -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;}

View File

@ -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;}

View File

@ -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;}

View File

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe SyllabusesController, :type => :controller do
end

View File

@ -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

View File

@ -0,0 +1,5 @@
require 'rails_helper'
RSpec.describe Syllabus, :type => :model do
pending "add some examples to (or delete) #{__FILE__}"
end