Merge branch 'szzh' into dev_hjq

This commit is contained in:
ouyangxuhua 2016-01-21 15:32:18 +08:00
commit b8ae62db84
98 changed files with 2673 additions and 2418 deletions

View File

@ -2,6 +2,7 @@
class PollController < ApplicationController
before_filter :find_poll_and_course, :only => [:edit,:update,:destroy,:show,:statistics_result,:create_poll_question,:commit_poll,:commit_answer,:publish_poll,:republish_poll,:poll_result,:close_poll,:export_poll]
before_filter :find_container, :only => [:new,:create, :index]
before_filter :is_logged, :only => [:index, :show, :poll_result,:new,:create,:edit,:update,:destroy,:publish_poll,:republish_poll,:close_poll,:export_poll,:commit_answer,:commit_poll,:statistics_result]
before_filter :is_member_of_course, :only => [:index,:show,:poll_result]
before_filter :is_course_teacher, :only => [:new,:create,:edit,:update,:destroy,:publish_poll,:republish_poll,:close_poll,:export_poll]
include PollHelper
@ -503,6 +504,10 @@ class PollController < ApplicationController
end
end
def is_logged
redirect_to signin_path unless User.current.logged?
end
def is_member_of_course
render_403 unless(@course && (User.current.member_of_course?(@course) || User.current.admin?))
end

View File

@ -24,7 +24,7 @@ class PraiseTreadController < ApplicationController
end
return
end
#@horizontal = params[:horizontal].downcase == "false" ? false:true
@horizontal = params[:horizontal].downcase == "false" ? false:true if params[:horizontal]
if @obj.respond_to?("author_id")
author_id = @obj.author_id
elsif @obj.respond_to?("user_id")
@ -103,16 +103,6 @@ class PraiseTreadController < ApplicationController
def find_object_by_type_and_id(type,id)
@obj = nil
case type
when 'User'
@obj = User.find_by_id(id)
when 'Issue'
@obj = Issue.find_by_id(id)
when 'Project'
@obj = Project.find_by_id(id)
when 'Bid'
@obj = Bid.find_by_id(id)
when 'Contest'
@obj = Contest.find_by_id(id)
when 'Memo'
@obj = Memo.find_by_id(id)
when 'Message'
@ -127,6 +117,22 @@ class PraiseTreadController < ApplicationController
@obj = Comment.find_by_id(id)
when 'Journal'
@obj = Journal.find_by_id(id)
when 'BlogComment'
@obj = BlogComment.find_by_id(id)
when 'OrgDocumentComment'
@obj = OrgDocumentComment.find_by_id(id)
when 'User'
@obj = User.find_by_id(id)
when 'Issue'
@obj = Issue.find_by_id(id)
when 'Project'
@obj = Project.find_by_id(id)
when 'Bid'
@obj = Bid.find_by_id(id)
when 'Contest'
@obj = Contest.find_by_id(id)
else
@obj = nil
end
return @obj
end
@ -143,7 +149,8 @@ class PraiseTreadController < ApplicationController
# end
#再创建或更新praise_tread_cache表
@ptc = PraiseTreadCache.find_by_object_id_and_object_type(id,type)
#@ptc = PraiseTreadCache.find_by_object_id_and_object_type(id,type)
@ptc = PraiseTreadCache.where("object_id = ? and object_type = ?",id.to_i,type).first
@ptc = @ptc.nil? ? PraiseTreadCache.new : @ptc
@ptc.object_id = id.to_i
@ptc.object_type = type

View File

@ -746,14 +746,34 @@ class UsersController < ApplicationController
end
end
# end
@page = params[:page] ? params[:page].to_i + 1 : 0
if params[:type].present?
case params[:type]
when "public"
jours = @user.journals_for_messages.where('m_parent_id IS NULL and private = 0').order('created_on DESC')
@jour_count = jours.count
@jour = jours.limit(10).offset(@page * 10)
when "private"
jours = @user.journals_for_messages.where('m_parent_id IS NULL and private = 1').order('created_on DESC')
@jour_count = jours.count
@jour = jours.limit(10).offset(@page * 10)
else
jours = @user.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
@jour_count = jours.count
@jour = jours.limit(10).offset(@page * 10)
end
else
jours = @user.journals_for_messages.where('m_parent_id IS NULL').order('created_on DESC')
@jour_count = jours.count
@jour = jours.limit(10).offset(@page * 10)
end
@type = params[:type]
if User.current == @user
jours.update_all(:is_readed => true, :status => false)
jours.each do |journal|
fetch_user_leaveWord_reply(journal).update_all(:is_readed => true, :status => false)
end
end
@jour = paginateHelper jours,10
@state = false
render :layout=>'new_base_user'
end

View File

@ -225,11 +225,11 @@ class WordsController < ApplicationController
def leave_user_message
if User.current.logged?
@user = User.find(params[:id])
if params[:new_form][:user_message].size>0 && User.current.logged? && @user
if params[:new_form][:content].size>0 && User.current.logged? && @user
if params[:private] && params[:private] == '1'
@user.journals_for_messages << JournalsForMessage.new(:user_id => User.current.id, :notes => params[:new_form][:user_message], :reply_id => 0, :status => true, :is_readed => false, :private => 1)
@user.journals_for_messages << JournalsForMessage.new(:user_id => User.current.id, :notes => params[:new_form][:content], :reply_id => 0, :status => true, :is_readed => false, :private => 1)
else
@user.add_jour(User.current, params[:new_form][:user_message])
@user.add_jour(User.current, params[:new_form][:content])
end
end
redirect_to feedback_path(@user)

View File

@ -2789,13 +2789,6 @@ int main(int argc, char** argv){
ss.html_safe
end
#代码提交数量
def changesets_num project
g = Gitlab.client
project.gpid.nil? ? 0 : g.project(project.gpid).commit_count
# project.changesets.count
end
#课程动态的更新
def update_course_activity type, id
course_activity = CourseActivity.where("course_act_type=? and course_act_id =?", type.to_s, id).first
@ -2836,4 +2829,13 @@ end
principal_activity.save
end
end
#项目按更新时间排序
def project_sort_update projects
unless projects.empty?
project_ids = '('+projects.map{|pro|pro.project_id}.join(',')+')'
sort_projects = ForgeActivity.find_by_sql("SELECT MAX(updated_at) AS updated_at,user_id, project_id FROM forge_activities WHERE project_id IN #{project_ids} GROUP BY project_id ORDER BY MAX(updated_at) DESC")
return sort_projects
end
end
end

View File

@ -1,7 +1,6 @@
require 'elasticsearch/model'
class Course < ActiveRecord::Base
include Redmine::SafeAttributes
include ApplicationHelper
STATUS_ACTIVE = 1
STATUS_CLOSED = 5
@ -71,7 +70,7 @@ class Course < ActiveRecord::Base
validates_length_of :description, :maximum => 10000
before_save :self_validate
# 公开课程变成私有课程,所有资源都变成私有
after_update :update_files_public,:update_course_ealasticsearch_index,:update_activity
after_update :update_files_public,:update_course_ealasticsearch_index
after_create :create_board_sync, :act_as_course_activity, :act_as_course_message,:create_course_ealasticsearch_index
before_destroy :delete_all_members,:delete_course_ealasticsearch_index
@ -429,12 +428,6 @@ class Course < ActiveRecord::Base
end
end
end
#动态的更新
def update_activity
update_course_activity(self.class, self.id)
update_user_activity(self.class, self.id)
update_org_activity(self.class, self.id)
end
# Delete the previous articles index in Elasticsearch
# Course.__elasticsearch__.client.indices.delete index: Course.index_name rescue nil

View File

@ -3,7 +3,7 @@
<div class="break_word">
<span class="fl">
<span title="<%= attachment.filename %>" id="attachment_<%=attachment.id %>">
<%= link_to_short_attachment attachment,:length=> 58, :class => 'mw400 hidden link_file_a fl newsBlue', :download => true -%>
<%= link_to_short_attachment attachment,:length=> 58, :class => 'hidden link_file_a fl newsBlue mw400', :download => true -%>
</span>
</span>
<span class="postAttSize">(

View File

@ -28,7 +28,7 @@
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='hiddent_alert_model();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","").css("left","").css("width","511");
$('#ajax-modal').parent().css("top","").css("left","").css("width","511").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("alert_praise");
<% end %>

View File

@ -4,5 +4,5 @@ showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("anonymos");

View File

@ -116,9 +116,18 @@
<% count=@article.children.count%>
<% end %>
<div class="homepagePostReply">
<% unless count == 0 %>
<%# unless count == 0 %>
<div class="homepagePostReplyBanner">
<div class="homepagePostReplyBannerCount">回复(<%=count %></div>
<div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=@article.id %>">
<% if @article.author == User.current %>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(@article) > 0 ? "#{get_praise_num(@article)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>@article, :user_activity_id=>@article.id,:type=>"activity"}%>
<% end %>
</span>
</div>
<div class="homepagePostReplyBannerTime"></div>
<!-- <div class="homepagePostReplyBannerMore">
<%# if @reply_count > 2%>
@ -150,7 +159,14 @@
</div>
<div style="margin-top: -7px; margin-bottom: 5px">
<%= format_time(reply.created_on) %>
<div class="fr" id="reply_edit_menu_<%= reply.id%>" style="display: none">
<span id="reply_praise_count_<%=reply.id %>">
<% if reply.author == User.current %>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %>
</span>
<div class="fr mr10" id="reply_edit_menu_<%= reply.id%>" style="display: none">
<%= link_to(
l(:button_reply),
{:controller => 'blog_comments',:action => 'quote',:user_id=>reply.author_id,:blog_id=>reply.blog_id, :id => reply.id},
@ -175,7 +191,7 @@
<% end %>
</div>
<% end %>
<%# end %>
<div class="cl"></div>
<% if !@article.locked? && User.current.logged?%>
<div class="talkWrapMsg" nhname="about_talk_reply">

View File

@ -123,11 +123,17 @@
<% count=activity.children.count%>
<% end %>
<div class="homepagePostReply">
<div class="topBorder" style="display: <%= count<=0 && !activity.locked ? '': 'none' %>"></div>
<div class="homepagePostReplyBanner" style="display: <%= count>0 ? '': 'none' %>">
<div class="homepagePostReplyBannerCount" onclick="expand_reply_input('#reply_input_<%= user_activity_id %>');">回复(
<%= count %>
)</div>
<div class="homepagePostReplyBanner">
<div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
</span>
</div>
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
<%if count > 3 %>
<div class="homepagePostReplyBannerMore">
@ -162,6 +168,13 @@
<%= link_to reply.try(:author).try(:realname), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
<% end %>
<%= format_time(reply.created_on) %>
<span id="reply_praise_count_<%=reply.id %>">
<% if reply.author == User.current %>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %>
</span>
</div>
<div class="homepagePostReplyContent break_word list_style upload_img" id="reply_content_<%= reply.id %>">
<%= reply.content.html_safe %>
@ -201,5 +214,13 @@
</div>
</div>
<script type="text/javascript">
$(description_show_hide(<%=user_activity_id %>));
$("#moreProject_<%=user_activity_id %>").click(function(){
$("#relatePWrap_<%=user_activity_id %>").toggleClass('relatePWrap');
$("#relatePWrap_<%=user_activity_id %>").css("height","auto");
$(this).hide();
});
$("#hideProject_<%=user_activity_id %>").click(function(){
$("#relatePWrap_<%=user_activity_id %>").toggleClass('relatePWrap');
$("#moreProject_<%=user_activity_id %>").show();
});
</script>

View File

@ -7,5 +7,5 @@ $('#ajax-modal').siblings().hide();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'>" +
"<a href='javascript:' onclick='hidden_join_course_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("alert_box");

View File

@ -4,5 +4,5 @@ $('#ajax-modal').css('height','100px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("anonymos");

View File

@ -135,7 +135,7 @@
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("anonymos");
}
$("#time_selected").click(select);

View File

@ -9,5 +9,5 @@ $('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span>" +
"<a href='javascript:void(0)' onclick='hidden_homework_score_form();'><img src='/images/bid/close.png' width='26px' height='26px' style='margin-left: 375px;' /></a></span>");
//$('#ajax-modal').parent().removeClass();
$('#ajax-modal').parent().css("top","30%").css("left","40%").css("position","fixed");
$('#ajax-modal').parent().css("top","30%").css("left","40%").css("position","fixed").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("new-watcher");

View File

@ -30,7 +30,7 @@
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("popbox_polls");
}
}

View File

@ -4,5 +4,5 @@ $('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='hidden_atert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("alert_box");

View File

@ -25,7 +25,7 @@
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("popbox_polls");
}
@ -57,7 +57,7 @@
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("popbox_polls");
}
}

View File

@ -6,5 +6,5 @@ $('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='close_alert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("poll_alert_form");

View File

@ -6,5 +6,5 @@ $('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='close_alert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("poll_alert_form");

View File

@ -40,7 +40,7 @@
showModal('ajax-modal', '513px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='closeModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("popbox_polls");
}

View File

@ -6,7 +6,7 @@
showModal('ajax-modal', '513px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='closeModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
$('#ajax-modal').parent().css("top","40%").css("left","36%");
$('#ajax-modal').parent().css("top","40%").css("left","36%").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("popbox_polls");
}

View File

@ -7,5 +7,5 @@
showModal('ajax-modal', '513px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='closeModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("popbox_polls");

View File

@ -7,5 +7,5 @@ $('#ajax-modal').html('<%= escape_javascript(render :partial => 'show_quote_reso
showModal('ajax-modal', '513px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='closeModal();' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("popbox_polls");

View File

@ -7,5 +7,5 @@
showModal('ajax-modal', '513px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='closeModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
$('#ajax-modal').parent().css("top","30%").css("left","35%");
$('#ajax-modal').parent().css("top","30%").css("left","35%").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("popbox_polls");

View File

@ -2,5 +2,5 @@ $('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_su
showModal('ajax-modal', '513px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("popbox_polls");

View File

@ -3,13 +3,13 @@
showModal('ajax-modal', '513px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
$('#ajax-modal').parent().css("top","40%").css("left","36%");
$('#ajax-modal').parent().css("top","40%").css("left","36%").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("popbox_polls");
<% elsif @course %>
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'files/upload_course_files',:locals => {:course => @course,:course_attachment_type => 1}) %>');
showModal('ajax-modal', '513px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
$('#ajax-modal').parent().css("top","40%").css("left","36%");
$('#ajax-modal').parent().css("top","40%").css("left","36%").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("popbox_polls");
<% end %>

View File

@ -5,6 +5,6 @@ $('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'>" +
"<a href='javascript:void(0)' onclick='hidden_homework_atert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("alert_box");

View File

@ -3,4 +3,4 @@ showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","30%").css("left","30%").css("position","fixed");
$('#ajax-modal').parent().css("top","30%").css("left","30%").css("position","fixed").css("border","3px solid #269ac9");

View File

@ -3,4 +3,4 @@ showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","30%").css("left","30%").css("position","fixed");
$('#ajax-modal').parent().css("top","30%").css("left","30%").css("position","fixed").css("border","3px solid #269ac9");

View File

@ -3,4 +3,4 @@ showModal('ajax-modal', '350px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='hideModal();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","25%").css("left","35%").css("position","fixed");
$('#ajax-modal').parent().css("top","25%").css("left","35%").css("position","fixed").css("border","3px solid #269ac9");

View File

@ -4,7 +4,7 @@ showModal('ajax-modal', '350px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='hideModal();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","25%").css("left","35%").css("position","fixed");
$('#ajax-modal').parent().css("top","25%").css("left","35%").css("position","fixed").css("border","3px solid #269ac9");
$(function() { $('#evaluation_start_time').datepicker(datepickerOptions);
$('#evaluation_end_time').datepicker(datepickerOptions);
});

View File

@ -70,12 +70,11 @@
<div class="cl"></div>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @issue.id %>' name="notes"></textarea>
<div class="cl"></div>
<div class="mt10 fl">
<div class="mt5 fl">
<%= render :partial => 'attachments/issue_reply', :locals => {:container => @issue} %>
</div>
<div class="cl"></div>
<span nhname='contentmsg_<%= @issue.id %>' class="fl"></span>
<a id="new_message_submit_btn_<%= @issue.id %>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<a id="new_message_submit_btn_<%= @issue.id %>" href="javascript:void(0)" class="blue_n_btn fr mt5" style="display:none;">发送</a>
<div class="cl"></div>
<% end %>
</div>
@ -83,4 +82,5 @@
<div class="cl"></div>
</div>
<div class="cl"></div>
</div>

View File

@ -126,7 +126,8 @@
<%# 工具栏展开 %>
<% if @course.homework_commons.count == 0 || @course.news.count == 0 || course_file_num == 0 || course_poll_count == 0 || @course.exercises.count == 0 ||
course_feedback_count == 0 || @course.exercises.count == 0 || (@course.boards.first ? @course.boards.first.topics.count : 0) == 0 %>
<div class="subNav subNav_jiantou" id="expand_tools_expand" nhtype="toggle4cookiecourse" data-id="expand_tool_more" data-target="#navContentCourse" data-val="retract"><%= l(:label_project_more) %></div>
<div class="subNav subNav_jiantou" id="expand_tools_expand"><%= l(:label_project_more) %></div>
<ul class="navContent" id="navContentCourse">
<%= render 'courses/tool_expand', :locals => {:is_teacher => is_teacher, :course_file_num => course_file_num} %>
</ul>
@ -278,7 +279,7 @@
showModal('ajax-modal', '513px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("popbox_polls");
}
// 鼠标经过的时候显示内容
@ -292,6 +293,9 @@
obj.parent().parent().next("div").hide();
}
$("#expand_tools_expand").click(function(){
$("#navContentCourse").toggle();
});
</script>
</html>

View File

@ -242,9 +242,13 @@
showModal('ajax-modal', '513px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
$('#ajax-modal').parent().css("top","40%").css("left","36%");
$('#ajax-modal').parent().css("top","40%").css("left","36%").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("popbox_polls");
}
$("#expand_tools_expand").click(function(){
$("#navContent").toggle();
});
</script>
</div>

View File

@ -5,4 +5,4 @@
$('#ajax-modal').parent().removeClass("alert_praise");
//$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().addClass("alert_box");
$('#ajax-modal').parent().css("border", "2px solid #15bccf").css("border-radius", "0").css(" -webkit-border-radius", "0").css(" -moz-border-radius", "0");
$('#ajax-modal').parent().css("border", "3px solid #269ac9").css("border-radius", "0").css(" -webkit-border-radius", "0").css(" -moz-border-radius", "0");

View File

@ -65,9 +65,18 @@
<% count = @document.children.count() %>
<div class="homepagePostReply fl" style="background-color: #f1f1f1;" id="<%= @document.id %>">
<% if count > 0 %>
<%# if count > 0 %>
<div class="homepagePostReplyBanner">
<div class="homepagePostReplyBannerCount">回复(<%= count %></div>
<div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=@document.id %>">
<% if @document.creator_id.to_i == User.current.id.to_i %>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(@document) > 0 ? "#{get_praise_num(@document)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>@document, :user_activity_id=>@document.id,:type=>"activity"}%>
<% end %>
</span>
</div>
</div>
<div class="" id="reply_div_<%= @document.id %>">
<% comments_for_doc.each_with_index do |reply,i| %>
@ -88,13 +97,20 @@
</div>
<div style="margin-top: -7px; margin-bottom: 5px">
<%= format_time(reply.created_at) %>
<span id="reply_praise_count_<%=reply.id %>">
<% if reply.creator_id.to_i == User.current.id.to_i %>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %>
</span>
<div class="fr" id="reply_edit_menu_<%= reply.id%>" style="display: none">
<%= link_to(
l(:button_reply),
{:controller => 'org_document_comments',:action => 'quote',:user_id=>reply.creator_id, :id => reply.id},
:remote => true,
:method => 'get',
:class => 'fr newsBlue',
:class => 'fr newsBlue mr10',
:title => l(:button_reply)) if User.current.logged? %>
<%= link_to(
l(:button_delete),
@ -113,7 +129,7 @@
<% end %>
</div>
<div class="cl"></div>
<% end %>
<%# end %>
<% if User.current.logged?%>
<div class="talkWrapMsg" nhname="about_talk_reply">
<em class="talkWrapArrow"></em>

View File

@ -35,7 +35,7 @@
showModal('ajax-modal', '513px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='closeModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("popbox_polls");
}

View File

@ -17,13 +17,9 @@
<div class="homepagePostTitle break_word" >
<%= link_to activity.name, course_path(activity.id,:host=>Setting.host_course), :class => "postGrey" %>
</div>
<div class="homepagePostDate fl">
<div class="homepagePostDate">
创建时间:<%= format_time(activity.created_at) %>
</div>
<div class="homepagePostDate fl ml15">
更新时间:<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %>
</div>
<div class="cl"></div>
<div class="homepagePostSetting" id="act-<%= user_activity_id %>" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">

View File

@ -127,29 +127,50 @@
<% if activity.student_works.count != 0 %>
<% sw = activity.student_works.reorder("created_at desc").first %>
<div class="mt10 homepagePostDeadline">
<%=time_from_now sw.created_at %><%= link_to sw.user.show_name, user_activities_path(sw.user_id), :class => "newsBlue ml5 mr5"%>提交了作品
#&nbsp;<%=time_from_now sw.created_at %><%= link_to sw.user.show_name, user_activities_path(sw.user_id), :class => "newsBlue ml5 mr5"%>提交了作品
</div>
<% end %>
<div class="cl"></div>
<% if activity.student_works.count != 0 %>
<% sw_id = "("+activity.student_works.map{|sw| sw.id}.join(",")+")" %>
<% student_work_scores = StudentWorksScore.where("student_work_id in #{sw_id}").reorder("created_at desc") %>
<% student_work_scores = StudentWorksScore.find_by_sql("select max(created_at) as created_at, student_work_id, user_id from student_works_scores where student_work_id in #{sw_id} group by student_work_id order by max(created_at) desc") %>
<%# student_work_scores = StudentWorksScore.where("student_work_id in #{sw_id}").reorder("created_at desc") %>
<% unless student_work_scores.empty? %>
<% last_score = student_work_scores.first %>
<div class="mt5 homepagePostDeadline">
<%=time_from_now last_score.created_at %><%= link_to last_score.user.show_name, user_activities_path(last_score.user_id), :class => "newsBlue ml5 mr5"%>评阅了作品
<div class="mt10">
<p class="mb10 fontGrey2">#&nbsp;<%=time_from_now last_score.created_at %>
<%= link_to last_score.user.show_name, user_activities_path(last_score.user_id), :class => "newsBlue ml5 mr5"%>评阅了作品,优秀排行:
</p>
<% ids = '('+student_work_scores.map{|sw|sw.student_work_id}.join(',')+')' %>
<% student_works = activity.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where("student_works.id in #{ids}").order("score desc") %>
<% student_works.each_with_index do |sw, i| %>
<div class="fl mr10 w100" style="text-align:center;">
<a href="javascript:void(0);" class="linkBlue"><%= link_to image_tag(url_to_avatar(User.find sw.user_id), :width => "40", :height => "40"), student_work_index_path(:homework => activity.id), :alt => "学生头像" %>
<p class="w100 hidden"><%= link_to sw.user.show_name, student_work_index_path(:homework => activity.id)%></p>
</a>
<% score = sw.respond_to?("score") ? sw.score : (sw.final_score || 0) - sw.absence_penalty - sw.late_penalty %>
<p class="fontGrey2">分数:<span class="c_red"><%=format("%.1f",score<0 ? 0 : score) %>分</span></p>
</div>
<% if i == 4 %>
<% break %>
<% end %>
<% end %>
<%= link_to "更多>>", student_work_index_path(:homework => activity.id),:class=>'linkGrey2 fl ml50',:style=>'margin-top:60px;'%>
<div class="cl"></div>
</div>
<% end %>
<% end %>
<div class="cl"></div>
<% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
<div class="mt10">
<% projects = activity.student_work_projects.where("is_leader = 1") %>
<div class="fl mr20 fontGrey3">
已关联项目:<%='各小组尚未将小组项目关联到本次作业。' if projects.empty? %>
<% unless projects.empty? %>
<% sort_projects = project_sort_update projects %>
<div class="mt10 relatePWrap" id="relatePWrap_<%=user_activity_id %>">
<div class="mr5 fontGrey2">
#&nbsp;<%=time_from_now sort_projects.first.updated_at %><%= link_to User.find(sort_projects.first.user_id).show_name, user_activities_path(sort_projects.first.user_id), :class => "newsBlue ml5 mr5"%>更新了项目,最近更新:
</div>
<div class="cl"></div>
<% projects.each do |pro| %>
<% sort_projects.each_with_index do |pro, i| %>
<% project = Project.find pro.project_id %>
<script type="text/javascript">
$(document).ready(function(){
@ -161,7 +182,7 @@
});
</script>
<div class="mr20 mb10 mt10 fl w110 fontGrey3" style="text-align: center;">
<div class="mr10 mb10 mt10 fl w100 fontGrey2" style="text-align: center;">
<% if project.is_public || User.current.member_of?(project) || User.current.admin? %>
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像" %>
<% else %>
@ -169,17 +190,24 @@
<% end %>
<% time=project.updated_on %>
<% time=ForgeActivity.where("project_id=?",project.id).last.updated_at if ForgeActivity.where("project_id=?",project.id).last %>
<p><span class="captainName" title="<%=(User.find project.user_id).show_name %>"><%=(User.find project.user_id).show_name %></span><span style="vertical-align: top;">(组长)</span></p>
<p><%=time_from_now time %>&nbsp;&nbsp;<%= project.project_score.changeset_num %>提交</p>
<p class="mh18"><span class="captainName" title="<%=(User.find project.user_id).show_name %>"><%=(User.find project.user_id).show_name %></span><span style="vertical-align: top;">(组长)</span></p>
<p class="mh18"><%=time_from_now time %>&nbsp;&nbsp;<%= project.project_score.changeset_num %>提交</p>
<div class="relatePInfo" id="relatePInfo_<%=project.id %>_<%=activity.id %>">
项目名称:<%=project.name %><br />
创建者:<%=(User.find project.user_id).show_name %>(组长)<br />
更新时间:<%=time_from_now time %>
</div>
</div>
<% if i == 9 && projects.count > 10 %>
<a href="javascript:void(0);" class="linkGrey2 fl ml50" style="margin-top:68px;" id="moreProject_<%=user_activity_id %>">更多>></a>
<% end %>
<% if i > 9 && i == (projects.count - 1) %>
<a href="javascript:void(0);" class="linkGrey2 fr mr10" style="margin-top:68px;" id="hideProject_<%=user_activity_id %>">收回&lt;&lt;</a>
<% end %>
<% end %>
</div>
<% end %>
<% end %>
<div class="cl"></div>
<% if is_teacher%>
<% comment_status = activity.homework_detail_manual.comment_status %>
@ -225,7 +253,7 @@
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>">
<% if activity.user == User.current %>
<span class="ml15 likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
@ -266,7 +294,7 @@
<%= format_time(comment.created_on) %>
<span id="reply_praise_count_<%=comment.id %>">
<% if comment.user == User.current %>
<span class="fr likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %>
@ -309,5 +337,13 @@
</div>
</div>
<script type="text/javascript">
$(description_show_hide(<%=user_activity_id %>));
$("#moreProject_<%=user_activity_id %>").click(function(){
$("#relatePWrap_<%=user_activity_id %>").toggleClass('relatePWrap');
$("#relatePWrap_<%=user_activity_id %>").css("height","auto");
$(this).hide();
});
$("#hideProject_<%=user_activity_id %>").click(function(){
$("#relatePWrap_<%=user_activity_id %>").toggleClass('relatePWrap');
$("#moreProject_<%=user_activity_id %>").show();
});
</script>

View File

@ -75,7 +75,7 @@
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %>
<span class="ml15 likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
@ -117,7 +117,7 @@
<%= format_time(reply.created_on) %>
<span id="reply_praise_count_<%=reply.id %>">
<% if reply.author == User.current %>
<span class="fr likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %>
@ -157,6 +157,3 @@
<% end %>
</div>
</div>
<script type="text/javascript">
$(description_show_hide(<%=user_activity_id %>));
</script>

View File

@ -45,7 +45,7 @@
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %>
<span class="ml15 likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
@ -86,7 +86,7 @@
<%= format_time(comment.created_on) %>
<span id="reply_praise_count_<%=comment.id %>">
<% if comment.author == User.current %>
<span class="fr likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %>
@ -121,6 +121,3 @@
</div>
</div>
</div>
<script type="text/javascript">
$(description_show_hide(<%=user_activity_id %>));
</script>

View File

@ -56,6 +56,3 @@
</div>
</div>
<% end %>
<script type="text/javascript">
$(description_show_hide(<%=user_activity_id %>));
</script>

View File

@ -56,7 +56,7 @@
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %>
<span class="ml15 likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
@ -97,7 +97,7 @@
<%= format_time(reply.created_on) %>
<span id="reply_praise_count_<%=reply.id %>">
<% if reply.user == User.current %>
<span class="fr likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %>
@ -139,6 +139,3 @@
</div>
</div>
<script type="text/javascript">
$(description_show_hide(<%=user_activity_id %>));
</script>

View File

@ -59,7 +59,7 @@
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %>
<span class="ml15 likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
@ -96,7 +96,7 @@
<%= format_time(reply.created_on) %>
<span id="reply_praise_count_<%=reply.id %>">
<% if reply.author == User.current %>
<span class="fr likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %>
@ -133,6 +133,3 @@
</div>
</div>
<script type="text/javascript">
$(description_show_hide(<%=user_activity_id %>));
</script>

View File

@ -19,13 +19,9 @@
<div class="homepagePostTitle break_word" >
<%= link_to project.name, project_path(project.id,:host=>Setting.host_course), :class => "postGrey" %>
</div>
<div class="homepagePostDate fl">
<div class="homepagePostDate">
创建时间:<%= format_time(project.created_on) %>
</div>
<div class="homepagePostDate fl ml15">
更新时间:<%= format_time(ForgeActivity.where("forge_act_type='ProjectCreateInfo' and forge_act_id =#{project.id}").first.updated_at) %>
</div>
<div class="cl"></div>
<div class="homepagePostSetting" id="act-<%= user_activity_id %>" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">

View File

@ -59,7 +59,7 @@
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %>
<span class="ml15 likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
@ -97,7 +97,7 @@
<%= format_time(reply.created_on) %>
<span id="reply_praise_count_<%=reply.id %>">
<% if reply.author == User.current %>
<span class="fr likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %>
@ -134,6 +134,3 @@
</div>
</div>
<script type="text/javascript">
$(description_show_hide(<%=user_activity_id %>));
</script>

View File

@ -60,8 +60,17 @@
<% count = document.children.count() %>
<div class="homepagePostReply fl" style="background-color: #f1f1f1;" id="<%= document.id %>">
<div class="homepagePostReplyBanner" style="display:<%= count == 0 ? 'none' : 'block' %>">
<div class="homepagePostReplyBannerCount">回复(<%= count %></div>
<div class="homepagePostReplyBanner">
<div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=document.id %>">
<% if document.creator_id.to_i == User.current.id.to_i %>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(document) > 0 ? "#{get_praise_num(document)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>document, :user_activity_id=>document.id,:type=>"activity"}%>
<% end %>
</span>
</div>
<% if count > 3 %>
<div class="homepagePostReplyBannerMore">
<a id="reply_btn_<%= document.id %>" onclick="expand_reply('#reply_div_<%= document.id %> li','#reply_btn_<%=document.id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help">
@ -81,6 +90,13 @@
<div class="homepagePostReplyPublisher">
<%= link_to User.find(comment.creator_id), user_path(comment.creator_id), :class => "newsBlue mr10 f14" %>
<%= format_activity_day(comment.created_at) %> <%= format_time(comment.created_at, false) %>
<span id="reply_praise_count_<%=comment.id %>">
<% if comment.creator_id.to_i == User.current.id.to_i %>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %>
</span>
</div>
<% unless comment.content.blank? %>
<div class="homepagePostReplyContent"><%= comment.content.html_safe %></div>

View File

@ -322,7 +322,7 @@ function insert_MCQ(quest_type,quest_num,quest_id){
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("popbox_polls");
}
}

View File

@ -5,5 +5,5 @@ $('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='hidden_atert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("alert_box");

View File

@ -20,7 +20,7 @@
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("popbox_polls");
}
@ -52,7 +52,7 @@
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("popbox_polls");
}
}
@ -77,7 +77,7 @@
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("popbox_polls");
}

View File

@ -8,6 +8,6 @@
showModal('ajax-modal', '513px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='closeModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("popbox_polls");
<% end %>

View File

@ -6,5 +6,5 @@ $('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='close_alert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("poll_alert_form");

View File

@ -6,5 +6,5 @@ $('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='close_alert_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("poll_alert_form");

View File

@ -1,7 +1,13 @@
<% if PraiseTread.where("praise_tread_object_id=? and praise_tread_object_type=? and user_id=?",activity.id,activity.class.to_s,User.current.id).empty? %>
<a href="<%= praise_tread_praise_plus_path({:obj_id=>activity.id,:obj_type=>activity.class,:user_activity_id=>user_activity_id,:type=>type })%>" data-remote="true" class="<%=type == 'reply'? 'fr' : 'ml15' %> likeButton" title="点赞" >
<span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></a>
<span class="likeText">赞</span>
<% num = get_praise_num(activity) %>
<span class="likeNum"><%= num > 0 ? "#{num}" : "" %></span>
</a>
<% else %>
<a href="<%= praise_tread_praise_minus_path({:obj_id=>activity.id,:obj_type=>activity.class,:user_activity_id=>user_activity_id,:type=>type })%>" data-remote="true" class="<%=type == 'reply'? 'fr' : 'ml15' %> likeButton" title="取消点赞" >
<span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></a>
<span class="likeText">已赞</span>
<% num = get_praise_num(activity) %>
<span class="likeNum"><%= num > 0 ? "#{num}" : "" %></span>
</a>
<% end %>

View File

@ -22,18 +22,14 @@
发布时间:<%= format_time(activity.created_on) %>
</div>
<p class="mt5 break_word"><%= textAreailizable activity, :description %><br/></p>
<div class="homepagePostIntro break_word upload_img list_style maxh360 table_maxWidth" id="activity_description_<%= user_activity_id %>">
<!--<div class="homepagePostIntro break_word upload_img list_style maxh360 table_maxWidth" id="activity_description_<%= user_activity_id %>">
<div id="intro_content_<%= user_activity_id %>">
<%#= activity.description.html_safe %>
</div>
</div>
</div>-->
<div class="cl"></div>
</div>
<div class="cl"></div>
</div>
</div>
<script type="text/javascript">
$(description_show_hide(<%=user_activity_id %>));
</script>

View File

@ -54,7 +54,7 @@
</div>
<% end %>
<!-- more -->
<div class="subNav subNav_jiantou" id="expand_tools_expand" nhtype="toggle4cookie" data-id="expand_tool_more" data-target="#navContent" data-val="retract"><%= l(:label_project_more) %></div>
<div class="subNav subNav_jiantou" id="expand_tools_expand"><%= l(:label_project_more) %></div>
<ul class="navContent" id="navContent">
<%= render 'projects/tools_expand' %>
</ul>

View File

@ -19,13 +19,9 @@
<div class="homepagePostTitle break_word" >
<%= link_to project.name, project_path(project.id,:host=>Setting.host_course), :class => "postGrey" %>
</div>
<div class="homepagePostDate fl">
<div class="homepagePostDate">
创建时间:<%= format_time(project.created_on) %>
</div>
<div class="homepagePostDate fl ml15">
更新时间:<%= format_time(ForgeActivity.where("forge_act_type='ProjectCreateInfo' and forge_act_id =#{project.id}").first.updated_at) %>
</div>
<div class="cl"></div>
<div class="homepagePostSetting" id="act-<%= user_activity_id %>" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">

View File

@ -45,7 +45,7 @@
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %>
<span class="ml15 likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
@ -86,7 +86,7 @@
<%= format_time(comment.created_on) %>
<span id="reply_praise_count_<%=comment.id %>">
<% if comment.author == User.current %>
<span class="fr likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %>
@ -121,6 +121,3 @@
</div>
</div>
</div>
<script type="text/javascript">
$(description_show_hide(<%=user_activity_id %>));
</script>

View File

@ -6,5 +6,5 @@ $('#ajax-modal').siblings().hide();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'>" +
"<a href='#' onclick='hidden_join_course_form();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("alert_box");

View File

@ -23,6 +23,7 @@
<% end%>
<script type="text/javascript">
function score_submit(id){
<% if !@is_teacher %>
if ($.trim($('#score_comment_'+id).val()) == "") {
$('#hint_message_'+id).html("为了对其他学生的作品负责,请您务必填写评语");
$("#hint_message_"+id).css('color','#ff0000');
@ -31,5 +32,8 @@
$("#work_submit_"+id).parent().parent().submit();
$('#about_hwork_'+id).html('');
}
<% else %>
$("#work_submit_"+id).parent().parent().submit();
<% end %>
}
</script>

View File

@ -80,8 +80,8 @@
$("#about_hwork_<%= work.id%>").html("<%= escape_javascript(render :partial => 'show',:locals => {:work => work, :score =>student_work_score(work,User.current),:student_work_scores => work.student_works_scores.order("updated_at desc")}) %>");
<% end %>
<% end %>
<% end %>
$('#score_<%= work.id%>').peSlider({range: 'min'});
<% end %>
<% end %>
});
</script>

View File

@ -4,7 +4,7 @@
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("anonymos");
<% elsif @submit_result%>
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/work_information') %>');
@ -12,7 +12,7 @@
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='/student_work/"+ <%=@student_work.id%> +"/retry_work' class='upload_btn' data-remote='true'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("anonymos");
<% else %>
window.location.href = '<%= new_student_work_url(:homework => @homework.id)%>';

View File

@ -103,14 +103,14 @@
$('#ajax-modal').html("<div><p align='center' style='margin-top: 35px'>作品信息完整性校验中,请稍等...</p></div>");
showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("anonymos");
}
} else {
$('#ajax-modal').html("<div><p align='center' style='margin-top: 35px'>作品信息完整性校验中,请稍等...</p></div>");
showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("anonymos");
}
}

View File

@ -30,7 +30,7 @@
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","25%").css("left","35%").css("position","fixed");
$('#ajax-modal').parent().css("top","25%").css("left","35%").css("position","fixed").css("border","3px solid #269ac9");
}
$(function(){

View File

@ -7,7 +7,7 @@
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","65%").css("left","60%");
$('#ajax-modal').parent().css("top","65%").css("left","60%").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("anonymos_work");
});
<% end%>
@ -24,7 +24,7 @@
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","30%").css("left","20%").css("position","fixed");
$('#ajax-modal').parent().css("top","30%").css("left","20%").css("position","fixed").css("border","3px solid #269ac9");
}
// 点击 checkbox选中引用的资源的时候保存该资源的id到session里去
@ -64,14 +64,14 @@
$('#ajax-modal').html("<div><p align='center' style='margin-top: 35px'>作品信息完整性校验中,请稍等...</p></div>");
showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("anonymos");
}
} else {
$('#ajax-modal').html("<div><p align='center' style='margin-top: 35px'>作品信息完整性校验中,请稍等...</p></div>");
showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("anonymos");
}
}

View File

@ -4,7 +4,7 @@ showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","").css("left","");
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("anonymos");
<% else %>
window.location.href = '<%= edit_student_work_url(@work)%>';

View File

@ -17,13 +17,9 @@
<div class="homepagePostTitle break_word" >
<%= link_to activity.name, course_path(activity.id,:host=>Setting.host_course), :class => "postGrey" %>
</div>
<div class="homepagePostDate fl">
<div class="homepagePostDate">
创建时间:<%= format_time(activity.created_at) %>
</div>
<div class="homepagePostDate fl ml15">
更新时间:<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %>
</div>
<div class="cl"></div>
<div class="homepagePostSetting" id="act-<%= user_activity_id %>" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">

View File

@ -127,29 +127,50 @@
<% if activity.student_works.count != 0 %>
<% sw = activity.student_works.reorder("created_at desc").first %>
<div class="mt10 homepagePostDeadline">
<%=time_from_now sw.created_at %><%= link_to sw.user.show_name, user_activities_path(sw.user_id), :class => "newsBlue ml5 mr5"%>提交了作品
#&nbsp;<%=time_from_now sw.created_at %><%= link_to sw.user.show_name, user_activities_path(sw.user_id), :class => "newsBlue ml5 mr5"%>提交了作品
</div>
<% end %>
<div class="cl"></div>
<% if activity.student_works.count != 0 %>
<% sw_id = "("+activity.student_works.map{|sw| sw.id}.join(",")+")" %>
<% student_work_scores = StudentWorksScore.where("student_work_id in #{sw_id}").reorder("created_at desc") %>
<% student_work_scores = StudentWorksScore.find_by_sql("select max(created_at) as created_at, student_work_id, user_id from student_works_scores where student_work_id in #{sw_id} group by student_work_id order by max(created_at) desc") %>
<%# student_work_scores = StudentWorksScore.where("student_work_id in #{sw_id}").reorder("created_at desc") %>
<% unless student_work_scores.empty? %>
<% last_score = student_work_scores.first %>
<div class="mt5 homepagePostDeadline">
<%=time_from_now last_score.created_at %><%= link_to last_score.user.show_name, user_activities_path(last_score.user_id), :class => "newsBlue ml5 mr5"%>评阅了作品
<div class="mt10">
<p class="mb10 fontGrey2">#&nbsp;<%=time_from_now last_score.created_at %>
<%= link_to last_score.user.show_name, user_activities_path(last_score.user_id), :class => "newsBlue ml5 mr5"%>评阅了作品,优秀排行:
</p>
<% ids = '('+student_work_scores.map{|sw|sw.student_work_id}.join(',')+')' %>
<% student_works = activity.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where("student_works.id in #{ids}").order("score desc") %>
<% student_works.each_with_index do |sw, i| %>
<div class="fl mr10 w100" style="text-align:center;">
<a href="javascript:void(0);" class="linkBlue"><%= link_to image_tag(url_to_avatar(User.find sw.user_id), :width => "40", :height => "40"), student_work_index_path(:homework => activity.id), :alt => "学生头像" %>
<p class="w100 hidden"><%= link_to sw.user.show_name, student_work_index_path(:homework => activity.id)%></p>
</a>
<% score = sw.respond_to?("score") ? sw.score : (sw.final_score || 0) - sw.absence_penalty - sw.late_penalty %>
<p class="fontGrey2">分数:<span class="c_red"><%=format("%.1f",score<0 ? 0 : score) %>分</span></p>
</div>
<% if i == 4 %>
<% break %>
<% end %>
<% end %>
<%= link_to "更多>>", student_work_index_path(:homework => activity.id),:class=>'linkGrey2 fl ml50',:style=>'margin-top:60px;'%>
<div class="cl"></div>
</div>
<% end %>
<% end %>
<div class="cl"></div>
<% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
<div class="mt10">
<% projects = activity.student_work_projects.where("is_leader = 1") %>
<div class="fl mr20 fontGrey3">
已关联项目:<%='各小组尚未将小组项目关联到本次作业。' if projects.empty? %>
<% unless projects.empty? %>
<% sort_projects = project_sort_update projects %>
<div class="mt10 relatePWrap" id="relatePWrap_<%=user_activity_id %>">
<div class="mr5 fontGrey2">
#&nbsp;<%=time_from_now sort_projects.first.updated_at %><%= link_to User.find(sort_projects.first.user_id).show_name, user_activities_path(sort_projects.first.user_id), :class => "newsBlue ml5 mr5"%>更新了项目,最近更新:
</div>
<div class="cl"></div>
<% projects.each do |pro| %>
<% sort_projects.each_with_index do |pro, i| %>
<% project = Project.find pro.project_id %>
<script type="text/javascript">
$(document).ready(function(){
@ -161,7 +182,7 @@
});
</script>
<div class="mr20 mb10 mt10 fl w110 fontGrey3" style="text-align: center;">
<div class="mr10 mb10 mt10 fl w100 fontGrey2" style="text-align: center;">
<% if project.is_public || User.current.member_of?(project) || User.current.admin? %>
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像" %>
<% else %>
@ -169,17 +190,24 @@
<% end %>
<% time=project.updated_on %>
<% time=ForgeActivity.where("project_id=?",project.id).last.updated_at if ForgeActivity.where("project_id=?",project.id).last %>
<p><span class="captainName" title="<%=(User.find project.user_id).show_name %>"><%=(User.find project.user_id).show_name %></span><span style="vertical-align: top;">(组长)</span></p>
<p><%=time_from_now time %>&nbsp;&nbsp;<%= project.project_score.changeset_num %>提交</p>
<p class="mh18"><span class="captainName" title="<%=(User.find project.user_id).show_name %>"><%=(User.find project.user_id).show_name %></span><span style="vertical-align: top;">(组长)</span></p>
<p class="mh18"><%=time_from_now time %>&nbsp;&nbsp;<%= project.project_score.changeset_num %>提交</p>
<div class="relatePInfo" id="relatePInfo_<%=project.id %>_<%=activity.id %>">
项目名称:<%=project.name %><br />
创建者:<%=(User.find project.user_id).show_name %>(组长)<br />
更新时间:<%=time_from_now time %>
</div>
</div>
<% if i == 9 && projects.count > 10 %>
<a href="javascript:void(0);" class="linkGrey2 fl ml50" style="margin-top:68px;" id="moreProject_<%=user_activity_id %>">更多>></a>
<% end %>
<% if i > 9 && i == (projects.count - 1) %>
<a href="javascript:void(0);" class="linkGrey2 fr mr10" style="margin-top:68px;" id="hideProject_<%=user_activity_id %>">收回&lt;&lt;</a>
<% end %>
<% end %>
</div>
<% end %>
<% end %>
<div class="cl"></div>
<% if is_teacher%>
<% comment_status = activity.homework_detail_manual.comment_status %>
@ -225,7 +253,7 @@
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>">
<% if activity.user == User.current %>
<span class="ml15 likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
@ -266,7 +294,7 @@
<%= format_time(comment.created_on) %>
<span id="reply_praise_count_<%=comment.id %>">
<% if comment.user == User.current %>
<span class="fr likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %>
@ -310,5 +338,13 @@
</div>
</div>
<script type="text/javascript">
$(description_show_hide(<%=user_activity_id %>));
$("#moreProject_<%=user_activity_id %>").click(function(){
$("#relatePWrap_<%=user_activity_id %>").toggleClass('relatePWrap');
$("#relatePWrap_<%=user_activity_id %>").css("height","auto");
$(this).hide();
});
$("#hideProject_<%=user_activity_id %>").click(function(){
$("#relatePWrap_<%=user_activity_id %>").toggleClass('relatePWrap');
$("#moreProject_<%=user_activity_id %>").show();
});
</script>

View File

@ -94,7 +94,7 @@
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %>
<span class="ml15 likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
@ -136,7 +136,7 @@
<%= format_time(reply.created_on) %>
<span id="reply_praise_count_<%=reply.id %>">
<% if reply.author == User.current %>
<span class="fr likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %>
@ -177,6 +177,4 @@
<% end %>
</div>
</div>
<script type="text/javascript">
$(description_show_hide(<%=user_activity_id %>));
</script>

View File

@ -56,7 +56,7 @@
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %>
<span class="ml15 likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
@ -97,7 +97,7 @@
<%= format_time(comment.created_on) %>
<span id="reply_praise_count_<%=comment.id %>">
<% if comment.author == User.current %>
<span class="fr likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %>
@ -132,6 +132,3 @@
</div>
</div>
</div>
<script type="text/javascript">
$(description_show_hide(<%=user_activity_id %>));
</script>

View File

@ -55,6 +55,3 @@
</div>
</div>
<% end %>
<script type="text/javascript">
$(description_show_hide(<%=user_activity_id %>));
</script>

View File

@ -1,4 +1,4 @@
<div class="homepagePostIntro break_word upload_img list_style maxh360 table_maxWidth" id="activity_description_<%= user_activity_id%>">
<div class="homepagePostIntro break_word upload_img list_style maxh360 table_maxWidth lh18" id="activity_description_<%= user_activity_id%>">
<div id="intro_content_<%= user_activity_id%>">
<%= content.to_s.html_safe%>
</div>
@ -8,5 +8,6 @@
var postContent = $("#intro_content_<%= user_activity_id%>").html();
postContent = postContent.replace(/&nbsp;/g," ");
$("#intro_content_<%= user_activity_id%>").html(postContent);
description_show_hide(<%=user_activity_id %>);
});
</script>

View File

@ -0,0 +1,19 @@
<%= content_for(:header_tags) do %>
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
<% end %>
<%= error_messages_for 'message' %>
<li>
<%= text_area :quote,:quote,:style => 'display:none' %>
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
<%= f.kindeditor :content, :editor_id => 'jour_content_editor',
:width => '99.7%',
:height => 40,
:minHeight=>40,
:input_html => { :id => 'jour_content',
:class => 'talk_text fl',
:maxlength => 5000 }%>
<div class="cl"></div>
<p id="jour_content_span"></p>
</li>
<div class="cl"></div>

View File

@ -19,13 +19,9 @@
<div class="homepagePostTitle break_word" >
<%= link_to project.name, project_path(project.id,:host=>Setting.host_course), :class => "postGrey" %>
</div>
<div class="homepagePostDate fl">
<div class="homepagePostDate">
创建时间:<%= format_time(project.created_on) %>
</div>
<div class="homepagePostDate fl ml15">
更新时间:<%= format_time(ForgeActivity.where("forge_act_type='ProjectCreateInfo' and forge_act_id =#{project.id}").first.updated_at) %>
</div>
<div class="cl"></div>
<div class="homepagePostSetting" id="act-<%= user_activity_id %>" style="visibility: hidden">
<ul>
<li class="homepagePostSettingIcon">

View File

@ -68,7 +68,7 @@
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %>
<span class="ml15 likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
@ -109,7 +109,7 @@
<%= format_time(reply.created_on) %>
<span id="reply_praise_count_<%=reply.id %>">
<% if reply.user == User.current %>
<span class="fr likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %>
@ -151,6 +151,3 @@
</div>
</div>
<script type="text/javascript">
$(description_show_hide(<%=user_activity_id %>));
</script>

View File

@ -93,7 +93,7 @@
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %>
<span class="ml15 likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
@ -131,7 +131,7 @@
<%= format_time(reply.created_on) %>
<span id="reply_praise_count_<%=reply.id %>">
<% if reply.author == User.current %>
<span class="fr likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(reply) > 0 ? "#{get_praise_num(reply)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
<% end %>
@ -167,6 +167,3 @@
</div>
</div>
</div>
<script type="text/javascript">
$(description_show_hide(<%=user_activity_id %>));
</script>

View File

@ -46,10 +46,16 @@
</div>
<% count=activity.children.count %>
<div class="homepagePostReply">
<div class="topBorder" style="display: <%= count>0 ? 'none': '' %>"></div>
<div class="homepagePostReplyBanner" style="display: <%= count>0 ? '': 'none' %>">
<div class="homepagePostReplyBannerCount" onclick="expand_reply_input('#reply_input_<%= user_activity_id %>');">
回复(<%= count %>
<div class="homepagePostReplyBanner">
<div class="homepagePostReplyBannerCount">回复
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>">
<% if activity.author == User.current %>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
</span>
</div>
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
<%if count>3 %>
@ -84,6 +90,13 @@
<%= link_to comment.try(:author).try(:realname), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
<% end %>
<%= format_time(comment.created_on) %>
<span id="reply_praise_count_<%=comment.id %>">
<% if comment.author == User.current %>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %>
</span>
</div>
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
<%= comment.content.html_safe %></div>
@ -122,5 +135,13 @@
</div>
</div>
<script type="text/javascript">
$(description_show_hide(<%=user_activity_id %>));
$("#moreProject_<%=user_activity_id %>").click(function(){
$("#relatePWrap_<%=user_activity_id %>").toggleClass('relatePWrap');
$("#relatePWrap_<%=user_activity_id %>").css("height","auto");
$(this).hide();
});
$("#hideProject_<%=user_activity_id %>").click(function(){
$("#relatePWrap_<%=user_activity_id %>").toggleClass('relatePWrap');
$("#moreProject_<%=user_activity_id %>").show();
});
</script>

View File

@ -128,29 +128,50 @@
<% if homework_common.student_works.count != 0 %>
<% sw = homework_common.student_works.reorder("created_at desc").first %>
<div class="mt10 homepagePostDeadline">
<%=time_from_now sw.created_at %><%= link_to sw.user.show_name, user_activities_path(sw.user_id), :class => "newsBlue ml5 mr5"%>提交了作品
#&nbsp;<%=time_from_now sw.created_at %><%= link_to sw.user.show_name, user_activities_path(sw.user_id), :class => "newsBlue ml5 mr5"%>提交了作品
</div>
<% end %>
<div class="cl"></div>
<% if homework_common.student_works.count != 0 %>
<% sw_id = "("+homework_common.student_works.map{|sw| sw.id}.join(",")+")" %>
<% student_work_scores = StudentWorksScore.where("student_work_id in #{sw_id}").reorder("created_at desc") %>
<% student_work_scores = StudentWorksScore.find_by_sql("select max(created_at) as created_at, student_work_id, user_id from student_works_scores where student_work_id in #{sw_id} group by student_work_id order by max(created_at) desc") %>
<%# student_work_scores = StudentWorksScore.where("student_work_id in #{sw_id}").reorder("created_at desc") %>
<% unless student_work_scores.empty? %>
<% last_score = student_work_scores.first %>
<div class="mt5 homepagePostDeadline">
<%=time_from_now last_score.created_at %><%= link_to last_score.user.show_name, user_activities_path(last_score.user_id), :class => "newsBlue ml5 mr5"%>评阅了作品
</div>
<% end %>
<% end %>
<div class="cl"></div>
<% if homework_common.homework_type == 3 && homework_common.homework_detail_group.base_on_project == 1 %>
<div class="mt10">
<p class="mb10 fontGrey2">#&nbsp;<%=time_from_now last_score.created_at %>
<%= link_to last_score.user.show_name, user_activities_path(last_score.user_id), :class => "newsBlue ml5 mr5"%>评阅了作品,优秀排行:
</p>
<% ids = '('+student_work_scores.map{|sw|sw.student_work_id}.join(',')+')' %>
<% student_works = homework_common.student_works.select("student_works.*,IF(final_score is null,null,final_score - absence_penalty - late_penalty) as score").where("student_works.id in #{ids}").order("score desc") %>
<% student_works.each_with_index do |sw, i| %>
<div class="fl mr10 w100" style="text-align:center;">
<a href="javascript:void(0);" class="linkBlue"><%= link_to image_tag(url_to_avatar(User.find sw.user_id), :width => "40", :height => "40"), student_work_index_path(:homework => homework_common.id), :alt => "学生头像" %>
<p class="w100 hidden"><%= link_to sw.user.show_name, student_work_index_path(:homework => homework_common.id)%></p>
</a>
<% score = sw.respond_to?("score") ? sw.score : (sw.final_score || 0) - sw.absence_penalty - sw.late_penalty %>
<p class="fontGrey2">分数:<span class="c_red"><%=format("%.1f",score<0 ? 0 : score) %>分</span></p>
</div>
<% if i == 4 %>
<% break %>
<% end %>
<% end %>
<%= link_to "更多>>", student_work_index_path(:homework => homework_common.id),:class=>'linkGrey2 fl ml50',:style=>'margin-top:60px;'%>
<div class="cl"></div>
</div>
<% end %>
<% end %>
<% if homework_common.homework_type == 3 && homework_common.homework_detail_group.base_on_project == 1 %>
<% projects = homework_common.student_work_projects.where("is_leader = 1") %>
<div class="fl mr20 fontGrey3">
已关联项目:<%='各小组尚未将小组项目关联到本次作业。' if projects.empty? %>
<% unless projects.empty? %>
<% sort_projects = project_sort_update projects %>
<div class="mt10 relatePWrap" id="relatePWrap_<%=homework_common.id %>">
<div class="mr5 fontGrey2">
#&nbsp;<%=time_from_now sort_projects.first.updated_at %><%= link_to User.find(sort_projects.first.user_id).show_name, user_activities_path(sort_projects.first.user_id), :class => "newsBlue ml5 mr5"%>更新了项目,最近更新:
</div>
<div class="cl"></div>
<% projects.each do |pro| %>
<% sort_projects.each_with_index do |pro, i| %>
<% project = Project.find pro.project_id %>
<script type="text/javascript">
$(document).ready(function(){
@ -161,7 +182,8 @@
});
});
</script>
<div class="mr20 mb10 mt10 fl w110 fontGrey3" style="text-align: center;">
<div class="mr10 mb10 mt10 fl w100 fontGrey2" style="text-align: center;">
<% if project.is_public || User.current.member_of?(project) || User.current.admin? %>
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+homework_common.id.to_s,:alt =>"项目头像" %>
<% else %>
@ -169,17 +191,24 @@
<% end %>
<% time=project.updated_on %>
<% time=ForgeActivity.where("project_id=?",project.id).last.updated_at if ForgeActivity.where("project_id=?",project.id).last %>
<p><span class="captainName" title="<%=(User.find project.user_id).show_name %>"><%=(User.find project.user_id).show_name %></span><span style="vertical-align: top;">(组长)</span></p>
<p><%=time_from_now time %>&nbsp;&nbsp;<%= project.project_score.changeset_num %>提交</p>
<p class="mh18"><span class="captainName" title="<%=(User.find project.user_id).show_name %>"><%=(User.find project.user_id).show_name %></span><span style="vertical-align: top;">(组长)</span></p>
<p class="mh18"><%=time_from_now time %>&nbsp;&nbsp;<%= project.project_score.changeset_num %>提交</p>
<div class="relatePInfo" id="relatePInfo_<%=project.id %>_<%=homework_common.id %>">
项目名称:<%=project.name %><br />
创建者:<%=(User.find project.user_id).show_name %>(组长)<br />
更新时间:<%=time_from_now time %>
</div>
</div>
<% if i == 9 && projects.count > 10 %>
<a href="javascript:void(0);" class="linkGrey2 fl ml50" style="margin-top:68px;" id="moreProject_<%=homework_common.id %>">更多>></a>
<% end %>
<% if i > 9 && i == (projects.count - 1) %>
<a href="javascript:void(0);" class="linkGrey2 fr mr10" style="margin-top:68px;" id="hideProject_<%=homework_common.id %>">收回&lt;&lt;</a>
<% end %>
<% end %>
</div>
<% end %>
<% end %>
<div class="cl"></div>
<% if is_teacher%>
<% comment_status = homework_common.homework_detail_manual.comment_status%>
@ -227,7 +256,7 @@
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=homework_common.id %>">
<% if homework_common.user == User.current %>
<span class="ml15 likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(homework_common) > 0 ? "#{get_praise_num(homework_common)}" : "" %></span></span>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(homework_common) > 0 ? "#{get_praise_num(homework_common)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>homework_common, :user_activity_id=>homework_common.id,:type=>"activity"}%>
<% end %>
@ -267,7 +296,7 @@
<% end %>
<%= format_time(comment.created_on) %><span id="reply_praise_count_<%=comment.id %>">
<% if comment.user == User.current %>
<span class="fr likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %>
@ -310,5 +339,13 @@
</div>
</div><!----HomeWork end-->
<script type="text/javascript">
$(homework_description_show_hide(<%=homework_common.id %>));
$("#moreProject_<%=homework_common.id %>").click(function(){
$("#relatePWrap_<%=homework_common.id %>").toggleClass('relatePWrap');
$("#relatePWrap_<%=homework_common.id %>").css("height","auto");
$(this).hide();
});
$("#hideProject_<%=homework_common.id %>").click(function(){
$("#relatePWrap_<%=homework_common.id %>").toggleClass('relatePWrap');
$("#moreProject_<%=homework_common.id %>").show();
});
</script>

View File

@ -25,6 +25,7 @@
<% end %>
<div class="HomeWorkCon">
<a id="submit_homework"></a>
<div>
<input type="text" name="homework_common[name]" id="homework_name" class="InputBox w701" maxlength="255" onfocus="$('#homework_editor').show()" onkeyup="regex_homework_name();" placeholder="发布作业,请先输入作业标题" value="<%= homework.name%>" >
<p id="homework_name_span" class="c_red mt5"></p>
@ -32,7 +33,7 @@
<div class="cl"></div>
<div class=" mt10">
<%= link_to("导入作业", user_import_homeworks_user_path(User.current.id,:select_course => defined?(select_course)),:class => "BlueCirBtn fl mr10",:remote => true) unless edit_mode%>
<%= link_to("导入作业", user_import_homeworks_user_path(User.current.id,:select_course => defined?(select_course)),:class => "BlueCirBtn fl mr10",:remote => true,:title=>"导入自己发布过的作业或者共享题库中的作业将于2016年春上线") unless edit_mode%>
<% if edit_mode %>
<label class="fl c_grey f14" style="margin-top: 4px;">截止日期:</label>
<% end %>
@ -131,10 +132,10 @@
</div>
</script>
<div class="BluePopupBox" id="BluePopupBox" style="display:none">
<div class="BluePopupBox" id="BluePopupBox" style="display:none;">
<%= render :partial => 'users/user_programing_attr', :locals => {:edit_mode => edit_mode, :homework=>homework} %>
</div><!----BluePopupBox end-->
<div class="BluePopupBox" style="display:none" id="GroupPopupBox">
<div class="BluePopupBox" style="display:none;" id="GroupPopupBox">
<%= render :partial => 'users/user_group_attr', :locals => {:edit_mode => edit_mode, :homework=>homework}%>
</div>

View File

@ -40,7 +40,7 @@
<sapn class="mr15"><%= count>0 ? "#{count}" : "" %></sapn><span style="color: #cecece;">▪</span>
<span id="praise_count_<%=user_activity_id %>">
<% if activity.user == User.current %>
<span class="ml15 likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<span class="ml15 likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>activity, :user_activity_id=>user_activity_id,:type=>"activity"}%>
<% end %>
@ -76,7 +76,7 @@
<%= format_time(comment.created_on) %>
<span id="reply_praise_count_<%=comment.id %>">
<% if comment.user == User.current %>
<span class="fr likeButton"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "#{get_praise_num(comment)}" : "" %></span></span>
<% else %>
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
<% end %>

View File

@ -0,0 +1,32 @@
<%= content_for(:header_tags) do %>
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
<%#= javascript_include_tag "init_KindEditor","user" %>
<% end %>
<style type="text/css">
/*回复框*/
.homepagePostReplyInputContainer .ke-toolbar {display: none; width: 400px; border: none; background: none; padding: 0px 0px;}
.homepagePostReplyInputContainer .ke-toolbar-icon {line-height: 26px; font-size: 14px; padding-left: 26px;}
.homepagePostReplyInputContainer .ke-toolbar-icon-url {background-image: url(/images/public_icon.png)}
.homepagePostReplyInputContainer .ke-outline {padding: 0px 0px; line-height: 26px; font-size: 14px;}
.homepagePostReplyInputContainer .ke-icon-emoticons {background-position: 0px -671px; width: 50px; height: 26px;}
.homepagePostReplyInputContainer .ke-icon-emoticons:hover {background-position: -79px -671px; width: 50px; height: 26px;}
.homepagePostReplyInputContainer .ke-outline {border: none;}
.homepagePostReplyInputContainer .ke-inline-block {display: none;}
.homepagePostReplyInputContainer .ke-container {float: left;}
</style>
<%if jours %>
<% jours.each do |jour|%>
<% unless jour.private == 1 && (!User.current || (User.current && jour.jour_id != User.current.id && jour.user_id != User.current.id)) %>
<script type="text/javascript">
$(function(){
init_activity_KindEditor_data(<%= jour.id%>, null, "87%", "<%=jour.class.to_s%>");
});
</script>
<%= render :partial => 'user_journalsformessage', :locals => {:activity => jour,:user_activity_id =>jour.id} %>
<%#= render :partial => 'user_jours_new', :locals => {:jour => jour} %>
<% end %>
<%end%>
<% end%>
<% if (jours.count + page * 10) < count %>
<%= link_to "点击展开更多",feedback_path(@user.id, :type => type, :page => page),:id => "show_more_jours",:remote => "true",:class => "loadMore mt10 f_grey"%>
<% end %>

View File

@ -7,6 +7,7 @@
<%= options_for_select({"C语言"=>1, "C++"=>2, "Python"=>3, "Java"=>4}, (edit_mode && homework.is_program_homework?) ? homework.language : 1) %>
</select>
</div>
<div style="max-height: 320px; overflow-y:auto; width:730px;">
<% if edit_mode && homework.is_program_homework? %>
<% homework.homework_tests.each_with_index do |test, index| %>
<div class="mt10">
@ -27,10 +28,11 @@
<div class="cl"></div>
</div>
<% end %>
</div>
<div class="mt10">
<span class="f12 c_red db mt5 fl">温馨提示:您可以在发布作业后,在作业“模拟答题”中进行标准代码的检测。</span>
<a href="javascript:void(0);" class="BlueCirBtn fr">确&nbsp;&nbsp;定</a>
<a href="#submit_homework" class="BlueCirBtn fr">确&nbsp;&nbsp;定</a>
<div class="cl"></div>
</div>

View File

@ -5,5 +5,5 @@ $('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'>" +
"<a href='javascript:void(0)' onclick='hideModal();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
//$('#ajax-modal').parent().removeClass("alert_praise");
$('#ajax-modal').parent().css("top","30%").css("left","35%");
$('#ajax-modal').parent().css("top","30%").css("left","35%").css("border","3px solid #269ac9");
$('#ajax-modal').parent().addClass("alert_box");

View File

@ -4,4 +4,4 @@ $('#ajax-modal').css('height','300px').css("width","580px");
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'>" +
"<a href='javascript:void(0)' onclick='hideModal();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","20%").css("left","25%").css("position","fixed");
$('#ajax-modal').parent().css("top","20%").css("left","25%").css("position","fixed").css("border","3px solid #269ac9");

View File

@ -1,68 +1,40 @@
<%= content_for(:header_tags) do %>
<%= import_ke(enable_at: false, prettify: false, init_activity: false) %>
<%= javascript_include_tag "init_KindEditor","user" %>
<% end %>
<style type="text/css">
/*回复框*/
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
span.ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
div.ke-toolbar .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
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;}
div.ke-toolbar .ke-outline{border:none;}
/*.ke-container{height: 80px !important;}*/
</style>
<div >
<div>
<div class="homepageRightBanner mb10">
<div class="NewsBannerName">留言</div>
</div>
<div class="cl"></div>
<div class="message_box mb10" id="users_setting" style="min-height:192px;">
<div nhname='new_message' style="display:none;">
<%= form_for('new_form',:url => leave_user_message_path(@user.id), :html =>{:id => "user_feedback_new"}, :method => "post") do |f|%>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea' name="new_form[user_message]"></textarea>
<p nhname='contentmsg'></p>
<input id="private_flag" name="private" type="hidden" value="0"/>
<div nhname='toolbar_container' style="float:left;padding-top:3px;"></div>
<!--<a id="new_message_cancel_btn" href="javascript:void(0)" class="grey_n_btn fr " style="margin-top:6px;">取消</a>-->
<a href="javascript:void(0);" class="blue_n_btn fr" id="submit_feedback_user" style="margin-top:6px;" >留言</a>
<a href="javascript:void(0);" class="greyBtn2 postReplySubmit mt5 mr15" id="private_submit_feedback_user">私信</a> </div>
<% end%>
</div>
<div class="cl"></div>
<div class="message_list_box " id="user_jour_list" style="padding: <%= @jour && @jour.count > 0 ? '10' : '0'%>px;">
<%if @jour%>
<% @jour.each do |jour|%>
<% unless jour.private == 1 && (!User.current || (User.current && jour.jour_id != User.current.id && jour.user_id != User.current.id)) %>
<%= render :partial => 'user_jours_new', :locals => {:jour => jour} %>
<% end %>
<%end%>
<% end%>
<ul class="wlist" style=" border:none;">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
<div class="NewsBannerName pr"><span id="mesLabel">留言</span></div>
<ul class="resourcesSelect">
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
<ul class="mesType">
<li><%= link_to "全部", {:controller => "users", :action => "user_newfeedback", :type => nil}, :class =>"resourcesTypeAll resourcesGrey"%></li>
<li><%= link_to "留言", {:controller => "users", :action => "user_newfeedback", :type => "public"}, :class => "mesIcon resourcesGrey"%></li>
<li><%= link_to "私信", {:controller => "users", :action => "user_newfeedback", :type => "private"}, :class => "personalIcon resourcesGrey"%></li>
</ul>
</li>
</ul>
<div class="cl"></div>
</div>
<div class="cl"></div>
<div id="messageContent">
<div class="resources"><%= link_to image_tag(url_to_avatar(User.current),:class=>"fl mr10", :width => "50", :height => "50"), :alt => "用户头像" %>
<div class="fl" style="width:658px;">
<%= form_for('new_form',:url => leave_user_message_path(@user.id), :html =>{:id => "user_feedback_new"}, :method => "post") do |f|%>
<%=render :partial => "jour_form", :locals => {:f => f} %>
<input id="private_flag" name="private" type="hidden" value="0"/>
<a href="javascript:void(0);" class="blue_n_btn fr" id="submit_feedback_user" style="margin-top:6px;" >留言</a>
<a href="javascript:void(0);" class="greyBtn2 postReplySubmit mt5 mr15" id="private_submit_feedback_user">私信</a>
<% end %>
</div>
</div>
<%=render :partial => "users/user_jours_list", :locals => {:jours =>@jour, :page => 0, :type => @type, :count => @jour_count} %>
<div class="cl"></div>
</div><!--message_box end-->
</div>
<script type="text/javascript">
$(function(){
$("#submit_feedback_user").one('click',function() {
$("#private_flag").val("0");
$("#submit_feedback_user").submit();
jour_submit();
});
$("#private_submit_feedback_user").one('click',function() {
$("#private_flag").val("1");
$("#submit_feedback_user").submit();
private_jour_submit();
});
});
</script>

View File

@ -0,0 +1 @@
$("#show_more_jours").replaceWith("<%= escape_javascript( render :partial => 'users/user_jours_list',:locals => {:jours => @jour, :page => @page,:type => @type, :count => @jour_count} )%>");

View File

@ -1214,6 +1214,7 @@ ActiveRecord::Schema.define(:version => 20160121070232) do
create_table "org_members", :force => true do |t|
t.integer "user_id"
t.integer "organization_id"
t.string "role"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
public/images/mes_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -23,23 +23,6 @@ function description_show_hide(id){
});
}
function homework_description_show_hide(id){
showNormalImage('homework_description_'+id);
if($("#intro_content_"+id).height() > 810) {
$("#intro_content_show_"+id).show();
}
$("#intro_content_show_"+id).click(function(){
$("#homework_description_"+id).toggleClass("maxh360");
$("#intro_content_show_"+id).hide();
$("#intro_content_hide_"+id).show();
});
$("#intro_content_hide_"+id).click(function(){
$("#homework_description_"+id).toggleClass("maxh360");
$("#intro_content_hide_"+id).hide();
$("#intro_content_show_"+id).show();
});
}
function cleanArray (actual){
var newArray = new Array();
for (var i = 0; i< actual.length; i++){

View File

@ -114,6 +114,9 @@ $(function(){
dialogClass: 'BluePopupBox',
minWidth: 753
});
$('#BluePopupBox').parent().resizable("disable");
$('#BluePopupBox').parent().removeClass("ui-state-disabled");
$('#BluePopupBox').parent().css("border","3px solid #269ac9").css("padding","10px");
$('a.ProBtn').live('click', function(){
$("#BluePopupBox").dialog("open");
@ -204,6 +207,9 @@ $(function(){
dialogClass: 'BluePopupBox',
minWidth: 290
});
$('#GroupPopupBox').parent().resizable("disable");
$('#GroupPopupBox').parent().removeClass("ui-state-disabled");
$('#GroupPopupBox').parent().css("border","3px solid #269ac9").css("padding","10px");
$('a.groupBtn').live('click', function(){
$("#GroupPopupBox").dialog("open");

View File

@ -55,6 +55,43 @@ function show_more_project(url){
);
}
//个人留言
function jour_submit(){
if(jourReplyVerify()){
$("#private_flag").val("0");
jour_content_editor.sync();//提交内容之前要sync不然服务器端取不到值
$("#user_feedback_new").submit();
}
}
function private_jour_submit(){
if(jourReplyVerify()){
$("#private_flag").val("1");
jour_content_editor.sync();//提交内容之前要sync不然服务器端取不到值
$("#user_feedback_new").submit();
}
}
function jourReplyVerify() {
var content = jour_content_editor.html();//$.trim($("#message_content").val());
if (jour_content_editor.isEmpty()) {
$("#jour_content_span").text("回复不能为空");
$("#jour_content_span").css('color', '#ff0000');
$("#submit_feedback_user").one('click',function() {
jour_submit();
});
$("#private_submit_feedback_user").one('click',function() {
private_jour_submit();
});
return false;
}
else {
$("#jour_content_span").text("填写正确");
$("#jour_content_span").css('color', '#008000');
return true;
}
}
//老师提交 新建/修改 作业
function submit_homework(id){
if(!regex_homework_name()){

View File

@ -1099,7 +1099,7 @@ a:hover.link_file_a{ background:url(../images/pic_file.png) 0 -25px no-repeat; c
.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;text-overflow:ellipsis;}
.postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;}
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important;}
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important;}
.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;}
@ -1221,7 +1221,7 @@ a:hover.blueCir{ background:#3598db; color:#fff;}
.hworkPrName {width:110px; max-width:110px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:18px; line-height:18px; font-size:12px; color:#888888; text-align:center;}
.mr150 {margin-right:150px;}
.relatePInfo {text-align: left; position:absolute; background-color:#ffffff; padding:3px 8px; white-space:nowrap; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5); z-index:999; color:#585858; cursor:pointer; display:none;}
.captainName {max-width:40px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; display: inline-block;}
.captainName {max-width:75px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; display: inline-block;}
/*上传资源弹窗*/
.resourceUploadPopup {width:400px; height:auto; border:3px solid #269ac9 !important; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; top:50%; left:50%; margin-left:-200px; z-index:1000;}
@ -1257,3 +1257,6 @@ div.disable_link {background-color: #c1c1c1 !important;}
.fn {font-weight:normal}
.boutiqueP {position:absolute; left:0px; top:0px;}
.mh18 {max-height: 18px;}
.relatePWrap{max-height: 210px;overflow:hidden;}

View File

@ -1,3 +1,4 @@
/* CSS Document */
/* 2015-06-26 */
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;}
@ -77,6 +78,7 @@ a.linkGrey6:hover {color:#ffffff !important;}
.ml36{ margin-left:36px; }
.ml40{ margin-left:40px;}
.ml45{ margin-left:45px;}
.ml50{ margin-left: 50px;}
.ml55{ margin-left:55px;}
.ml30{ margin-left:30px;}
.ml60{ margin-left:60px;}
@ -95,7 +97,9 @@ a.linkGrey6:hover {color:#ffffff !important;}
.mr20{ margin-right:20px;}
.mr30{ margin-right:30px !important;}
.mr40{ margin-right:40px !important;}
.mr65 {margin-right: 65px;}
.mw20{ margin: 0 20px;}
.mw400 {max-width: 400px !important;}
.mt-20 {margin-top:-20px;}
.mt-4 {margin-top: -4px;}
.mt0 {margin-top: 0px !important;}
@ -121,6 +125,7 @@ a.linkGrey6:hover {color:#ffffff !important;}
.w70{ width:70px;}
.w80{ width:80px;}
.w90{ width:90px;}
.w100 {width: 100px;}
.w110{width:110px;}
.w210{ width:210px;}
.w150{ width:150px;}
@ -552,7 +557,7 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-
/*.navHomepageProfile ul li ul {display:none;}
.navHomepageProfile ul li:hover ul {display:block;}*/
.homepageLeft {width:240px; float:left; margin-right:10px; margin-bottom:10px;}
.homepageRight {width:750px; float:left; margin-top:10px; margin-bottom:10px;}
.homepageRight {width:750px; float:left; margin-top:10px; margin-bottom:10px; margin-top:10px;}
.homepagePortraitContainer {width:208px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px; padding:15px;}
.homepagePortraitImage {width:78px; height:78px; position:relative; border:1px solid #cbcbcb; padding: 2px;}
.homepagePortraitImage:hover {border:1px solid #269ac9;}
@ -836,7 +841,7 @@ a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-re
.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;text-overflow:ellipsis;}
.postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;}
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important;}
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important;}
.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;display: inline}
@ -1416,3 +1421,4 @@ span.at a{color:#269ac9;text-decoration: none;}
.orgDirection {width:392px; background-color:#f1f1f1; height:30px; vertical-align:middle; line-height:30px; color:#585858; padding-left:10px;}
.orgSendSearch {border:1px solid #dddddd; outline:none; width:262px; height:22px; padding-left:10px; float:left;}
.relatePWrap{max-height: 210px;overflow:hidden;}

View File

@ -1109,7 +1109,7 @@ a:hover.BlueCirBtnMini{ background:#269ac9; color:#fff;}
.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;text-overflow:ellipsis;}
.postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;}
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important;}
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important;}
.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;}

View File

@ -71,6 +71,7 @@ h4{ font-size:14px; color:#3b3b3b;}
.ml40{ margin-left:40px;}
.ml45{ margin-left:45px;}
.ml48{ margin-left:48px;}
.ml50{ margin-left: 50px;}
.ml53{margin-left:53px;}
.ml55{ margin-left:55px;}
.ml58{margin-left:58px;}
@ -102,6 +103,7 @@ h4{ font-size:14px; color:#3b3b3b;}
.mr50{margin-right: 50px;}
.mr55{margin-right: 55px;}
.mr60 {margin-right:60px;}
.mr65 {margin-right:65px;}
.mr70{margin-right: 70px;}
.mw15{margin:0 15px;}
.mr90 {margin-right:90px;}
@ -113,6 +115,7 @@ h4{ font-size:14px; color:#3b3b3b;}
.mt5{ margin-top:5px;}
.mt8{ margin-top:8px;}
.mt10{ margin-top:10px !important;}
.mt20{margin-top: 20px;}
.mt30{ margin-top: 30px;}
.mt40{ margin-top: 40px;}
.mt12 { margin-top:12px !important;}
@ -167,7 +170,8 @@ h4{ font-size:14px; color:#3b3b3b;}
.h70{ height:70px;}
.h150{ height:150px;}
.p10 {padding-left:10px; padding-right:10px;}
.mw400 {max-width: 400px;}
.mw400 {max-width: 400px !important;}
.mh18 {max-height: 18px;}
/* Font & background Color */
a.b_grey{ background: #F5F5F5;}
@ -302,7 +306,7 @@ a:hover.bgreen_n_btn{background:#08a384;}
.blue_btn_cir{ background:#3498db; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal;font-size:12px;white-space:nowrap;}
.orange_btn_cir{ background:#e67e22; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;white-space:nowrap;}
.bgreen_btn_cir{ background:#1abc9c; padding:1px 10px; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; color:#fff; font-weight:normal; font-size:12px;white-space:nowrap;}
.grey_border{border:1px solid #dddddd !important; }
.grey_border{border:1px solid #dddddd !important;}
/* commonpic */
.pic_date{ display:block; background:url(../images/new_project/public_icon.png) -31px 0 no-repeat; width:16px; height:15px; float:left;}
.pic_add{ display:block; background:url(../images/new_project/public_icon.png) -31px -273px no-repeat; width:16px; height:15px; float:left;}
@ -1004,3 +1008,5 @@ a:hover.userCancel{border:1px solid #888888; }
.userCard em {display:block; border-width:8px; position:absolute; bottom:-17px; left:110px; border-style:solid dashed dashed dashed; border-color:#eaeaea transparent transparent transparent; font-size:0; line-height:0;}
.userCardM {width:201px; height:20px; border:1px solid #dddddd; resize:none;}
.resourceCopy {padding:0px; margin:0px; width:12px; height:12px; display:inline-block;}
.relatePWrap{max-height: 210px;overflow:hidden;}

View File

@ -35,7 +35,7 @@ ul.subNavArrow:hover li ul {display:block;}
a.mesIcon {background:url(../images/mes_icon.png) -5px -73px no-repeat; padding-left:23px;}
a.personalIcon {background:url(../images/mes_icon.png) -6px -16px no-repeat; padding-left:23px;}
.mesType {background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:10px 15px; left:-50px; font-size:12px; color:#888888; display:none; line-height:2; z-index:999; white-space:nowrap;}
a.greyBtn2 {float:right; text-align:center; font-size:12px; color:#ffffff; background-color:#cecece; padding:3px 10px;}
a.greyBtn2 {float:right; text-align:center; font-size:12px; color:#ffffff; background-color:#aaaaaa; padding:3px 10px;}
.PMTag {padding:0px 5px; background-color:#555555; border-radius:3px; color:#ffffff;}
.upload_con h2{ display:block; background:#eaeaea; font-size:14px; color:#343333; height:31px; width: auto; margin-top:25px; padding-left:20px; padding-top:5px;}
.upload_box{ width:430px; margin:15px auto;}