merge
This commit is contained in:
commit
bacb5f859b
|
@ -67,6 +67,14 @@ class StudentWorkController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
# 消息状态更新
|
||||||
|
@homework.course_messages.each do |homework_message|
|
||||||
|
if User.current.id == homework_message.user_id
|
||||||
|
homework_message.update_attributes(:viewed => true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# 消息end
|
||||||
#设置作业对应的forge_messages表的viewed字段
|
#设置作业对应的forge_messages表的viewed字段
|
||||||
query_student_work = @homework.course_messages
|
query_student_work = @homework.course_messages
|
||||||
query_student_work.each do |query|
|
query_student_work.each do |query|
|
||||||
|
@ -159,10 +167,14 @@ class StudentWorkController < ApplicationController
|
||||||
|
|
||||||
def new
|
def new
|
||||||
redirect_to new_user_commit_homework_users_path(homework_id: @homework.id) if @homework.homework_type==2
|
redirect_to new_user_commit_homework_users_path(homework_id: @homework.id) if @homework.homework_type==2
|
||||||
|
@user = User.current
|
||||||
@student_work = @homework.student_works.where("user_id = ?",User.current.id).first
|
@student_work = @homework.student_works.where("user_id = ?",User.current.id).first
|
||||||
if @student_work.nil?
|
if @student_work.nil?
|
||||||
@student_work = StudentWork.new
|
@student_work = StudentWork.new
|
||||||
end
|
end
|
||||||
|
respond_to do |format|
|
||||||
|
format.html{ render :layout => "new_base_user"}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
@ -203,11 +215,12 @@ class StudentWorkController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
|
@user = User.current
|
||||||
if !User.current.admin? && @homework.homework_type == 2 #编程作业不能修改作业
|
if !User.current.admin? && @homework.homework_type == 2 #编程作业不能修改作业
|
||||||
render_403
|
render_403
|
||||||
else
|
else
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html{ render :layout => "new_base_user"}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -106,15 +106,17 @@ class UsersController < ApplicationController
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
# 当前用户查看消息,则设置消息为已读
|
# 当前用户查看消息,则设置消息为已读
|
||||||
course_querys = @user.course_messages
|
if params[:viewed] == "all"
|
||||||
forge_querys = @user.forge_messages
|
course_querys = @user.course_messages
|
||||||
user_querys = @user.user_feedback_messages
|
forge_querys = @user.forge_messages
|
||||||
forum_querys = @user.memo_messages
|
user_querys = @user.user_feedback_messages
|
||||||
if User.current.id == @user.id
|
forum_querys = @user.memo_messages
|
||||||
course_querys.update_all(:viewed => true)
|
if User.current.id == @user.id
|
||||||
forge_querys.update_all(:viewed => true)
|
course_querys.update_all(:viewed => true)
|
||||||
user_querys.update_all(:viewed => true)
|
forge_querys.update_all(:viewed => true)
|
||||||
forum_querys.update_all(:viewed => true)
|
user_querys.update_all(:viewed => true)
|
||||||
|
forum_querys.update_all(:viewed => true)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
# @new_message_count = forge_querys.count + forum_querys.count + course_querys.count + user_querys.count
|
# @new_message_count = forge_querys.count + forum_querys.count + course_querys.count + user_querys.count
|
||||||
case params[:type]
|
case params[:type]
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
|
include UserScoreHelper
|
||||||
|
|
||||||
module StudentWorkHelper
|
module StudentWorkHelper
|
||||||
def user_projects_option
|
def user_projects_option
|
||||||
cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1"
|
cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1"
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
|
<div class="cl"></div>
|
||||||
<% project = project %>
|
<% project = project %>
|
||||||
<span class="add_attachment" style="font-weight:normal;">
|
<span class="add_attachment" style="font-weight:normal;">
|
||||||
<%= button_tag l(:button_browse), :type=>"button", :onclick=>"_file.click()",:onmouseover => 'this.focus()',:class => 'sub_btn', :style => ie8? ? 'display:none' : '' %>
|
<%= button_tag l(:button_browse), :type=>"button", :onclick=>"_file.click()",:onmouseover => 'this.focus()',:class => 'sub_btn', :style => ie8? ? 'display:none' : '' %>
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
|
div.respond-form .reply_btn{margin-left:565px;margin-top:5px;}
|
||||||
div.recall_con{width:570px;}
|
div.recall_con{width:570px;}
|
||||||
div.recall_con .reply_btn{margin-left:525px;margin-top:5px;}
|
div.recall_con .reply_btn{margin-left:525px;margin-top:5px;}
|
||||||
|
.ke-container{height: 80px !important;}
|
||||||
</style>
|
</style>
|
||||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_KindEditor" %>
|
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_KindEditor" %>
|
||||||
<script >
|
<script >
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
<%= homework_anonymous_comment(homework)%>
|
<%= homework_anonymous_comment(homework)%>
|
||||||
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "fr mr10 work_edit") %>
|
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "fr mr10 work_edit") %>
|
||||||
<%#= link_to(l(:button_edit),edit_homework_common_path(homework), :class => "fr mr10 work_edit") %>
|
<%#= link_to(l(:button_edit),edit_homework_common_path(homework), :class => "fr mr10 work_edit") %>
|
||||||
<%= link_to(l(:button_edit),"javascript:void(0)", :class => "fr mr10 un_work_edit",:title => "编辑功能正在维护中") %>
|
|
||||||
<% elsif @is_student%>
|
<% elsif @is_student%>
|
||||||
<%= student_anonymous_comment homework %>
|
<%= student_anonymous_comment homework %>
|
||||||
<%= student_new_homework homework %>
|
<%= student_new_homework homework %>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<li class="fl"><a href="<%= agreement_path %>" class="f_grey mw20" target="_blank">服务协议</a>|</li>
|
<li class="fl"><a href="<%= agreement_path %>" class="f_grey mw20" target="_blank">服务协议</a>|</li>
|
||||||
<li class="fl" style="display: none"><span class="f_grey mw20" title="暂未开放"><%= l(:label_recruitment_information)%></span>|</li>
|
<li class="fl" style="display: none"><span class="f_grey mw20" title="暂未开放"><%= l(:label_recruitment_information)%></span>|</li>
|
||||||
<li class="fl"><a href="http://forge.trustie.net/forums/1/memos/1168" class="f_grey mw20" target="_blank"><%= l(:label_surpport_group)%></a>|</li>
|
<li class="fl"><a href="http://forge.trustie.net/forums/1/memos/1168" class="f_grey mw20" target="_blank"><%= l(:label_surpport_group)%></a>|</li>
|
||||||
<li class="fl"><span class="f_grey mw20" title="暂未开放"><%= l(:label_forums)%></span></li>
|
<li class="fl"><a href="<%= forums_path %>" class="f_grey mw20" target="_blank" ><%= l(:label_forums)%></a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,52 +1,54 @@
|
||||||
<div class="project_r_h">
|
<div class="HomeWork" id="RSide">
|
||||||
<h2 class="project_h2">编辑作品</h2>
|
<div class="RightBanner">
|
||||||
</div>
|
<div class="NewsBannerName">编辑作品</div>
|
||||||
<div class="Newwork">
|
</div>
|
||||||
<div class="hwork_ctt">
|
<div class="Newwork">
|
||||||
<div class="hwork_dis" id="tbc_01">
|
<div class="hwork_ctt">
|
||||||
<%= labelled_form_for @work,:html => { :multipart => true } do |f|%>
|
<div class="hwork_dis" id="tbc_01">
|
||||||
<div class="N_con">
|
<%= labelled_form_for @work,:html => { :multipart => true } do |f|%>
|
||||||
<p>
|
<div class="N_con">
|
||||||
<label class="fl"><span class="c_red">*</span> 作品名称 :</label>
|
<p>
|
||||||
<input type="text" name="student_work[name]" id="student_work_name" class="bo fl" maxlength="200" onkeyup="regexStudentWorkName();" value="<%= @work.name%>">
|
<label class="fl"><span class="c_red">*</span> 作品名称 :</label>
|
||||||
<a href="javascript:void(0)" class="fl ml10 mt3" onclick="show_project();" >项目信息
|
<input type="text" name="student_work[name]" id="student_work_name" class="bo fl" maxlength="200" onkeyup="regexStudentWorkName();" value="<%= @work.name%>">
|
||||||
<img class="ml5 " src="/images/bid/pic_question.png" width="15" height="15" Title="项目是一种由用户创建的基于 网络的协作空间,能够为个人 或小组提供分布式的协同交流 和资料管理等方面的。">
|
<a href="javascript:void(0)" class="fl ml10 mt3" onclick="show_project();" >项目信息
|
||||||
</a>
|
<img class="ml5 " src="/images/bid/pic_question.png" width="15" height="15" Title="项目是一种由用户创建的基于 网络的协作空间,能够为个人 或小组提供分布式的协同交流 和资料管理等方面的。">
|
||||||
<div class="cl"></div>
|
</a>
|
||||||
<p id="student_work_name_span" class="c_red ml90 mb10"></p>
|
<div class="cl"></div>
|
||||||
</p>
|
<p id="student_work_name_span" class="c_red ml90 mb10"></p>
|
||||||
<div class="cl"></div>
|
</p>
|
||||||
|
<div class="cl"></div>
|
||||||
|
|
||||||
<p id="about_project" class="about_project" style="<%= @work.project.nil? ? '' : 'display:block;'%>">
|
<p id="about_project" class="about_project" style="<%= @work.project.nil? ? '' : 'display:block;'%>">
|
||||||
<label class="fl"> 关联项目 :</label>
|
<label class="fl"> 关联项目 :</label>
|
||||||
<%= f.select :project,options_for_select(user_projects_option,@work.project_id), {},{:class => "bo02 mb10"} %>
|
<%= f.select :project,options_for_select(user_projects_option,@work.project_id), {},{:class => "bo02 mb10"} %>
|
||||||
</p>
|
</p>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<label class="fl">
|
<label class="fl">
|
||||||
<span class="c_red">*</span>
|
<span class="c_red">*</span>
|
||||||
作品描述 :
|
作品描述 :
|
||||||
</label>
|
</label>
|
||||||
<textarea name="student_work[description]" placeholder="最多3000个汉字(或6000个英文字符)" id="student_work_description" class="w620 hwork_txt" maxlength="6000" onkeyup="regexStudentWorkDescription();"><%= @work.description%></textarea>
|
<textarea name="student_work[description]" placeholder="最多3000个汉字(或6000个英文字符)" id="student_work_description" class="w620 hwork_txt" maxlength="6000" onkeyup="regexStudentWorkDescription();"><%= @work.description%></textarea>
|
||||||
<p id="student_work_description_textarea" class="c_red ml90 mb10"></p>
|
<p id="student_work_description_textarea" class="c_red ml90 mb10"></p>
|
||||||
</p>
|
</p>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<p>
|
<p>
|
||||||
<label class="fl"> 添加附件 :</label>
|
<label class="fl"> 添加附件 :</label>
|
||||||
<%= render :partial => 'attachments/new_form',:locals => {:container => @work} %>
|
<%= render :partial => 'attachments/new_form',:locals => {:container => @work} %>
|
||||||
</p>
|
</p>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<p class="ml80 ">
|
<p class="ml80 ">
|
||||||
<a href="javascript:void(0)" class="blue_btn fl c_white" onclick="edit_student_work(<%= @work.id%>);">提交作品</a>
|
<a href="javascript:void(0)" class="blue_btn fl c_white mt10" onclick="edit_student_work(<%= @work.id%>);">提交作品</a>
|
||||||
<%= link_to "返 回".html_safe, student_work_index_path(:homework => @homework), :class => "blue_btn grey_btn fl c_white"%>
|
<%= link_to "返 回".html_safe, student_work_index_path(:homework => @homework), :class => "blue_btn grey_btn fl c_white mt10 ml10"%>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</p>
|
</p>
|
||||||
</div><!---创建作业内容结束-->
|
</div><!---创建作业内容结束-->
|
||||||
<% end%>
|
<% end%>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div><!--新建作业结束-->
|
</div><!--新建作业结束-->
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
|
</div>
|
||||||
|
|
|
@ -124,7 +124,6 @@
|
||||||
</h4>
|
</h4>
|
||||||
<% if @is_teacher%>
|
<% if @is_teacher%>
|
||||||
<%= homework_anonymous_comment(@homework)%>
|
<%= homework_anonymous_comment(@homework)%>
|
||||||
<%= link_to(l(:button_edit),"javascript:void(0)", :class => "fr mr10 un_work_edit",:title => "编辑功能正在维护中") %>
|
|
||||||
<% else%>
|
<% else%>
|
||||||
<%= student_anonymous_comment @homework %>
|
<%= student_anonymous_comment @homework %>
|
||||||
<%= student_new_homework @homework %>
|
<%= student_new_homework @homework %>
|
||||||
|
|
|
@ -17,75 +17,77 @@
|
||||||
});
|
});
|
||||||
<% end%>
|
<% end%>
|
||||||
</script>
|
</script>
|
||||||
<div class="project_r_h">
|
<div class="HomeWork" id="RSide">
|
||||||
<h2 class="project_h2">创建作品</h2>
|
<div class="RightBanner">
|
||||||
</div>
|
<div class="NewsBannerName">提交作品</div>
|
||||||
<div class="Newwork">
|
</div>
|
||||||
<div class="hwork_ctt">
|
<div class="Newwork">
|
||||||
<div class="hwork_dis" id="tbc_01">
|
<div class="hwork_ctt">
|
||||||
<%= form_for(@student_work,
|
<div class="hwork_dis" id="tbc_01">
|
||||||
:html => { :multipart => true },
|
<%= form_for(@student_work,
|
||||||
:url => {:controller => 'student_work',
|
:html => { :multipart => true },
|
||||||
:action => 'create',
|
:url => {:controller => 'student_work',
|
||||||
:homework => @homework.id
|
:action => 'create',
|
||||||
}) do |f|%>
|
:homework => @homework.id
|
||||||
<div class="N_con">
|
}) do |f|%>
|
||||||
<% if @homework.homework_type == 1%>
|
<div class="N_con">
|
||||||
<div class=" c_red mb10 ml90">
|
<% if @homework.homework_type == 1%>
|
||||||
提示:匿评作业提交的作品,作品名称和描述中不能出现真实的姓名信息
|
<div class=" c_red mb10 ml90">
|
||||||
</div>
|
提示:匿评作业提交的作品,作品名称和描述中不能出现真实的姓名信息
|
||||||
|
</div>
|
||||||
|
<% end%>
|
||||||
|
<p>
|
||||||
|
<label class="fl"><span class="c_red">*</span> 作品名称 :</label>
|
||||||
|
<%= f.text_field "name", :required => true, :size => 60, :class => "bo fl", :maxlength => 200, :placeholder => "作品名称", :onkeyup => "regexStudentWorkName();" %>
|
||||||
|
<% if @homework.homework_type != 2%>
|
||||||
|
<a href="javascript:void(0)" class="fl ml10 mt3" onclick=" $('#about_project').slideToggle();" >
|
||||||
|
项目信息
|
||||||
|
<img class="ml5 " src="../images/bid/pic_question.png" width="15" height="15" Title="项目是一种由用户创建的基于 网络的协作空间,能够为个人 或小组提供分布式的协同交流 和资料管理等方面的。">
|
||||||
|
</a>
|
||||||
|
<% end%>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<p id="student_work_name_span" class="c_red ml90 mb10"></p>
|
||||||
|
</p>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<p id="about_project" class="about_project" >
|
||||||
|
<label class="fl"> 选择项目 :</label>
|
||||||
|
<%= f.select :project_id,options_for_select(user_projects_option), {},{:class => "bo02 mb10"} %>
|
||||||
|
</p>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<p>
|
||||||
|
<label class="fl">
|
||||||
|
<span class="c_red">*</span>
|
||||||
|
<%= @homework.homework_type == 2 ? "提交代码" : "作品描述"%>
|
||||||
|
:
|
||||||
|
</label>
|
||||||
|
<% if @homework.homework_type == 2 && @homework.homework_detail_programing%>
|
||||||
|
<%= f.text_area "description", :class => "w620 hwork_txt h400", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();", :value => @homework.homework_detail_programing.language == "1" ? c_stantard_code_student : c_stantard_code_student_%>
|
||||||
|
<% else %>
|
||||||
|
<%= f.text_area "description", :class => "w620 hwork_txt", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();"%>
|
||||||
|
<% end%>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<p id="student_work_description_textarea" class="c_red ml90 mb10"></p>
|
||||||
|
</p>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<% if @homework.homework_type != 2%>
|
||||||
|
<p>
|
||||||
|
<label class="fl"> 添加附件 :</label>
|
||||||
|
<%= render :partial => 'attachments/new_form' %>
|
||||||
|
</p>
|
||||||
|
<div class="cl"></div>
|
||||||
|
<% end%>
|
||||||
|
<p class="ml80 ">
|
||||||
|
<a href="javascript:void(0)" class="blue_btn fl c_white mt10" onclick="new_student_work();">提交作品</a>
|
||||||
|
<%= link_to "返 回".html_safe, student_work_index_path(:homework => @homework), :class => "blue_btn grey_btn fl c_white mt10 ml10"%>
|
||||||
|
<div class="cl"></div>
|
||||||
|
</p>
|
||||||
|
</div><!---创建作业内容结束-->
|
||||||
<% end%>
|
<% end%>
|
||||||
<p>
|
</div>
|
||||||
<label class="fl"><span class="c_red">*</span> 作品名称 :</label>
|
</div>
|
||||||
<%= f.text_field "name", :required => true, :size => 60, :class => "bo fl", :maxlength => 200, :placeholder => "作品名称", :onkeyup => "regexStudentWorkName();" %>
|
</div><!--新建作业结束-->
|
||||||
<% if @homework.homework_type != 2%>
|
<div class="cl"></div>
|
||||||
<a href="javascript:void(0)" class="fl ml10 mt3" onclick="show_project();" >
|
|
||||||
项目信息
|
|
||||||
<img class="ml5 " src="../images/bid/pic_question.png" width="15" height="15" Title="项目是一种由用户创建的基于 网络的协作空间,能够为个人 或小组提供分布式的协同交流 和资料管理等方面的。">
|
|
||||||
</a>
|
|
||||||
<% end%>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<p id="student_work_name_span" class="c_red ml90 mb10"></p>
|
|
||||||
</p>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<p id="about_project" class="about_project" >
|
|
||||||
<label class="fl"> 选择项目 :</label>
|
|
||||||
<%= f.select :project_id,options_for_select(user_projects_option), {},{:class => "bo02 mb10"} %>
|
|
||||||
</p>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<p>
|
|
||||||
<label class="fl">
|
|
||||||
<span class="c_red">*</span>
|
|
||||||
<%= @homework.homework_type == 2 ? "提交代码" : "作品描述"%>
|
|
||||||
:
|
|
||||||
</label>
|
|
||||||
<% if @homework.homework_type == 2 && @homework.homework_detail_programing%>
|
|
||||||
<%= f.text_area "description", :class => "w620 hwork_txt h400", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();", :value => @homework.homework_detail_programing.language == "1" ? c_stantard_code_student : c_stantard_code_student_%>
|
|
||||||
<% else %>
|
|
||||||
<%= f.text_area "description", :class => "w620 hwork_txt", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();"%>
|
|
||||||
<% end%>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<p id="student_work_description_textarea" class="c_red ml90 mb10"></p>
|
|
||||||
</p>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<% if @homework.homework_type != 2%>
|
|
||||||
<p>
|
|
||||||
<label class="fl"> 添加附件 :</label>
|
|
||||||
<%= render :partial => 'attachments/new_form' %>
|
|
||||||
</p>
|
|
||||||
<div class="cl"></div>
|
|
||||||
<% end%>
|
|
||||||
<p class="ml80 ">
|
|
||||||
<a href="javascript:void(0)" class="blue_btn fl c_white" onclick="new_student_work();">提交作品</a>
|
|
||||||
<%= link_to "返 回".html_safe, student_work_index_path(:homework => @homework), :class => "blue_btn grey_btn fl c_white"%>
|
|
||||||
<div class="cl"></div>
|
|
||||||
</p>
|
|
||||||
</div><!---创建作业内容结束-->
|
|
||||||
<% end%>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div><!--新建作业结束-->
|
|
||||||
<div class="cl"></div>
|
|
||||||
|
|
||||||
<% else %>
|
<% else %>
|
||||||
|
|
||||||
|
@ -125,8 +127,8 @@
|
||||||
</script>
|
</script>
|
||||||
<!-- 模板1结束 -->
|
<!-- 模板1结束 -->
|
||||||
|
|
||||||
<div class="homepageRight">
|
|
||||||
<div class="HomeWork">
|
<div class="HomeWork" id="RSide">
|
||||||
<div class="RightBanner">
|
<div class="RightBanner">
|
||||||
<div class="NewsBannerName">提交作品</div>
|
<div class="NewsBannerName">提交作品</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -201,6 +203,5 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div><!----ProResult end-->
|
</div><!----ProResult end-->
|
||||||
</div><!--homepageRight end-->
|
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -29,6 +29,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="resources mt10" id="users_setting">
|
<div class="resources mt10" id="users_setting">
|
||||||
<div>
|
<div>
|
||||||
|
<% if params[:type].nil? %>
|
||||||
|
<div class="newsReadSetting">
|
||||||
|
有 <span class="c_red"><%= User.current.count_new_message %></span> 条未读<a href="javascript:void(0);" class="ml15"><%= link_to "全部设为已读", user_message_path(User.current, :viewed => 'all') %></a>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
<% if @message_alls.count >0 %>
|
<% if @message_alls.count >0 %>
|
||||||
<%# 课程消息 %>
|
<%# 课程消息 %>
|
||||||
<% unless @message_alls.nil? %>
|
<% unless @message_alls.nil? %>
|
||||||
|
@ -52,7 +57,11 @@
|
||||||
<li class="homepageNewsContent fl">
|
<li class="homepageNewsContent fl">
|
||||||
<%= link_to ma.course_message.comments.html_safe, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
|
<%= link_to ma.course_message.comments.html_safe, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
|
||||||
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
:title => "#{ma.course_message.comments.html_safe}" %></li>
|
:onmouseover =>"message_titile_show($(this),event)",
|
||||||
|
:onmouseout => "message_titile_hide($(this))" %></li>
|
||||||
|
<div style="display: none" class="message_title">
|
||||||
|
<%= ma.course_message.comments.html_safe %>
|
||||||
|
</div>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -80,11 +89,21 @@
|
||||||
<ul class="homepageNewsList fl">
|
<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="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>
|
<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>
|
||||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
<% if ma.course_message.parent_id.nil? %>
|
||||||
<%= link_to ma.course_message.parent_id.nil? ? ma.course_message.subject.html_safe : ma.course_message.content.html_safe,
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||||
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),
|
<%= 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"}",
|
:class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
|
||||||
:title => "#{ma.course_message.subject.html_safe}" %></a></li>
|
:title => "#{ma.course_message.subject.html_safe}" %></a></li>
|
||||||
|
<% 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" >
|
||||||
|
<%= ma.course_message.content.html_safe %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -150,11 +169,23 @@
|
||||||
<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="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" %>
|
<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>
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %></span></li>
|
||||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
<% if ma.forge_message.parent_id.nil? %>
|
||||||
<%=link_to ma.forge_message.parent_id.nil? ? ma.forge_message.subject.html_safe : ma.forge_message.content.html_safe, project_boards_path(ma.forge_message.project,
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||||
:parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
|
<%=link_to ma.forge_message.subject, project_boards_path(ma.forge_message.project,
|
||||||
:topic_id => ma.forge_message.id),:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
|
:parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
|
||||||
:title => "#{ma.forge_message.subject.html_safe}" %></a></li>
|
:topic_id => ma.forge_message.id),:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
|
||||||
|
:title => "#{ma.forge_message.subject.html_safe}" %></a></li>
|
||||||
|
<% else %>
|
||||||
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||||
|
<%=link_to ma.forge_message.content.html_safe, 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">
|
||||||
|
<%= ma.forge_message.content.html_safe %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -180,7 +211,9 @@
|
||||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了新闻:</span></li>
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>">评论了新闻:</span></li>
|
||||||
<li class="homepageNewsContent fl">
|
<li class="homepageNewsContent fl">
|
||||||
<%= link_to "#{ma.forge_message.comments.html_safe}",
|
<%= link_to "#{ma.forge_message.comments.html_safe}",
|
||||||
{:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ma.forge_message.comments.html_safe}"%></li>
|
{:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
|
||||||
|
:title => "#{ma.forge_message.comments.html_safe}" %>
|
||||||
|
</li>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.created_at).html_safe %> </li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -196,9 +229,21 @@
|
||||||
<%=link_to ma.memo.author, user_path(ma.memo.author), :class => "newsBlue homepageNewsPublisher" %>
|
<%=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>
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>" ><%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %></span>
|
||||||
</li>
|
</li>
|
||||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
<% if ma.memo.parent_id.nil? %>
|
||||||
<%= link_to ma.memo.parent_id.nil? ? ma.memo.subject : ma.memo.content, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ma.memo.parent_id.nil? ? ma.memo.subject : ma.memo.content}" %></a>
|
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
||||||
</li>
|
<%= 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"}",
|
||||||
|
:title => "#{ma.memo.subject}" %></a>
|
||||||
|
</li>
|
||||||
|
<% 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">
|
||||||
|
<%= ma.memo.content.html_safe %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.memo.created_at).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.memo.created_at).html_safe %> </li>
|
||||||
</ul>
|
</ul>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -215,8 +260,13 @@
|
||||||
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %></span>
|
<span class="<%= ma.viewed == 0 ? "homepageNewsTypeNotRead fl":"homepageNewsType fl" %>"><%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %></span>
|
||||||
</li>
|
</li>
|
||||||
<li class="homepageNewsContent fl"><a href="javascript:void(0);" class="newsGrey">
|
<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"}", :title => "#{ma.journals_for_message.notes}" %></a>
|
<%= 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>
|
</li>
|
||||||
|
<div style="display: none" class="message_title" >
|
||||||
|
<%= ma.journals_for_message.notes.html_safe %>
|
||||||
|
</div>
|
||||||
<li class="homepageNewsTime fl"><%= time_tag(ma.journals_for_message.created_on).html_safe %> </li>
|
<li class="homepageNewsTime fl"><%= time_tag(ma.journals_for_message.created_on).html_safe %> </li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -236,6 +286,17 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function message_titile_show(obj,e)
|
||||||
|
{
|
||||||
|
obj.parent().next("div").show();
|
||||||
|
obj.parent().next("div").css("top",e.pageY).css("left",e.pageX).css("position","absolute");
|
||||||
|
}
|
||||||
|
function message_titile_hide(obj)
|
||||||
|
{
|
||||||
|
obj.parent().next("div").hide();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
span.ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
|
||||||
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
|
||||||
div.ke-toolbar .ke-outline{border:none;}
|
div.ke-toolbar .ke-outline{border:none;}
|
||||||
|
.ke-container{height: 80px !important;}
|
||||||
</style>
|
</style>
|
||||||
<div >
|
<div >
|
||||||
<div class="homepageRightBanner mb10">
|
<div class="homepageRightBanner mb10">
|
||||||
|
|
|
@ -1,78 +1,78 @@
|
||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
class ForgeMessages < ActiveRecord::Migration
|
class ForgeMessages < ActiveRecord::Migration
|
||||||
def up
|
def up
|
||||||
Project.all.each do |project|
|
# Project.all.each do |project|
|
||||||
transaction do
|
# transaction do
|
||||||
project.forge_messages << ForgeMessage.new(:user_id => project.user_id, :project_id => project.id)
|
# project.forge_messages << ForgeMessage.new(:user_id => project.user_id, :project_id => project.id)
|
||||||
|
#
|
||||||
# 新闻
|
# # 新闻
|
||||||
project.news.each do |new|
|
# project.news.each do |new|
|
||||||
new.project.members.each do |m|
|
# new.project.members.each do |m|
|
||||||
if m.user_id != new.author_id
|
# if m.user_id != new.author_id
|
||||||
if m.created_on < new.created_on # 在成员加入项目之后
|
# if m.created_on < new.created_on # 在成员加入项目之后
|
||||||
new.forge_messages << ForgeMessage.new(:user_id => m.user_id, :project_id => new.project_id, :viewed => true)
|
# new.forge_messages << ForgeMessage.new(:user_id => m.user_id, :project_id => new.project_id, :viewed => true)
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
#
|
||||||
# 新闻回复
|
# # 新闻回复
|
||||||
project.news.each do |new|
|
# project.news.each do |new|
|
||||||
if new.comments
|
# if new.comments
|
||||||
new.comments.each do |comment|
|
# new.comments.each do |comment|
|
||||||
if comment.author_id != comment.commented.author_id
|
# if comment.author_id != comment.commented.author_id
|
||||||
comment.forge_messages << ForgeMessage.new(:user_id => comment.commented.author_id, :project_id => comment.commented.project.id, :viewed => true)
|
# comment.forge_messages << ForgeMessage.new(:user_id => comment.commented.author_id, :project_id => comment.commented.project.id, :viewed => true)
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
#
|
||||||
# 讨论区
|
# # 讨论区
|
||||||
if project.boards.first
|
# if project.boards.first
|
||||||
project.boards.first.messages.each do |message|
|
# project.boards.first.messages.each do |message|
|
||||||
if message.parent_id.nil? # 主贴
|
# if message.parent_id.nil? # 主贴
|
||||||
message.project.members.each do |m|
|
# message.project.members.each do |m|
|
||||||
if m.user_id != message.author_id
|
# if m.user_id != message.author_id
|
||||||
if m.created_on < message.created_on
|
# if m.created_on < message.created_on
|
||||||
message.forge_messages << ForgeMessage.new(:user_id => m.user_id, :project_id => message.board.project_id, :viewed => true)
|
# message.forge_messages << ForgeMessage.new(:user_id => m.user_id, :project_id => message.board.project_id, :viewed => true)
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
else # 回帖
|
# else # 回帖
|
||||||
message.project.members.each do |m|
|
# message.project.members.each do |m|
|
||||||
if m.user_id == Message.find(message.parent_id).author_id && m.user_id != message.author_id # 只针对主贴回复,回复自己的帖子不发消息
|
# if m.user_id == Message.find(message.parent_id).author_id && m.user_id != message.author_id # 只针对主贴回复,回复自己的帖子不发消息
|
||||||
if m.created_on < message.created_on
|
# if m.created_on < message.created_on
|
||||||
message.forge_messages << ForgeMessage.new(:user_id => m.user_id, :project_id => message.board.project_id, :viewed => true)
|
# message.forge_messages << ForgeMessage.new(:user_id => m.user_id, :project_id => message.board.project_id, :viewed => true)
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
#
|
||||||
# 缺陷
|
# # 缺陷
|
||||||
project.issues.each do |issue|
|
# project.issues.each do |issue|
|
||||||
unless issue.author_id == issue.assigned_to_id
|
# unless issue.author_id == issue.assigned_to_id
|
||||||
issue.forge_messages << ForgeMessage.new(:user_id => issue.assigned_to_id, :project_id => issue.project_id, :viewed => true)
|
# issue.forge_messages << ForgeMessage.new(:user_id => issue.assigned_to_id, :project_id => issue.project_id, :viewed => true)
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
#
|
||||||
# 缺陷更新
|
# # 缺陷更新
|
||||||
project.issues.each do |issue|
|
# project.issues.each do |issue|
|
||||||
if issue.journals
|
# if issue.journals
|
||||||
issue.journals.each do |journal|
|
# issue.journals.each do |journal|
|
||||||
if journal.user_id != journal.issue.author_id
|
# if journal.user_id != journal.issue.author_id
|
||||||
journal.forge_messages << ForgeMessage.new(:user_id => journal.issue.author_id, :project_id => journal.issue.project_id, :viewed => true)
|
# journal.forge_messages << ForgeMessage.new(:user_id => journal.issue.author_id, :project_id => journal.issue.project_id, :viewed => true)
|
||||||
end
|
# end
|
||||||
if journal.user_id != journal.issue.assigned_to_id && journal.issue.assigned_to_id != journal.issue.author_id # 指派人不是自己的话,则给指派人发送
|
# if journal.user_id != journal.issue.assigned_to_id && journal.issue.assigned_to_id != journal.issue.author_id # 指派人不是自己的话,则给指派人发送
|
||||||
journal.forge_messages << ForgeMessage.new(:user_id => journal.issue.assigned_to_id, :project_id => journal.issue.project_id, :viewed => true)
|
# journal.forge_messages << ForgeMessage.new(:user_id => journal.issue.assigned_to_id, :project_id => journal.issue.project_id, :viewed => true)
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
#
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
|
|
|
@ -1,79 +1,80 @@
|
||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
class CourseMessages < ActiveRecord::Migration
|
class CourseMessages < ActiveRecord::Migration
|
||||||
def up
|
def up
|
||||||
Course.all.each do |course|
|
# Course.all.each do |course|
|
||||||
transaction do
|
# transaction do
|
||||||
course.course_messages << CourseMessage.new(:user_id => course.tea_id,:course_id => course.id)
|
# put course.id
|
||||||
# 作业
|
# course.course_messages << CourseMessage.new(:user_id => course.tea_id,:course_id => course.id)
|
||||||
course.homework_commons.each do |homework_common|
|
# # 作业
|
||||||
homework_common.course.members.each do |m|
|
# course.homework_commons.each do |homework_common|
|
||||||
if m.user_id != homework_common.user_id
|
# homework_common.course.members.each do |m|
|
||||||
if m.created_on < homework_common.created_at
|
# if m.user_id != homework_common.user_id
|
||||||
homework_common.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => true)
|
# if m.created_on < homework_common.created_at
|
||||||
end
|
# homework_common.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => true)
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
# end
|
||||||
# 通知
|
#
|
||||||
course.news.each do |new|
|
# # 通知
|
||||||
new.course.members.each do |m|
|
# course.news.each do |new|
|
||||||
if m.user_id != new.author_id
|
# new.course.members.each do |m|
|
||||||
if m.created_on < new.created_on # 在成员加入课程之后
|
# if m.user_id != new.author_id
|
||||||
new.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => true)
|
# if m.created_on < new.created_on # 在成员加入课程之后
|
||||||
end
|
# new.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => true)
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
# end
|
||||||
# 通知的回复
|
#
|
||||||
course.news.each do |new|
|
# # 通知的回复
|
||||||
if new.comments
|
# course.news.each do |new|
|
||||||
new.comments.each do |comment|
|
# if new.comments
|
||||||
if comment.author_id != comment.commented.author_id
|
# new.comments.each do |comment|
|
||||||
comment.course_messages << CourseMessage.new(:user_id => comment.commented.author_id, :course_id => course.id, :viewed => true)
|
# if comment.author_id != comment.commented.author_id
|
||||||
end
|
# comment.course_messages << CourseMessage.new(:user_id => comment.commented.author_id, :course_id => course.id, :viewed => true)
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
# end
|
||||||
# 讨论区
|
#
|
||||||
if course.boards.first
|
# # 讨论区
|
||||||
course.boards.first.messages.each do |message|
|
# if course.boards.first
|
||||||
if message.parent_id.nil? # 主贴
|
# course.boards.first.messages.each do |message|
|
||||||
message.course.members.each do |m|
|
# if message.parent_id.nil? # 主贴
|
||||||
if message.author.allowed_to?(:as_teacher, message.course) && m.user_id != message.author_id # 老师 自己的帖子不给自己发送消息
|
# message.course.members.each do |m|
|
||||||
if m.created_on < message.created_on
|
# if message.author.allowed_to?(:as_teacher, message.course) && m.user_id != message.author_id # 老师 自己的帖子不给自己发送消息
|
||||||
message.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => true)
|
# if m.created_on < message.created_on
|
||||||
end
|
# message.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => true)
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
else # 回帖
|
# end
|
||||||
message.course.members.each do |m|
|
# else # 回帖
|
||||||
if m.user_id == Message.find(message.parent_id).author_id && m.user_id != message.author_id # 只针对主贴回复,回复自己的帖子不发消息
|
# message.course.members.each do |m|
|
||||||
if m.created_on < message.created_on
|
# if m.user_id == Message.find(message.parent_id).author_id && m.user_id != message.author_id # 只针对主贴回复,回复自己的帖子不发消息
|
||||||
message.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => true)
|
# if m.created_on < message.created_on
|
||||||
end
|
# message.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => true)
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
# end
|
||||||
# 问卷
|
#
|
||||||
Poll.where("polls_type = 'Course' and polls_group_id = #{course.id}").each do |poll|
|
# # 问卷
|
||||||
if poll.polls_status == 2 #问卷是发布状态
|
# Poll.where("polls_type = 'Course' and polls_group_id = #{course.id}").each do |poll|
|
||||||
Course.find(poll.polls_group_id).members.each do |m|
|
# if poll.polls_status == 2 #问卷是发布状态
|
||||||
if m.user_id != poll.user_id
|
# Course.find(poll.polls_group_id).members.each do |m|
|
||||||
if m.created_on < poll.created_at
|
# if m.user_id != poll.user_id
|
||||||
poll.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => true)
|
# if m.created_on < poll.created_at
|
||||||
end
|
# poll.course_messages << CourseMessage.new(:user_id => m.user_id, :course_id => course.id, :viewed => true)
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
elsif poll.polls_status == 1 #问卷是新建状态
|
# end
|
||||||
poll.course_messages.destroy_all
|
# elsif poll.polls_status == 1 #问卷是新建状态
|
||||||
end
|
# poll.course_messages.destroy_all
|
||||||
end
|
# end
|
||||||
|
# end
|
||||||
|
|
||||||
# 作品评阅
|
# 作品评阅
|
||||||
# course.homework_commons.each do |homework_common|
|
# course.homework_commons.each do |homework_common|
|
||||||
|
@ -106,8 +107,8 @@ class CourseMessages < ActiveRecord::Migration
|
||||||
# end
|
# end
|
||||||
# 作品讨论
|
# 作品讨论
|
||||||
|
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
|
|
|
@ -1,24 +1,25 @@
|
||||||
class UpdateMessageTime < ActiveRecord::Migration
|
class UpdateMessageTime < ActiveRecord::Migration
|
||||||
def up
|
def up
|
||||||
course_count = CourseMessage.all.count / 30 + 1
|
# course_count = CourseMessage.all.count / 30 + 1
|
||||||
transaction do
|
# transaction do
|
||||||
for i in 1 ... course_count do i
|
# for i in 1 ... course_count do i
|
||||||
CourseMessage.page(i).per(30).each do |cmessage|
|
# CourseMessage.page(i).per(30).each do |cmessage|
|
||||||
if cmessage.course_message
|
# if cmessage.course_message
|
||||||
if cmessage.course_message.respond_to?("created_at")
|
# if cmessage.course_message.respond_to?("created_at")
|
||||||
cmessage.created_at = cmessage.course_message.created_at
|
# cmessage.created_at = cmessage.course_message.created_at
|
||||||
elsif cmessage.course_message.respond_to?("created_on")
|
# elsif cmessage.course_message.respond_to?("created_on")
|
||||||
cmessage.created_at = cmessage.course_message.created_on
|
# cmessage.created_at = cmessage.course_message.created_on
|
||||||
end
|
# end
|
||||||
cmessage.save
|
# cmessage.save
|
||||||
|
# puts cmessage.id
|
||||||
course_all_message = MessageAll.where("message_type = '#{cmessage.class.to_s}' and message_id = '#{cmessage.id}'").first
|
#
|
||||||
course_all_message.created_at = cmessage.created_at
|
# course_all_message = MessageAll.where("message_type = '#{cmessage.class.to_s}' and message_id = '#{cmessage.id}'").first
|
||||||
course_all_message.save
|
# course_all_message.created_at = cmessage.created_at
|
||||||
end
|
# course_all_message.save
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
# end
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
|
|
|
@ -1,24 +1,25 @@
|
||||||
class UpdateForgeMessageTime < ActiveRecord::Migration
|
class UpdateForgeMessageTime < ActiveRecord::Migration
|
||||||
def up
|
def up
|
||||||
forge_count = ForgeMessage.all.count / 30 + 1
|
# forge_count = ForgeMessage.all.count / 30 + 1
|
||||||
transaction do
|
# transaction do
|
||||||
for i in 1 ... forge_count do i
|
# for i in 1 ... forge_count do i
|
||||||
ForgeMessage.page(i).per(30).each do |fmessage|
|
# ForgeMessage.page(i).per(30).each do |fmessage|
|
||||||
if fmessage.forge_message
|
# if fmessage.forge_message
|
||||||
if fmessage.forge_message.respond_to?("created_at")
|
# if fmessage.forge_message.respond_to?("created_at")
|
||||||
fmessage.created_at = fmessage.forge_message.created_at
|
# fmessage.created_at = fmessage.forge_message.created_at
|
||||||
elsif fmessage.forge_message.respond_to?("created_on")
|
# elsif fmessage.forge_message.respond_to?("created_on")
|
||||||
fmessage.created_at = fmessage.forge_message.created_on
|
# fmessage.created_at = fmessage.forge_message.created_on
|
||||||
end
|
# end
|
||||||
fmessage.save
|
# fmessage.save
|
||||||
|
# puts fmessage.id
|
||||||
forge_all_message = MessageAll.where("message_type = '#{fmessage.class.to_s}' and message_id = '#{fmessage.id}'").first
|
#
|
||||||
forge_all_message.created_at = fmessage.created_at
|
# forge_all_message = MessageAll.where("message_type = '#{fmessage.class.to_s}' and message_id = '#{fmessage.id}'").first
|
||||||
forge_all_message.save
|
# forge_all_message.created_at = fmessage.created_at
|
||||||
end
|
# forge_all_message.save
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
# end
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
|
|
|
@ -1,34 +1,34 @@
|
||||||
class AboutMemoMessage < ActiveRecord::Migration
|
class AboutMemoMessage < ActiveRecord::Migration
|
||||||
def up
|
def up
|
||||||
Memo.all.each do |memo|
|
# Memo.all.each do |memo|
|
||||||
transaction do
|
# transaction do
|
||||||
# 贴吧帖子
|
# # 贴吧帖子
|
||||||
receivers = []
|
# receivers = []
|
||||||
u = User.find(6)
|
# u = User.find(6)
|
||||||
receivers << u
|
# receivers << u
|
||||||
# 主贴
|
# # 主贴
|
||||||
if memo.parent_id.nil?
|
# if memo.parent_id.nil?
|
||||||
if memo.author_id != memo.forum.creator_id # 发帖人不是吧主
|
# if memo.author_id != memo.forum.creator_id # 发帖人不是吧主
|
||||||
receivers << memo.forum.creator
|
# receivers << memo.forum.creator
|
||||||
end
|
# end
|
||||||
else # 回帖
|
# else # 回帖
|
||||||
# 添加吧主
|
# # 添加吧主
|
||||||
if memo.author_id != memo.forum.creator_id
|
# if memo.author_id != memo.forum.creator_id
|
||||||
receivers << memo.forum.creator
|
# receivers << memo.forum.creator
|
||||||
end
|
# end
|
||||||
# 添加发帖人
|
# # 添加发帖人
|
||||||
unless memo.parent.nil?
|
# unless memo.parent.nil?
|
||||||
if memo.author_id != memo.parent.author_id
|
# if memo.author_id != memo.parent.author_id
|
||||||
receivers << memo.parent.author
|
# receivers << memo.parent.author
|
||||||
puts memo.id
|
# puts memo.id
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
receivers.each do |r|
|
# receivers.each do |r|
|
||||||
memo.memo_messages << MemoMessage.new(:user_id => r.id, :forum_id => memo.forum_id, :memo_id => memo.id, :memo_type => "Memo", :viewed => true)
|
# memo.memo_messages << MemoMessage.new(:user_id => r.id, :forum_id => memo.forum_id, :memo_id => memo.id, :memo_type => "Memo", :viewed => true)
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
|
|
|
@ -1,34 +1,34 @@
|
||||||
class AboutUserFeedbackMessage < ActiveRecord::Migration
|
class AboutUserFeedbackMessage < ActiveRecord::Migration
|
||||||
def up
|
def up
|
||||||
JournalsForMessage.all.each do |jour_for_message|
|
# JournalsForMessage.all.each do |jour_for_message|
|
||||||
transaction do
|
# transaction do
|
||||||
# 主留言
|
# # 主留言
|
||||||
if jour_for_message.jour_type == 'Principal'
|
# if jour_for_message.jour_type == 'Principal'
|
||||||
receivers = []
|
# receivers = []
|
||||||
if jour_for_message.reply_id == 0
|
# if jour_for_message.reply_id == 0
|
||||||
if jour_for_message.user_id != jour_for_message.jour_id # 过滤自己给自己的留言消息
|
# if jour_for_message.user_id != jour_for_message.jour_id # 过滤自己给自己的留言消息
|
||||||
receivers << jour_for_message.jour
|
# receivers << jour_for_message.jour
|
||||||
end
|
# end
|
||||||
else # 留言回复
|
# else # 留言回复
|
||||||
reply_to = User.find(jour_for_message.reply_id)
|
# reply_to = User.find(jour_for_message.reply_id)
|
||||||
if jour_for_message.user_id != jour_for_message.reply_id # 添加我回复的那个人
|
# if jour_for_message.user_id != jour_for_message.reply_id # 添加我回复的那个人
|
||||||
receivers << reply_to
|
# receivers << reply_to
|
||||||
end
|
# end
|
||||||
unless jour_for_message.parent.nil?
|
# unless jour_for_message.parent.nil?
|
||||||
if jour_for_message.user_id != jour_for_message.parent.jour_id && jour_for_message.reply_id != jour_for_message.parent.jour_id # 给东家发信息,如果回复的对象是东家则不发
|
# if jour_for_message.user_id != jour_for_message.parent.jour_id && jour_for_message.reply_id != jour_for_message.parent.jour_id # 给东家发信息,如果回复的对象是东家则不发
|
||||||
receivers << jour_for_message.parent.jour
|
# receivers << jour_for_message.parent.jour
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
unless receivers.blank?
|
# unless receivers.blank?
|
||||||
receivers.each do |r|
|
# receivers.each do |r|
|
||||||
puts jour_for_message.id
|
# puts jour_for_message.id
|
||||||
jour_for_message.user_feedback_messages << UserFeedbackMessage.new(:user_id => r.id, :journals_for_message_id => jour_for_message.id, :journals_for_message_type => "Principal", :viewed => true)
|
# jour_for_message.user_feedback_messages << UserFeedbackMessage.new(:user_id => r.id, :journals_for_message_id => jour_for_message.id, :journals_for_message_type => "Principal", :viewed => true)
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
|
|
|
@ -1,24 +1,25 @@
|
||||||
class UpdateMemoMessageTime < ActiveRecord::Migration
|
class UpdateMemoMessageTime < ActiveRecord::Migration
|
||||||
def up
|
def up
|
||||||
memo_count = Memo.all.count / 30 + 1
|
# memo_count = Memo.all.count / 30 + 1
|
||||||
transaction do
|
# transaction do
|
||||||
for i in 1 ... memo_count do i
|
# for i in 1 ... memo_count do i
|
||||||
MemoMessage.page(i).per(30).each do |memo_message|
|
# MemoMessage.page(i).per(30).each do |memo_message|
|
||||||
if memo_message.memo
|
# if memo_message.memo
|
||||||
if memo_message.memo.respond_to?("created_at")
|
# if memo_message.memo.respond_to?("created_at")
|
||||||
memo_message.created_at = memo_message.memo.created_at
|
# memo_message.created_at = memo_message.memo.created_at
|
||||||
elsif memo_message.memo.respond_to?("created_on")
|
# elsif memo_message.memo.respond_to?("created_on")
|
||||||
memo_message.created_at = memo_message.memo.created_on
|
# memo_message.created_at = memo_message.memo.created_on
|
||||||
end
|
# end
|
||||||
memo_message.save
|
# memo_message.save
|
||||||
|
# puts memo_message.id
|
||||||
memo_messages = MessageAll.where("message_type = '#{memo_message.class.to_s}' and message_id = '#{memo_message.id}'").first
|
#
|
||||||
memo_messages.created_at = memo_message.created_at
|
# memo_messages = MessageAll.where("message_type = '#{memo_message.class.to_s}' and message_id = '#{memo_message.id}'").first
|
||||||
memo_messages.save
|
# memo_messages.created_at = memo_message.created_at
|
||||||
end
|
# memo_messages.save
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
|
# end
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
class UpdateUserfeebackMessageTime < ActiveRecord::Migration
|
class UpdateUserfeebackMessageTime < ActiveRecord::Migration
|
||||||
def up
|
def up
|
||||||
user_feedback_count = UserFeedbackMessage.all.count / 30 + 1
|
# user_feedback_count = UserFeedbackMessage.all.count / 30 + 1
|
||||||
transaction do
|
# transaction do
|
||||||
for i in 1 ... user_feedback_count do i
|
# for i in 1 ... user_feedback_count do i
|
||||||
UserFeedbackMessage.page(i).per(30).each do |ufm|
|
# UserFeedbackMessage.page(i).per(30).each do |ufm|
|
||||||
if ufm.journals_for_message
|
# if ufm.journals_for_message
|
||||||
if ufm.journals_for_message.respond_to?("created_at")
|
# if ufm.journals_for_message.respond_to?("created_at")
|
||||||
ufm.created_at = ufm.journals_for_message.created_at
|
# ufm.created_at = ufm.journals_for_message.created_at
|
||||||
elsif ufm.journals_for_message.respond_to?("created_on")
|
# elsif ufm.journals_for_message.respond_to?("created_on")
|
||||||
ufm.created_at = ufm.journals_for_message.created_on
|
# ufm.created_at = ufm.journals_for_message.created_on
|
||||||
end
|
# end
|
||||||
puts ufm.id
|
# puts ufm.id
|
||||||
ufm.save
|
# ufm.save
|
||||||
|
#
|
||||||
user_feedback_messages = MessageAll.where("message_type = '#{ufm.class.to_s}' and message_id = '#{ufm.id}'").first
|
# user_feedback_messages = MessageAll.where("message_type = '#{ufm.class.to_s}' and message_id = '#{ufm.id}'").first
|
||||||
user_feedback_messages.created_at = ufm.created_at
|
# user_feedback_messages.created_at = ufm.created_at
|
||||||
user_feedback_messages.save
|
# user_feedback_messages.save
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
function init_editor(params){
|
function init_editor(params){
|
||||||
var editor = params.kindutil.create(params.textarea, {
|
var editor = params.kindutil.create(params.textarea, {
|
||||||
resizeType : 0,minWidth:"1px",width:"100%",minHeight:"40px",
|
resizeType : 1,minWidth:"1px",width:"100%",height:"80px",
|
||||||
items:['emoticons'],
|
items:['emoticons'],
|
||||||
afterChange:function(){//按键事件
|
afterChange:function(){//按键事件
|
||||||
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
nh_check_field({content:this,contentmsg:params.contentmsg,textarea:params.textarea});
|
||||||
|
|
|
@ -132,3 +132,49 @@ function search_homework_by_name(url){
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//提交新建作品
|
||||||
|
function new_student_work()
|
||||||
|
{
|
||||||
|
if(regexStudentWorkName()&®exStudentWorkDescription())
|
||||||
|
{$("#new_student_work").submit();}
|
||||||
|
}
|
||||||
|
|
||||||
|
function edit_student_work(id)
|
||||||
|
{
|
||||||
|
if(regexStudentWorkName()&®exStudentWorkDescription())
|
||||||
|
{$("#edit_student_work_" + id).submit();}
|
||||||
|
}
|
||||||
|
|
||||||
|
//验证作品名称
|
||||||
|
function regexStudentWorkName()
|
||||||
|
{
|
||||||
|
var name = $.trim($("#student_work_name").val());
|
||||||
|
|
||||||
|
if(name=="")
|
||||||
|
{
|
||||||
|
$("#student_work_name_span").text("作品名称不能为空");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$("#student_work_name_span").text("");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function regexStudentWorkDescription()
|
||||||
|
{
|
||||||
|
var name = $.trim($("#student_work_description").val());
|
||||||
|
|
||||||
|
if(name=="")
|
||||||
|
{
|
||||||
|
$("#student_work_description_textarea").text("作品描述不能为空");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$("#student_work_description_textarea").text("");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -187,7 +187,7 @@ a:hover.grey_n_btn{ background:#717171; color:#fff;}
|
||||||
.green_btn{ background:#28be6c; color:#fff; font-weight:normal;padding:2px 10px; text-align:center;}
|
.green_btn{ background:#28be6c; color:#fff; font-weight:normal;padding:2px 10px; text-align:center;}
|
||||||
a.green_btn{background:#28be6c;color:#fff; font-weight:normal; padding:2px 10px; text-align:center;}
|
a.green_btn{background:#28be6c;color:#fff; font-weight:normal; padding:2px 10px; text-align:center;}
|
||||||
a:hover.green_btn{ background:#14ad5a;}
|
a:hover.green_btn{ background:#14ad5a;}
|
||||||
.blue_btn{ background:#64bdd9; color:#fff; font-weight:normal;padding:2px 10px; text-align:center;}
|
.blue_btn{ background:#64bdd9; color:#fff; font-size:14px; font-weight:normal;padding:2px 8px; text-align:center;}
|
||||||
a.blue_btn{background:#64bdd9;color:#fff; font-weight:normal; padding:2px 10px; text-align:center;}
|
a.blue_btn{background:#64bdd9;color:#fff; font-weight:normal; padding:2px 10px; text-align:center;}
|
||||||
a:hover.blue_btn{ background:#329cbd;}
|
a:hover.blue_btn{ background:#329cbd;}
|
||||||
a.orange_btn{ background:#ff5722;color:#fff; font-weight:normal; padding:2px 10px; text-align:center; }
|
a.orange_btn{ background:#ff5722;color:#fff; font-weight:normal; padding:2px 10px; text-align:center; }
|
||||||
|
@ -525,7 +525,7 @@ a.replyGrey1 {color:#888888;}
|
||||||
a.replyGrey1:hover {color:#4b4b4b;}
|
a.replyGrey1:hover {color:#4b4b4b;}
|
||||||
a.newsBlue {color:#269ac9;}
|
a.newsBlue {color:#269ac9;}
|
||||||
a.newsBlue:hover {color:#297fb8;}
|
a.newsBlue:hover {color:#297fb8;}
|
||||||
a.newsBlack {color:#000000; font-size:13px; font-weight:bold}
|
a.newsBlack {color:#4b4b4b; font-size:13px; font-weight:bold}
|
||||||
a.menuGrey {color:#808080;}
|
a.menuGrey {color:#808080;}
|
||||||
a.menuGrey:hover {color:#fe7d68;}
|
a.menuGrey:hover {color:#fe7d68;}
|
||||||
.navSearchTypeBox {width:368px; height:35px; position:absolute; border:1px solid #e1e1e1; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px;}
|
.navSearchTypeBox {width:368px; height:35px; position:absolute; border:1px solid #e1e1e1; background-color:#ffffff; padding-left:10px; display:none; color:#3e3e3e; font-size:14px;}
|
||||||
|
@ -925,6 +925,7 @@ img.ui-datepicker-trigger {
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
margin-bottom: 3px;
|
margin-bottom: 3px;
|
||||||
}
|
}
|
||||||
|
.message_title{border: 1px solid #D4D4D4;padding: 0.6em;margin-left: 1.4em;margin-right: 0.4em;border-radius: 4px;font-family: "Microsoft YaHei";background-size: 100% 100%;margin-bottom: 5px;background-color: #E8E8E8;}
|
||||||
.description{display: none !important;}
|
.description{display: none !important;}
|
||||||
.ispublic-label{display: none !important;}
|
.ispublic-label{display: none !important;}
|
||||||
.is_public_checkbox{display: none !important;}
|
.is_public_checkbox{display: none !important;}
|
||||||
|
@ -953,3 +954,50 @@ blockquote {
|
||||||
background-color: #e8e8e8;
|
background-color: #e8e8e8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 创建作品 work */
|
||||||
|
.Newwork{ width:668px; height:418px;}
|
||||||
|
.N_top{ float:right; margin-left:390px; }
|
||||||
|
.N_con{ color:#484747; font-weight:bold; width:660px; margin-top:10px; }
|
||||||
|
.N_con p{ }
|
||||||
|
.w430{ width:470px;}
|
||||||
|
.w557{ width:557px;}
|
||||||
|
.w350{ width:350px;}
|
||||||
|
.h400{height: 400px !important;}
|
||||||
|
.w620{ width:480px; height:160px; border:1px solid #CCC;}
|
||||||
|
.bo{height:26px; border:1px solid #CCC; padding-left:5px; background:#fff;width:470px; }
|
||||||
|
.bo02{height:26px; border:1px solid #CCC; padding-left:5px; background:#fff;width:480px; margin-left:2px; color: #999; }
|
||||||
|
.hwork_txt{ width:560px; padding-left:5px; background:#fff;}
|
||||||
|
a.tijiao{ height:28px; display:block; width:80px; color:#fff; background:#15bccf; text-align:center; padding-top:4px; float:left; margin-right:10px;}
|
||||||
|
a:hover.tijiao{ background:#0f99a9;}
|
||||||
|
.members_left{ float:left; width:410px; margin-right:20px; text-align:center;}
|
||||||
|
.members_left{}
|
||||||
|
.members_left ul li{ height:30px; border-bottom:1px solid #E4E4E4; width:410px; padding-top:10px; }
|
||||||
|
.members_left ul li a{ float:left; text-align:center;}
|
||||||
|
.members_left ul li span{ float:left; text-align:center; color:#484747;}
|
||||||
|
.w150{ text-align:center; width:150px;min-height: 10px;}
|
||||||
|
.f_b{ font-weight: bold;}
|
||||||
|
.members_right label{ margin-left:15px;}
|
||||||
|
.N_search{ height:20px; border:1px solid #999;}
|
||||||
|
/* 创建作品 homework */
|
||||||
|
.hwork_new{ color:#4c4c4c;}
|
||||||
|
.c_red{ color:#F00;}
|
||||||
|
.hwork_input{ border:1px solid #64bdd9; height:22px; width:88%; background:#fff; margin-bottom:10px; padding:5px;}
|
||||||
|
.hwork_input02{ border:1px solid #64bdd9; height:15px; width:140px; background:#fff; margin-bottom:10px; padding:5px;}
|
||||||
|
.hwork_text{ border:1px solid #64bdd9; height:100px;width:555px; background:#fff; margin-left:5px; padding:5px; margin-bottom:10px;}
|
||||||
|
.hwork_new ul li{ }
|
||||||
|
.ml21{ margin-left:21px;}
|
||||||
|
.ml9{ margin-left:9px;}
|
||||||
|
.hwork_ttl{height:24px;}
|
||||||
|
.hwork_ctt{height:auto; padding-left:10px;clear:both;}
|
||||||
|
.hwork_tb_{ border-bottom:3px solid #e4e4e4; text-align:center;}
|
||||||
|
.hwork_tb_ ul{height:24px;}
|
||||||
|
.hwork_tb_ li{float:left;height: 24px;width: auto; padding:0 10px;cursor:pointer;}
|
||||||
|
.hwork_normaltab { color:#15bccf ; border-bottom:3px solid #e4e4e4; }
|
||||||
|
.hwork_hovertab { color:#656767; font-weight:bold; border-bottom:3px solid #15bccf; }
|
||||||
|
|
||||||
|
.hwork_dis{display:block; }
|
||||||
|
.hwork_undis{display:none;}
|
||||||
|
.project_none{ display:none;}
|
||||||
|
.about_project{ overflow:hidden;display:none;}
|
||||||
|
.project_r_h{ width:670px; height:40px; background:#eaeaea; margin-bottom:10px;}
|
||||||
|
.project_r_h02{ width:920px; height:40px; background:#eaeaea; margin-bottom:10px;}
|
||||||
|
|
|
@ -391,16 +391,17 @@ blockquote {
|
||||||
border-right: 1px solid #e0e0e0;
|
border-right: 1px solid #e0e0e0;
|
||||||
border-top: 1px solid #e0e0e0;
|
border-top: 1px solid #e0e0e0;
|
||||||
border-bottom: 1px solid #e0e0e0;
|
border-bottom: 1px solid #e0e0e0;
|
||||||
padding-left: .6em;
|
padding-left: 0.6em;
|
||||||
padding-top: .6em;
|
padding-top: 0.6em;
|
||||||
padding-right: .6em;
|
padding-right: 0.6em;
|
||||||
padding-bottom: .6em;
|
padding-bottom: 0.6em;
|
||||||
margin-left: 1.4em;
|
margin-left: 1.4em;
|
||||||
margin-right: .4em;
|
margin-right: 0.4em;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
font-family: "Microsoft YaHei";
|
font-family: "Microsoft YaHei";
|
||||||
background: url(http://test.forge.trustie.net/images/requirements/xreference.jpg.pagespeed.ic.h4inUJNyH0.jpg);
|
/*background: url('../images/requirements/reference.jpg');*/
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
|
margin-top:5px;
|
||||||
}
|
}
|
||||||
/*上传项目图片*/
|
/*上传项目图片*/
|
||||||
.upload_file{margin-left: -60px;margin-top: 40px;width: 50px;position: absolute;height: 24px;opacity: 0;cursor: pointer}
|
.upload_file{margin-left: -60px;margin-top: 40px;width: 50px;position: absolute;height: 24px;opacity: 0;cursor: pointer}
|
||||||
|
|
Loading…
Reference in New Issue