Merge remote-tracking branch 'origin/develop' into weixin_guange
This commit is contained in:
commit
d3d31ca3a2
|
@ -6,6 +6,8 @@
|
|||
/config/database.yml
|
||||
/config/configuration.yml
|
||||
/config/additional_environment.rb
|
||||
/config/menu.yml
|
||||
/config/wechat.yml
|
||||
|
||||
/files/*
|
||||
/log/*
|
||||
|
|
|
@ -41,7 +41,7 @@ class OrgDocumentCommentsController < ApplicationController
|
|||
@org_subfield = OrgSubfield.where(:id => @document.org_subfield_id).first
|
||||
@subfield_content = @organization.org_subfields.order("priority")
|
||||
respond_to do |format|
|
||||
format.html {render :layout => @organization.switch_type ? 'base_org_custom' : 'base_org'}
|
||||
format.html {render :layout => (@organization.switch_type && @document && !@document.org_subfield_id.blank?) ? 'base_org_custom' : 'base_org'}
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -96,7 +96,12 @@ class OrgDocumentCommentsController < ApplicationController
|
|||
def add_reply_in_doc
|
||||
@document = OrgDocumentComment.find(params[:id]).root
|
||||
@comment = OrgDocumentComment.new(:organization_id => @document.organization_id, :creator_id => User.current.id, :reply_id => params[:id])
|
||||
@comment.content = params[:org_content]
|
||||
if params[:org_comment].blank?
|
||||
@comment.content = params[:org_content]
|
||||
else
|
||||
@comment.content = params[:org_comment][:org_content]
|
||||
end
|
||||
|
||||
@document.children << @comment
|
||||
@document.save
|
||||
respond_to do |format|
|
||||
|
|
|
@ -29,7 +29,7 @@ class OrganizationsController < ApplicationController
|
|||
helper :issues
|
||||
include UsersHelper
|
||||
include OrganizationsHelper
|
||||
before_filter :find_organization, :only => [:show, :members, :apply_subdomain, :select_org_layout, :teachers, :students, :projects, :courses]
|
||||
before_filter :find_organization, :only => [:show, :members, :apply_subdomain, :select_org_layout, :teachers, :students, :projects, :courses, :acts]
|
||||
# before_filter :allow_as_admin, :only => [:students, :teachers, :projects, :courses, :acts]
|
||||
layout 'base_org'
|
||||
def index
|
||||
|
@ -107,7 +107,7 @@ class OrganizationsController < ApplicationController
|
|||
if @organization.org_subfields.where(:field_type => "Compact", :hide => 0).count > 0
|
||||
@acts = UserActivity.find_by_sql("SELECT * FROM `user_activities` where act_type in ('HomeworkCommon', 'News', 'Message', 'Issue') and
|
||||
((container_type = 'Course' and container_id in (#{course_ids.join(',')})) or (container_type = 'Project' and container_id in (#{project_ids.join(',')})))
|
||||
order by updated_at desc limit 6;")
|
||||
order by created_at desc limit 6;")
|
||||
end
|
||||
render :layout => 'base_org_custom'
|
||||
else
|
||||
|
@ -265,6 +265,19 @@ class OrganizationsController < ApplicationController
|
|||
end
|
||||
|
||||
def acts
|
||||
@subfield_content = @organization.org_subfields.order("priority")
|
||||
@org_subfield = OrgSubfield.where(:id => params[:org_subfield_id]).first
|
||||
shield_project_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Project'").map(&:shield_id)
|
||||
shield_course_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Course'").map(&:shield_id)
|
||||
project_ids = (@organization.projects.map(&:id) - shield_project_ids) << 0
|
||||
course_ids = (@organization.courses.map(&:id) - shield_course_ids) << 0
|
||||
@org_acts = UserActivity.find_by_sql("SELECT * FROM `user_activities` where act_type in ('HomeworkCommon', 'News', 'Message', 'Issue') and
|
||||
((container_type = 'Course' and container_id in (#{course_ids.join(',')})) or (container_type = 'Project' and container_id in (#{project_ids.join(',')})))
|
||||
order by created_at desc limit 6;")
|
||||
respond_to do |format|
|
||||
format.html{render :layout => 'base_org_custom'}
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
def searchmember_by_name members, name
|
||||
|
|
|
@ -100,7 +100,7 @@ class UsersController < ApplicationController
|
|||
else
|
||||
@user_activity_id = -1
|
||||
end
|
||||
@is_in_course = params[:is_in_course]
|
||||
@is_in_course = params[:is_in_course].to_i
|
||||
@course_activity = params[:course_activity].to_i
|
||||
end
|
||||
respond_to do |format|
|
||||
|
@ -3236,6 +3236,38 @@ class UsersController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def all_journals
|
||||
if params[:type].present?
|
||||
case params[:type]
|
||||
when 'OrgDocumentComment'
|
||||
obj = OrgDocumentComment.where('id = ?', params[:id].to_i).first
|
||||
@journals = obj.children.reorder("created_at desc")
|
||||
when 'Message'
|
||||
obj = Message.where('id = ?', params[:id].to_i).first
|
||||
@journals = obj.children.reorder("created_on desc")
|
||||
when 'News'
|
||||
obj = News.where('id = ?', params[:id].to_i).first
|
||||
@journals = obj.comments.reorder("created_on desc")
|
||||
when 'JournalsForMessage'
|
||||
obj = JournalsForMessage.where('id = ?', params[:id].to_i).first
|
||||
@journals = obj.children.reorder("created_on desc")
|
||||
when 'Issue'
|
||||
obj = Issue.where('id = ?', params[:id].to_i).first
|
||||
@journals = obj.journals.reorder("created_on desc")
|
||||
when 'BlogComment'
|
||||
obj = BlogComment.where('id = ?', params[:id].to_i).first
|
||||
@journals = obj.children.reorder("created_on desc")
|
||||
when 'HomeworkCommon'
|
||||
obj = HomeworkCommon.where('id = ?', params[:id].to_i).first
|
||||
@journals = obj.journals_for_messages.reorder("created_on desc")
|
||||
@is_in_course = params[:is_in_course].to_i if params[:is_in_course]
|
||||
@course_activity = params[:course_activity].to_i if params[:course_activity]
|
||||
@is_teacher = User.current.allowed_to?(:as_teacher,obj.course)
|
||||
@user_activity_id = params[:user_activity_id].to_i if params[:user_activity_id]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def find_user
|
||||
|
|
|
@ -6,7 +6,7 @@ class WechatsController < ActionController::Base
|
|||
|
||||
# default text responder when no other match
|
||||
on :text do |request, content|
|
||||
request.reply.text "您的意见已收到" # Just echo
|
||||
request.reply.text "您的意见已收到,感谢您的反馈!" # Just echo
|
||||
end
|
||||
|
||||
# When receive 'help', will trigger this responder
|
||||
|
@ -179,7 +179,7 @@ class WechatsController < ActionController::Base
|
|||
raise "此微信号已绑定用户, 不能重复绑定" if user_binded?(openid)
|
||||
|
||||
user, last_login_on = User.try_to_login(params[:username], params[:password])
|
||||
raise "用户名或密码错误,请重新登录" unless user
|
||||
raise "用户名或密码错误,请重新输入" unless user
|
||||
#补全用户信息
|
||||
|
||||
raise "此用户已经绑定过公众号, 请换一个帐户试试" if user.user_wechat
|
||||
|
|
|
@ -106,7 +106,7 @@ class WordsController < ApplicationController
|
|||
elsif @journal_destroyed.jour_type == 'HomeworkCommon'
|
||||
@homework = HomeworkCommon.find @journal_destroyed.jour_id
|
||||
if params[:user_activity_id]
|
||||
@user_activity_id = params[:user_activity_id]
|
||||
@user_activity_id = params[:user_activity_id].to_i
|
||||
else
|
||||
@user_activity_id = -1
|
||||
end
|
||||
|
|
|
@ -105,13 +105,26 @@ module OrganizationsHelper
|
|||
def org_time_by_type obj
|
||||
case obj.act_type
|
||||
when "Message"
|
||||
obj.act.updated_on
|
||||
obj.act.created_on
|
||||
when "News"
|
||||
obj.act.created_on
|
||||
when "HomeworkCommon"
|
||||
obj.act.updated_at
|
||||
obj.act.created_at
|
||||
when "Issue"
|
||||
obj.act.updated_on
|
||||
obj.act.created_on
|
||||
end
|
||||
end
|
||||
|
||||
def org_reply_count_type obj
|
||||
case obj.act_type
|
||||
when "HomeworkCommon"
|
||||
obj.act.journals_for_messages.count
|
||||
when "Issue"
|
||||
obj.act.journals.count
|
||||
when "Message"
|
||||
obj.act.children.count
|
||||
when "News"
|
||||
obj.act.comments_count
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -124,6 +137,8 @@ module OrganizationsHelper
|
|||
obj.org_act.parent_id.nil? ? obj.org_act.subject : obj.org_act.parent.subject
|
||||
when "News"
|
||||
obj.org_act.title
|
||||
when "Issue"
|
||||
obj.org_act.subject
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -76,6 +76,18 @@ class BlogComment < ActiveRecord::Base
|
|||
def project
|
||||
end
|
||||
|
||||
def creator_user
|
||||
self.author
|
||||
end
|
||||
|
||||
def created_time
|
||||
self.created_at
|
||||
end
|
||||
|
||||
def content_detail
|
||||
self.content
|
||||
end
|
||||
|
||||
#博客回复微信模板消息
|
||||
# def blog_wechat_message
|
||||
# ws = WechatService.new
|
||||
|
|
|
@ -104,4 +104,16 @@ class Comment < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
def creator_user
|
||||
self.author
|
||||
end
|
||||
|
||||
def created_time
|
||||
self.created_on
|
||||
end
|
||||
|
||||
def content_detail
|
||||
self.comments
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -137,6 +137,18 @@ class Journal < ActiveRecord::Base
|
|||
end
|
||||
##
|
||||
|
||||
def creator_user
|
||||
self.user
|
||||
end
|
||||
|
||||
def created_time
|
||||
self.created_on
|
||||
end
|
||||
|
||||
def content_detail
|
||||
self.notes
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def split_private_notes
|
||||
|
|
|
@ -329,4 +329,16 @@ class JournalsForMessage < ActiveRecord::Base
|
|||
down_course_score_num(self.jour.course_id, self.user_id, "HomeworkCommon")
|
||||
end
|
||||
end
|
||||
|
||||
def creator_user
|
||||
self.user
|
||||
end
|
||||
|
||||
def created_time
|
||||
self.created_on
|
||||
end
|
||||
|
||||
def content_detail
|
||||
self.notes
|
||||
end
|
||||
end
|
||||
|
|
|
@ -221,6 +221,18 @@ class Message < ActiveRecord::Base
|
|||
update_org_activity(self.class, self.id)
|
||||
end
|
||||
|
||||
def creator_user
|
||||
self.author
|
||||
end
|
||||
|
||||
def created_time
|
||||
self.created_on
|
||||
end
|
||||
|
||||
def content_detail
|
||||
self.content
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def add_author_as_watcher
|
||||
|
|
|
@ -35,4 +35,15 @@ class OrgDocumentComment < ActiveRecord::Base
|
|||
|
||||
end
|
||||
|
||||
def creator_user
|
||||
self.creator
|
||||
end
|
||||
|
||||
def created_time
|
||||
self.created_at
|
||||
end
|
||||
|
||||
def content_detail
|
||||
self.content
|
||||
end
|
||||
end
|
||||
|
|
|
@ -52,23 +52,6 @@
|
|||
</style>
|
||||
<% course_activities.includes(:course_act).each do |activity| if course_activities %>
|
||||
<script>
|
||||
function expand_reply(container, btnid) {
|
||||
var target = $(container);
|
||||
var btn = $(btnid);
|
||||
if (btn.data('init') == '0') {
|
||||
btn.data('init', 1);
|
||||
btn.html('收起回复');
|
||||
target.show();
|
||||
} else {
|
||||
btn.data('init', 0);
|
||||
btn.html('展开更多');
|
||||
target.hide();
|
||||
target.eq(0).show();
|
||||
target.eq(1).show();
|
||||
target.eq(2).show();
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
sd_create_editor_from_data(<%= activity.id%>, null, "100%", "<%= activity.class.to_s %>");
|
||||
});
|
||||
|
|
|
@ -24,8 +24,10 @@
|
|||
<ul class="st_box_top">
|
||||
<li class="ml50" style="padding-right: 5px;"><span class="fontGrey6 fb">姓名</span></li>
|
||||
<li class="ml10" style="padding-right: 15px;"><span class="fontGrey6 fb">学号</span></li>
|
||||
<li style="padding-right: 55px; margin-left: 160px;"><span class="fontGrey6 fb">分班</span></li>
|
||||
<li class="st_list_score ml10">
|
||||
<% unless @course.course_groups.empty? %>
|
||||
<li style="padding-right: 55px; margin-left: 160px;"><span class="fontGrey6 fb">分班</span></li>
|
||||
<% end %>
|
||||
<li class="st_list_score <%= @course.course_groups.empty? ? 'ml250' : 'ml10' %>">
|
||||
<%= link_to '英雄榜', member_score_sort_course_path(:sort_type => 'score', :sort_by => (@score_sort_by == "desc" ? "asc" : "desc"), :group_id => (@group ? @group.id : 0),:search_name => (@search_name ? @search_name : nil)) ,:result => members,method: 'get', remote: true, :class => 'ml35'%>
|
||||
<% if @sort_type == "score" && @score_sort_by == 'desc' %>
|
||||
<a id="pic" href="javascript:" class= "st_down"></a>
|
||||
|
@ -59,31 +61,33 @@
|
|||
<li><%= link_to("#{l(:label_bidding_user_studentcode)}:<span >#{member.user.user_extensions.student_id}</span>".html_safe,user_path(member.user)) %></li>
|
||||
<% end%>
|
||||
</ul>
|
||||
<% if User.current.allowed_to?(:as_teacher, @course) || User.current.admin? %>
|
||||
<% if @course.course_groups.nil? || @group %>
|
||||
<% unless @course.course_groups.empty? %>
|
||||
<% if User.current.allowed_to?(:as_teacher, @course) || User.current.admin? %>
|
||||
<% if @course.course_groups.nil? || @group %>
|
||||
<div class="select-class-option fl" style="margin-left: 5px;">
|
||||
<span style="width: 100px; text-align: center; float: left;" class="hidden"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= form_tag({:controller => 'courses', :action => 'teacher_assign_group', :id => @course.id,:user_id => member.user_id},:remote=>'true', :method => 'post', :id=>"join_group_form_#{member.id}", :class => 'query_form') do %>
|
||||
<div class="select-class-option fl" style="margin-left: 5px;"><span style="width: 100px; text-align: center; float: left;" class="hidden"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
|
||||
<a style="display: inline-block;" href="javascript:void(0)" class="pic_edit2 ml5"></a>
|
||||
</div>
|
||||
<%= select( :name,:group_id, course_group_option(@course),
|
||||
{ :include_blank => false,:selected => member.course_group_id},
|
||||
{:onchange=>"join_group_function('#join_group_form_#{member.id}');", :id =>"course_group_id", :name => "course_group_id",:class=>"w125 undis class-edit fl", :style => "margin-left: 5px;"}) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="select-class-option fl" style="margin-left: 5px;">
|
||||
<span style="width: 100px; text-align: center; float: left;" class="hidden"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= form_tag({:controller => 'courses', :action => 'teacher_assign_group', :id => @course.id,:user_id => member.user_id},:remote=>'true', :method => 'post', :id=>"join_group_form_#{member.id}", :class => 'query_form') do %>
|
||||
<div class="select-class-option fl" style="margin-left: 5px;"><span style="width: 100px; text-align: center; float: left;" class="hidden"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
|
||||
<a style="display: inline-block;" href="javascript:void(0)" class="pic_edit2 ml5"></a>
|
||||
</div>
|
||||
<%= select( :name,:group_id, course_group_option(@course),
|
||||
{ :include_blank => false,:selected => member.course_group_id},
|
||||
{:onchange=>"join_group_function('#join_group_form_#{member.id}');", :id =>"course_group_id", :name => "course_group_id",:class=>"w125 undis class-edit fl", :style => "margin-left: 5px;"}) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="select-class-option fl" style="margin-left: 5px;">
|
||||
<span style="width: 100px; text-align: center; float: left;" class="hidden"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= link_to format("%0.2f",member.score.nil? ? 0 : member.score.to_s), {
|
||||
:action => 'show_member_score',
|
||||
:member_id => member.id,
|
||||
:remote => true},
|
||||
:class => 'st_list_score c_red' %>
|
||||
:class => "st_list_score c_red #{@course.course_groups.empty? ? 'ml130' : ''}" %>
|
||||
<%= link_to member.act_score.nil? ? 0 : member.act_score.to_s, {
|
||||
:action => 'show_member_act_score',
|
||||
:member_id => member.id,
|
||||
|
|
|
@ -1,22 +1,5 @@
|
|||
<% issue_list(issues) do |issue, level| -%>
|
||||
<script>
|
||||
function expand_reply(container, btnid) {
|
||||
var target = $(container);
|
||||
var btn = $(btnid);
|
||||
if (btn.data('init') == '0') {
|
||||
btn.data('init', 1);
|
||||
btn.html('收起回复');
|
||||
target.show();
|
||||
} else {
|
||||
btn.data('init', 0);
|
||||
btn.html('展开更多');
|
||||
target.hide();
|
||||
target.eq(0).show();
|
||||
target.eq(1).show();
|
||||
target.eq(2).show();
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
sd_create_editor_from_data(<%= issue.id%>, null, "100%", "<%= issue.class.name %>");
|
||||
});
|
||||
|
|
|
@ -6,23 +6,6 @@
|
|||
<% if all_news %>
|
||||
<% all_news.each do |news| %>
|
||||
<script>
|
||||
function expand_reply(container, btnid) {
|
||||
var target = $(container);
|
||||
var btn = $(btnid);
|
||||
if (btn.data('init') == '0') {
|
||||
btn.data('init', 1);
|
||||
btn.html('收起回复');
|
||||
target.show();
|
||||
} else {
|
||||
btn.data('init', 0);
|
||||
btn.html('展开更多');
|
||||
target.hide();
|
||||
target.eq(0).show();
|
||||
target.eq(1).show();
|
||||
target.eq(2).show();
|
||||
}
|
||||
}
|
||||
|
||||
function expand_reply_input(id) {
|
||||
$(id).toggle();
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<% if @organization.switch_type %>
|
||||
<% if @organization.switch_type && @document && !@document.org_subfield_id.blank? %>
|
||||
<%= render :partial => 'show_custom_org_document_comment' %>
|
||||
<% else %>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"create_kindeditor",'blog' %>
|
||||
|
@ -23,6 +23,9 @@
|
|||
<% else %>
|
||||
<span style="color:#269ac9;">组织文章</span>
|
||||
<% end %>
|
||||
<% if @document.organization.home_id == @document.id %>
|
||||
<span class="red_homework_btn_cir ml5">已设为首页</span>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="homepagePostTitle postGrey"><%= link_to @document.title, org_document_comment_path(:id => @document.id, :organization_id => @document.organization.id) %></div>
|
||||
<div class="homepagePostDate">
|
||||
|
@ -45,8 +48,14 @@
|
|||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li>
|
||||
<%= form_for('new_form', :url => {:controller => 'organizations', :action => 'set_homepage', :id => @document.organization_id, :home_id => @document.id}, :method => "put", :remote => true) do |f| %>
|
||||
<a href="javascript:void(0);" class="postOptionLink" onclick="$(this).parent().submit();">设为首页</a>
|
||||
<% if @document.organization.home_id == @document.id %>
|
||||
<%= form_for('new_form', :url => {:controller => 'organizations', :action => 'cancel_homepage', :id => @document.organization_id, :home_id => @document.id}, :method => "put", :remote => true) do |f| %>
|
||||
<a href="javascript:void(0);" class="postOptionLink" onclick="$(this).parent().submit();">取消首页</a>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= form_for('new_form', :url => {:controller => 'organizations', :action => 'set_homepage', :id => @document.organization_id, :home_id => @document.id}, :method => "put", :remote => true) do |f| %>
|
||||
<a href="javascript:void(0);" class="postOptionLink" onclick="$(this).parent().submit();">设为首页</a>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
|
|
|
@ -53,9 +53,9 @@
|
|||
<% if act.container_type == 'Project' %>
|
||||
<% case act.org_act_type.to_s %>
|
||||
<% when 'Issue' %>
|
||||
<%= render :partial => 'organizations/org_project_issue', :locals => {:activity => Issue.find(act.org_act_id),:user_activity_id =>act.id} %>
|
||||
<%= render :partial => 'users/project_issue', :locals => {:activity => Issue.find(act.org_act_id),:user_activity_id =>act.id} %>
|
||||
<% when 'Message' %>
|
||||
<%= render :partial => 'organizations/project_message', :locals => {:activity => Message.find(act.org_act_id),:user_activity_id =>act.id} %>
|
||||
<%= render :partial => 'users/project_message', :locals => {:activity => Message.find(act.org_act_id),:user_activity_id =>act.id, :is_course=>0, :is_board=>0} %>
|
||||
<% when 'Project'%>
|
||||
<%= render :partial => 'organizations/project_create', :locals => {:activity => act,:user_activity_id =>act.id} %>
|
||||
<% end %>
|
||||
|
@ -63,24 +63,24 @@
|
|||
<% if act.container_type == 'Course' %>
|
||||
<% case act.org_act_type.to_s %>
|
||||
<% when 'HomeworkCommon' %>
|
||||
<%= render :partial => 'org_course_homework', :locals => {:activity => HomeworkCommon.find(act.org_act_id),:user_activity_id =>act.id,:course_activity => 0} %>
|
||||
<%= render :partial => 'users/course_homework', :locals => {:activity => HomeworkCommon.find(act.org_act_id),:user_activity_id =>act.id,:course_activity => 0} %>
|
||||
<% when 'News' %>
|
||||
<%= render :partial => 'org_course_news', :locals => {:activity => News.find(act.org_act_id),:user_activity_id =>act.id} %>
|
||||
<%= render :partial => 'users/course_news', :locals => {:activity => News.find(act.org_act_id),:user_activity_id =>act.id} %>
|
||||
<% when 'Message'%>
|
||||
<%= render :partial => 'org_course_message', :locals => {:activity => Message.find(act.org_act_id),:user_activity_id =>act.id} %>
|
||||
<%= render :partial => 'users/course_message', :locals => {:activity => Message.find(act.org_act_id),:user_activity_id =>act.id,:is_course=>0,:is_board=>0} %>
|
||||
<% when 'Poll' %>
|
||||
<%= render :partial => 'org_course_poll', :locals => {:activity => Poll.find(act.org_act_id), :user_activity_id => act.id} %>
|
||||
<%= render :partial => 'users/course_poll', :locals => {:activity => Poll.find(act.org_act_id), :user_activity_id => act.id} %>
|
||||
<% when 'Course'%>
|
||||
<%= render :partial => 'org_course_create', :locals => {:activity => Course.find(act.org_act_id), :user_activity_id => act.id} %>
|
||||
<%= render :partial => 'users/course_create', :locals => {:activity => Course.find(act.org_act_id), :user_activity_id => act.id} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if act.container_type == 'OrgSubfield' %>
|
||||
<% if act.org_act_type == 'Message' and act.org_act_id and Message.where("id=#{act.org_act_id}").count > 0 %>
|
||||
<% message = Message.find(act.org_act_id) %>
|
||||
<% if !message.board.course_id.nil? %>
|
||||
<%= render :partial => 'org_course_message', :locals => {:activity => message,:user_activity_id =>act.id} %>
|
||||
<%= render :partial => 'users/course_message', :locals => {:activity => message,:user_activity_id =>act.id} %>
|
||||
<% elsif message.board.project_id != -1 %>
|
||||
<%= render :partial => 'organizations/project_message', :locals => {:activity => message,:user_activity_id =>act.id} %>
|
||||
<%= render :partial => 'users/project_message', :locals => {:activity => message,:user_activity_id =>act.id,:is_course=>0,:is_board=>0} %>
|
||||
<% elsif message.board.org_subfield_id %>
|
||||
<%= render :partial => 'organizations/org_subfield_message', :locals => {:activity => message, :user_activity_id => act.id} %>
|
||||
<% end %>
|
||||
|
|
|
@ -88,46 +88,15 @@
|
|||
</span>
|
||||
</div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore"><a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >展开更多</a></div>
|
||||
<div class="homepagePostReplyBannerMore"><a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'Message',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >展开更多</a></div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% activity= activity.parent_id.nil? ? activity : activity.parent %>
|
||||
<% replies_all_i = 0 %>
|
||||
<% comments = activity.children.reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% activity.children.reorder("created_on desc").each do |reply| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= reply.id %>');
|
||||
autoUrl('reply_content_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i=replies_all_i+1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i>3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33"), user_url_in_org(reply.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if reply.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to reply.try(:author), user_url_in_org(reply.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= link_to reply.try(:author).try(:realname), user_url_in_org(reply.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= format_time(reply.created_on) %>
|
||||
<span id="reply_praise_count_<%=reply.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= reply.id %>">
|
||||
<%= reply.content.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= render :partial => 'users/all_replies', :locals => {:comments => comments}%>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -70,48 +70,17 @@
|
|||
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'News',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% replies_all_i = 0 %>
|
||||
<% comments = activity.comments.reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% activity.comments.reorder("created_on desc").each do |comment| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_url_in_org(comment.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if comment.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:author), user_url_in_org(comment.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= link_to comment.try(:author).try(:realname), user_url_in_org(comment.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= format_time(comment.created_on) %>
|
||||
<span id="reply_praise_count_<%=comment.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.comments.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= render :partial => 'users/all_replies', :locals => {:comments => comments}%>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
<% if @subfield_acts.blank? %>
|
||||
<% else %>
|
||||
<div class="sn-inner-body">
|
||||
<div class="sn-innner-content">
|
||||
<div class="sn-row sn-bg-white">
|
||||
<div class="sn-font-grey3 f14">
|
||||
您的位置:<%= link_to "首页", organization_path(@organization), :class => "sn-link-grey2" %> >
|
||||
<a class = "sn-link-grey2"><%= @org_subfield.name %></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sn-inner-body">
|
||||
<div class="sn-innner-content">
|
||||
<div class="sn-row sn-bg-white">
|
||||
<div class="sn-font-grey3 f14">
|
||||
您的位置:<%= link_to "首页", organization_path(@organization), :class => "sn-link-grey2" %> >
|
||||
<a class = "sn-link-grey2"><%= @org_subfield.name %></a>
|
||||
</div>
|
||||
</div>
|
||||
<% if @subfield_acts.blank? %>
|
||||
<p class="fontGrey2 f14 mt10 mb5">该模块暂时没有相关内容</p>
|
||||
<% else %>
|
||||
|
||||
<div class="sn-inner-newslist mt15">
|
||||
<h2 class="sn-inner-newsh2"><%= @org_subfield.name %></h2>
|
||||
<ul>
|
||||
|
@ -33,12 +35,13 @@
|
|||
</ul>
|
||||
|
||||
<!--<div>-->
|
||||
<!--<ul class="sn-inner-pages" id="pages" style="margin-top: 5px;">-->
|
||||
<!--<%#= pagination_links_full @atta_pages, @atta_count, :per_page_links => true, :remote => @is_remote, :flag => true %>-->
|
||||
<!--<div class="cl"></div>-->
|
||||
<!--</ul>-->
|
||||
<!--<ul class="sn-inner-pages" id="pages" style="margin-top: 5px;">-->
|
||||
<!--<%#= pagination_links_full @atta_pages, @atta_count, :per_page_links => true, :remote => @is_remote, :flag => true %>-->
|
||||
<!--<div class="cl"></div>-->
|
||||
<!--</ul>-->
|
||||
<!--</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo">
|
||||
<%= link_to User.find(document.creator_id), user_url_in_org(document.creator.id), :class => "newsBlue mr15" %>
|
||||
<%= link_to document.creator.show_name, user_url_in_org(document.creator.id), :class => "newsBlue mr15" %>
|
||||
TO <%= link_to document.organization.name, organization_path(document.organization), :class => "newsBlue" %>
|
||||
|
|
||||
<span style="color:#269ac9;"><%= document.org_subfield_id.nil? ? "组织文章" :"#{OrgSubfield.find(document.org_subfield_id).name}" %></span>
|
||||
|
@ -41,8 +41,14 @@
|
|||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li>
|
||||
<%= form_for('new_form', :url => {:controller => 'organizations', :action => 'set_homepage', :id => document.organization_id, :home_id => document.id, :show_homepage => 1}, :method => "put", :remote => true) do |f| %>
|
||||
<a href="javascript:void(0);" class="postOptionLink" onclick="$(this).parent().submit();">设为首页</a>
|
||||
<% if document.organization.home_id == document.id %>
|
||||
<%= form_for('new_form', :url => {:controller => 'organizations', :action => 'cancel_homepage', :id => document.organization_id, :home_id => document.id}, :method => "put", :remote => true) do |f| %>
|
||||
<a href="javascript:void(0);" class="postOptionLink" onclick="$(this).parent().submit();">取消首页</a>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= form_for('new_form', :url => {:controller => 'organizations', :action => 'set_homepage', :id => document.organization_id, :home_id => document.id, :show_homepage => 1}, :method => "put", :remote => true) do |f| %>
|
||||
<a href="javascript:void(0);" class="postOptionLink" onclick="$(this).parent().submit();">设为首页</a>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -61,7 +67,7 @@
|
|||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% comments_for_doc = document.children.reorder("created_at desc") %>
|
||||
<% comments_for_doc = document.children.reorder("created_at desc").limit(3) %>
|
||||
<% count = document.children.count() %>
|
||||
|
||||
<div class="homepagePostReply fl" style="background-color: #f1f1f1;" id="<%= document.id %>">
|
||||
|
@ -74,41 +80,14 @@
|
|||
</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">
|
||||
<a id="reply_btn_<%= document.id %>" onclick="expand_reply('#reply_div_<%= document.id %> li','#reply_btn_<%=document.id%>',<%= document.id %>,'OrgDocumentComment',<%= document.id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help">
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContainer" id="reply_div_<%= document.id %>" style="display:<%= count == 0 ? 'none' : 'block' %>">
|
||||
<ul>
|
||||
<% reply_id = 0 %>
|
||||
<% comments_for_doc.each do |comment| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% reply_id += 1 %>
|
||||
<li style="display:<%= reply_id > 3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait"><%= link_to image_tag(url_to_avatar(User.find(comment.creator_id)), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_id) %></div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<%= link_to User.find(comment.creator_id), user_url_in_org(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 %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||
</span>
|
||||
</div>
|
||||
<% unless comment.content.blank? %>
|
||||
<div class="homepagePostReplyContent" id="reply_content_<%= comment.id %>"><%= comment.content.html_safe %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= render :partial => 'users/all_replies', :locals => {:comments => comments_for_doc}%>
|
||||
</div>
|
||||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= act.id %>">
|
||||
|
@ -138,22 +117,6 @@
|
|||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function expand_reply(container, btnid) {
|
||||
var target = $(container);
|
||||
var btn = $(btnid);
|
||||
if (btn.data('init') == '0') {
|
||||
btn.data('init', 1);
|
||||
btn.html('收起回复');
|
||||
target.show();
|
||||
} else {
|
||||
btn.data('init', 0);
|
||||
btn.html('展开更多');
|
||||
target.hide();
|
||||
target.eq(0).show();
|
||||
target.eq(1).show();
|
||||
target.eq(2).show();
|
||||
}
|
||||
}
|
||||
$(function(){
|
||||
user_card_show_hide();
|
||||
});
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
<li class="orgListType"><%= org_subfield_type field %></li>
|
||||
<li class="orgListCatalog hidden">
|
||||
<% if Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 %>
|
||||
<div id="sub_dir_show_<%= field.id %>" ondblclick="edit_dir('#sub_dir_show_<%= field.id %>','#sub_dir_edit_<%= field.id %>');" style="cursor:pointer;background-color:#fffce6;color: #0d90c3; width:30px; margin-left:20px;" title="双击可编辑">
|
||||
<div id="sub_dir_show_<%= field.id %>" ondblclick="edit_dir('#sub_dir_show_<%= field.id %>','#sub_dir_edit_<%= field.id %>');" style="cursor:pointer;background-color:#fffce6;color: #0d90c3; width:75px;overflow: hidden; white-space: nowrap;text-overflow: ellipsis;" title="双击可编辑">
|
||||
<%= field.subfield_subdomain_dir.nil? ? '未设置': field.subfield_subdomain_dir.name %>
|
||||
</div>
|
||||
<% else %>
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
<% if @org_acts.blank? %>
|
||||
<p class="fontGrey2 f14 mt10 mb5">该模块暂时没有相关内容</p>
|
||||
<% else %>
|
||||
<div class="sn-inner-body">
|
||||
<div class="sn-innner-content">
|
||||
<div class="sn-row sn-bg-white">
|
||||
<div class="sn-font-grey3 f14">
|
||||
您的位置:<%= link_to "首页", organization_path(@organization), :class => "sn-link-grey2" %> >
|
||||
<a class = "sn-link-grey2"><%= @org_subfield.name %></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sn-inner-newslist mt15">
|
||||
<h2 class="sn-inner-newsh2"><%= @org_subfield.name %></h2>
|
||||
<ul>
|
||||
<% @org_acts.each do |obj| %>
|
||||
<% user = org_user_by_type(obj) %>
|
||||
<% title = org_title_by_type(obj) %>
|
||||
<% content = org_content_by_type(obj) %>
|
||||
<% time = org_time_by_type(obj) %>
|
||||
<% reply_count = org_reply_count_type(obj) %>
|
||||
<li>
|
||||
<div class="sn-circle fl"></div>
|
||||
<% if obj.act_type == "Message" %>
|
||||
<%= link_to title, board_message_path(obj.act.board.id, obj.act.id), :class => "sn-newslist-titile fl", :target => "_blank" %>
|
||||
<% elsif obj.act_type == "News" %>
|
||||
<%= link_to title, news_path(obj.act.id), :class => "sn-newslist-titile fl", :target => "_blank" %>
|
||||
<% elsif obj.act_type == "HomeworkCommon" %>
|
||||
<%= link_to title, student_work_index_url_in_org(obj.act.id), :class => "sn-newslist-titile fl", :target => "_blank" %>
|
||||
<% elsif obj.act_type == "Issue" %>
|
||||
<%= link_to title, issue_path(obj.act.id), :class => "sn-newslist-titile fl", :target => "_blank" %>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
|
||||
<span class=" txt-grey fr"><%= format_date(time) %></span>
|
||||
<span class="sn-newslist-reply fr mr10 txt-grey">回复(<%= reply_count %>)</span>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<!--<div>-->
|
||||
<!--<ul class="sn-inner-pages" id="pages" style="margin-top: 5px;">-->
|
||||
<!--<%#= pagination_links_full @atta_pages, @atta_count, :per_page_links => true, :remote => @is_remote, :flag => true %>-->
|
||||
<!--<div class="cl"></div>-->
|
||||
<!--</ul>-->
|
||||
<!--</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
|
@ -75,9 +75,9 @@
|
|||
<div class="orgRow mb10 mt5">
|
||||
<span style="margin-left:10px;" >显示模式 : </span>
|
||||
<input type="radio" id="show_mode_ordinary" value="0" name="show_mode" style="margin-left:5px;" <%= @organization.show_mode == 0 ? "checked" : "" %> />
|
||||
<label for="show_mode_ordinary">社区模式一</label>
|
||||
<label for="show_mode_ordinary">简洁模式</label>
|
||||
<input type="radio" id="show_mode_special" value="1" name="show_mode" style="margin-left:10px;" <%= @organization.show_mode == 1 ? "checked" : "" %> />
|
||||
<label for="show_mode_special">社区模式二</label>
|
||||
<label for="show_mode_special">门户模式</label>
|
||||
</div>
|
||||
<div class="orgRow mb10 mt5"><span style="margin-left:38px;" >公开 : </span>
|
||||
<input type="checkbox" id="is_public" onclick="disable_down($(this), $('#allow_download'),$('#allow_down_hint'));" name="organization[is_public]" <%= @organization.is_public ? 'checked': ''%> class="ml3" />
|
||||
|
|
|
@ -50,23 +50,6 @@
|
|||
<% unless forge_acts.empty? %>
|
||||
<% forge_acts.each do |activity| -%>
|
||||
<script>
|
||||
function expand_reply(container, btnid) {
|
||||
var target = $(container);
|
||||
var btn = $(btnid);
|
||||
if (btn.data('init') == '0') {
|
||||
btn.data('init', 1);
|
||||
btn.html('收起回复');
|
||||
target.show();
|
||||
} else {
|
||||
btn.data('init', 0);
|
||||
btn.html('展开更多');
|
||||
target.hide();
|
||||
target.eq(0).show();
|
||||
target.eq(1).show();
|
||||
target.eq(2).show();
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
sd_create_editor_from_data(<%= activity.id %>, null, "100%", "<%= activity.class.to_s %>");
|
||||
});
|
||||
|
|
|
@ -50,48 +50,17 @@
|
|||
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'News',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% replies_all_i = 0 %>
|
||||
<% comments = activity.comments.reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% activity.comments.reorder("created_on desc").each do |comment| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_path(comment.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if comment.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= 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 %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.comments.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= render :partial => 'users/all_replies', :locals => {:comments => comments}%>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
<table class="hwork-table-wrap">
|
||||
<tr class="b_grey hworkH30" style="border-bottom:1px solid #eaeaea;">
|
||||
<!--
|
||||
<table class="hwork-table-wrap" id="homework_table" onmouseenter="<%#= @homework.homework_type == 3 ? '' : 'resizeable_table(2,4,1,1)' %>">
|
||||
-->
|
||||
|
||||
<table class="hwork-table-wrap" id="homework_table">
|
||||
<tr class="b_grey hworkH30">
|
||||
<th class="hworkList30 hworkH30 pl5 pr5">序号</th>
|
||||
<th class="hworkList50"> </th>
|
||||
<% if @homework.homework_type != 3 %>
|
||||
<th class="hworkList260" style="text-align:left;">作品名称</th>
|
||||
<th class="hworkList80">
|
||||
<span class="HomeworkStuTitle f14 fb fl">姓名</span>
|
||||
<th class="hworkList260 hide-text" style="text-align:left;">作品名称</th>
|
||||
<th class="hworkList80 hide-text">
|
||||
<span class="HomeworkStuTitle f14 fb">姓名</span>
|
||||
</th>
|
||||
<th class="hworkList80">
|
||||
<span class="HomeworkStuTitle f14 fb fl">学号</span>
|
||||
<th class="hworkList80 hide-text">
|
||||
<span class="HomeworkStuTitle f14 fb">学号</span>
|
||||
</th>
|
||||
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
|
||||
<th class="hworkList260" style="text-align:left;">作品名称</th>
|
||||
|
|
|
@ -1,67 +1,71 @@
|
|||
<table class="hwork-table-wrap">
|
||||
<tr class="b_grey hworkH30" style="border-bottom:1px solid #eaeaea;">
|
||||
<!--
|
||||
<table class="hwork-table-wrap" id="homework_table" onmouseenter="<%#= @homework.homework_type == 3 ? '' : 'resizeable_table(2,4,11,11)' %>">
|
||||
-->
|
||||
|
||||
<table class="hwork-table-wrap" id="homework_table">
|
||||
<tr class="b_grey hworkH30">
|
||||
<th class="hworkList30 hworkH30 pl5 pr5">序号</th>
|
||||
<th class="hworkList50"> </th>
|
||||
<% if @homework.homework_type != 3 %>
|
||||
<th class="<%= @homework.homework_type == 2 ? 'hworkList80 pr10' : 'hworkList130 pr10'%>" style="text-align:left;">作品名称</th>
|
||||
<th class="<%=@homework.anonymous_comment == 1 ? 'hworkList100' : 'hworkList60'%> pr10">
|
||||
<%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl #{@homework.anonymous_comment == 1 ? 'ml35' : 'ml18'}" ,:remote => true%>
|
||||
<th class="<%= @homework.homework_type == 2 ? 'hworkList80 pl5 pr5 hide-text' : 'hworkList130 pl5 pr5 hide-text'%>" style="text-align:left;">作品名称</th>
|
||||
<th class="<%=@homework.anonymous_comment == 1 ? 'hworkList100' : 'hworkList60'%> pl5 pr5 hide-text">
|
||||
<%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb" ,:remote => true%>
|
||||
<% if @show_all && @order == "lastname"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'sort_up' : 'sort_down'} float-none" ,:style => "line-height:30px; vertical-align:middle;",:remote => true%>
|
||||
<% end%>
|
||||
</th>
|
||||
<th class="<%=@homework.anonymous_comment == 1 ? 'hworkList90' : 'hworkList80'%> pr10">
|
||||
<%= link_to "学号",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_id", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml30" ,:remote => true%>
|
||||
<th class="<%=@homework.anonymous_comment == 1 ? 'hworkList90' : 'hworkList80'%> pl5 pr5 hide-text">
|
||||
<%= link_to "学号",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_id", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb" ,:remote => true%>
|
||||
<% if @show_all && @order == "student_id"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_id", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_id", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'sort_up' : 'sort_down'} float-none" ,:style => "line-height:30px; vertical-align:middle;",:remote => true%>
|
||||
<% end%>
|
||||
</th>
|
||||
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
|
||||
<th class="hworkList130 pr10" style="text-align:left;">作品名称</th>
|
||||
<th class="<%=@homework.anonymous_comment == 1 ? 'hworkList220' : 'hworkList160'%>">
|
||||
<th class="hworkList130 pl5 pr5" style="text-align:left;">作品名称</th>
|
||||
<th class="<%=@homework.anonymous_comment == 1 ? 'hworkList210' : 'hworkList160'%>">
|
||||
<span class="c_dark f14 fb">关联项目</span>
|
||||
</th>
|
||||
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 0 %>
|
||||
<th class="<%=@homework.anonymous_comment == 1 ? 'hworkList340' : 'hworkList290' %> pr10" style="text-align:left;">作品名称</th>
|
||||
<th class="<%=@homework.anonymous_comment == 1 ? 'hworkList340' : 'hworkList290' %> pl5 pr5" style="text-align:left;">作品名称</th>
|
||||
<% end %>
|
||||
<th class="hworkList130">
|
||||
<%= link_to "时间",@show_all ? student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml50" ,:remote => true%>
|
||||
<%= link_to "时间",@show_all ? student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb" ,:remote => true%>
|
||||
<% if @show_all && @order == "created_at"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'sort_up' : 'sort_down'} float-none",:style => "line-height:30px; vertical-align:middle;",:remote => true%>
|
||||
<% end%>
|
||||
</th>
|
||||
<th class="hworkList50">
|
||||
<%= link_to "教师",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10" ,:remote => true%>
|
||||
<%= link_to "教师",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb" ,:remote => true%>
|
||||
<% if @show_all && @order == "teacher_score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'sort_up' : 'sort_down'} float-none" ,:style => "line-height:30px; vertical-align:middle;",:remote => true%>
|
||||
<% end%>
|
||||
</th>
|
||||
<th class="hworkList50">
|
||||
<%= link_to "教辅",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
|
||||
<%= link_to "教辅",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb",:remote => true%>
|
||||
<% if @show_all && @order == "teaching_asistant_score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'sort_up' : 'sort_down'} float-none",:style => "line-height:30px; vertical-align:middle;",:remote => true%>
|
||||
<% end%>
|
||||
</th>
|
||||
<% if @homework.homework_type == 2%>
|
||||
<th class="hworkList50">
|
||||
<%= link_to "系统",@show_all ? student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
|
||||
<%= link_to "系统",@show_all ? student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb",:remote => true%>
|
||||
<% if @show_all && @order == "system_score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'sort_up' : 'sort_down'} float-none",:style => "line-height:30px; vertical-align:middle;",:remote => true%>
|
||||
<% end%>
|
||||
</th>
|
||||
<% end%>
|
||||
<% if @homework.anonymous_comment == 0%>
|
||||
<th class="hworkList50">
|
||||
<%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
|
||||
<%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb",:remote => true%>
|
||||
<% if @show_all && @order == "student_score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'sort_up' : 'sort_down'} float-none",:style => "line-height:30px; vertical-align:middle;",:remote => true%>
|
||||
<% end%>
|
||||
</th>
|
||||
<% end %>
|
||||
<th class="hworkList50">
|
||||
<%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
|
||||
<%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb",:remote => true%>
|
||||
<% if @show_all && @order == "score"%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
|
||||
<%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'sort_up' : 'sort_down'} float-none",:style => "line-height:30px; vertical-align:middle;",:remote => true%>
|
||||
<% end%>
|
||||
</th>
|
||||
</tr>
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
<%= link_to student_work_name,"javascript:void(0)" ,:title => student_work_name, :class => "linkGrey f14 StudentName break_word #{@homework.homework_type == 2 ? '' : 'width165'}"%>
|
||||
</div>
|
||||
</td>
|
||||
<td class="<%=@homework.anonymous_comment == 1 ? 'hworkStName100' : 'hworkStName'%> pr10 student_work_<%= student_work.id%>" title="<%= student_work.user.show_name%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
|
||||
<td class="<%=@homework.anonymous_comment == 1 ? 'hworkStName100' : 'hworkStName'%> pr10 float-none student_work_<%= student_work.id%>" title="<%= student_work.user.show_name%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
|
||||
<%= student_work.user.show_name%>
|
||||
</td>
|
||||
<td class="<%=@homework.anonymous_comment == 1 ? 'hworkStID90' : 'hworkStID'%> pr10 float-none student_work_<%= student_work.id%>" title="<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>" onclick="show_student_work('<%= student_work_path(student_work)%>');" style="cursor:pointer;">
|
||||
<span style="width:80px;" class="hidden fl"><%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%></span>
|
||||
<%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
|
||||
</td>
|
||||
<% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
|
||||
<td class="hworkName float-none pr10 student_work_<%= student_work.id%> width130" style="cursor: pointer;" onclick="show_student_work('<%= student_work_path(student_work)%>');">
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<% content_for :header_tags do %>
|
||||
<%= javascript_include_tag "/assets/codemirror/codemirror_python_ruby_c" %>
|
||||
<%= javascript_include_tag "resizeable_table" %>
|
||||
<%= stylesheet_link_tag "/assets/codemirror/codemirror" %>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
$("#homework_student_work_list").html("<%= escape_javascript(render :partial => 'student_work/student_work_list') %>");
|
||||
$("#export_student_work").replaceWith("<%= escape_javascript( link_to "导出作业成绩", student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :group => @group, :name => @name, :format => 'xls'),:class=>'hworkExport postTypeGrey', :id => 'export_student_work') %>");
|
||||
$("#homework_student_work_list").html("<%= escape_javascript(render :partial => 'student_work/student_work_list') %>");
|
||||
$("#export_student_work").replaceWith("<%= escape_javascript( link_to "导出作业成绩", student_work_index_path(:homework => @homework.id,:order => @order, :sort => @b_sort, :group => @group, :name => @name, :format => 'xls'),:class=>'hworkExport postTypeGrey', :id => 'export_student_work') %>");
|
||||
/*
|
||||
$("th").each(function(){$(this).css("width",$(this).width()-1);});*/
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
<ul>
|
||||
<% comments.each do |comment| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<%= link_to comment.creator_user.show_name, user_url_in_org(comment.creator_user.id), :class => "newsBlue mr10 f14" %>
|
||||
<%= format_activity_day(comment.created_time) %> <%= format_time(comment.created_time, false) %>
|
||||
<span id="reply_praise_count_<%=comment.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||
</span>
|
||||
</div>
|
||||
<% if !comment.content_detail.blank? || comment.class == Journal %>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
<% if comment.class == Journal %>
|
||||
<% if comment.details.any? %>
|
||||
<% details_to_strings(comment.details).each do |string| %>
|
||||
<p><%= string %></p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<P><%= comment.notes.html_safe %></P>
|
||||
<% else %>
|
||||
<%= comment.content_detail.html_safe %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
|
@ -4,24 +4,5 @@
|
|||
<%=render :partial => 'users/comment_reply', :locals => {:comment => comment.parent} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<!--<span id="reply_praise_count_<%#=comment.id %>" class="orig_index">
|
||||
<%# if comment.user == 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 class="orig_user fl">
|
||||
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33"), user_path(comment.user_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="orig_right fl">
|
||||
<% if comment.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:user), user_path(comment.user_id), :class => "content-username" %>
|
||||
<% else %>
|
||||
<%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "content-username" %>
|
||||
<% end %>
|
||||
<span class="orig_area"><%= time_from_now(comment.created_on) %></span>
|
||||
<div class="orig_content "><%= comment.notes.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => comment} %>
|
||||
</div>
|
|
@ -302,91 +302,17 @@
|
|||
<div class="homepagePostReplyBannerTime"></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply_homework('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'HomeworkCommon',<%=user_activity_id %>,-1,<%=course_activity %>,<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% replies_all_i = 0 %>
|
||||
<% comments = activity.journals_for_messages.reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% activity.journals_for_messages.reorder("created_on desc").each do |comment| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" onmouseover="$('#message_edit_<%= comment.id%>').show();" onmouseout="$('#message_edit_<%= comment.id%>').hide();" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33", :class =>"mt8"), user_path(comment.user_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if comment.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:user), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= time_from_now(comment.created_on) %>
|
||||
</div>
|
||||
<% unless comment.m_parent_id.nil? %>
|
||||
<% parents_rely = [] %>
|
||||
<% parents_rely = get_reply_parents parents_rely, comment %>
|
||||
<% length = parents_rely.length %>
|
||||
<div id="comment_reply_<%=comment.id %>">
|
||||
<% if length <= 3 %>
|
||||
<%=render :partial => 'users/comment_reply', :locals => {:comment => comment.parent} %>
|
||||
<% else %>
|
||||
<div class="orig_cont clearfix">
|
||||
<div class="orig_cont clearfix">
|
||||
<div id="comment_reply_<%=parents_rely[length - 1].id %>">
|
||||
<%=render :partial => 'users/comment_reply', :locals => {:comment => parents_rely[length - 1]} %>
|
||||
</div>
|
||||
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[length - 2]} %>
|
||||
</div>
|
||||
<div class="orig_cont_hide clearfix"><span class="orig_icon" >↓ </span><span class="orig_icon" style="display:none;" > ↑</span><%= link_to '点击展开隐藏楼层', show_all_replies_users_path(:comment => comment),:remote=>true %></div>
|
||||
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[0]} %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.notes.html_safe %></div>
|
||||
<div class="orig_reply mb10 mt-10">
|
||||
<div class="reply">
|
||||
<span class="reply-right">
|
||||
<span id="reply_praise_count_<%=comment.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||
</span>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
{:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => 'HomeworkCommon', :is_in_course => -1, :user_activity_id => user_activity_id, :course_activity=>course_activity},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) %>
|
||||
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<!--<a action-type="reply" href="javascript:;" poped="false" class="fr mr20 linkGrey3" title="回复">回复</a>-->
|
||||
<% if User.current.admin? ||is_teacher || comment.user == User.current%>
|
||||
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user,:is_in_course => -1, :user_activity_id => user_activity_id, :course_activity=>course_activity},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<p id="reply_message_<%= comment.id%>"></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%=render :partial => 'users/homework_replies', :locals => {:comments => comments, :is_in_course => -1,:course_activity=>course_activity, :is_teacher => is_teacher, :user_activity_id => user_activity_id} %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -43,50 +43,17 @@
|
|||
<div class="homepagePostReplyBannerTime"></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'JournalsForMessage',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% replies_all_i = 0 %>
|
||||
<% comments = activity.children.reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% fetch_user_leaveWord_reply(activity).each do |comment| unless fetch_user_leaveWord_reply(activity).nil? %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33", :class =>"mt8"), user_path(comment.user_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if comment.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:user), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= format_time(comment.created_on) %>
|
||||
<span id="reply_praise_count_<%=comment.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.notes.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= render :partial => 'users/all_replies', :locals => {:comments => comments}%>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
|
||||
<%if count > 3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'Message',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
|
@ -105,43 +105,10 @@
|
|||
</div>
|
||||
|
||||
<% activity= activity.parent ? activity.parent : activity%>
|
||||
<% replies_all_i = 0 %>
|
||||
<% comments = activity.children.reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% activity.children.includes(:author).reorder("created_on desc").each do |reply|%>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= reply.id %>');
|
||||
autoUrl('reply_content_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i=replies_all_i+1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i>3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33"), user_path(reply.author_id,:host=>Setting.host_user), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if reply.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to reply.try(:author), user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= 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 %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= reply.id %>">
|
||||
<%= reply.content.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= render :partial => 'users/all_replies', :locals => {:comments => comments}%>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -75,48 +75,17 @@
|
|||
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'News',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% replies_all_i = 0 %>
|
||||
<% comments = activity.comments.reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% activity.comments.reorder("created_on desc").each do |comment| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_path(comment.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if comment.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= 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 %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.comments.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= render :partial => 'users/all_replies', :locals => {:comments => comments}%>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
<ul>
|
||||
<% comments.reorder("created_on desc").each do |comment| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" onmouseover="$('#message_edit_<%= comment.id%>').show();" onmouseout="$('#message_edit_<%= comment.id%>').hide();">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33", :class =>"mt8"), user_path(comment.user_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if comment.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:user), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= time_from_now(comment.created_on) %>
|
||||
</div>
|
||||
<% unless comment.m_parent_id.nil? %>
|
||||
<% parents_rely = [] %>
|
||||
<% parents_rely = get_reply_parents parents_rely, comment %>
|
||||
<% length = parents_rely.length %>
|
||||
<div id="comment_reply_<%=comment.id %>">
|
||||
<% if length <= 3 %>
|
||||
<%=render :partial => 'users/comment_reply', :locals => {:comment => comment.parent} %>
|
||||
<% else %>
|
||||
<div class="orig_cont clearfix">
|
||||
<div class="orig_cont clearfix">
|
||||
<div>
|
||||
<%=render :partial => 'users/comment_reply', :locals => {:comment => parents_rely[length - 1]} %>
|
||||
</div>
|
||||
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[length - 2]} %>
|
||||
</div>
|
||||
<div class="orig_cont_hide clearfix">
|
||||
<span class="orig_icon" >↓ </span>
|
||||
<span class="orig_icon" style="display:none;" > ↑</span>
|
||||
<%= link_to '点击展开隐藏楼层', show_all_replies_users_path(:comment => comment),:remote=>true %>
|
||||
</div>
|
||||
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[0]} %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth t_txt" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.notes.html_safe %></div>
|
||||
<div class="orig_reply mb10 mt-10">
|
||||
<div class="reply">
|
||||
<span class="reply-right">
|
||||
<span id="reply_praise_count_<%=comment.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||
</span>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
{:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => 'HomeworkCommon', :is_in_course => is_in_course, :user_activity_id => user_activity_id, :course_activity => course_activity},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) %>
|
||||
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<!--<a action-type="reply" href="javascript:;" poped="false" class="fr mr20 linkGrey3" title="回复">回复</a>-->
|
||||
<% if User.current.admin? ||is_teacher || comment.user == User.current%>
|
||||
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user,:is_in_course => is_in_course, :user_activity_id => user_activity_id, :course_activity => course_activity},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<p id="reply_message_<%= comment.id%>"></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
|
@ -10,54 +10,17 @@
|
|||
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
|
||||
<% if count > 3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%= user_activity_id %>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help">
|
||||
<a id="reply_btn_<%= user_activity_id %>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'Issue',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help">
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% replies_all_i = 0 %>
|
||||
<% comments = activity.journals.includes(:user, :details).reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% activity.journals.includes(:user, :details).reorder("created_on desc").each do |reply| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= reply.id %>');
|
||||
autoUrl('reply_content_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i=replies_all_i + 1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i>3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33"), user_path(reply.user_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if reply.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= format_time(reply.created_on) %>
|
||||
<span id="reply_praise_count_<%= reply.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= reply.id %>">
|
||||
<% if reply.details.any? %>
|
||||
<% details_to_strings(reply.details).each do |string| %>
|
||||
<p><%= string %></p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<P><%= reply.notes.html_safe %></P>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= render :partial => 'users/all_replies', :locals => {:comments => comments}%>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -95,46 +95,15 @@
|
|||
</div>
|
||||
<div class="homepagePostReplyBannerTime"><%#=format_date(activity.updated_on)%></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore"><a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >展开更多</a></div>
|
||||
<div class="homepagePostReplyBannerMore"><a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'Message',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >展开更多</a></div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% activity= activity.parent_id.nil? ? activity : activity.parent %>
|
||||
<% replies_all_i = 0 %>
|
||||
<% comments = activity.children.reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% activity.children.includes(:author).reorder("created_on desc").each do |reply| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= reply.id %>');
|
||||
autoUrl('reply_content_<%= reply.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i=replies_all_i+1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i>3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33"), user_path(reply.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if reply.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to reply.try(:author), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= format_time(reply.created_on) %>
|
||||
<span id="reply_praise_count_<%=reply.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= reply.id %>">
|
||||
<%= reply.content.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= render :partial => 'users/all_replies', :locals => {:comments => comments}%>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -72,48 +72,17 @@
|
|||
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'News',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% replies_all_i = 0 %>
|
||||
<% comments = activity.comments.reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% activity.comments.reorder("created_on desc").each do |comment| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_path(comment.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if comment.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= 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 %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.comments.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= render :partial => 'users/all_replies', :locals => {:comments => comments}%>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -29,23 +29,6 @@
|
|||
<% user_activities.each do |user_activity|
|
||||
if user_activities %>
|
||||
<script>
|
||||
function expand_reply(container,btnid){
|
||||
var target = $(container);
|
||||
var btn = $(btnid);
|
||||
if(btn.data('init')=='0'){
|
||||
btn.data('init',1);
|
||||
btn.html('收起回复');
|
||||
target.show();
|
||||
}else{
|
||||
btn.data('init',0);
|
||||
btn.html('展开更多');
|
||||
target.hide();
|
||||
target.eq(0).show();
|
||||
target.eq(1).show();
|
||||
target.eq(2).show();
|
||||
}
|
||||
}
|
||||
|
||||
function expand_reply_input(id) {
|
||||
$(id).toggle();
|
||||
}
|
||||
|
|
|
@ -56,48 +56,17 @@
|
|||
<div class="homepagePostReplyBannerTime"><%#= format_date(activity.updated_on) %></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'BlogComment',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% replies_all_i = 0 %>
|
||||
<% comments = activity.children.reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% activity.children.reorder("created_on desc").each do |comment| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.author), :width => "33", :height => "33"), user_path(comment.author_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if comment.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:author), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= 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 %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||
</span>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.content.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= render :partial => 'users/all_replies', :locals => {:comments => comments}%>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -312,95 +312,17 @@
|
|||
<div class="homepagePostReplyBannerTime"></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=homework_common.id%>" onclick="expand_reply('#reply_div_<%= homework_common.id %> li','#reply_btn_<%=homework_common.id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
<a id="reply_btn_<%=homework_common.id%>" onclick="expand_reply_homework('#reply_div_<%= homework_common.id %> li','#reply_btn_<%=homework_common.id%>',<%= homework_common.id %>,'HomeworkCommon',<%=homework_common.id %>,<%=is_in_course %>,-1, -1)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% replies_all_i = 0 %>
|
||||
<% comments = homework_common.journals_for_messages.reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= homework_common.id %>">
|
||||
<ul>
|
||||
<% homework_common.journals_for_messages.reorder("created_on desc").each do |comment| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" onmouseover="$('#message_edit_<%= comment.id%>').show();" onmouseout="$('#message_edit_<%= comment.id%>').hide();" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33", :class =>"mt8"), user_path(comment.user_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if comment.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:user), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= time_from_now(comment.created_on) %>
|
||||
</div>
|
||||
<% unless comment.m_parent_id.nil? %>
|
||||
<% parents_rely = [] %>
|
||||
<% parents_rely = get_reply_parents parents_rely, comment %>
|
||||
<% length = parents_rely.length %>
|
||||
<div id="comment_reply_<%=comment.id %>">
|
||||
<% if length <= 3 %>
|
||||
<%=render :partial => 'users/comment_reply', :locals => {:comment => comment.parent} %>
|
||||
<% else %>
|
||||
<div class="orig_cont clearfix">
|
||||
<div class="orig_cont clearfix">
|
||||
<div>
|
||||
<%=render :partial => 'users/comment_reply', :locals => {:comment => parents_rely[length - 1]} %>
|
||||
</div>
|
||||
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[length - 2]} %>
|
||||
</div>
|
||||
<div class="orig_cont_hide clearfix">
|
||||
<span class="orig_icon" >↓ </span>
|
||||
<span class="orig_icon" style="display:none;" > ↑</span>
|
||||
<%= link_to '点击展开隐藏楼层', show_all_replies_users_path(:comment => comment),:remote=>true %>
|
||||
</div>
|
||||
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[0]} %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth t_txt" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.notes.html_safe %></div>
|
||||
<div class="orig_reply mb10 mt-10">
|
||||
<div class="reply">
|
||||
<span class="reply-right">
|
||||
<span id="reply_praise_count_<%=comment.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||
</span>
|
||||
<span style="position: relative" class="fr mr20">
|
||||
<%= link_to(
|
||||
l(:button_reply),
|
||||
{:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => 'HomeworkCommon', :is_in_course => is_in_course, :course_activity => -1},
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:button_reply)) %>
|
||||
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
||||
</span>
|
||||
<!--<a action-type="reply" href="javascript:;" poped="false" class="fr mr20 linkGrey3" title="回复">回复</a>-->
|
||||
<% if User.current.admin? ||is_teacher || comment.user == User.current%>
|
||||
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user,:is_in_course => is_in_course, :course_activity => -1},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<p id="reply_message_<%= comment.id%>"></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%=render :partial => 'users/homework_replies', :locals => {:comments => comments, :is_in_course => is_in_course, :course_activity=> -1, :is_teacher => is_teacher, :user_activity_id => -1} %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -70,57 +70,17 @@
|
|||
<div class="homepagePostReplyBannerTime"></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>',<%= activity.id %>,'JournalsForMessage',<%=user_activity_id %>)" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% replies_all_i = 0 %>
|
||||
<% comments = activity.children.reorder("created_on desc").limit(3) %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% fetch_user_leaveWord_reply(activity).reorder("created_on desc").each do |comment| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
autoUrl('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" onmouseover="$('#message_delete_<%= comment.id%>').show();" onmouseout="$('#message_delete_<%= comment.id%>').hide();" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33", :class =>"mt8"), user_path(comment.user_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if comment.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:user), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= format_time(comment.created_on) %>
|
||||
<span id="reply_praise_count_<%=comment.id %>">
|
||||
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
||||
</span>
|
||||
<div id="message_delete_<%=comment.id %>" style="display: none" class="mr10 fr">
|
||||
<% if comment.user == User.current|| User.current.admin? %>
|
||||
<%= link_to(l(:label_bid_respond_delete),
|
||||
{:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user,:user_activity_id => user_activity_id,:is_activity=>is_activity},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete',
|
||||
:class => "delete", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.notes.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= render :partial => 'users/all_replies', :locals => {:comments => comments}%>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -7,22 +7,6 @@
|
|||
<% 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 expand_reply(container,btnid){
|
||||
var target = $(container);
|
||||
var btn = $(btnid);
|
||||
if(btn.data('init')=='0'){
|
||||
btn.data('init',1);
|
||||
btn.html('收起回复');
|
||||
target.show();
|
||||
}else{
|
||||
btn.data('init',0);
|
||||
btn.html('展开更多');
|
||||
target.hide();
|
||||
target.eq(0).show();
|
||||
target.eq(1).show();
|
||||
target.eq(2).show();
|
||||
}
|
||||
}
|
||||
$(function(){
|
||||
sd_create_editor_from_data(<%= jour.id%>, null, "100%", "<%=jour.class.to_s%>");
|
||||
});
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<% if params[:type] == 'HomeworkCommon' %>
|
||||
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/homework_replies', :locals => {:comments => @journals, :is_in_course =>@is_in_course,:course_activity=>@course_activity, :is_teacher => @is_teacher, :user_activity_id => @user_activity_id}) %>');
|
||||
<% else %>
|
||||
$('#reply_div_<%= params[:div_id].to_i %>').html('<%=escape_javascript(render :partial => 'users/all_replies', :locals => {:comments => @journals}) %>');
|
||||
<% end %>
|
|
@ -549,6 +549,7 @@ RedmineApp::Application.routes.draw do
|
|||
get 'user_messages_unviewed'
|
||||
post "user_commit_homework"
|
||||
post 'user_select_homework'
|
||||
get 'all_journals'
|
||||
end
|
||||
|
||||
member do
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
class UpdateOrgSubfiledDefault < ActiveRecord::Migration
|
||||
def up
|
||||
OrgSubfield.where(:name => "activity").update_all(:status => false)
|
||||
OrgSubfield.where(:name => "course").update_all(:status => 2)
|
||||
OrgSubfield.where(:name => "project").update_all(:status => 2)
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -0,0 +1,8 @@
|
|||
class UpdateOrgSubfiledResource < ActiveRecord::Migration
|
||||
def up
|
||||
OrgSubfield.where(:field_type => "Resource").update_all(:status => 6)
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20160606064856) do
|
||||
ActiveRecord::Schema.define(:version => 20160612043259) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
|
|
@ -815,7 +815,8 @@ function _formatHtml(html, htmlTags, urlType, wellFormatted, indentChar) {
|
|||
startNewline = endNewline = '';
|
||||
}
|
||||
}
|
||||
if (attr !== '') {
|
||||
//blockquote 单独加上style 之后再改成接口 给别的加上默认的
|
||||
if (attr !== '' || (tagName === 'blockquote')) {
|
||||
var attrMap = _getAttrList(full);
|
||||
if (tagName === 'font') {
|
||||
var fontStyleMap = {}, fontStyle = '';
|
||||
|
@ -877,6 +878,9 @@ function _formatHtml(html, htmlTags, urlType, wellFormatted, indentChar) {
|
|||
}
|
||||
});
|
||||
attr = '';
|
||||
if (tagName === 'blockquote') {
|
||||
attrMap['style'] = "margin: 0 0 0 40px; border: none; padding: 0px;background: none;background-color: ;";
|
||||
}
|
||||
_each(attrMap, function(key, val) {
|
||||
if (key === 'style' && val === '') {
|
||||
return;
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
.ke-content div.ref .ref_body {margin:0;padding:2px;line-height:20px;color:#666;font-size:9pt;}
|
||||
|
||||
|
||||
.ke-content blockquote {margin:15px 10px;border:2px solid #eee;padding:5px 5px 5px 35px;}
|
||||
.ke-content blockquote{background: none;border: none;padding: 0px;margin: 0 0 0 40px;}
|
||||
span.at {color:#269ac9;}
|
||||
span.at a{color:#269ac9;text-decoration: none;}
|
||||
|
||||
|
|
|
@ -284,7 +284,7 @@ KindEditor.plugin('table', function(K) {
|
|||
for (var i = 0; i < rows; i++) {
|
||||
html += '<tr>';
|
||||
for (var j = 0; j < cols; j++) {
|
||||
html += '<td style="border:'+ border+'px solid;border-color:' + borderColor+';text-overflow:inherit;overflow: hidden;white-space: nowrap" >' + (K.IE ? ' ' : '<br />') + '</td>';
|
||||
html += '<td style="border:'+ border+'px solid;border-color:' + borderColor+';">' + (K.IE ? ' ' : '<br />') + '</td>';
|
||||
}
|
||||
html += '</tr>';
|
||||
}
|
||||
|
|
|
@ -1283,21 +1283,72 @@ function clear_data(k,mdu){
|
|||
}
|
||||
}
|
||||
|
||||
function expand_reply(container,btnid){
|
||||
var target = $(container);
|
||||
var btn = $(btnid);
|
||||
if(btn.data('init')=='0'){
|
||||
btn.data('init',1);
|
||||
btn.html('收起回复');
|
||||
target.show();
|
||||
}else{
|
||||
btn.data('init',0);
|
||||
btn.html('展开更多');
|
||||
target.hide();
|
||||
target.eq(0).show();
|
||||
target.eq(1).show();
|
||||
target.eq(2).show();
|
||||
}
|
||||
function expand_reply(container, btnid, id, type, div_id) {
|
||||
var target = $(container);
|
||||
var btn = $(btnid);
|
||||
if (btn.data('init') == '0') {
|
||||
btn.data('init', 1);
|
||||
$.get(
|
||||
'/users/all_journals',
|
||||
{
|
||||
type: type,
|
||||
id: id,
|
||||
div_id: div_id
|
||||
},
|
||||
function(data) {
|
||||
|
||||
}
|
||||
);
|
||||
btn.html('收起回复');
|
||||
//target.show();
|
||||
} else if(btn.data('init') == '1') {
|
||||
btn.data('init', 3);
|
||||
btn.html('展开更多');
|
||||
target.hide();
|
||||
target.eq(0).show();
|
||||
target.eq(1).show();
|
||||
target.eq(2).show();
|
||||
}
|
||||
else {
|
||||
btn.data('init', 1);
|
||||
btn.html('收起回复');
|
||||
target.show();
|
||||
}
|
||||
}
|
||||
|
||||
function expand_reply_homework(container, btnid, id, type, div_id, is_in_course, course_activity, user_activity_id) {
|
||||
var target = $(container);
|
||||
var btn = $(btnid);
|
||||
if (btn.data('init') == '0') {
|
||||
btn.data('init', 1);
|
||||
$.get(
|
||||
'/users/all_journals',
|
||||
{
|
||||
type: type,
|
||||
id: id,
|
||||
div_id: div_id,
|
||||
is_in_course: is_in_course,
|
||||
course_activity: course_activity,
|
||||
user_activity_id: user_activity_id
|
||||
},
|
||||
function(data) {
|
||||
}
|
||||
);
|
||||
btn.html('收起回复');
|
||||
//target.show();
|
||||
} else if(btn.data('init') == '1') {
|
||||
btn.data('init', 3);
|
||||
btn.html('展开更多');
|
||||
target.hide();
|
||||
target.eq(0).show();
|
||||
target.eq(1).show();
|
||||
target.eq(2).show();
|
||||
}
|
||||
else {
|
||||
btn.data('init', 1);
|
||||
btn.html('收起回复');
|
||||
target.show();
|
||||
}
|
||||
}
|
||||
|
||||
//by yk 列表描述将文字和起来去掉空格多于100就显示省略号
|
||||
|
@ -1347,6 +1398,43 @@ function pop_up_box(value,tWidth,tTop,tLeft){
|
|||
}
|
||||
}
|
||||
|
||||
//显示的时候根据当前网址是http 还是https 选择视频显示方式直接显示还是弹框
|
||||
function autoMedia(id){
|
||||
var rootPath = getRootPath();
|
||||
|
||||
function _mediaType(src) {
|
||||
if (/\.(rm|rmvb)(\?|$)/i.test(src)) {
|
||||
return 'audio/x-pn-realaudio-plugin';
|
||||
}
|
||||
if (/\.(swf|flv)(\?|$)/i.test(src)) {
|
||||
return 'application/x-shockwave-flash';
|
||||
}
|
||||
return 'video/x-ms-asf-plugin';
|
||||
}
|
||||
|
||||
if (rootPath.indexOf("https") < 0){
|
||||
$("#"+id+" img").each(function(){
|
||||
if ($(this).attr("class") == "mediaIco"){
|
||||
var href = $(this).parent().attr("href");
|
||||
//正则取地址
|
||||
if (href){
|
||||
var url = href.split("open('")[1].split("',")[0];
|
||||
if (url != ""){
|
||||
var type = _mediaType(url);
|
||||
//1.video/x-ms-asf-plugin 类型的视频播放不了,2.audio/x-pn-realaudio-plugin没试过3.application/x-shockwave-flash可以播放
|
||||
if (type != "video/x-ms-asf-plugin"){
|
||||
var width = 550;
|
||||
var height = 400;
|
||||
var html = '<embed src="'+url+'" allowFullScreen="true" quality="high" width="'+width+'" height="'+height+'" align="middle" allowScriptAccess="always" type="'+type+'"></embed>';
|
||||
$(this).parent().replaceWith(html);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//yk 自动识别URL 并加上链接
|
||||
function autoUrl(id){
|
||||
if ($("#"+id).children().length > 0 ){
|
||||
|
@ -1387,6 +1475,8 @@ function autoUrl(id){
|
|||
});
|
||||
$("#"+id).html(html);
|
||||
}
|
||||
if(!(!!window.ActiveXObject || "ActiveXObject" in window)){
|
||||
autoMedia(id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
/**
|
||||
* Created by ttang on 2016/5/24.
|
||||
*/
|
||||
/*$(document).ready(function(){
|
||||
$("th").each(function(){
|
||||
$(this).css("width",$(this).width()-1);
|
||||
});
|
||||
resizeable_table = function(colS,colE,p1,p2){
|
||||
var headerTds = document.getElementById("homework_table").rows[0].cells;
|
||||
var mousedown = false;
|
||||
var resizeable = false;
|
||||
var targetTd;
|
||||
var screenXStart =0;
|
||||
var tdWidth = 0;
|
||||
var headerWidth = 0;
|
||||
var tblObj = document.getElementById("homework_table");
|
||||
var tblWidth = tblObj.offsetWidth;
|
||||
for(var i = colS;i<colE;i++){
|
||||
addListener(headerTds[i],"mousedown",onmousedown);
|
||||
addListener(headerTds[i],"mousemove",onmousemove);
|
||||
addListener(headerTds[i],"mouseup",onmouseup);
|
||||
}
|
||||
|
||||
function onmousedown(event){
|
||||
if (resizeable == true){
|
||||
var evt =event||window.event;
|
||||
mousedown = true;
|
||||
screenXStart = evt.screenX;
|
||||
tdWidth = targetTd.offsetWidth;
|
||||
tdWidth2 = targetTd.nextElementSibling.offsetWidth;
|
||||
totalWidth = tdWidth + tdWidth2;
|
||||
}
|
||||
}
|
||||
function onmousemove(event){
|
||||
var evt =event||window.event;
|
||||
var srcObj = getTarget(evt);
|
||||
var offsetX = evt.offsetX || (evt.clientX - srcObj.getBoundingClientRect().left);//这个比较关键,解决了Firefox无offsetX属性的问题
|
||||
if (mousedown == true){
|
||||
var width = (tdWidth + (evt.screenX - screenXStart)) - p1 + "px";//计算后的新的宽度
|
||||
var width2 = (tdWidth2 - (evt.screenX - screenXStart)) - p2 + "px";
|
||||
if (parseInt(width)<0 || parseInt(width2)<0 || tdWidth > totalWidth || tdWidth2 > totalWidth){
|
||||
tartgetTd = null;
|
||||
resizeable = false;
|
||||
mousedown = false;
|
||||
}else{
|
||||
targetTd.style.width = width;
|
||||
targetTd.nextElementSibling.style.width = width2;
|
||||
}
|
||||
}else{
|
||||
var trObj = tblObj.rows[0];
|
||||
if(srcObj.offsetWidth - offsetX <=5){//实际改变本单元格列宽
|
||||
targetTd=srcObj;
|
||||
resizeable = true;
|
||||
for(var i = colS;i<colE;i++){
|
||||
headerTds[i].style.cursor='col-resize';//修改光标样式
|
||||
};
|
||||
}else{
|
||||
resizeable = false;
|
||||
mousedown = false;
|
||||
srcObj.style.cursor='default';
|
||||
}
|
||||
}
|
||||
}
|
||||
function onmouseup(event){
|
||||
tartgetTd = null;
|
||||
resizeable = false;
|
||||
mousedown = false;
|
||||
document.body.style.cursor='default';
|
||||
}
|
||||
document.body.onmouseup = function(event){
|
||||
tartgetTd = null;
|
||||
resizeable = false;
|
||||
mousedown = false;
|
||||
document.body.style.cursor='default';
|
||||
}
|
||||
function getTarget(evt){
|
||||
return evt.target || evt.srcElement;
|
||||
}
|
||||
function addListener(element,type,listener,useCapture){
|
||||
element.addEventListener?element.addEventListener(type,listener,useCapture):element.attachEvent("on" + type,listener);
|
||||
}
|
||||
}
|
||||
});
|
||||
*/
|
|
@ -59,7 +59,7 @@ a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;}
|
|||
.hworkList100 {width:100px; text-align:center;}
|
||||
.hworkList130 {width:130px; text-align:center;}
|
||||
.hworkList160 {width:160px; text-align:center;}
|
||||
.hworkList220 {width:220px; text-align:center;}
|
||||
.hworkList210 {width:210px; text-align:center;}
|
||||
.hworkList260 {width:260px; text-align:left;}
|
||||
.hworkList290 {width:290px; text-align:left;}
|
||||
.hworkList340 {width:340px; text-align:left;}
|
||||
|
@ -108,8 +108,8 @@ a.hworkSearchIcon:hover {background:url(../images/nav_icon.png) -49px -1px no-re
|
|||
.pr10{padding-right: 10px;}
|
||||
|
||||
/*20160520作品列表table*/
|
||||
.hwork-table-wrap {width:720px; border-collapse:collapse; vertical-align:middle;}
|
||||
.hwork-table-wrap th {font-size:14px; color:#2d2d2d;}
|
||||
.hwork-table-wrap {width:720px; border-collapse:collapse; vertical-align:middle; table-layout:fixed;}
|
||||
.hwork-table-wrap th {font-size:14px; color:#2d2d2d; border-bottom:1px solid #e1e1e1;}
|
||||
|
||||
/*作业信息*/
|
||||
.mt-2 {margin-top:-2px;}
|
||||
|
@ -152,7 +152,6 @@ a.postTypeGrey:hover {color:#269ac9;}
|
|||
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
|
||||
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
|
||||
.homepagePostIntro a{color: #136ec2;}
|
||||
.homepagePostIntro blockquote{background: none;}
|
||||
.homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;}
|
||||
.homepagePostDate {font-size:12px; color:#888888;margin-bottom: 5px;}
|
||||
.homepagePostReply {width:710px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;}
|
||||
|
@ -195,7 +194,6 @@ a.postOptionLink2:hover {color:#ffffff; background-color:#269ac9;}
|
|||
.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 20px;}
|
||||
.homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
|
||||
.homepagePostReplyContent a{color: #136ec2;}
|
||||
.homepagePostReplyContent blockquote{background: none;}
|
||||
.table_maxWidth table {max-width: 642px;}
|
||||
.homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
|
||||
.homepagePostAssignTo {float:left; font-size:14px; color:#269ac9;}
|
||||
|
@ -562,6 +560,8 @@ a.exit { height:24px; display:block; width:80px; color:#000000; background:#c3c3
|
|||
.st_box_top a:hover{ color:#1c9ec7;}
|
||||
a.st_up{ display: block; width:8px; float:left; height:13px; background:url(../images/pic_up.png) 0 0 no-repeat; margin-top:5px; margin-left:3px;}
|
||||
a.st_down{ display: block; width:8px; float:left; height:13px; background:url(../images/pic_up.png) 0 -22px no-repeat; margin-top:5px; margin-left:3px;}
|
||||
a.sort_up{ display: inline-block; width:8px; height:13px; background:url(../images/pic_up.png) 0 0 no-repeat;}
|
||||
a.sort_down{ display: inline-block; width:8px; height:13px; background:url(../images/pic_up.png) 0 -22px no-repeat;}
|
||||
a.st_img { display:block;width:32px; height:32px; border:1px solid #CCC; padding:1px;}
|
||||
a:hover.st_img { border:1px solid #1c9ec7; }
|
||||
.st_boxlist{ border-bottom:1px dashed #CCC; height:43px; margin-bottom:10px; }
|
||||
|
@ -1144,7 +1144,6 @@ a.link_file_a2{ background:url(../images/pic_file.png) 0 -15px no-repeat; paddin
|
|||
.postDetailDes ul li{list-style-type: disc;margin-left: 40px;}
|
||||
.postDetailDes td,.postDetailDes tr {border: 1px solid; border-color: inherit;}
|
||||
.postDetailDes a{color: #136ec2;}
|
||||
.postDetailDes blockquote{background: none;}
|
||||
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; }
|
||||
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
|
||||
.postDetailDate {color:#888888; font-size:12px; float:left;}
|
||||
|
@ -1264,7 +1263,7 @@ a:hover.blueCir{ background:#3598db; color:#fff;}
|
|||
.tac {text-align:center;}
|
||||
.proHelp {background:url(/images/course/hwork_icon.png) -5px -124px no-repeat; display:inline-block; width:15px; height:15px; display:inline-block;}
|
||||
.hworkPrName {width:160px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:65px; line-height:65px; vertical-align:middle; font-size:12px; color:#888888; text-align:center;}
|
||||
.hworkPrName2 {width:220px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:65px; line-height:65px; vertical-align:middle; font-size:12px; color:#888888; text-align:center;}
|
||||
.hworkPrName2 {width:210px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; float:left; height:65px; line-height:65px; vertical-align:middle; 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:65px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; display: inline-block;}
|
||||
|
|
|
@ -683,7 +683,6 @@ a.postTypeGrey:hover {color:#269ac9;}
|
|||
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
|
||||
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
|
||||
.homepagePostIntro a{color: #136ec2;}
|
||||
.homepagePostIntro blockquote{background: none;}
|
||||
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;}
|
||||
.borderBottomNone {border-bottom:none !important;}
|
||||
.homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;}
|
||||
|
@ -724,7 +723,6 @@ a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;}
|
|||
.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 40px;}
|
||||
.homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
|
||||
.homepagePostReplyContent a{color: #136ec2;}
|
||||
.homepagePostReplyContent blockquote{background: none;}
|
||||
.table_maxWidth table {max-width: 642px;}
|
||||
.homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
|
||||
.homepagePostAssignTo {float:left; font-size:14px; color:#269ac9;}
|
||||
|
@ -870,7 +868,6 @@ a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-re
|
|||
.postDetailDes ul li{list-style-type: disc;margin-left: 40px;}
|
||||
.postDetailDes td,.postDetailDes tr {border: 1px solid; border-color: inherit;}
|
||||
.postDetailDes a{color: #136ec2;}
|
||||
.postDetailDes blockquote{background: none;}
|
||||
.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;}
|
||||
|
|
|
@ -978,7 +978,6 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
|
|||
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
|
||||
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
|
||||
.homepagePostIntro a{color: #136ec2;}
|
||||
.homepagePostIntro blockquote{background: none;}
|
||||
.topBorder {
|
||||
border-top: 1px solid #E4E4E4;
|
||||
}
|
||||
|
@ -1121,7 +1120,6 @@ a:hover.BlueCirBtnMini{ background:#269ac9; color:#fff;}
|
|||
.postDetailDes ul li{list-style-type: disc;margin-left: 40px;}
|
||||
.postDetailDes td,.postDetailDes tr {border: 1px solid; border-color: inherit;}
|
||||
.postDetailDes a{color: #136ec2;}
|
||||
.postDetailDes blockquote{background: none;}
|
||||
.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important;}
|
||||
.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
|
||||
.postDetailDate {color:#888888; font-size:12px; float:left;}
|
||||
|
|
|
@ -56,6 +56,7 @@ h4{ font-size:14px; }
|
|||
.flow_hidden{ width:300px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;}
|
||||
.white_space{white-space:nowrap;}
|
||||
.pr {position:relative;}
|
||||
.hide-text {overflow:hidden; white-space:nowrap;}
|
||||
|
||||
/* Spacing */
|
||||
.ml2{ margin-left:2px;}
|
||||
|
@ -88,7 +89,9 @@ h4{ font-size:14px; }
|
|||
.ml100{ margin-left:100px;}
|
||||
.ml110{ margin-left:110px;}
|
||||
.ml125 { margin-left:125px;}
|
||||
.ml130 { margin-left:130px;}
|
||||
.ml200 {margin-left:200px;}
|
||||
.ml250 {margin-left:250px;}
|
||||
.ml320{ margin-left:320px;}
|
||||
.ml150 { margin-left:150px;}
|
||||
.mr-5 {margin-right:-5px;}
|
||||
|
@ -617,7 +620,6 @@ a.postTypeGrey:hover {color:#269ac9;}
|
|||
.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;}
|
||||
.homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;}
|
||||
.homepagePostIntro a{color: #136ec2;}
|
||||
.homepagePostIntro blockquote{background: none;}
|
||||
.homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;}
|
||||
.homepagePostDate {font-size:12px; color:#888888;margin-bottom: 5px;}
|
||||
.homepagePostReplyBanner {width:708px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;}
|
||||
|
@ -655,7 +657,6 @@ a.postReplyCancel:hover {color:#ffffff;}
|
|||
.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 40px;}
|
||||
.homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;}
|
||||
.homepagePostReplyContent a{color: #136ec2;}
|
||||
.homepagePostReplyContent blockquote{background: none;}
|
||||
.table_maxWidth table {max-width: 642px;}
|
||||
.homepagePostProjectState {width:42px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
|
||||
.homepagePostAssignTo {float:left; font-size:14px; color:#15bccf;}
|
||||
|
|
Loading…
Reference in New Issue