This commit is contained in:
Tim 2015-09-29 14:35:02 +08:00
commit 21408f3843
54 changed files with 1243 additions and 1138 deletions

View File

@ -50,11 +50,15 @@ class CommentsController < ApplicationController
# # <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ض<EFBFBD>̬<EFBFBD>ļ<EFBFBD>¼add end
flash[:notice] = l(:label_comment_added)
course_activity = CourseActivity.where("course_act_type='News' and course_act_id =#{@news.id}").first
course_activity.updated_at = Time.now
course_activity.save
if course_activity
course_activity.updated_at = Time.now
course_activity.save
end
user_activity = UserActivity.where("act_type='News' and act_id =#{@news.id}").first
user_activity.updated_at = Time.now
user_activity.save
if user_activity
user_activity.updated_at = Time.now
user_activity.save
end
end
if params[:user_activity_id]

View File

@ -11,11 +11,16 @@ class HomeworkCommonController < ApplicationController
before_filter :member_of_course, :only => [:index]
def index
homeworks = @course.homework_commons.order("created_at desc")
@new_homework = HomeworkCommon.new
@new_homework.homework_detail_manual = HomeworkDetailManual.new
@new_homework.course = @course
@page = params[:page] ? params[:page].to_i + 1 : 0
@homeworks = @course.homework_commons.order("created_at desc").limit(10).offset(@page * 10)
@is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,@course))
@is_student = User.current.logged? && (User.current.admin? || (User.current.member_of_course?(@course) && !@is_teacher))
@homeworks = paginateHelper homeworks,20
@is_new = params[:is_new]
respond_to do |format|
format.js
format.html
end
end
@ -32,7 +37,7 @@ class HomeworkCommonController < ApplicationController
def edit
@user = User.current
@is_in_course = params[:is_in_course]
@is_in_course = params[:is_in_course].to_i
respond_to do |format|
format.html{render :layout => 'new_base_user'}
end
@ -148,9 +153,9 @@ class HomeworkCommonController < ApplicationController
# 开启/关闭匿评消息通知
def send_message_anonymous_comment(homework, m_status )
# status 标记匿评状态 1为关闭 0为开启
course = @homework.course
course.student.each do |st|
@homework.course_messages << CourseMessage.new(:user_id => st.student_id, :course_id => course.id, :viewed => false, :status => m_status)
course = homework.course
course.members.each do |m|
@homework.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => m_status)
end
end
#提示

View File

@ -163,11 +163,15 @@ class MessagesController < ApplicationController
# @reply.reply_id = params[:id]
@topic.children << @reply
course_activity = CourseActivity.where("course_act_type='Message' and course_act_id =#{@topic.id}").first
course_activity.updated_at = Time.now
course_activity.save
if course_activity
course_activity.updated_at = Time.now
course_activity.save
end
user_activity = UserActivity.where("act_type='Message' and act_id =#{@topic.id}").first
user_activity.updated_at = Time.now
user_activity.save
if user_activity
user_activity.updated_at = Time.now
user_activity.save
end
#@topic.update_attribute(:updated_on, Time.now)
if !@reply.new_record?
if params[:asset_id]

View File

@ -173,6 +173,16 @@ class StudentWorkController < ApplicationController
end
if student_work.save
course_activity = CourseActivity.where("course_act_type='HomeworkCommon' and course_act_id =#{@homework.id}").first
if course_activity
course_activity.updated_at = Time.now
course_activity.save
end
user_activity = UserActivity.where("act_type='HomeworkCommon' and act_id =#{@homework.id}").first
if user_activity
user_activity.updated_at = Time.now
user_activity.save
end
respond_to do |format|
format.html {
flash[:notice] = l(:notice_successful_create)

View File

@ -346,6 +346,7 @@ class UsersController < ApplicationController
user_course_ids = @user.courses.empty? ? "(-1)" :"(" + @user.courses.visible.map{|course| course.id}.join(",") + ")"
@homework_commons = HomeworkCommon.where("course_id in #{user_course_ids}").order("created_at desc").limit(10).offset(@page * 10)
@is_teacher = User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)
@is_in_course = params[:is_in_course].to_i || 0
respond_to do |format|
format.js
format.html {render :layout => 'new_base_user'}
@ -508,7 +509,13 @@ class UsersController < ApplicationController
if homework.save
homework_detail_manual.save if homework_detail_manual
homework_detail_programing.save if homework_detail_programing
redirect_to user_homeworks_user_path(User.current.id)
if params[:is_in_course] == "1"
redirect_to homework_common_index_path(:course => homework.course_id)
else
redirect_to user_homeworks_user_path(User.current.id)
end
end
end
else

View File

@ -55,12 +55,16 @@ class WordsController < ApplicationController
@jfm = add_reply_adapter options
@save_succ = true if @jfm.errors.empty?
if @save_succ
course_activity = CourseActivity.where("course_act_type='JournalsForMessage' and course_act_id =#{parent_id}").first
course_activity.updated_at = Time.now
course_activity.save
user_activity = UserActivity.where("act_type='JournalsForMessage' and act_id =#{parent_id}").first
user_activity.updated_at = Time.now
user_activity.save
course_activity = CourseActivity.where("course_act_type='JournalsForMessage' and course_act_id =#{parent_id}").first
if course_activity
course_activity.updated_at = Time.now
course_activity.save
end
user_activity = UserActivity.where("act_type='JournalsForMessage' and act_id =#{parent_id}").first
if user_activity
user_activity.updated_at = Time.now
user_activity.save
end
end
respond_to do |format|
# format.html {

View File

@ -1,4 +1,7 @@
class CourseMessage < ActiveRecord::Base
# status说明 status在课程不同的类型区分不同的功能
# HomeworkCommonstatus
# nil发布了作业 1作业截止时间到了提醒2:开启匿评; 3关闭匿评 4匿评开始失败
attr_accessible :course_id, :course_message_id, :course_message_type, :user_id, :viewed, :content, :status
# 多态 虚拟关联

View File

@ -1,14 +1,7 @@
class ForgeMessage < ActiveRecord::Base
# 公共表中活动类型,命名规则:TYPE_OF_{类名}_ACT
TYPE_OF_ISSUE_ACT = "Issue"
TYPE_OF_MESSAGE_ACT = "Message"
TYPE_OF_ATTACHMENT_ACT = "Attachment"
TYPE_OF_DOCUMENT_ACT = "Document"
TYPE_OF_JOURNAL_ACT = "Journal"
TYPE_OF_WIKI_ACT = "Wiki"
TYPE_OF_NEWS_ACT = "News"
attr_accessible :forge_message_id, :forge_message_type, :project_id, :user_id, :viewed, :secret_key
# status在不同的类中作用不同
# Isseu satus nil发布了缺陷1缺陷计划完成日志到了提醒
attr_accessible :forge_message_id, :forge_message_type, :project_id, :user_id, :viewed, :secret_key, :status
belongs_to :forge_message ,:polymorphic => true
belongs_to :project

View File

@ -51,9 +51,9 @@ class Mailer < ActionMailer::Base
def send_mail_anonymous_comment_open(homework_common)
course = homework_common.course
recipients ||= []
course.student.each do |student|
user = User.find(student.student_id)
@subject = "#{l(:mail_homework)}#{homework_common.name} #{l(:mail_anonymous_comment_open)}"
course.members.each do |member|
user = User.find(member.user_id)
# @subject = "#{l(:mail_homework)}#{homework_common.name} #{l(:mail_anonymous_comment_open)}"
@token = Token.get_token_from_user(user, 'autologin')
@anonymous_comment_close_url = url_for(student_work_index_url(:homework => homework_common.id, :token => @token.value))
@anonymous_comment_close_name = homework_common.name
@ -62,16 +62,16 @@ class Mailer < ActionMailer::Base
recipients << user.mail
end
mail :to => recipients,
:subject => @subject
:subject => "[#{l(:mail_homework)}#{homework_common.name}] #{l(:mail_anonymous_comment_open)}"
end
# 作业匿评关闭
def send_mail_anonymous_comment_close(homework_common)
course = homework_common.course
recipients ||= []
course.student.each do |student|
user = User.find(student.student_id)
@subject = "#{l(:mail_homework)}#{homework_common.name} #{l(:mail_anonymous_comment_open)}"
course.members.each do |member|
user = User.find(member.user_id)
#@subject = "#{l(:mail_homework)}#{homework_common.name} #{l(:mail_anonymous_comment_open)}"
@token = Token.get_token_from_user(user, 'autologin')
@anonymous_comment_close_url = url_for(student_work_index_url(:homework => homework_common.id, :token => @token.value))
@anonymous_comment_close_name = homework_common.name
@ -80,7 +80,28 @@ class Mailer < ActionMailer::Base
recipients << user.mail
end
mail :to => recipients,
:subject => @subject
:subject => "[#{l(:mail_homework)}#{homework_common.name}] #{l(:mail_anonymous_comment_open)}"
end
# 匿评失败给老师发送邮件通知
def send_mail_anonymous_comment_fail(homework_common)
course = homework_common.course
recipients ||= []
# 只给该课程的老师发送邮件提醒
course.members.each do |member|
if m.user.allowed_to?(:as_teacher,course)
user = User.find(member.user_id)
#@subject = "[#{l(:mail_homework)} #{homework_common.name}] #{l(:mail_anonymous_comment_failed)}"
@token = Token.get_token_from_user(user, 'autologin')
@anonymous_comment_fail_url = url_for(student_work_index_url(:homework => homework_common.id, :token => @token.value))
@anonymous_comment_fail_name = homework_common.name
@author = homework_common.user
#收件人邮箱
recipients << user.mail
end
end
mail :to => recipients,
:subject => "[#{l(:mail_homework)} #{homework_common.name}] #{l(:mail_anonymous_comment_failed)}"
end
# author: alan
@ -247,6 +268,7 @@ class Mailer < ActionMailer::Base
has_content = [@issues,@issues_journals,@course_messages,@project_messages,@course_news,@course_news_comments,@project_news,@project_news_comments,@project_attachments,
@course_journal_messages,@user_journal_messages,@project_journal_messages,@forums,@memos,@attachments,@bids,@wiki_contents].any? {|o| !o.empty?}
mylogger.debug "Sent activity mail : #{user.mail} - #{has_content}"
#有内容才发,没有不发
mail :to => user.mail,:subject => subject if has_content
@ -263,7 +285,7 @@ class Mailer < ActionMailer::Base
#收件人邮箱
recipient = user.mail
mail :to => recipient,
:subject => "#{l(:mail_homework)}#{homework_common.name}#{l(:mail_homework_endtime)} "
:subject => @subject
end
# 公共讨论区发帖、回帖添加邮件发送信息

View File

@ -1,7 +1,6 @@
<script type="text/javascript">
$(function(){
$("#RSide").removeAttr("id");
$("#homework_page_right").css("min-height",$("#LSide").height()-30);
$("#Container").css("width","1000px");
});
</script>

View File

@ -1,4 +1,4 @@
<%= javascript_include_tag 'new_user' %>
<%= javascript_include_tag 'new_user','/assets/kindeditor/pasteimg','/assets/kindeditor/kindeditor' %>
<script>
function add_class(id){
if($("#"+id).hasClass("sortArrowActiveD")){
@ -58,11 +58,15 @@
if(!check_memo_name()){
return;
}
if($("textarea[name='memo[subject]']").val().trim() != "" && $("textarea[name='memo[content]']").val().trim() != "" ){
if($("textarea[name='memo[subject]']").val().trim() != "" && memo_content.html().trim() != "" ){
memo_content.sync();
$("#new_memo").submit();
}else if($("textarea[name='memo[subject]']").val().trim() == "" && $("textarea[name='memo[content]']").val().trim() != "" ){
}else if($("textarea[name='memo[subject]']").val().trim() == "" && memo_content.html().trim() == ""){
$("#error").html("主题和内容不能为空").show();
}
else if($("textarea[name='memo[subject]']").val().trim() == "" && memo_content.html().trim() != "" ){
$("#error").html("主题不能为空").show();
}else if($("textarea[name='memo[subject]']").val().trim() != "" && $("textarea[name='memo[content]']").val().trim() == ""){
}else if($("textarea[name='memo[subject]']").val().trim() != "" && memo_content.html().val().trim() == ""){
$("#error").html("内容不能为空").show();
}
}
@ -72,7 +76,7 @@
$("#error").html("主题 过长(最长为 50 个字符)").show();
return false;
}
if($("#memo_content").val().trim().length > 5000){
if(memo_content.html().trim().length > 5000){
$("#error").html("内容 过长(最长为 5000 个字符)").show();
return false;
}
@ -83,7 +87,7 @@
$('#create_memo_div').slideToggle();
$('#create_memo_btn').slideToggle();
$('#memo_subject').val('');
$('#memo_content').val('')
memo_content.html('')
$('#error').html('').hide();
}
</script>
@ -99,11 +103,7 @@
</script>
</div>
<div class="mt15">
<textarea type="text" name="memo[content]" id="memo_content" maxlength="5000" onfocus="$('#error').hide();" onmouseover="this.style.borderColor='#d9d9d9'" class="postDetailInput" placeholder="输入帖子内容" /></textarea>
<script>
var textarea = document.getElementById('memo_content');
autoTextarea(textarea);
</script>
<%= kindeditor_tag 'memo[content]','',:height=>300,:editor_id=>'memo_content'%>
</div>
<div class="mt10">
<!--<a href="javascript:void(0);" class="AnnexBtn fl mt3">上传附件</a>-->

View File

@ -1,129 +1,55 @@
<div class="project_r_h">
<h2 class="project_h2">
<%= l(:label_homework)%>
</h2>
</div>
<div class="talk_top">
<p class="fl">
<%= l(:label_totle)%>
<span><%= @obj_count%></span>
<%= l(:label_homework_count)%>
</p>
<%#= link_to( l(:label_course_homework_new), new_homework_common_path(:course => @course.id), :class => 'problem_new_btn fl c_dorange') if @is_teacher %>
<script type="text/javascript">
function reset_homework(){
$("#homework_name").val("");
$("#homework_end_time").val("");
$("#course_id").val($("#option_select").val());
$("#homework_attachments").html("<%= escape_javascript(render :partial => 'users/user_homework_attachment', :locals => { :container => HomeworkCommon.new,:has_program => true })%>");
homework_description_editor.html("");
$("#homework_editor").toggle();
}
$(function(){
$("#RSide").removeAttr("id");
$("#Container").css("width","1000px");
});
<% if @is_new%>
$(function(){
$("#homework_name").focus();
});
<%end%>
</script>
<style>
/*日历选择图*/
img.ui-datepicker-trigger {display:block;background:url(../images/public_icon.png) -31px 0 no-repeat;cursor: pointer;vertical-align: middle;width:16px;height:15px;float:left;margin: 7px;}
.description{display: none !important;}
.ispublic-label{display: none !important;}
.is_public_checkbox{display: none !important;}
.is_public{display: none !important;}
.link_file{ background:url(../images/pic_file.png) 0 5px no-repeat !important;}
#attachments_fields input.filename{ background:url(../images/pic_file.png) 0 5px no-repeat !important;padding-left:20px !important; color:#64bdd9 !important;}
.link_file_a{background:url(../images/pic_file.png) 0 5px no-repeat !important;padding-left:20px !important; color:#64bdd9 !important;}
</style>
<div class="homepageRight mt0 ml10">
<div class="homepageRightBanner mb10">
<div class="NewsBannerName">作业</div>
</div>
<div class="cl"></div>
<% if @is_teacher%>
<!-- 老师身份才可以发布作业 -->
<div class="HomeWork mb10">
<%= labelled_form_for @new_homework,:url => user_new_homework_users_path,:method => "post" do |f| %>
<div id="HomeWorkCon">
<%= render :partial => 'users/user_homework_form', :locals => { :homework => @new_homework,:f => f,:edit_mode => false,:select_course => false } %>
<input type="hidden" name="is_in_course" value="1"/>
</div>
<% end%>
</div><!----HomeWork end-->
<% end%>
<%= render :partial => 'users/user_homework_list', :locals => {:homework_commons => @homeworks,:page => 0,:is_in_course => 1,:course_id => @course.id} %>
</div>
<% @homeworks.each do |homework|%>
<div class="problem_main">
<%= link_to(image_tag(url_to_avatar(homework.user), :width => "42", :height => "42"), user_path(homework.user), :class => "problem_pic fl") %>
<div class="problem_txt fl mt5">
<%= link_to(homework.user.lastname+homework.user.firstname, user_path(homework.user),:class => 'problem_name fl',:target => "_blank") %>
<span class="fl"> <%= l(:label_user_create_project_homework) %></span>
<%= link_to(homework.name, student_work_index_path(:homework => homework.id), :class => 'problem_tit fl fb c_dblue',:target => "_blank") %>
<div class="cl mb5"></div>
<p class="fl ">
<%= l(:lebel_homework_commit)%>
( <%= link_to homework.student_works.count, student_work_index_path(:homework => homework.id), :class => 'c_red'%> )
</p>
<% if @is_teacher%>
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework,:is_in_course => 1),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "fr mr10 work_edit") %>
<%= link_to(l(:button_edit),edit_homework_common_path(homework,:is_in_course => 1), :class => "fr mr10 work_edit ml10") %>
<%= homework_anonymous_comment(homework)%>
<% elsif @is_student%>
<%= student_anonymous_comment homework %>
<%= student_new_homework homework %>
<% end %>
<div class="cl"></div>
<script>
$(function(){if($("#bid_description_<%= homework.id%>_content").height()>360){$("#bid_show_more_des_button<%= homework.id%>").show();}});
</script>
<div id="bid_description_<%= homework.id%>" class="news_description mt5">
<div id="bid_description_<%= homework.id%>_content" class="upload_img list_style">
<%= homework.description.html_safe %>
</div>
</div>
<div class="cl"></div>
<div class="cl"></div>
<div class="news_foot currentDd fr" id="bid_show_more_des_button<%= homework.id%>" onclick="bid_show_more_des(<%= homework.id%>);" style="cursor:pointer;display: none;">
[展开]
</div>
<div class="cl"></div>
<% if homework.homework_type == 2 && homework.homework_detail_programing%>
<% if @is_teacher%>
<table class="border_ce" cellpadding="0" cellspacing="0">
<tbody>
<tr class="<%= cycle("", "b_grey") %>">
<td class="td_tit">
输入
</td>
<td class="td_tit">
输出
</td>
</tr>
<% homework.homework_tests.each do |test|%>
<tr class="<%= cycle("", "b_grey") %>">
<td class="td_tit">
<%=test.input%>
</td>
<td class="td_tit">
<%= test.output%>
</td>
</tr>
<% end%>
</tbody>
</table>
<div class="cl"></div>
<% end%>
<div class="mt5">
<span class="tit_fb" style="width: auto;"> 开发语言:</span>
<div class="fl">
<%= homework.language_name%>
</div>
</div>
<div class="cl"></div>
<% end%>
<% unless homework.attachments.empty?%>
<div class="mt5">
<span class="tit_fb" style="width: auto;"> 附件:</span>
<div class="fl mb5">
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => homework.attachments} %>
</div>
</div>
<div class="cl"></div>
<% end%>
<!--div class="mt5">
<span class="tit_fb" style="width: auto;"> 扣分标准:</span>
<div class="fl mb5 c_red">
<%# if homework.homework_type == 1%>
<%#= scoring_rules homework.late_penalty,homework.id,@is_teacher,homework.homework_detail_manual.absence_penalty%>
<%# else%>
<%#= scoring_rules homework.late_penalty,homework.id,@is_teacher%>
<%# end%>
</div>
</div>
<div class="cl"></div-->
<span class="fl"><%= l(:label_end_time)%><%= homework.end_time%></span>
<% if betweentime(homework.end_time) < 0 %>
<span class='fr mr10 c_red '>
<%= l(:label_commit_limit)%>
</span>
<% else %>
<script type="text/javascript">
window.setInterval(function(){show_bid_dead_line(<%= homework.end_time.year%>,<%= homework.end_time.month%>,<%= homework.end_time.day + 1%>,"bid_deadline_<%= homework.id%>");},1000)
</script>
<div id="bid_deadline_<%= homework.id%>">
</div>
<% end %>
</div>
<div class="cl"></div>
</div>
<% end%>
<ul class="wlist">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
</ul>
<div class="cl"></div>

View File

@ -0,0 +1 @@
$("#user_show_more_homework").replaceWith("<%= escape_javascript( render :partial => 'users/user_homework_list',:locals => {:homework_commons => @homeworks, :page => @page, :is_in_course => 1,:course_id => @course.id} )%>");

View File

@ -17,7 +17,7 @@
<%= javascript_heads %>
<%= heads_for_theme %>
<%= call_hook :view_layouts_base_html_head %>
<%= stylesheet_link_tag 'public', 'leftside', 'jquery/jquery-ui-1.9.2','prettify', 'courses','header'%>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2','public', 'leftside','prettify', 'courses','header'%>
<%= javascript_include_tag "course","header","attachments",'prettify' %>
<!-- page specific tags -->
<%= yield :header_tags -%>
@ -93,7 +93,7 @@
<div class="subNav">
<%= link_to l(:label_homework), homework_common_index_path(:course => @course.id), :class => "f14 c_blue02"%>
<%= link_to "(#{@course.homework_commons.count})", homework_common_index_path(:course => @course.id), :class => "subnav_num c_orange"%>
<%= link_to( "+#{l(:label_course_homework_new)}", "javascript:void(0)", :class => 'subnav_green c_white', :onclick => "new_homework_alert();") if is_teacher %>
<%= link_to( "+#{l(:label_course_homework_new)}", homework_common_index_path(:course => @course.id,:is_new => 1), :class => 'subnav_green c_white') if is_teacher %>
</div>
<div class="subNav">
<%= link_to l(:label_course_news), course_news_index_path(@course), :class => "f14 c_blue02" %>

View File

@ -143,6 +143,9 @@
<div class="cl"></div>
<div class="homepageContentContainer">
<div class="homepageContent">
<div class="postRouteContainer mb10">
»&nbsp;<a href="<%= forums_path%>" class="postRouteLink">贴吧</a>&nbsp;»&nbsp;<a href="<%= forum_path(@forum)%>" title="<%=@forum.name %>" class="postRouteLink"><%= truncate(@forum.name,:lenght=>32)%></a>&nbsp;<%if @memo %> »&nbsp;<font class="fontGrey2"><%= @memo.subject%></font><% end %>
</div>
<div class="homepageLeft">
<div class="postDetailContainer">
<div class="fl mr10 pr"> <%= link_to image_tag(url_to_avatar(@forum.creator),:width=>75,:height => 75,:alt=>'贴吧图像' ),user_path( @forum.creator) %>

View File

@ -7,7 +7,7 @@
<div class="wmail_main" style="padding:20px 10px 0px;">
<h3 class="wmail_h2" style="color:#474646; "><%= l(:label_course_overview)%></h3>
<!-- 课程通知 -->
<% unless @course_news.first.nil? || @course_news_comments.first.nil? %>
<% if !@course_news.first.nil? || !@course_news_comments.first.nil? %>
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#474646; font-size:14px; margin-bottom:5px;" >
<%= l(:label_course_news) %>
@ -190,7 +190,7 @@
@project_attachments.first %>
<div class="wmail_main" style="padding:20px 10px 0px;">
<h3 class="wmail_h2" style="color:#474646; "><%= l(:label_project_overview_new)%></h3>
<% unless @issues.first.nil? || @issues_journals.first.nil? %>
<% if !@issues.first.nil? || !@issues_journals.first.nil? %>
<ul class="wmail_ul" style="margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
<%= l(:label_issue_tracking) %>
@ -302,7 +302,7 @@
<% end %>
<!--项目新闻-->
<% unless @project_news.first.nil? || @project_news_comments.first.nil? %>
<% if !@project_news.first.nil? || !@project_news_comments.first.nil? %>
<ul class="wmail_ul" style=" list-style-type:none;clear: both;margin-left:10px; border-bottom:1px dashed #cfcfcf; padding-bottom:15px; width:1020px; margin-bottom:15px;">
<span class="wmail_h4" style="color:#666; font-size:14px; margin-bottom:5px;" >
<%= l(:label_project_news) %>

View File

@ -0,0 +1,3 @@
<%= l(:mail_issue_content)%>
<%=link_to @author, user_url(@author) %>
<%=link_to @anonymous_comment_close_name, @anonymous_comment_close_url%>

View File

@ -0,0 +1,10 @@
<div class="mail_box" style="border:1px solid #c8c8c8; width:570px; height: auto; padding:15px; margin-top:10px; margin-bottom:10px;">
<ul style="list-style-type:none; margin:0; padding:0;">
<li style="list-style-type:none; margin:0; padding:0;"><span style="float: left;"><strong><%= l(:mail_issue_content)%></strong></span>
<span style="float: left; width: 526px">
<p><%=link_to @author, user_url(@author) %> 发布的作业:<%=link_to @anonymous_comment_fail_name, @anonymous_comment_fail_url%> <span style="color: red; padding-left: 10px;">匿评开启失败!</span></p>
</span>
</li>
</ul>
<div class="cl" style="margin-top: 30px; clear:both; overflow:hidden;"></div>
</div>

View File

@ -2,7 +2,7 @@
<% if User.current.logged? %>
<% if horizontal %>
<!-- 横排 -->
<div id="praise_tread_<%= obj.id %>" style="float:right;">
<div id="praise_tread_<%= obj.id %>" style="float:right; " >
<% @is_valuate = is_praise_or_tread(obj,user_id)%>
<% if @is_valuate.size > 0 %> <!-- 评价过 1代表赞 0代表踩 -->
<% @flag = @is_valuate.first.praise_or_tread %>

View File

@ -1,21 +1,24 @@
<%= javascript_include_tag 'new_user'%>
<%= javascript_include_tag 'new_user','/assets/kindeditor/pasteimg','/assets/kindeditor/kindeditor'%>
<script>
function check_and_submit(){
if($("textarea[name='memo[subject]']").val().trim() != "" && $("textarea[name='memo[content]']").val().trim() != "" ){
if($("textarea[name='memo[subject]']").val().trim() != "" && memo_content.html().trim() != "" ){
if($("textarea[name='memo[subject]']").val().trim().length > 50 ){
$("#error").html('主题不能超过50个字符').show();
return;
}
if($("textarea[name='memo[content]']").val().trim().length > 5000 ){
if(memo_content.html().trim().length > 5000 ){
$("#error").html('内容不能超过5000个字符').show();
return;
}
memo_content.sync();
$("#edit_memo").submit();
}else if($("textarea[name='memo[subject]']").val().trim() == "" && $("textarea[name='memo[content]']").val().trim() != "" ){
}else if($("textarea[name='memo[subject]']").val().trim() == "" && memo_content.html().trim() != "" ){
$("#error").html("主题不能为空").show();
}else if($("textarea[name='memo[subject]']").val().trim() != "" && $("textarea[name='memo[content]']").val().trim() == ""){
}else if($("textarea[name='memo[subject]']").val().trim() != "" && memo_content.html().trim() == ""){
$("#error").html("内容不能为空").show();
}else if($("textarea[name='memo[subject]']").val().trim() == "" && memo_content.html().trim() == ""){
$("#error").html("主题和内容不能为空").show();
}
}
</script>
@ -35,11 +38,7 @@
</script>
</div>
<div class="mt15">
<textarea type="text" id="memo_content" name="memo[content]" maxlength="5000" class="postDetailInput" placeholder="对应帖子内容" ><%= @memo.content.html_safe%></textarea>
<script>
var ta1 = document.getElementById('memo_content')
autoTextarea(ta1)
</script>
<%= kindeditor_tag 'memo[content]',@memo.content,:height=>300,:editor_id=>'memo_content'%>
</div>
<div class="mt10">
<!--<a href="javascript:void(0);" class="AnnexBtn fl mt3">对应附件名称</a>-->

View File

@ -58,14 +58,16 @@
</ul>
</div>
<%end%>
<div class="postDetailTitle"><a href="javascript:void(0);" class="f14 linkGrey4 fb" style="word-break: break-all; word-wrap:break-word;white-space:pre-wrap;">主题: <%= @memo.subject%></a></div>
<div class="postDetailTitle">
<a href="javascript:void(0);" class="f14 linkGrey4 fb" style="word-break: break-all; word-wrap:break-word;white-space:pre-wrap;">主题: <%= @memo.subject%></a>
<%= render :partial => "memos/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%>
<div class="cl"></div>
</div>
<div class="postDetailCreater"><a href="javascript:void(0);" class="linkBlue2" target="_blank"><%= @memo.author.name%></a></div>
<div class="postDetailDate mb5"><%= format_date( @memo.created_at)%></div>
<span id="praise_tread" style="float: right">
<%= render :partial => "memos/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%>
</span>
<div class="cl"></div>
<div class="memo-content" style="word-break: break-all; word-wrap:break-word;white-space:pre-wrap;margin-bottom: 0px !important;" >
<div class="memo-content" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
<%= @memo.content.html_safe%>
</div>
<div class="cl"></div>

View File

@ -29,79 +29,6 @@
</p>
</div>
</div>
<div class="repos_more"><a href="#" id="showgithelp" value="show_help" onclick ="showhelpAndScrollTo('repos_git_more'); " class="c_dblue lh23">展开Git操作指南</a></div>
<div id="repos_git_more">
<br>
<div class=" c_dark f14">
<p color="red">git 克隆和提交的用户名和密码为登录用户名和密码 </p>
<p>项目代码请设置好正确的编码方式utf-8否则中文会出现乱码。</p>
<p>通过cmd命令提示符进入代码对应文件夹的根目录
如果是首次提交代码,执行如下命令:</p>
</div>
<div class="repos_explain">
<p>git init</p>
<p>git add *</p>
<p>git commit -m "first commit"</p>
<p>git remote add origin
<%= @repos_url %>
</p>
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
<p>git push -u origin master</p>
</div>
<!--repos_explain end-->
<div class="c_dark f14">
<p>已经有本地库,还没有配置远程地址,打开命令行执行如下:</p>
</div>
<div class="repos_explain">
<p>git remote add origin <%= @repos_url %></p>
<p>git add .</p>
<p>git commit -m "first commit"</p>
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
<p>git push -u origin master</p>
</div>
<!--repos_explain end-->
<div class="c_dark f14">
<p>已有远程地址,创建一个远程分支,并切换到该分支,打开命令行执行如下:</p>
</div>
<div class="repos_explain">
<p>git clone <%= @repos_url %></p>
<p>git push</p>
<p>git checkout -b branch_name</p>
<p>git push origin branch_name</p>
</div>
<!--repos_explain end-->
<div class="c_dark f14">
<p>从网上获取别人的开源版本库转交到trustie网站上打开命令行执行如下</p>
</div>
<div class="repos_explain">
<p>git remote add trustie
<%= @repos_url %>
</p>
<p>git add .</p>
<p>git commit -m "first commit"</p>
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
<p>git push -u trustie branch:branch</p>
<p><a href="/users/646" class="c_orange">李海</a>提供</p>
</div>
</div>
<!-- 代码库显示 -->
<% if !@entries.nil? && authorize_for('repositories', 'browse') %>
<%= render :partial => 'dir_list' %>
<% end %>

View File

@ -46,28 +46,28 @@
<div class="homepagePostIntro break_word upload_img list_style" id="activity_description_<%= user_activity_id%>">
<%= activity.description.html_safe %>
</div>
<% if is_teacher%>
<div class="homepagePostSetting">
<%# if is_teacher%>
<!--<div class="homepagePostSetting">
<ul>
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li>
<%= link_to l(:button_edit),edit_homework_common_path(activity,:is_in_course => 0), :class => "postOptionLink"%>
<%#= link_to l(:button_edit),edit_homework_common_path(activity,:is_in_course => 0), :class => "postOptionLink"%>
</li>
<li>
<%= link_to(l(:label_bid_respond_delete), homework_common_path(activity,:is_in_course => 0),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
<%#= link_to(l(:label_bid_respond_delete), homework_common_path(activity,:is_in_course => 0),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
</li>
<li>
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(activity),:class => "postOptionLink", :remote => true) if activity.homework_detail_manual.comment_status == 1%>
<%#= link_to("匿评设置", start_evaluation_set_homework_common_path(activity),:class => "postOptionLink", :remote => true) if activity.homework_detail_manual.comment_status == 1%>
</li>
<li>
<%= homework_anonymous_comment activity %>
<%#= homework_anonymous_comment activity %>
</li>
</ul>
</li>
</ul>
</div>
<% end%>
<%# end%>-->
</div>
<div class="cl"></div>
</div>

View File

@ -62,7 +62,8 @@
<% end %>
<%= format_time(comment.created_on) %>
</div>
<div class="homepagePostReplyContent break_word list_style upload_img"><%= comment.notes.html_safe %></div>
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= user_activity_id %>">
<%= comment.notes.html_safe %></div>
<% fetch_user_leaveWord_reply(comment).each do |reply| unless fetch_user_leaveWord_reply(comment).nil? %>
<div class="recall">
<div class="homepagePostReplyPortrait">
@ -83,7 +84,8 @@
<% end %>
<%= format_time reply.created_on %>
</div>
<div class="homepagePostReplyContent break_word list_style upload_img"><%= reply.notes.html_safe %></div>
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= user_activity_id %>">
<%= reply.notes.html_safe %></div>
<div class="cl"></div>
</div>
<div class="cl"></div>

View File

@ -87,7 +87,7 @@
<% end %>
<%= format_time(reply.created_on) %>
</div>
<div class="homepagePostReplyContent break_word list_style upload_img">
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= user_activity_id %>">
<%= reply.content.html_safe %>
</div>
</div>

View File

@ -60,7 +60,8 @@
<% end %>
<%= format_time(comment.created_on) %>
</div>
<div class="homepagePostReplyContent break_word list_style upload_img"><%= comment.comments.html_safe %></div>
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= user_activity_id %>">
<%= comment.comments.html_safe %></div>
</div>
<div class="cl"></div>
</li>

View File

@ -97,7 +97,7 @@
<% end %>
<%= format_time(reply.created_on) %>
</div>
<div class="homepagePostReplyContent break_word list_style upload_img">
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= user_activity_id %>">
<% if reply.details.any? %>
<% details_to_strings(reply.details).each do |string| %>
<p><%= string %></p>
@ -133,17 +133,3 @@
</div>
</div>
<script type="text/javascript">
$(function(){
var images=$("div#activity_description_<%= user_activity_id %>").find("img");
if (images.length>0) {
for (var i=0; i<images.length; i++){
var image=$(images[i]);
var element=$("<a></a>").attr("href",image.attr('src'));
image.wrap(element);
}
}
$('#activity_description_<%= user_activity_id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});
});
</script>

View File

@ -74,7 +74,8 @@
<% end %>
<%= format_time(reply.created_on) %>
</div>
<div class="homepagePostReplyContent break_word list_style upload_img"><%= reply.content.html_safe %></div>
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= user_activity_id %>">
<%= reply.content.html_safe %></div>
</div>
<div class="cl"></div>
</li>

View File

@ -60,7 +60,7 @@
</div>
<div>
<a href="javascript:void(0);" onclick="$(this).parent().parent().submit();" class="db courseSendSubmit sendSourceText">确定</a>
<a href="javascript:void(0);" onclick="hideModal();" class="db courseSendCancel sendSourceText">取消</a>
<a href="javascript:void(0);" onclick="hideResource();" class="db courseSendCancel sendSourceText">取消</a>
</div>
<div class="cl"></div>
<% end %>

View File

@ -37,6 +37,26 @@
$(function() {
init_activity_KindEditor_data(<%= user_activity.id%>,null,"87%");
var description_images=$("div#activity_description_<%= user_activity.id %>").find("img");
if (description_images.length>0) {
for (var i=0; i<description_images.length; i++){
var image=$(description_images[i]);
var element=$("<a></a>").attr("href",image.attr('src'));
image.wrap(element);
}
}
$('#activity_description_<%= user_activity.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});
var reply_images=$("div#reply_content_<%= user_activity.id %>").find("img");
if (reply_images.length>0) {
for (var i=0; i<reply_images.length; i++){
var image=$(reply_images[i]);
var element=$("<a></a>").attr("href",image.attr('src'));
image.wrap(element);
}
}
$('#reply_content_<%= user_activity.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});
});
</script>
<% act= user_activity.act unless user_activity.act_type == "ProjectCreateInfo" %>

View File

@ -36,8 +36,7 @@
</div>
<div class="cl"></div>
<div class="mt10">
<div class="mt10 <%= defined?(select_course) ? 'none' : ''%>">
<%= select_tag :course_id, options_for_select(get_as_teacher_courses(User.current), homework.course_id), {:class => "InputBox w709",:value => "请选择发布作业的课程"} %>
</div>
<p id="homework_course_id_span" class="c_red mt5"></p>

View File

@ -58,10 +58,10 @@
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<li>
<%= link_to l(:button_edit),edit_homework_common_path(homework_common,:is_in_course => 0), :class => "postOptionLink"%>
<%= link_to l(:button_edit),edit_homework_common_path(homework_common,:is_in_course => is_in_course), :class => "postOptionLink"%>
</li>
<li>
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common,:is_in_course => 0),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common,:is_in_course => is_in_course),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
</li>
<li>
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(homework_common),:class => "postOptionLink", :remote => true) if homework_common.homework_detail_manual.comment_status == 1%>
@ -80,5 +80,11 @@
</div><!----HomeWork end-->
<% end%>
<% if homework_commons.count == 10%>
<%= link_to "加载更多",user_homeworks_user_path(User.current.id,:page => page),:id => "user_show_more_homework",:remote => "true",:class => "loadMore f_grey"%>
<% if is_in_course == 1%>
<!-- 在课程内 -->
<%= link_to "加载更多",homework_common_index_path(:course => course_id,:page => page,:is_in_course => is_in_course),:id => "user_show_more_homework",:remote => "true",:class => "loadMore f_grey"%>
<% else%>
<!-- 在个人主页 -->
<%= link_to "加载更多",user_homeworks_user_path(User.current.id,:page => page,:is_in_course => is_in_course),:id => "user_show_more_homework",:remote => "true",:class => "loadMore f_grey"%>
<% end%>
<% end%>

View File

@ -0,0 +1,338 @@
<% if ma.class == CourseMessage %>
<% if ma.course_message_type == "News" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"),user_path(ma.course_message.author) %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了通知:</span></li>
<li class="homepageNewsContent fl">
<%= link_to ma.course_message.title, {:controller => 'news', :action => 'show', :id => ma.course_message.id },
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></li>
<div style="display: none" class="message_title_red system_message_style">
<p><strong>标题:</strong><%= ma.course_message.title %></p>
<% unless ma.course_message.description.nil? %>
<div class="fl"><strong>内容:</strong></div>
<div class="ml36"><%= ma.course_message.description.html_safe %></div>
<% end %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "Comment" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了通知:</span></li>
<li class="homepageNewsContent fl">
<%= link_to ma.course_message.comments.html_safe, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></li>
<div style="display: none" class="message_title_red system_message_style">
<p><strong>标题:</strong><%= ma.course_message.commented.title %></p>
<% unless ma.course_message.comments.nil? %>
<div class="fl"><strong>内容:</strong></div>
<div class="ml36"><%= ma.course_message.comments.html_safe %></div>
<% end %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status.nil? %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了课程作业:</span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a></li>
<div style="display: none" class="message_title_red system_message_style">
<% if User.current.allowed_to?(:as_teacher,ma.course_message.course) %>
<p>
<%= User.current.lastname + User.current.firstname %>老师您好!
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业:
</p>
<p>课程名称:<%= ma.course_message.course.name %>
(<%= ma.course_message.course.term %>)</p>
<p>作业标题:<span style="color:Red"><%= ma.course_message.name %></span></p>
<p>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %>&nbsp;&nbsp;24点</span></p>
<p>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %>&nbsp;&nbsp;24点</span></p>
<p>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;24点</span></p>
<p>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></p>
<p>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></p>
<p>
您可以修改作业内容、评分规则、匿评过程等,谢谢!
</p>
<% else %>
<p><%= User.current.lastname + User.current.firstname %>同学你好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业:</p>
<p>课程名称:<%= ma.course_message.course.name %>
(<%= ma.course_message.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
<p>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %>&nbsp;&nbsp;24点</span></p>
<p>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;24点</span></p>
<p>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></p>
<p>
请抓紧时间提交自己的作品,谢谢!
</p>
<% end %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 1 %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布的作业:</span></li>
<li class="homepageHomeworkContent fl">
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %>
</li>
<div style="display: none" class="message_title_red system_message_style">
<% if !User.current.allowed_to?(:as_teacher,ma.course_message.course) %>
<p>
<%= User.current.lastname + User.current.firstname %>同学您好!
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师发布的作业截止日期快到了:
</p>
<p>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
<p>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %>@nbsp;&nbsp;24点</span></p>
<p>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>@nbsp;@nbsp;24点</span></p>
<p>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></p>
<p>请同学们抓紧时间提交自己的作品,谢谢!</p>
<% else %>
<p><%= User.current.lastname + User.current.firstname %>老师您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师发布的作业截止日期快到了:</p>
<p>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
<p>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %>@nbsp;@nbsp;24点</span></p>
<p>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %>@nbsp;@nbsp;24点</span></p>
<p>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>@nbsp;@nbsp;24点</span></p>
<p>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></p>
<p>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></p>
<p>您可以修改作业内容、评分规则、匿评过程等,谢谢!</p>
<% end %>
</div>
<li class="homepageHomeworkContentWarn fl"> &nbsp;&nbsp; 截止时间快到了!</li>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<!--作品开启匿评 待整合:时间紧-->
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 2 %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a>
</li>
<li class="homepageNewsPubType fl">
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">启动了作业匿评:</span>
</li>
<li class="homepageNewsContent fl">
<%= link_to "作业题目:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %>
</li>
<div style="display: none" class="message_title_red system_message_style">
<p>
<%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher,ma.course_message.course) ? '老师' : '同学' %>您好!
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师开启了匿评,作业详情如下:
</p>
<p>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
<p>
截止日期:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;24点</span>
</p>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<!--作品关闭匿评-->
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 3 %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
<li class="homepageNewsPubType fl">
<%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">关闭了作业匿评:</span></li>
<li class="homepageNewsContent fl">
<%= link_to "作业题目:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))"%>
</li>
<div style="display: none" class="message_title_red system_message_style">
<p>
<%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher,ma.course_message.course) ? '老师':'同学'%>您好!
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师关闭了匿评,作业详情如下:
</p>
<p>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 4 %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a>
</li>
<li class="homepageNewsPubType fl">
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">启动作业匿评失败</span>
</li>
<li class="homepageNewsContent fl">
<%= link_to "作业题目:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %>
</li>
<div style="display: none" class="message_title_red system_message_style">
<p>
<%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher, ma.course_message.course) ? '老师':'同学'%>您好!
<%= User.current.eql?(ma.course_message.user) ?"您":(ma.course_message.user.lastname + ma.course_message.user.firstname + "老师") %>启动作业匿评失败,作业详情如下:
</p>
<p>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "Poll" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了问卷:</span></li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to format_activity_title(" #{ma.course_message.polls_name.nil? ? "未命名问卷" : ma.course_message.polls_name}"), poll_path(ma.course_message.id),
:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a></li>
<div style="display: none" class="message_title_red system_message_style">
<%= ma.course_message.polls_name %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "Message" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.course_message.parent_id.nil? ? "发布了课程帖子:" : "评论了课程帖子:" %></span></li>
<% if ma.course_message.parent_id.nil? %>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.course_message.subject, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a></li>
<div style="display: none" class="message_title_red system_message_style" >
<p><strong>主题:</strong><%= ma.course_message.subject %></p>
<% unless ma.course_message.content.nil? %>
<div class="fl"><strong>内容:</strong></div>
<div class="ml36"><%= ma.course_message.content.html_safe %></div>
<% end %>
</div>
<% else %>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.course_message.content.html_safe, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a></li>
<div style="display: none" class="message_title_red system_message_style" >
<p><strong>主题:</strong><%= ma.course_message.subject %></p>
<% unless ma.course_message.content.nil? %>
<div class="fl"><strong>内容:</strong></div>
<div class="ml36"><%= ma.course_message.content.html_safe %></div>
<% end %>
</div>
<% end %>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "StudentWorksScore" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<% if ma.course_message.reviewer_role == 3 %>
<%=link_to image_tag(url_to_avatar(""), :width => "30", :height => "30") %>
<% else %>
<%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
<% end %>
</li>
<li class="homepageNewsPubType fl">
<% if ma.course_message.reviewer_role == 3 %>
<span class="newsBlue homepageNewsPublisher">匿名用户</span>
<% else %>
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
<% end %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
<%= ma.status == 0 ? "评阅了您的作品:" : "重新评阅了您的作品:" %>
</span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<% unless ma.content.nil? %>
<%= link_to ma.content.html_safe, student_work_index_path(:homework => ma.course_message.student_work.homework_common_id),
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a></li>
<div style="display: none" class="message_title_red system_message_style" >
<%= ma.content.html_safe %>
<p>课程名称:<%= ma.course.name %>(<%= ma.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%=ma.course_message.student_work.homework_common.name %></span></p>
</div>
<% end %>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "JournalsForMessage" %>
<% if ma.course_message.jour_type == 'Course' %>
<% if params[:type] != 'homework' %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a>
</li>
<li class="homepageNewsPubType fl"><%= link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">在课程中留言了:</span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.course_message.notes.html_safe, course_feedback_path(:id => ma.course_id),
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>
</li>
<div style="display: none" class="message_title_red system_message_style">
<%= ma.course_message.notes.html_safe %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% else %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a>
</li>
<li class="homepageNewsPubType fl">
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname +
"#{ma.course_message.user.members.where("course_id=?", ma.course.id).first.roles.first.name=='Student'?"同学":"老师"}",
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">回复了作品评论:</span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.course_message.notes, student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>
</li>
<div style="display: none" class="message_title_red system_message_style">
<div class="fl">回复内容:</div>
<div class="ml60"><%= ma.course_message.notes %></div>
<div class="fl">您的评论:</div>
<div class="ml60"><%= ma.course_message.jour.comment %></div>
<p>课程名称:<%= ma.course.name %>(<%= ma.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%=ma.course_message.jour.student_work.homework_common.name %></span></p>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>
<% end %>

View File

@ -0,0 +1,213 @@
<% if ma.class == ForgeMessage %>
<!--申请加入项目-->
<% if ma.forge_message_type == "AppliedProject" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user) %></a>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">申请加入项目:</span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.project, settings_project_path(:id => ma.project, :tab => "members"), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>
</li>
<div style="display: none" class="message_title_red system_message_style">
<%= ma.project %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<!--邀请加入项目-->
<% if ma.forge_message_type == "ProjectInvite" %>
<% inviter = User.find(ma.forge_message_id) %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(inviter), :width => "30", :height => "30"), user_path(inviter) %></a>
</li>
<li class="homepageNewsPubType fl">
<%=link_to inviter, user_path(inviter), :class => "newsBlue homepageNewsPublisher" %>
<span class='<%= ma.viewed == 0 ? 'homepageNewsTypeNotRead fl' : 'homepageNewsType fl' %>'>邀请你加入项目</span>
</li>
<% if ma.user.member_of?(ma.project) %>
<li class="homepageNewsContent fl">
<% else %>
<li class="homepageHomeworkContent fl">
<% end %>
<%= link_to ma.project, project_path(ma.project),
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %>
</li>
<div style="display: none" class="message_title_red system_message_style">
<%= ma.project %>
</div>
<% unless User.current.member_of?(ma.project) %>
<li class="homepageHomeworkContentWarn fl">
<%=link_to "同意加入", {:controller => 'projects', :action => 'member', :id => ma.project_id, :message_id =>ma.id, :key => ma.secret_key},
:value => ma.secret_key,
:class => "green_btn_cir ml10",
:style => "color:#fff" %>
</li>
<% end %>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.forge_message_type == "Issue" %>
<% if ma.status == 1%>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %></a>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>"><%= ma.forge_message.tracker_id == 5 ? "发布的周报:":"指派给你的问题:"%></span>
</li>
<li class="homepageHomeworkContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>
</li>
<div style="display: none" class="message_title_red system_message_style">
<p><strong>主题:</strong><%= ma.forge_message.subject %></p>
<% unless ma.forge_message.description.nil? || ma.forge_message.description == "" %>
<div class="fl"><strong>描述:</strong></div>
<div class="ml36"><%= ma.forge_message.description.html_safe %></div>
<% end %>
</div>
<li class="homepageHomeworkContentWarn fl"> &nbsp;&nbsp; 截止时间快到了!</li>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% else %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %></a>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>"><%= ma.forge_message.tracker_id == 5 ? "发布了周报:":"指派了问题给你:"%></span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>
</li>
<div style="display: none" class="message_title_red system_message_style">
<p><strong>主题:</strong><%= ma.forge_message.subject %></p>
<% unless ma.forge_message.description.nil? || ma.forge_message.description == "" %>
<div class="fl"><strong>描述:</strong></div>
<div class="ml36"><%= ma.forge_message.description.html_safe %></div>
<% end %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>
<% if ma.forge_message_type == "Journal" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user) %></a>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
更新了问题状态:</span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.forge_message.journalized.subject,
issue_path(:id => ma.forge_message.journalized_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>
</li>
<div style="display: none" class="message_title_red system_message_style" >
<p><strong>问题标题:</strong><%= ma.forge_message.journalized.subject %></p>
<div class="fl"><strong>更新内容:</strong></div>
<div class="ml60"><%= get_issue_des_update(ma.forge_message).html_safe %></div>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.forge_message_type == "Message" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %></span></li>
<% if ma.forge_message.parent_id.nil? %>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.forge_message.subject, 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), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a></li>
<div style="display: none" class="message_title_red system_message_style">
<p><strong>主题:</strong><%= ma.forge_message.subject %></p>
<% unless ma.forge_message.content.nil? %>
<div class="fl"><strong>内容:</strong></div>
<div class="ml36"><%= ma.forge_message.content.html_safe %></div>
<% end %>
</div>
<% else %>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.forge_message.subject, 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), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a></li>
<div style="display: none" class="message_title_red system_message_style">
<p><strong>帖子主题:</strong><%= ma.forge_message.subject %></p>
<% unless ma.forge_message.content.nil? %>
<div class="fl"><strong>评论内容:</strong></div>
<div class="ml60"><%= ma.forge_message.content.html_safe %></div>
<% end %>
</div>
<% end %>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.forge_message_type == "News" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %></a>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了新闻:</span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ("#{ma.forge_message.title.html_safe}"), {:controller => 'news', :action => 'show', :id => ma.forge_message.id},
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>
</li>
<div style="display: none" class="message_title_red system_message_style">
<p><strong>标题:</strong><%= ma.forge_message.title %></p>
<% unless ma.forge_message.description.nil? %>
<div class="fl"><strong>内容:</strong></div>
<div class="ml36"><%= ma.forge_message.description.html_safe %></div>
<% end %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.forge_message_type == "Comment" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了新闻:</span></li>
<li class="homepageNewsContent fl">
<%= link_to "#{ma.forge_message.comments.html_safe}",
{:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %>
</li>
<div style="display: none" class="message_title_red system_message_style">
<p><strong>新闻标题:</strong><%= ma.forge_message.commented.title %></p>
<div class="fl"><strong>评论内容:</strong></div>
<div class="ml60"><%= ma.forge_message.comments.html_safe %></div>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>

View File

@ -0,0 +1,41 @@
<% if ma.class == MemoMessage %>
<% if ma.memo_type == "Memo" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.memo.author), :width => "30", :height => "30"), user_path(ma.memo.author) %></a>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.memo.author, user_path(ma.memo.author), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>" ><%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %></span>
</li>
<% if ma.memo.parent_id.nil? %>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.memo.subject, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>
</li>
<div style="display: none" class="message_title_red system_message_style">
<p><strong>标题:</strong><%= ma.memo.subject %></p>
<% unless ma.memo.content.nil? %>
<div class="fl"><strong>内容:</strong></div>
<div class="ml36"><%= ma.memo.content.html_safe %></div>
<% end %>
</div>
<% else %>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.memo.content.html_safe, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>
</li>
<div style="display: none" class="message_title_red system_message_style">
<p><strong>标题:</strong><%= ma.memo.subject %></p>
<% unless ma.memo.content.nil? %>
<div class="fl"><strong>内容:</strong></div>
<div class="ml36"><%= ma.memo.content.html_safe %></div>
<% end %>
</div>
<% end %>
<li class="homepageNewsTime fl"><%= time_tag(ma.memo.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>

View File

@ -0,0 +1,30 @@
<% if ma.class == UserFeedbackMessage %>
<% if ma.journals_for_message_type == "JournalsForMessage" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.journals_for_message.user), :width => "30", :height => "30"), user_path(ma.journals_for_message.user) %></a>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.journals_for_message.user, user_path(ma.journals_for_message.user), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %></span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.journals_for_message.notes.html_safe, feedback_path(ma.journals_for_message.jour_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>
</li>
<div style="display: none" class="message_title_red system_message_style" >
<% if ma.journals_for_message.reply_id == 0 %>
<%= ma.journals_for_message.notes.html_safe %>
<% else %>
<div class="fl"><strong>您的留言:</strong></div>
<div class="ml60"><%= JournalsForMessage.find(ma.journals_for_message.m_reply_id).notes.html_safe %></div>
<div class="fl"><strong>回复内容:</strong></div>
<div class="ml60"><%= ma.journals_for_message.notes.html_safe %></div>
<% end %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.journals_for_message.created_on).html_safe %> </li>
</ul>
<% end %>
<% end %>

View File

@ -12,5 +12,5 @@
'<div class="cl"></div>')
<% end %>
hideModal();
hideResource();
<% end %>

View File

@ -26,4 +26,4 @@
</div><!----HomeWork end-->
<% end%>
<%= render :partial => 'users/user_homework_list', :locals => {:homework_commons => @homework_commons,:page => 0} %>
<%= render :partial => 'users/user_homework_list', :locals => {:homework_commons => @homework_commons,:page => 0,:is_in_course => 0} %>

View File

@ -1,2 +1,2 @@
$("#user_show_more_homework").replaceWith("<%= escape_javascript( render :partial => 'users/user_homework_list',:locals => {:homework_commons => @homework_commons, :page => @page} )%>");
$("#user_show_more_homework").replaceWith("<%= escape_javascript( render :partial => 'users/user_homework_list',:locals => {:homework_commons => @homework_commons, :page => @page,:is_in_course => 0} )%>");

View File

@ -3,6 +3,6 @@ showModal('ajax-modal', '730px');
$('#ajax-modal').css('height','500px').css("width","730px");
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<div class='resourcePopupClose mt5 mr-5'>" +
"<a href='javascript:void(0)' class='resourceClose' onclick='hideModal();'></a></div>");
$('#ajax-modal').parent().css("top","30%").css("left","").css("position","fixed").css("padding-left","16px").css("padding-bottom","16px").css("padding-right","16px");
"<a href='javascript:void(0)' class='resourceClose' onclick='hideResource();'></a></div>");
$('#ajax-modal').parent().css("top","30%").css("left","").css("position","fixed");
$('#ajax-modal').parent().addClass("popbox").addClass("referenceResourcesPopup");

View File

@ -31,662 +31,73 @@
</ul>
</div>
<div class="resources mt10" id="users_setting">
<div>
<% if @message_alls.count >0 || @user_system_messages.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) %>
<a href="javascript:void(0);" class="ml15"><%= link_to "全部设为已读", user_message_path(User.current, :viewed => 'all') %></a>
<% end %>
</div>
<% end %>
<%# 系统消息 %>
<% if params[:type] != 'system_messages' %>
<% @user_system_messages.each do |usm| %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag("/images/logo.png", width: "30px", height: "30px", class: "mt3") %></div></a>
</li>
<li class="homepageNewsPubType fl">
<span class="newsBlue homepageNewsPublisher">Trustie平台</span><span class="homepageNewsType fl">发布新消息:</span>
</li>
<span style="color: red;float: left">【系统消息】</span>
<li class="homepageSystenMessageContent fl">
<div>
<% if @message_alls.count >0 || @user_system_messages.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) %>
<a href="javascript:void(0);" class="ml15"><%= link_to "全部设为已读", user_message_path(User.current, :viewed => 'all') %></a>
<% end %>
</div>
<% end %>
<%# 系统消息 %>
<% if params[:type] != 'system_messages' %>
<% @user_system_messages.each do |usm| %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><div class="navHomepageLogo fl"><%= image_tag("/images/logo.png", width: "30px", height: "30px", class: "mt3") %></div></a>
</li>
<li class="homepageNewsPubType fl">
<span class="newsBlue homepageNewsPublisher">Trustie平台</span><span class="homepageNewsType fl">发布新消息:</span>
</li>
<span style="color: red;float: left">【系统消息】</span>
<li class="homepageSystenMessageContent fl">
<%= link_to usm.subject.blank? ? (usm.content.nil? ? usm.description.html_safe : usm.content.html_safe) : usm.subject, user_system_messages_path(User.current),
:id => "content_link_#{usm.id}",
:onmouseover =>"message_titile_show($(this),event);",
:onmouseout => "message_titile_hide($(this));"
%>
</li>
<div style="display:none;" class="message_title_red system_message_style">
<% unless usm.subject.blank? %>
<p><strong>标题:</strong><%= usm.subject %></p>
<% end %>
<% if (!usm.description.blank?) || (!usm.content.blank?) %>
<div class="fl"><strong>内容:</strong></div><div class="ml36"><%= usm.description.nil? ? usm.content.html_safe : usm.description.html_safe %></div>
<% end %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(usm.created_at).html_safe %> </li>
<%= link_to usm.subject.blank? ? (usm.content.nil? ? usm.description.html_safe : usm.content.html_safe) : usm.subject, user_system_messages_path(User.current),
:id => "content_link_#{usm.id}",
:onmouseover =>"message_titile_show($(this),event);",
:onmouseout => "message_titile_hide($(this));"
%>
</li>
<div style="display:none;" class="message_title_red system_message_style">
<% unless usm.subject.blank? %>
<p><strong>标题:</strong><%= usm.subject %></p>
<% end %>
<% if (!usm.description.blank?) || (!usm.content.blank?) %>
<div class="fl"><strong>内容:</strong></div><div class="ml36"><%= usm.description.nil? ? usm.content.html_safe : usm.description.html_safe %></div>
<% end %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(usm.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>
<!--总消息列表-->
<% unless @message_alls.nil? %>
<% @message_alls.each do |ma| %>
<%# 课程消息 %>
<%= render :partial => 'users/user_message_course', :locals => {:ma => ma} %>
<!--项目消息-->
<%= render :partial => 'users/user_message_forge', :locals => {:ma => ma} %>
<!--公共贴吧-->
<%= render :partial => 'users/user_message_forum', :locals => {:ma => ma} %>
<!--用户留言-->
<%= render :partial => 'users/user_message_userfeedaback', :locals => {:ma => ma} %>
<% end %>
<ul class="wlist" style=" border:none; padding-top: 15px;">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
</ul>
<% end %>
<!--项目消息-->
<% else %>
<div class="flash notice">您目前还没有相关消息!</div>
<% end %>
<!--总消息列表-->
<% unless @message_alls.nil? %>
<% @message_alls.each do |ma| %>
<%# 课程消息 %>
<% if ma.class == CourseMessage %>
<% if ma.course_message_type == "News" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"),user_path(ma.course_message.author) %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了通知:</span></li>
<li class="homepageNewsContent fl">
<%= link_to ma.course_message.title, {:controller => 'news', :action => 'show', :id => ma.course_message.id },
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></li>
<div style="display: none" class="message_title_red system_message_style">
<p><strong>标题:</strong><%= ma.course_message.title %></p>
<% unless ma.course_message.description.nil? %>
<div class="fl"><strong>内容:</strong></div>
<div class="ml36"><%= ma.course_message.description.html_safe %></div>
<% end %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "Comment" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了通知:</span></li>
<li class="homepageNewsContent fl">
<%= link_to ma.course_message.comments.html_safe, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></li>
<div style="display: none" class="message_title_red system_message_style">
<p><strong>标题:</strong><%= ma.course_message.commented.title %></p>
<% unless ma.course_message.comments.nil? %>
<div class="fl"><strong>内容:</strong></div>
<div class="ml36"><%= ma.course_message.comments.html_safe %></div>
<% end %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status.nil? %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师", user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了课程作业:</span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a></li>
<div style="display: none" class="message_title_red system_message_style">
<% if User.current.allowed_to?(:as_teacher,ma.course_message.course) %>
<p>
<%= User.current.lastname + User.current.firstname %>老师您好!
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业:
</p>
<p>课程名称:<%= ma.course_message.course.name %>
(<%= ma.course_message.course.term %>)</p>
<p>作业标题:<span style="color:Red"><%= ma.course_message.name %></span></p>
<p>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %>&nbsp;&nbsp;24点</span></p>
<p>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %>&nbsp;&nbsp;24点</span></p>
<p>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;24点</span></p>
<p>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></p>
<p>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></p>
<p>
您可以修改作业内容、评分规则、匿评过程等,谢谢!
</p>
<% else %>
<p><%= User.current.lastname + User.current.firstname %>同学你好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师刚刚发布了一个作业:</p>
<p>课程名称:<%= ma.course_message.course.name %>
(<%= ma.course_message.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
<p>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %>&nbsp;&nbsp;24点</span></p>
<p>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;24点</span></p>
<p>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></p>
<p>
请抓紧时间提交自己的作品,谢谢!
</p>
<% end %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 1 %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布的作业:</span></li>
<li class="homepageHomeworkContent fl">
<%= link_to ma.course_message.name, student_work_index_path(:homework => ma.course_message.id),
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %>
</li>
<div style="display: none" class="message_title_red system_message_style">
<% if User.current.members.where("course_id = ?", ma.course_message.course.id).first.roles.first.name == 'Student' %>
<p>
<%= User.current.lastname + User.current.firstname %>同学您好!
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师发布的作业截止日期快到了:
</p>
<p>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
<p>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %>@nbsp;&nbsp;24点</span></p>
<p>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>@nbsp;@nbsp;24点</span></p>
<p>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></p>
<p>请同学们抓紧时间提交自己的作品,谢谢!</p>
<% else %>
<p><%= User.current.lastname + User.current.firstname %>老师您好!<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师发布的作业截止日期快到了:</p>
<p>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
<p>提交截止:<span style="color:Red;"><%= ma.course_message.end_time %>@nbsp;@nbsp;24点</span></p>
<p>匿评开始:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_start %>@nbsp;@nbsp;24点</span></p>
<p>匿评关闭:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>@nbsp;@nbsp;24点</span></p>
<p>迟交扣分:<span style="color:Red;"><%= ma.course_message.late_penalty %>分</span></p>
<p>缺评扣分:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.absence_penalty %>分</span></p>
<p>您可以修改作业内容、评分规则、匿评过程等,谢谢!</p>
<% end %>
</div>
<li class="homepageHomeworkContentWarn fl"> &nbsp;&nbsp; 截止时间快到了!</li>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<!--作品开启匿评 待整合:时间紧-->
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 2 %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a>
</li>
<li class="homepageNewsPubType fl">
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">启动了作业匿评:</span>
</li>
<li class="homepageNewsContent fl">
<%= link_to "作业题目:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %>
</li>
<div style="display: none" class="message_title_red system_message_style">
<p>
<%= User.current.lastname + User.current.firstname %><%= User.current.members.where("course_id=?", ma.course.id).first.roles.first.name == 'Student' ? '同学' : '老师' %>您好!
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师开启了匿评,作业详情如下:
</p>
<p>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
<p>
截止日期:<span style="color:Red;"><%= ma.course_message.homework_detail_manual.evaluation_end %>&nbsp;&nbsp;24点</span>
</p>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<!--作品关闭匿评-->
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 3 %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
<li class="homepageNewsPubType fl">
<%=link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">关闭了作业匿评:</span></li>
<li class="homepageNewsContent fl">
<%= link_to "作业题目:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))"%>
</li>
<div style="display: none" class="message_title_red system_message_style">
<p>
<%= User.current.lastname + User.current.firstname %><%= User.current.members.where("course_id=?", ma.course.id).first.roles.first.name == 'Student' ? '同学':'老师'%>您好!
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师关闭了匿评,作业详情如下:
</p>
<p>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "HomeworkCommon" && ma.status == 4 %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a>
</li>
<li class="homepageNewsPubType fl">
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">启动作业匿评失败</span>
</li>
<li class="homepageNewsContent fl">
<%= link_to "作业题目:" + ma.course_message.name, student_work_index_path(:homework => ma.course_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %>
</li>
<div style="display: none" class="message_title_red system_message_style">
<p>
<%= User.current.lastname + User.current.firstname %><%= User.current.allowed_to?(:as_teacher, ma.course_message.course) ? '老师':'同学'%>您好!
<%= ma.course_message.user.lastname + ma.course_message.user.firstname %>老师启动作业匿评失败,作业详情如下:
</p>
<p>课程名称:<%= ma.course_message.course.name %>(<%= ma.course_message.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%= ma.course_message.name %></span></p>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "Poll" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了问卷:</span></li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to format_activity_title(" #{ma.course_message.polls_name.nil? ? "未命名问卷" : ma.course_message.polls_name}"), poll_path(ma.course_message.id),
:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a></li>
<div style="display: none" class="message_title_red system_message_style">
<%= ma.course_message.polls_name %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "Message" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %><span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.course_message.parent_id.nil? ? "发布了课程帖子:" : "评论了课程帖子:" %></span></li>
<% if ma.course_message.parent_id.nil? %>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.course_message.subject, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a></li>
<div style="display: none" class="message_title_red system_message_style" >
<p><strong>主题:</strong><%= ma.course_message.subject %></p>
<% unless ma.course_message.content.nil? %>
<div class="fl"><strong>内容:</strong></div>
<div class="ml36"><%= ma.course_message.content.html_safe %></div>
<% end %>
</div>
<% else %>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.course_message.content.html_safe, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a></li>
<div style="display: none" class="message_title_red system_message_style" >
<p><strong>主题:</strong><%= ma.course_message.subject %></p>
<% unless ma.course_message.content.nil? %>
<div class="fl"><strong>内容:</strong></div>
<div class="ml36"><%= ma.course_message.content.html_safe %></div>
<% end %>
</div>
<% end %>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "StudentWorksScore" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<% if ma.course_message.reviewer_role == 3 %>
<%=link_to image_tag(url_to_avatar(""), :width => "30", :height => "30") %>
<% else %>
<%=link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %>
<% end %>
</li>
<li class="homepageNewsPubType fl">
<% if ma.course_message.reviewer_role == 3 %>
<span class="newsBlue homepageNewsPublisher">匿名用户</span>
<% else %>
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname + "老师",
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
<% end %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
<%= ma.status == 0 ? "评阅了您的作品:" : "重新评阅了您的作品:" %>
</span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<% unless ma.content.nil? %>
<%= link_to ma.content.html_safe, student_work_index_path(:homework => ma.course_message.student_work.homework_common_id),
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a></li>
<div style="display: none" class="message_title_red system_message_style" >
<%= ma.content.html_safe %>
<p>课程名称:<%= ma.course.name %>(<%= ma.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%=ma.course_message.student_work.homework_common.name %></span></p>
</div>
<% end %>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.course_message_type == "JournalsForMessage" %>
<% if ma.course_message.jour_type == 'Course' %>
<% if params[:type] != 'homework' %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a>
</li>
<li class="homepageNewsPubType fl"><%= link_to ma.course_message.user, user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">在课程中留言了:</span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.course_message.notes.html_safe, course_feedback_path(:id => ma.course_id),
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>
</li>
<div style="display: none" class="message_title_red system_message_style">
<%= ma.course_message.notes.html_safe %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% else %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%= link_to image_tag(url_to_avatar(ma.course_message.user), :width => "30", :height => "30"), user_path(ma.course_message.user) %></a>
</li>
<li class="homepageNewsPubType fl">
<%= link_to ma.course_message.user.lastname + ma.course_message.user.firstname +
"#{ma.course_message.user.members.where("course_id=?", ma.course.id).first.roles.first.name=='Student'?"同学":"老师"}",
user_path(ma.course_message.user), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">回复了作品评论:</span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.course_message.notes, student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>
</li>
<div style="display: none" class="message_title_red system_message_style">
<div class="fl">回复内容:</div>
<div class="ml60"><%= ma.course_message.notes %></div>
<div class="fl">您的评论:</div>
<div class="ml60"><%= ma.course_message.jour.comment %></div>
<p>课程名称:<%= ma.course.name %>(<%= ma.course.term %>)</p>
<p>作业标题:<span style="color:Red;"><%=ma.course_message.jour.student_work.homework_common.name %></span></p>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>
<% end %>
<!--项目消息-->
<% if ma.class == ForgeMessage %>
<!--申请加入项目-->
<% if ma.forge_message_type == "AppliedProject" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user) %></a>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">申请加入项目:</span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.project, settings_project_path(:id => ma.project, :tab => "members"), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>
</li>
<div style="display: none" class="message_title_red system_message_style">
<%= ma.project %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<!--邀请加入项目-->
<% if ma.forge_message_type == "ProjectInvite" %>
<% inviter = User.find(ma.forge_message_id) %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(inviter), :width => "30", :height => "30"), user_path(inviter) %></a>
</li>
<li class="homepageNewsPubType fl">
<%=link_to inviter, user_path(inviter), :class => "newsBlue homepageNewsPublisher" %>
<span class='<%= ma.viewed == 0 ? 'homepageNewsTypeNotRead fl' : 'homepageNewsType fl' %>'>邀请你加入项目</span>
</li>
<% if ma.user.member_of?(ma.project) %>
<li class="homepageNewsContent fl">
<% else %>
<li class="homepageHomeworkContent fl">
<% end %>
<%= link_to ma.project, project_path(ma.project),
:class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %>
</li>
<div style="display: none" class="message_title_red system_message_style">
<%= ma.project %>
</div>
<% unless User.current.member_of?(ma.project) %>
<li class="homepageHomeworkContentWarn fl">
<%=link_to "同意加入", {:controller => 'projects', :action => 'member', :id => ma.project_id, :message_id =>ma.id, :key => ma.secret_key},
:value => ma.secret_key,
:class => "green_btn_cir ml10",
:style => "color:#fff" %>
</li>
<% end %>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.forge_message_type == "Issue" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %></a>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>"><%= ma.forge_message.tracker_id == 5 ? "发布了周报:":"指派了问题给你:"%></span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.forge_message.subject, issue_path(:id => ma.forge_message.id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>
</li>
<div style="display: none" class="message_title_red system_message_style">
<p><strong>主题:</strong><%= ma.forge_message.subject %></p>
<% unless ma.forge_message.description.nil? || ma.forge_message.description == "" %>
<div class="fl"><strong>描述:</strong></div>
<div class="ml36"><%= ma.forge_message.description.html_safe %></div>
<% end %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.forge_message_type == "Journal" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.user), :width => "30", :height => "30"), user_path(ma.forge_message.user) %></a>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.forge_message.user, user_path(ma.forge_message.user), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl" : "homepageNewsType fl" %>">
更新了问题状态:</span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.forge_message.journalized.subject,
issue_path(:id => ma.forge_message.journalized_id), :class => "#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>
</li>
<div style="display: none" class="message_title_red system_message_style" >
<p><strong>问题标题:</strong><%= ma.forge_message.journalized.subject %></p>
<div class="fl"><strong>更新内容:</strong></div>
<div class="ml60"><%= get_issue_des_update(ma.forge_message).html_safe %></div>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.forge_message_type == "Message" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %></span></li>
<% if ma.forge_message.parent_id.nil? %>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.forge_message.subject, 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), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a></li>
<div style="display: none" class="message_title_red system_message_style">
<p><strong>主题:</strong><%= ma.forge_message.subject %></p>
<% unless ma.forge_message.content.nil? %>
<div class="fl"><strong>内容:</strong></div>
<div class="ml36"><%= ma.forge_message.content.html_safe %></div>
<% end %>
</div>
<% else %>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.forge_message.subject, 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), :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a></li>
<div style="display: none" class="message_title_red system_message_style">
<p><strong>帖子主题:</strong><%= ma.forge_message.subject %></p>
<% unless ma.forge_message.content.nil? %>
<div class="fl"><strong>评论内容:</strong></div>
<div class="ml60"><%= ma.forge_message.content.html_safe %></div>
<% end %>
</div>
<% end %>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.forge_message_type == "News" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %></a>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">发布了新闻:</span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ("#{ma.forge_message.title.html_safe}"), {:controller => 'news', :action => 'show', :id => ma.forge_message.id},
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>
</li>
<div style="display: none" class="message_title_red system_message_style">
<p><strong>标题:</strong><%= ma.forge_message.title %></p>
<% unless ma.forge_message.description.nil? %>
<div class="fl"><strong>内容:</strong></div>
<div class="ml36"><%= ma.forge_message.description.html_safe %></div>
<% end %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% if ma.forge_message_type == "Comment" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl"><a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %></a></li>
<li class="homepageNewsPubType fl"><%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了新闻:</span></li>
<li class="homepageNewsContent fl">
<%= link_to "#{ma.forge_message.comments.html_safe}",
{:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover => "message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %>
</li>
<div style="display: none" class="message_title_red system_message_style">
<p><strong>新闻标题:</strong><%= ma.forge_message.commented.title %></p>
<div class="fl"><strong>评论内容:</strong></div>
<div class="ml60"><%= ma.forge_message.comments.html_safe %></div>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>
<!--公共贴吧-->
<% if ma.class == MemoMessage %>
<% if ma.memo_type == "Memo" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.memo.author), :width => "30", :height => "30"), user_path(ma.memo.author) %></a>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.memo.author, user_path(ma.memo.author), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>" ><%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %></span>
</li>
<% if ma.memo.parent_id.nil? %>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.memo.subject, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>
</li>
<div style="display: none" class="message_title_red system_message_style">
<p><strong>标题:</strong><%= ma.memo.subject %></p>
<% unless ma.memo.content.nil? %>
<div class="fl"><strong>内容:</strong></div>
<div class="ml36"><%= ma.memo.content.html_safe %></div>
<% end %>
</div>
<% else %>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.memo.content.html_safe, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>
</li>
<div style="display: none" class="message_title_red system_message_style">
<p><strong>标题:</strong><%= ma.memo.subject %></p>
<% unless ma.memo.content.nil? %>
<div class="fl"><strong>内容:</strong></div>
<div class="ml36"><%= ma.memo.content.html_safe %></div>
<% end %>
</div>
<% end %>
<li class="homepageNewsTime fl"><%= time_tag(ma.memo.created_at).html_safe %> </li>
</ul>
<% end %>
<% end %>
<!--用户留言-->
<% if ma.class == UserFeedbackMessage %>
<% if ma.journals_for_message_type == "JournalsForMessage" %>
<ul class="homepageNewsList fl">
<li class="homepageNewsPortrait fl">
<a href="javascript:void(0);"><%=link_to image_tag(url_to_avatar(ma.journals_for_message.user), :width => "30", :height => "30"), user_path(ma.journals_for_message.user) %></a>
</li>
<li class="homepageNewsPubType fl">
<%=link_to ma.journals_for_message.user, user_path(ma.journals_for_message.user), :class => "newsBlue homepageNewsPublisher" %>
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %></span>
</li>
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
<%= link_to ma.journals_for_message.notes.html_safe, feedback_path(ma.journals_for_message.jour_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
:onmouseover =>"message_titile_show($(this),event)",
:onmouseout => "message_titile_hide($(this))" %></a>
</li>
<div style="display: none" class="message_title_red system_message_style" >
<% if ma.journals_for_message.reply_id == 0 %>
<%= ma.journals_for_message.notes.html_safe %>
<% else %>
<div class="fl"><strong>您的留言:</strong></div>
<div class="ml60"><%= JournalsForMessage.find(ma.journals_for_message.m_reply_id).notes.html_safe %></div>
<div class="fl"><strong>回复内容:</strong></div>
<div class="ml60"><%= ma.journals_for_message.notes.html_safe %></div>
<% end %>
</div>
<li class="homepageNewsTime fl"><%= time_tag(ma.journals_for_message.created_on).html_safe %> </li>
</ul>
<% end %>
<% end %>
<% end %>
<ul class="wlist" style=" border:none; padding-top: 15px;">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
</ul>
<% end %>
<!--项目消息-->
<% else %>
<div class="flash notice">您目前还没有相关消息!</div>
<% end %>
<div class="cl"></div>
</div>
<div class="cl"></div>
</div>
</div>
<script>

View File

@ -27,4 +27,5 @@ zh:
mail_homework_endtime: "作业截止时间快到了!"
mail_homework: "作业:"
mail_anonymous_comment_close: "作业匿评已经关闭!"
mail_anonymous_comment_open: "作业匿评已经开启!"
mail_anonymous_comment_open: "作业匿评已经开启!"
mail_anonymous_comment_failed: "作业匿评开启失败!"

View File

@ -0,0 +1,5 @@
class AddStatusToForgeMessage < ActiveRecord::Migration
def change
add_column :forge_messages, :status, :integer
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20150925060939) do
ActiveRecord::Schema.define(:version => 20150928090128) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -476,6 +476,13 @@ ActiveRecord::Schema.define(:version => 20150925060939) do
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
create_table "discuss_demos", :force => true do |t|
t.string "title"
t.text "body"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "documents", :force => true do |t|
t.integer "project_id", :default => 0, :null => false
t.integer "category_id", :default => 0, :null => false
@ -490,23 +497,26 @@ ActiveRecord::Schema.define(:version => 20150925060939) do
add_index "documents", ["created_on"], :name => "index_documents_on_created_on"
add_index "documents", ["project_id"], :name => "documents_project_id"
create_table "dts", :force => true do |t|
t.string "IPLineCode"
t.string "Description"
t.string "Num"
t.string "Variable"
t.string "TraceInfo"
t.string "Method"
create_table "dts", :primary_key => "Num", :force => true do |t|
t.string "Defect", :limit => 50
t.string "Category", :limit => 50
t.string "File"
t.string "IPLine"
t.string "Review"
t.string "Category"
t.string "Defect"
t.string "PreConditions"
t.string "StartLine"
t.string "Method"
t.string "Module", :limit => 20
t.string "Variable", :limit => 50
t.integer "StartLine"
t.integer "IPLine"
t.string "IPLineCode", :limit => 200
t.string "Judge", :limit => 15
t.integer "Review", :limit => 1
t.string "Description"
t.text "PreConditions", :limit => 2147483647
t.text "TraceInfo", :limit => 2147483647
t.text "Code", :limit => 2147483647
t.integer "project_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.integer "id", :null => false
end
create_table "enabled_modules", :force => true do |t|
@ -566,6 +576,7 @@ ActiveRecord::Schema.define(:version => 20150925060939) do
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "secret_key"
t.integer "status"
end
create_table "forums", :force => true do |t|
@ -910,7 +921,6 @@ ActiveRecord::Schema.define(:version => 20150925060939) do
t.datetime "created_on"
t.integer "comments_count", :default => 0, :null => false
t.integer "course_id"
t.datetime "updated_on"
end
add_index "news", ["author_id"], :name => "index_news_on_author_id"

View File

@ -3,16 +3,14 @@
namespace :homework_endtime do
desc "send a message for Job deadline"
task :message => :environment do
current_day = Date.today.day
homework_commons = HomeworkCommon.where("end_time >=?",Date.today)
contrast_time = Time.now - 86400
homework_commons = HomeworkCommon.where("end_time >=? and end_time <=?",contrast_time, Time.now)
homework_commons.each do |homework_common|
if CourseMessage.where("course_message_type =? and course_message_id =? and status =?", "HomeworkCommon", homework_common.id, 1).first.nil?
if homework_common.end_time.day - Date.today.day < 2 && homework_common.end_time.year == Date.today.year
homework_common.course.student.each do |s|
homework_common.course_messages << CourseMessage.new(:user_id => s.student_id, :course_id => homework_common.course_id, :viewed => false, :status => true)
# 发送邮件通知
Mailer.homework_endtime__added(homework_common, s.student_id).deliver
end
homework_common.course.student.each do |s|
homework_common.course_messages << CourseMessage.new(:user_id => s.student_id, :course_id => homework_common.course_id, :viewed => false, :status => true)
# 发送邮件通知
Mailer.homework_endtime__added(homework_common, s.student_id).deliver
end
end
end

View File

@ -26,6 +26,7 @@ namespace :homework_evaluation do
end
homework_detail_manual.update_column('comment_status', 2)
# 匿评开启消息邮件通知,# 所有人
#send_message_anonymous_comment(homework_common, 2)
course = homework_common.course
course.members.each do |m|
homework_common.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => 2)
@ -43,7 +44,7 @@ namespace :homework_evaluation do
end
end
# 邮件通知
# Mailer.send_mail_anonymous_comment_close(homework_common).deliver
Mailer.send_mail_anonymous_comment_fail(homework_common).deliver
end
end
end
@ -64,10 +65,7 @@ namespace :homework_evaluation do
end
homework_detail_manual.update_column('comment_status', 3)
# 匿评关闭消息通知 给所有人发
course = homework_common.course
course.members.each do |m|
homework_common.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => false, :status => 3)
end
send_message_anonymous_comment(homework_common, 3)
# 邮件通知
Mailer.send_mail_anonymous_comment_close(homework_common).deliver
end

View File

@ -0,0 +1,21 @@
#coding=utf-8
namespace :issue_due_date do
desc "send a message for Issue'due_date deadline"
task :end_time => :environment do
contrast_time = Time.now - 86400
issues = Issue.where("due_date >=? and due_date <=?",contrast_time,Time.now)
issues.each do |issue|
if ForgeMessage.where("forge_message_type =? and forge_message_id =? and status =?", "Issue", issue.id, 1).first.nil?
recipients = []
assigner = User.find(issue.assigned_to_id)
recipients << issue.author
recipients << assigner
recipients.each do |r|
issue.forge_messages << ForgeMessage.new(:user_id => r.id, :project_id => issue.project_id, :viewed => false, :status => 1)
# 发送邮件通知
# Mailer.homework_endtime__added(homework_common, s.student_id).deliver
end
end
end
end
end

View File

@ -935,6 +935,11 @@ function clickOK(path)
}
});
}
//关闭引入资源弹框
function hideResource(){
$('#ajax-modal').parent().removeClass("popbox").removeClass("referenceResourcesPopup");
hideModal();
}
//查询
function SearchByName(url,event)
{
@ -986,3 +991,94 @@ function show_student_work(url){
}
);
}
/////////////////////////////////////////////////////////////////////////////////////////
var autoTextarea2 = function (elem,elem2, extra, maxHeight) {
extra = extra || 0;
var isFirefox = !!document.getBoxObjectFor || 'mozInnerScreenX' in window,
isOpera = !!window.opera && !!window.opera.toString().indexOf('Opera'),
addEvent = function (element, type, callback) {
element.addEventListener ?
element.addEventListener(type, callback, false) :
element.attachEvent('on' + type, callback);
},
getFirstStyle = elem.currentStyle ? function (name) {
var val = elem.currentStyle[name];
if (name === 'height' && val.search(/px/i) !== 1) {
var rect = elem.getBoundingClientRect();
return rect.bottom - rect.top -
parseFloat(getFirstStyle('paddingTop')) -
parseFloat(getFirstStyle('paddingBottom')) + 'px';
};
return val;
} : function (name) {
return getComputedStyle(elem, null)[name];
},
minHeight = parseFloat(getFirstStyle('height'))
elem.style.resize = 'none';
elem2.style.resize = 'none';
var change = function () {
var scrollTop, height,
padding = 0,
style = elem.style,
style2 = elem2.style;
if (elem._length === elem.value.length) return;
elem._length = elem.value.length;
elem2._length = elem._length;
if (!isFirefox && !isOpera) {
padding = parseInt(getFirstStyle('paddingTop')) + parseInt(getFirstStyle('paddingBottom'));
};
scrollTop = document.body.scrollTop || document.documentElement.scrollTop;
elem.style.height = minHeight + 'px';
elem2.style.height = minHeight + 'px';
if (elem.scrollHeight > minHeight) {
if (maxHeight && elem.scrollHeight > maxHeight) {
height = maxHeight - padding;
style.overflowY = 'auto';
style2.overflowY = 'auto';
} else {
height = elem.scrollHeight - padding;
style.overflowY = 'hidden';
style2.overflowY = 'hidden';
};
style.height = height + extra + 'px';
style2.height = height + extra + 'px';
scrollTop += parseInt(style.height) - elem.currHeight;
document.body.scrollTop = scrollTop;
document.documentElement.scrollTop = scrollTop;
elem.currHeight = parseInt(style.height);
};
if (elem2.scrollHeight > minHeight) {
if (maxHeight && elem2.scrollHeight > maxHeight) {
height = maxHeight - padding;
style.overflowY = 'auto';
style2.overflowY = 'auto';
} else {
height = elem2.scrollHeight - padding;
style.overflowY = 'hidden';
style2.overflowY = 'hidden';
};
style.height = height + extra + 'px';
style2.height = height + extra + 'px';
scrollTop += parseInt(style2.height) - elem2.currHeight;
document.body.scrollTop = scrollTop;
document.documentElement.scrollTop = scrollTop;
elem2.currHeight = parseInt(style2.height);
};
};
addEvent(elem, 'propertychange', change);
addEvent(elem, 'input', change);
addEvent(elem, 'focus', change);
addEvent(elem2, 'propertychange', change);
addEvent(elem2, 'input', change);
addEvent(elem2, 'focus', change);
change();
};

View File

@ -419,6 +419,11 @@ function clickOK(path)
}
});
}
//关闭引入资源弹框
function hideResource(){
$('#ajax-modal').parent().removeClass("popbox").removeClass("referenceResourcesPopup");
hideModal();
}
/////////////////////////////////////////////////////////////////////////////////////////
var autoTextarea2 = function (elem,elem2, extra, maxHeight) {

View File

@ -96,29 +96,29 @@ function show_more_reply1(contentid, id2, id3) {
}
}
//项目版本库git帮助文档显示
function showhelpAndScrollTo(id) {
$('#' + id).toggle();
if(cookieget("repositories_visiable") == "true")
{
cookiesave("repositories_visiable", false,'','','');
}
else
{
cookiesave("repositories_visiable", true,'','','');
}
var information = $("#showgithelp");
var val = information.attr("value");
if(val=="show_help")
{
$("#showgithelp").text("收起Git操作指南");
information.attr("value", "hide_help");
}
else
{
$("#showgithelp").text("展开Git操作指南");
information.attr("value", "show_help");
}
}
//function showhelpAndScrollTo(id) {
// $('#' + id).toggle();
// if(cookieget("repositories_visiable") == "true")
// {
// cookiesave("repositories_visiable", false,'','','');
// }
// else
// {
// cookiesave("repositories_visiable", true,'','','');
// }
// var information = $("#showgithelp");
// var val = information.attr("value");
// if(val=="show_help")
// {
// $("#showgithelp").text("收起Git操作指南");
// information.attr("value", "hide_help");
// }
// else
// {
// $("#showgithelp").text("展开Git操作指南");
// information.attr("value", "show_help");
// }
//}
function showhelpAndScrollToMessage(id, id1, count) {
$('#' + id).toggle();
if(cookieget("repositories_visiable") == "true")

View File

@ -176,7 +176,7 @@ a.homepageWhite:hover {color:#a1ebff}
a.newsGrey {color:#4b4b4b;}
a.newsGrey:hover {color:#000000;}
a.newsRed {color:red;}
a.newsRed:hovor {color:#888888;}
a.newsRed:hover {color:#888888;}
a.replyGrey {color:#888888; display:inline-block;}
a.replyGrey:hover {color:#4b4b4b;}
a.replyGrey1 {color:#888888;}
@ -891,54 +891,109 @@ a:hover.about_me{ color:#0781b4;}
/*20150820课程作业 LB*/
.HomeWork {width:708px; background-color:#ffffff; padding:10px 20px 20px 20px; border:1px solid #dddddd;}
.HomeWork {width:718px; background-color:#ffffff; padding:15px; border:1px solid #dddddd; float:right;}
.RightBanner {width:708px; height:34px; border-bottom:1px solid #e9e9e9;}
select.InputBox,input.InputBox,textarea.InputBox{ border:1px solid #d9d9d9; color:#888888; height:28px; line-height:28px; padding-left:5px; font-size:14px;}
a.BlueCirBtn{ display:block;width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; text-align:center; border:1px solid #15bccf; color:#15bccf; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
a:hover.BlueCirBtn{ background:#15bccf; color:#fff;}
a.BlueCirBtn{ display:block;width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; text-align:center; border:1px solid #269ac9; color:#269ac9; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
a:hover.BlueCirBtn{ background:#269ac9; color:#fff;}
.W440{ width:440px;}
.W120{ width:110px;}
.W700{ width:700px;max-width: 700px;min-width: 700px;}
.w708{width: 708px;}
a.AnnexBtn{ background: url(../images/homepage_icon2.png) 0px -343px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
a:hover.AnnexBtn{background: url(../images/homepage_icon2.png) -90px -343px no-repeat; color:#15bccf;}
.w712{width:712px;max-width:712px;min-width: 712px;}
.w720{width:721px;}
.w709{width: 709px;}
.w701{width: 701px;}
a.AnnexBtn{ background: url(images/homepage_icon2.png) 0px -343px no-repeat !important; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
a:hover.AnnexBtn{background: url(images/homepage_icon2.png) -90px -343px no-repeat !important; color:#3598db;}
a.FilesBtn{ background: url(../images/homepage_icon2.png) 0px -373px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
a:hover.FilesBtn{background: url(../images/homepage_icon2.png) -89px -372px no-repeat; color:#15bccf;}
a.BlueCirBtnMini{ display:block;width:40px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #15bccf; color:#15bccf; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
a:hover.BlueCirBtnMini{ background:#15bccf; color:#fff;}
a:hover.FilesBtn{background: url(../images/homepage_icon2.png) -89px -372px no-repeat; color:#269ac9;}
a.BlueCirBtnMini{ display:block;width:40px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #269ac9; color:#269ac9; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
a:hover.BlueCirBtnMini{ background:#269ac9; color:#fff;}
a.DropBtn{background: url(../images/homepage_icon2.png) -125px -339px no-repeat; width:85px; height:20px; display:block; color:#888888; font-size:14px;}
a:hover.DropBtn{background: url(../images/homepage_icon2.png) -125px -370px no-repeat;}
.DropLine{border-top:1px solid #d9d9d9; float:left; width:623px; height:10px; margin-top:10px;}
/*20150820课程作业 LB*/
.HomeWork {width:708px; background-color:#ffffff; padding:20px; border:1px solid #dddddd;}
.RightBanner {font-size:16px; width:733px; color:#4b4b4b; padding:10px 0 0 15px; margin-bottom:10px; background:#fff; border:1px solid #dddddd;height:34px;}
select.InputBox,input.InputBox,textarea.InputBox{ border:1px solid #d9d9d9; color:#888888; height:28px; line-height:28px; padding-left:5px; font-size:14px;}
a.BlueCirBtn{ display:block;width:75px; height:28px; background-color:#fff; line-height:28px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
a:hover.BlueCirBtn{ background:#3598db; color:#fff;}
.W440{ width:440px;}
.W120{ width:110px;}
.W700{ width:700px;}
/*a.AnnexBtn{ background: url(../images/homepage_icon.png) 0px -343px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}*/
/*a:hover.AnnexBtn{background: url(../images/homepage_icon.png) -90px -343px no-repeat; color:#3598db;}*/
a.FilesBtn{ background: url(../images/homepage_icon.png) 0px -373px no-repeat; width:38px; height:20px; display:block; padding-left:20px; color:#888888;}
a:hover.FilesBtn{background: url(../images/homepage_icon.png) -89px -372px no-repeat; color:#3598db;}
a.BlueCirBtnMini{ display:block;width:40px; height:22px; background-color:#ffffff; line-height:24px; vertical-align:middle; text-align:center; border:1px solid #3598db; color:#3598db; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px;}
a:hover.BlueCirBtnMini{ background:#3598db; color:#fff;}
a.ProBtn{background: url(../images/homepage_icon.png) -86px -396px no-repeat; width:30px; height:20px; display:block; padding-left:20px; color:#888888;}
a:hover.ProBtn{background: url(../images/homepage_icon.png) -86px -426px no-repeat; color:#3598db;}
a.DropBtn{background: url(../images/homepage_icon.png) -125px -339px no-repeat; width:85px; height:20px; display:block; color:#888888; font-size:14px;}
a:hover.DropBtn{background: url(../images/homepage_icon.png) -125px -370px no-repeat;}
.DropLine{border-top:1px solid #d9d9d9; float:left; width:623px; height:10px; margin-top:10px;}
/*20150820编程作业 LB*/
.W320{ width:320px;}
.icon_add{ background:url(images/icons.png) 0px -310px no-repeat; width:16px; height:27px; display:block;float:left; margin-right:5px;}
a:hover.icon_add{background:url(images/icons.png) -20px -310px no-repeat;}
.icon_remove{background:url(images/icons.png) 0px -338px no-repeat; width:16px; height:27px; display:block;float:left;}
a:hover.icon_remove{background:url(images/icons.png) -20px -338px no-repeat;}
.icon_add{ background:url(../images/course/icons.png) 0px -310px no-repeat; width:16px; height:27px; display:block;float:left; margin-right:5px;}
a:hover.icon_add{background:url(../images/course/icons.png) -20px -310px no-repeat;}
.icon_remove{background:url(../images/course/icons.png) 0px -338px no-repeat; width:16px; height:27px; display:block;float:left;}
a:hover.icon_remove{background:url(../images/course/icons.png) -20px -338px no-repeat;}
/*20150820提交作业 LB*/
.HomeWorkBox{ background:#f6f6f6; padding:10px; margin:10px 0;}
.c_grey{ color:#888888;}
.c_dark_grey{color:#a9a9a9 !important;}
.HomeWorkP{ width:690px; font-size:14px;}
.HomeWorkP p{background-color: transparent !important;}
.HomeWorkP div{background-color: transparent !important;}
.H150{ height:150px;}
.ProResult{width:748px; background-color:#fff; border:1px solid #dddddd;border-bottom:none; }
.ProResultTop{ height:38px; line-height:38px; border-bottom:1px solid #dddddd; background:#f2f2f2; padding:0 10px;}
.ProResultCon{ padding:10px; color:#888888; line-height:24px; border-bottom:1px solid #dddddd; }
.W50{ width:50px;}
.W200{ width:200px;}
.m_w530{max-width: 530px;}
.ProResultTable{ color:#888888;}
.T_C{ text-align:center;}
.SearchIcon{background:url(../images/homepage_icon2.png) 676px -393px no-repeat; }
.SearchIcon:hover{background:url(../images/homepage_icon2.png) 676px -419px no-repeat; }
a.link_file_a{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; }
a:hover.link_file_a{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;}
a.link_file{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-left:20px; }
a:hover.link_file{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;}
a.remove-upload {background: url(../images/delete.png) no-repeat 1px 50%;width: 1px;display: inline-block;padding-left: 16px;}
a.FilesName{ max-width:540px;overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block;}
a.FilesName02{ max-width:665px;overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:block;}
.ProResultUl span { display:block; float:left;}
.ProResultUl li{ line-height:35px; border-bottom:1px solid #dddddd; }
.DateBorder{border:1px solid #d9d9d9; border-left:none; padding:7px 6px 6px 6px;}
.mb50{margin-bottom: 50px;}
a.UsersEditBtn{ display:block; width:55px; height:20px; border:1px solid #6d6d6d; color:#fff; background:#888888 url(../images/homepage_icon.png) -11px -35px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a:hover.UsersEditBtn{ color:#484848; background:#888888 url(../images/homepage_icon.png) -11px -74px no-repeat;}
a.UsersAttBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -9px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a:hover.UsersAttBtn{border:1px solid #888888; }
a.UsersApBtn{ display:block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -177px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
a:hover.UsersApBtn{border:1px solid #888888; }
/*20150906编程作业设置弹框 LB*/
.C_lgrey{ color:#a5a5a5;}
.C_Blue{ color:#3598db;}
a.C_Blue{ color:#3598db;}
a:hover.C_Blue{ color:#297fb8;}
.BluePopupBox{ padding:20px; background:#fff; width:707px;}
/*.BluePopupBox:hover{ border:3px solid #297fb8; }*/
a.CloseBtn{background:url(../images/CloseBtn.png) 0px 0px no-repeat; width:13px; height:13px; display:block; float:right;}
a:hover.CloseBtn{background:url(../images/CloseBtn.png) 0px -24px no-repeat; }
.BluePopuph2{ font-size:16px; font-weight:bold; color:#3598db; }
.ProBoxResult{width:706px; background-color:#fff; border:1px solid #dddddd;border-bottom:none; max-height:300px; overflow:auto; }
.W108{ width:108px;}
.HomeWorkCon{ width:706px;}
/*20150906导入作业弹框 LB*/
.ImportBox{ width:708px; max-height:300px;overflow:auto;}
.ImportBox li{ margin-bottom:10px;}
.WorkTitle{ max-width:660px; font-size:14px; font-weight:bold; color:#484848;}
.W520{ width:680px;}
.ImportSearchIcon{background:url(../images/homepage_icon.png) 656px -393px no-repeat; }
.ImportSearchIcon:hover{background:url(../images/homepage_icon.png) 656px -419px no-repeat; }
.calendar_input{border-left:none !important;border-bottom: none!important; border-top: none!important; border-right: 1px solid #d9d9d9;}
.calendar_div{border: 1px solid #d9d9d9;}
/* 课程主页 */
.rside_nav{ background:#eaebec; padding:10px 10px;}
@ -980,4 +1035,8 @@ a:hover.c_grey{ color:#333;}
.link_file_a{ display:block; max-width:450px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
.last_time{width:auto; text-align:right; margin-right:70px;}
.link_file_box{ width:360px;}
/*a.postOptionLink{float: right;color: #64bdd9;display: block;padding: 1px 5px;border: 1px solid #64bdd9;width: initial;}*/
/*a:hover.postOptionLink {color: #fff;background: #64bdd9;}*/
a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;}
a.postOptionLink:hover {color:#ffffff; background-color:#15bccf;}

View File

@ -796,8 +796,8 @@ a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-re
.postDetailRow {width:720px; border-bottom:1px solid #efefef; padding:15px 0;}
.postDetailPortrait {width:50px; height:50px; float:left; margin-right:15px;}
.postDetailWrap {width:580px; float:left;}
.postDetailTitle {width:580px; max-width:580px; margin-bottom:5px;}
.postDetailDes {width:580px; max-width:580px; margin-bottom:6px; color:#888888;display:block;overflow:hidden;word-break:keep-all;white-space:nowrap;text-overflow:ellipsis;}
.postDetailTitle {width:650px; max-width:650px; margin-bottom:5px;}
.postDetailDes {width:580px; max-width:580px; margin-bottom:6px; color:#888888;display:block;overflow:hidden;word-break:keep-all;text-overflow:ellipsis;}
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
.postDetailDate {color:#888888; font-size:12px; float:left;}
.postDetailReply { margin-top:28px; color:#888888; float:right;}
@ -808,7 +808,7 @@ a.postReplyIcon:hover {background:url(images/post_image_list.png) -40px -29px no
.postAttIcon:hover {background:url(images/post_image_list.png) 0px -113px no-repeat;}
.postThemeContainer {width:720px;}
.postThemeWrap {width:655px; float:left;position: relative}
.postLikeIcon {background:url(images/post_image_list.png) 0px -42px no-repeat ;float:right; padding-left:18px;}
.postLikeIcon {background:url(images/post_image_list.png) 0px -42px no-repeat ;float:right; padding-left:18px; margin-right:30px; margin-top:3px;}
.postLikeIcon:hover {background:url(images/post_image_list.png) 0px -64px no-repeat ;}
a.AnnexBtn{ background: url(images/homepage_icon2.png) 0px -343px no-repeat !important; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
a:hover.AnnexBtn{background: url(images/homepage_icon2.png) -90px -343px no-repeat !important; color:#3598db;}
@ -816,6 +816,9 @@ a:hover.AnnexBtn{background: url(images/homepage_icon2.png) -90px -343px no-repe
.postDelete {background:url(images/post_image_list.png) -42px -93px no-repeat; width:18px; height:18px; display:block; float:right;}
.pageBanner {width:968px; margin:0px auto; border:1px solid #dddddd; background-color: #FFF; padding: 10px 15px; float:left;}
.homepagePostReplyInput {width:543px; height:33px; max-width:543px; max-height:33px; border:1px solid #d9d9d9; outline:none;}
.postRouteContainer {padding:10px 15px; background-color:#ffffff; border:1px solid #dddddd; margin-top:10px; font-size:14px;}
a.postRouteLink {font-weight:bold; color:#484848;}
a.postRouteLink:hover {text-decoration:underline;}
/*底部*/
#Footer{background-color:#ffffff; padding-bottom:15px; color:#666666;} /*margin-bottom:10px;*/
.footerAboutContainer {width:auto; border-bottom:1px solid #efefef;}

View File

@ -391,83 +391,6 @@ a:hover.search_btn{ background: #0fa9bb;}
#LSide{ width:240px; }
#RSide{ width:670px; margin-left:10px; background:#fff; padding:10px; margin-bottom:10px;}
/*资源库*/
.resources {width:728px; background-color:#ffffff; padding:10px 10px 20px 10px; border:1px solid #dddddd;}
.resourcesBanner {width:730px; height:40px; background-color:#eaeaea; margin-bottom:10px;}
.bannerName {background:#64bdd9; color:#ffffff; height:40px; line-height:40px; width:90px; text-align:center; font-weight:normal; vertical-align:middle; font-size: 16px; float:left;}
.resourcesSelect {width:30px; height:34px; float:right; position:relative; margin-top:-6px;}
.resourcesSelected {width:25px; height:20px; position:relative; background:url(../images/resource_icon_list.png) 0px 0px no-repeat;}
.resourcesSelected:hover { background:url(../images/resource_icon_list.png) 0px -25px no-repeat;}
.resourcesIcon {margin-top:15px; display:block; width:25px; height:20px;}
.resourcesType {width:75px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:10px 20px; left:-90px; font-size:12px; color:#888888; display:none; line-height:2;}
a.resourcesTypeAll {background:url(../images/homepage_icon.png) -180px -89px no-repeat; padding-left:23px;}
a.resourcesTypeAtt {background:url(../images/homepage_icon.png) -180px -49px no-repeat; padding-left:23px;}
a.resourcesGrey {font-size:12px; color:#888888;}
a.resourcesGrey:hover {font-size:12px; color:#269ac9;}
.resourcesBanner ul li:hover ul.resourcesType {display:block;}
ul li:hover ul {display:block;}
.resourcesUploadBox {float:right; width:103px; height:34px; background-color:#269ac9; line-height:34px; vertical-align:middle; text-align:center; margin-left:12px;}
.resourcesUploadBox:hover {background-color:#297fb8;}
a.uploadBoxIcon {background:url(../images/resource_icon_list.png) -35px 10px no-repeat; float:left; display:block; width:81px; height:30px; padding-left:22px; font-size:14px; color:#ffffff;}
.resourcesSearchloadBox {border:1px solid #e6e6e6; width:225px; float:left; background-color:#ffffff;}
.searchResource {border:none; outline:none; background-color:#ffffff; width:184px; height:32px; padding-left:10px; display:block; float:left;}
.searchIcon{width:31px; height:32px; background-color:#ffffff; background:url(../images/resource_icon_list.png) -40px -15px no-repeat; display:block; float:left;}
.resourcesSearchBanner {width:710px; height:34px; margin-bottom:10px; margin-top:15px; margin-left:auto; margin-right:auto;}
.resourcesListTab {width:710px; height:40px; background-color:#f6f6f6; border-bottom:1px solid #eaeaea; font-size:14px; color:#7a7a7a; margin-left:auto; margin-right:auto;}
.resourcesListCheckbox {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle;}
.resourcesCheckbox {padding:0px; margin:0px; margin-top:14px; width:12px; height:12px;}
.resourcesListName {width:160px; height:40px; line-height:40px; text-align:left;}
.resourcesListSize {width:105px; height:40px; line-height:40px; text-align:center;}
.resourcesListType {width:150px; height:40px; line-height:40px; text-align:center;}
.resourcesListUploader {width:180px; height:40px; line-height:40px; text-align:center;}
.resourcesListTime {width:95px; height:40px; line-height:40px; text-align:center;}
.resourcesList {width:710px; height:39px; background-color:#ffffff; border-bottom:1px dashed #eaeaea; color:#9a9a9a; font-size:12px; margin-left:auto; margin-right:auto;}
.resourcesListOption {width:710px; height:40px; line-height:40px; vertical-align:middle; margin-left:auto; margin-right:auto; background-color:#f6f6f6;}
.resourcesCheckAll {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle; float:left;}
.resourcesSelectSend {float:right;}
.resourcesSelectSendButton {width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; margin-top:5px; margin-right:10px; margin-left:15px; text-align:center; border:1px solid #269ac9; border-radius:5px; float:right;}
a.sendButtonBlue {color:#269ac9;}
a.sendButtonBlue:hover {color:#ffffff;}
.resourcesSelectSendButton:hover {background-color:#297fb8;}
a.resourcesBlack {font-size:12px; color:#4c4c4c;}
a.resourcesBlack:hover {font-size:12px; color:#000000;}
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 80px;
padding: 5px 0;
margin: 2px 0 0;
font-size: 12px;
text-align: left;
background-color: #fff;
-webkit-background-clip: padding-box;
background-clip: padding-box;
border: 1px solid #ccc;
border-radius: 4px;
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
}
.dropdown-menu > li > a {
display: block;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: 1.5;
color:#616060;
white-space: nowrap;
}
.dropdown-menu > li > a:hover{
color: #ffffff;
text-decoration: none;
background-color: #64bdd9;
outline:none;
}
/*发送资源弹窗*/
/*.resourceShareContainer {width:100%; height:100%; background:#666; filter:alpha(opacity=50); opacity:0.5; -moz-opacity:0.5; position:absolute; left:0; top:0; z-index:-999;}*/
.resourceSharePopup {width:300px; height:auto; border:3px solid #269ac9; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-150px; z-index:1000;}
@ -578,7 +501,7 @@ a.homepageWhite:hover {color:#a1ebff}
a.newsGrey {color:#4b4b4b;}
a.newsGrey:hover {color:#000000;}
a.newsRed {color:red;}
a.newsRed:hovor {color:#888888;}
a.newsRed:hover {color:#888888;}
a.replyGrey {color:#888888; display:inline-block;}
a.replyGrey:hover {color:#4b4b4b;}
a.replyGrey1 {color:#888888;}
@ -683,29 +606,30 @@ a.loginChooseTab {color:#484848; height:30px; display:block;}
.loginSignRow {height:60px; min-height:60px;}
/*课程选择弹窗*/
.coursesChoosePopup {width:530px; height:auto; border:3px solid #269ac9; padding-left:20px; padding-bottom:35px; background-color:#ffffff; position:absolute; top:0; left:0; z-index:1000;}
.coursesChoosePopup {width:530px; height:auto; padding-left:20px; padding-bottom:35px; background-color:#ffffff;}
.coursesSearchBox {border:1px solid #e6e6e6; width:515px; height:25px; background-color:#ffffff; margin-top:12px; margin-bottom:15px;}
.searchCoursesPopup {border:none; outline:none; background-color:#ffffff; width:470px; height:25px; padding-left:10px; display:inline-block; float:left;}
.searchIconPopup{width:31px; height:25px; background-color:#ffffff; background:url(../images/homepage_icon.png) -180px -273px no-repeat; display:inline-block; float:left;}
.searchIconPopup:hover {background:url(../images/homepage_icon.png) -180px -314px no-repeat;}
/*导入作业弹窗*/
.homeworkPublish {width:260px; height:15px; line-height:15px;}
.homeworkPublish {width:500px; height:15px; line-height:15px;}
.homeworkPublishTime {font-size:12px; color:#b1b1b1; margin-left:22px; margin-bottom:8px;}
.homeworkListForm{height: 160px;width: 550px;overflow: scroll;overflow-x: hidden;}
.w450{width: 450px;}
/*引用资源库弹窗*/
.referenceResourcesPopup {width:710px; height:auto; border:3px solid #269ac9; padding-left:20px; padding-right:20px; padding-bottom:35px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-375px; z-index:1000;}
.popbox{position:fixed !important;left:50%;top:50%;margin:-100px 0 0 -150px; -moz-border-radius:5px;}
.referenceResourcesPopup {width:710px; height:500px !important; border:3px solid #269ac9 !important; padding-left:16px !important; padding-right:16px !important; padding-bottom:16px !important; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-375px; z-index:1000;}
.referenceText {font-size:16px; color:#269ac9; line-height:16px; padding-top:20px; display:inline-block; font-weight:bold;}
.referenceSearchBox {border:1px solid #e6e6e6; width:235px; height:32px; background-color:#ffffff; margin-top:12px; margin-bottom:15px;}
.searchReferencePopup {border:none; outline:none; background-color:#ffffff; width:190px; height:32px; padding-left:10px; display:inline-block; float:left;}
.referenceSearchIcon{width:31px; height:25px; background-color:#ffffff; background:url(../images/homepage_icon.png) -170px -135px no-repeat; display:inline-block; float:left;}
.referenceSearchIcon:hover {background:url(../images/homepage_icon.png) -170px -190px no-repeat;}
.referenceResourceType {font-size:14px; width:355px; height:34px; line-height:34px; vertical-align:middle; background-color:#f6f6f6; margin-top:15px;}
.referenceSearchIcon{width:31px; height:25px; background-color:#ffffff; background:url(../images/homepage_icon.png) -180px -270px no-repeat; display:inline-block; float:left;}
.referenceSearchIcon:hover {background:url(../images/homepage_icon.png) -180px -311px no-repeat;}
.referenceResourceType {font-size:14px; width:475px; height:34px; line-height:34px; vertical-align:middle; background-color:#f6f6f6; margin-top:15px;}
.referenceTypeActive {background-color:#269ac9; color:#ffffff !important;}
a.referenceTypeBlock {color:#888888; display:inline-block; padding:0px 20px;}
/*底部*/
#Footer{background-color:#ffffff; margin-bottom:10px; padding-bottom:15px; color:#666666;}
.footerAboutContainer {width:auto; border-bottom:1px solid #efefef;}
@ -888,34 +812,45 @@ a.box_close{background:url(../images/img_floatbox.png) -22px 0 no-repeat;}
/*a.f_grey:hover {color:#000000;}*/
/*资源库*/
.resources {width:730px; background-color:#ffffff; padding:10px;}
.resources {width:718px; background-color:#ffffff; padding:15px; border:1px solid #dddddd;float: right}
.resourcesBanner {width:730px; height:40px; background-color:#eaeaea; margin-bottom:10px;}
.bannerName {background:#64bdd9; color:#ffffff; height:40px; line-height:40px; width:90px; text-align:center; font-weight:normal; vertical-align:middle; font-size: 16px; float:left;}
.resourcesSelect {width:30px; height:24px; float:right; position:relative; margin-top:-6px;}
.resourcesSelected {width:25px; height:20px; position:relative; background:url(images/resource_icon_list.png) 0px 0px no-repeat;}
.resourcesSelected:hover { background:url(images/resource_icon_list.png) 0px -25px no-repeat;}
.resourcesIcon {margin-top:15px; display:block; width:25px; height:20px;}
.resourcesType {width:50px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:35px; padding:5px 10px; left:-30px; font-size:12px; color:#888888; display:none;}
a.resourcesGrey {font-size:12px; color:#888888;}
a.resourcesGrey:hover {font-size:12px; color:#15bccf;}
a.resourcesGrey:hover {font-size:12px; color:#269ac9;}
.resourcesBanner ul li:hover ul.resourcesType {display:block;}
.resourcesSelected:hover ul {display:block;}
.resourcesUploadBox {float:right; width:103px; height:34px; background-color:#64bdd9; line-height:34px; vertical-align:middle; text-align:center; margin-left:12px;}
.uploadIcon {background:url(../images/resource_icon_list.png) -35px 10px no-repeat; float:left; display:block; width:30px; height:30px; margin-left:-3px;}
.resourcesUploadBox {float:right; width:103px; height:34px; background-color:#269ac9; line-height:34px; vertical-align:middle; text-align:center; margin-left:12px;}
.resourcesUploadBox:hover {background-color:#297fb8;}
.uploadIcon {background:url(images/resource_icon_list.png) -35px 10px no-repeat; float:left; display:block; width:30px; height:30px; margin-left:-3px;}
a.uploadText {color:#ffffff; font-size:14px;}
.resourcesSearchloadBox {border:1px solid #e6e6e6; width:225px; float:right; background-color:#ffffff;}
.resourcesSearchloadBox {border:1px solid #e6e6e6; width:225px; float:left; background-color:#ffffff;}
.searchResource {border:none; outline:none; background-color:#ffffff; width:184px; height:32px; padding-left:10px; display:block; float:left;}
.searchIcon{width:31px; height:32px; background-color:#ffffff; background:url(../images/resource_icon_list.png) -40px -15px no-repeat; display:block; float:left;}
.resourcesSearchBanner {height:34px; margin-bottom:10px;}
.resourcesListTab {width:730px; height:40px; background-color:#f6f6f6; border-bottom:1px solid #eaeaea; font-size:14px; color:#7a7a7a;}
.resourcesListName {width:175px; height:40px; line-height:40px; text-align:center;}
.resourcesListSize {width:110px; height:40px; line-height:40px; text-align:center;}
.resourcesListType {width:150px; height:40px; line-height:40px; text-align:center;}
.resourcesListUploader {width:130px; height:40px; line-height:40px; text-align:center;}
.resourcesListTime {width:165px; height:40px; line-height:40px; text-align:center;}
.resourcesList {width:730px; height:39px; background-color:#ffffff; border-bottom:1px dashed #eaeaea; color:#9a9a9a; font-size:12px;}
a.resourcesBlack {font-size:12px; color:#4c4c4c;}
.searchIcon{width:31px; height:32px; background-color:#ffffff; background:url(images/resource_icon_list.png) -40px -15px no-repeat; display:block; float:left;}
.resourcesSearchBanner {width:710px; height:34px; margin-bottom:10px; margin-top:15px; margin-left:auto; margin-right:auto;}
.resourcesListTab {width:710px; height:40px; background-color:#f6f6f6; border-bottom:1px solid #eaeaea; font-size:14px; color:#7a7a7a; margin-left:auto; margin-right:auto;}
.resourcesListName {width:340px; height:40px; line-height:40px; text-align:left;}
.resourcesListSize {width:85px; height:40px; line-height:40px; text-align:center;}
.resourcesListType {width:85px; height:40px; line-height:40px; text-align:center;}
.resourcesListUploader {width:85px; height:40px; line-height:40px; text-align:center;}
.resourcesListTime {width:95px; height:40px; line-height:40px; text-align:center;}
a.resourcesBlack {font-size:12px; color:#4c4c4c;white-space: nowrap;text-align: left}
a.resourcesBlack:hover {font-size:12px; color:#000000;}
.resourcesListCheckbox {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle;}
.resourcesCheckbox {padding:0px; margin:0px; margin-top:14px; width:12px; height:12px;}
.resourcesList {width:710px; height:39px; background-color:#ffffff; border-bottom:1px dashed #eaeaea; color:#9a9a9a; font-size:12px; margin-left:auto; margin-right:auto;}
.resourcesListOption {width:710px; height:40px; line-height:40px; vertical-align:middle; margin-left:auto; margin-right:auto; background-color:#f6f6f6;}
.resourcesCheckAll {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle; float:left;}
.resourcesSelectSend {float:right;}
.resourcesSelectSendButton {width:75px; height:28px; background-color:#ffffff; line-height:28px; vertical-align:middle; margin-top:5px; margin-right:10px; margin-left:15px; text-align:center; border:1px solid #269ac9; border-radius:5px; float:right;}
a.sendButtonBlue {color:#269ac9;}
a.sendButtonBlue:hover {color:#ffffff;}
.resourcesSelectSendButton:hover {background-color:#297fb8;}
.db {display:block !important;}
.dropdown-menu {
position: absolute;
top: 100%;
@ -951,6 +886,10 @@ a.resourcesBlack:hover {font-size:12px; color:#000000;}
background-color: #64bdd9;
outline:none;
}
a.resourcesTypeAll {background:url(images/homepage_icon.png) -180px -89px no-repeat; padding-left:23px;}
a.resourcesTypeAtt {background:url(images/homepage_icon.png) -180px -49px no-repeat; padding-left:23px;}
a.resourcesTypeUser {background:url(images/homepage_icon.png) -178px -453px no-repeat; padding-left:23px;}
.resourcesType {width:75px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:10px 20px; left:-90px; font-size:12px; color:#888888; display:none; line-height:2;}
.AgreementBox{margin: 20px 0; color: #666666; font-size: 14px; line-height: 1.9;}
.Agreementh4{ color:#2980b9; font-weight:bold; font-size:14px; margin-top:30px; border: none;}