Merge branch 'develop' into cxt_course
This commit is contained in:
commit
d4d96e66fc
|
@ -875,7 +875,7 @@ class UsersController < ApplicationController
|
|||
#显示更多用户课程
|
||||
def user_courses4show
|
||||
@page = params[:page].to_i + 1
|
||||
@courses = @user.courses.visible.select("courses.*,(SELECT MAX(created_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(5).offset(@page * 5)
|
||||
@courses = @user.courses.visible.where("is_delete =?", 0).select("courses.*,(SELECT MAX(created_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(5).offset(@page * 5)
|
||||
end
|
||||
|
||||
#显示更多用户项目
|
||||
|
|
|
@ -199,8 +199,7 @@ class Message < ActiveRecord::Base
|
|||
def act_as_forge_activity
|
||||
# 如果project为空,那么就是课程相关的消息
|
||||
if self.board.project_id != -1 && self.parent_id.nil?
|
||||
self.forge_acts << ForgeActivity.new(:user_id => self.author_id,
|
||||
:project_id => self.board.project.id)
|
||||
self.forge_acts << ForgeActivity.new(:user_id => self.author_id, :project_id => self.board.project.id)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,24 @@
|
|||
<% if @in_user_center%>
|
||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @article,:user_activity_id =>@user_activity_id}) %>");
|
||||
init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", 'UserActivity');
|
||||
// init_activity_KindEditor_data(<%#= @user_activity_id%>,"","87%", 'UserActivity');
|
||||
<% else%>
|
||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'blogs/article', :locals => {:activity => @article,:user_activity_id =>@user_activity_id}) %>");
|
||||
//init_activity_KindEditor_data(<%#= @user_activity_id%>,"","87%", 'UserActivity');
|
||||
<% end %>
|
||||
init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", 'UserActivity');
|
||||
<% end %>
|
||||
showNormalImage('activity_description_<%= @user_activity_id %>');
|
||||
if($("#intro_content_<%= @user_activity_id %>").height() > 810) {
|
||||
$("#intro_content_show_<%= @user_activity_id %>").show();
|
||||
}
|
||||
$("#intro_content_show_<%= @user_activity_id %>").click(function(){
|
||||
$("#activity_description_<%= @user_activity_id %>").toggleClass("maxh360");
|
||||
$("#activity_description_<%= @user_activity_id%>").toggleClass("lh18");
|
||||
$("#intro_content_show_<%= @user_activity_id %>").hide();
|
||||
$("#intro_content_hide_<%= @user_activity_id %>").show();
|
||||
});
|
||||
$("#intro_content_hide_<%= @user_activity_id %>").click(function(){
|
||||
$("#activity_description_<%= @user_activity_id %>").toggleClass("maxh360");
|
||||
$("#activity_description_<%= @user_activity_id%>").toggleClass("lh18");
|
||||
$("#intro_content_hide_<%= @user_activity_id %>").hide();
|
||||
$("#intro_content_show_<%= @user_activity_id %>").show();
|
||||
});
|
|
@ -57,13 +57,14 @@
|
|||
<div class="homepagePostDate">
|
||||
发帖时间:<%= format_time(activity.created_on) %>
|
||||
</div>
|
||||
|
||||
<div class="homepagePostIntro break_word upload_img list_style" id="activity_description_<%= user_activity_id%>">
|
||||
<% if activity.parent_id.nil? %>
|
||||
<%= activity.content.to_s.html_safe%>
|
||||
<% else %>
|
||||
<%= activity.parent.content.to_s.html_safe%>
|
||||
<% end %>
|
||||
<div class="homepagePostIntro break_word upload_img list_style maxh360 lh18 table_maxWidth" id="activity_description_<%= user_activity_id%>">
|
||||
<div id="intro_content_<%= user_activity_id%>">
|
||||
<% if activity.parent_id.nil? %>
|
||||
<%= activity.content.to_s.html_safe%>
|
||||
<% else %>
|
||||
<%= activity.parent.content.to_s.html_safe%>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class=" fl" style="width: 600px">
|
||||
|
@ -72,6 +73,11 @@
|
|||
<%= render :partial => 'blog_comments/attachments_links', :locals => {:attachments => activity.attachments, :options => options, :is_float => true} %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
||||
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div class="homepagePostSetting" id="act-<%= user_activity_id %>" style="visibility: hidden">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
|
|
|
@ -76,15 +76,21 @@
|
|||
$(function () {
|
||||
init_activity_KindEditor_data(<%= topic.id%>, null, "87%", "<%=topic.class.to_s%>");
|
||||
showNormalImage('activity_description_<%= topic.id %>');
|
||||
/*var description_images=$("div#activity_description_<%#= topic.id %>").find("img");
|
||||
if (description_images.length>0) {
|
||||
for (var i=0; i<description_images.length; i++){
|
||||
var image=$(description_images[i]);
|
||||
var element=$("<a></a>").attr("href",image.attr('src'));
|
||||
image.wrap(element);
|
||||
}
|
||||
}
|
||||
$('#activity_description_<%#= topic.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});*/
|
||||
if($("#intro_content_<%= topic.id %>").height() > 810) {
|
||||
$("#intro_content_show_<%= topic.id %>").show();
|
||||
}
|
||||
$("#intro_content_show_<%= topic.id %>").click(function(){
|
||||
$("#activity_description_<%= topic.id %>").toggleClass("maxh360");
|
||||
$("#activity_description_<%= topic.id%>").toggleClass("lh18");
|
||||
$("#intro_content_show_<%= topic.id %>").hide();
|
||||
$("#intro_content_hide_<%= topic.id %>").show();
|
||||
});
|
||||
$("#intro_content_hide_<%= topic.id %>").click(function(){
|
||||
$("#activity_description_<%= topic.id %>").toggleClass("maxh360");
|
||||
$("#activity_description_<%= topic.id%>").toggleClass("lh18");
|
||||
$("#intro_content_hide_<%= topic.id %>").hide();
|
||||
$("#intro_content_show_<%= topic.id %>").show();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<% if topic %>
|
||||
|
|
|
@ -42,15 +42,21 @@
|
|||
$(function () {
|
||||
init_activity_KindEditor_data(<%= topic.id%>, null, "87%");
|
||||
showNormalImage('activity_description_<%= topic.id %>');
|
||||
/*var description_images=$("div#activity_description_<%#= topic.id %>").find("img");
|
||||
if (description_images.length>0) {
|
||||
for (var i=0; i<description_images.length; i++){
|
||||
var image=$(description_images[i]);
|
||||
var element=$("<a></a>").attr("href",image.attr('src'));
|
||||
image.wrap(element);
|
||||
}
|
||||
}
|
||||
$('#activity_description_<%#= topic.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});*/
|
||||
if($("#intro_content_<%= topic.id %>").height() > 810) {
|
||||
$("#intro_content_show_<%= topic.id %>").show();
|
||||
}
|
||||
$("#intro_content_show_<%= topic.id %>").click(function(){
|
||||
$("#activity_description_<%= topic.id %>").toggleClass("maxh360");
|
||||
$("#activity_description_<%= topic.id%>").toggleClass("lh18");
|
||||
$("#intro_content_show_<%= topic.id %>").hide();
|
||||
$("#intro_content_hide_<%= topic.id %>").show();
|
||||
});
|
||||
$("#intro_content_hide_<%= topic.id %>").click(function(){
|
||||
$("#activity_description_<%= topic.id %>").toggleClass("maxh360");
|
||||
$("#activity_description_<%= topic.id%>").toggleClass("lh18");
|
||||
$("#intro_content_hide_<%= topic.id %>").hide();
|
||||
$("#intro_content_show_<%= topic.id %>").show();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<% if topic %>
|
||||
|
|
|
@ -41,15 +41,21 @@
|
|||
$(function () {
|
||||
init_activity_KindEditor_data(<%= topic.id%>, null, "87%");
|
||||
showNormalImage('activity_description_<%= topic.id %>');
|
||||
/*var description_images=$("div#activity_description_<%#= topic.id %>").find("img");
|
||||
if (description_images.length>0) {
|
||||
for (var i=0; i<description_images.length; i++){
|
||||
var image=$(description_images[i]);
|
||||
var element=$("<a></a>").attr("href",image.attr('src'));
|
||||
image.wrap(element);
|
||||
}
|
||||
}
|
||||
$('#activity_description_<%#= topic.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});*/
|
||||
if($("#intro_content_<%= topic.id %>").height() > 810) {
|
||||
$("#intro_content_show_<%= topic.id %>").show();
|
||||
}
|
||||
$("#intro_content_show_<%= topic.id %>").click(function(){
|
||||
$("#activity_description_<%= topic.id %>").toggleClass("maxh360");
|
||||
$("#activity_description_<%= topic.id%>").toggleClass("lh18");
|
||||
$("#intro_content_show_<%= topic.id %>").hide();
|
||||
$("#intro_content_hide_<%= topic.id %>").show();
|
||||
});
|
||||
$("#intro_content_hide_<%= topic.id %>").click(function(){
|
||||
$("#activity_description_<%= topic.id %>").toggleClass("maxh360");
|
||||
$("#activity_description_<%= topic.id%>").toggleClass("lh18");
|
||||
$("#intro_content_hide_<%= topic.id %>").hide();
|
||||
$("#intro_content_show_<%= topic.id %>").show();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<% if topic %>
|
||||
|
|
|
@ -5,4 +5,20 @@
|
|||
<% elsif @org_subfield %>
|
||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>");
|
||||
<%end%>
|
||||
init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", "UserActivity");
|
||||
init_activity_KindEditor_data(<%= @user_activity_id %>,"","87%", "UserActivity");
|
||||
showNormalImage('activity_description_<%= @user_activity_id %>');
|
||||
if($("#intro_content_<%= @user_activity_id %>").height() > 810) {
|
||||
$("#intro_content_show_<%= @user_activity_id %>").show();
|
||||
}
|
||||
$("#intro_content_show_<%= @user_activity_id %>").click(function(){
|
||||
$("#activity_description_<%= @user_activity_id %>").toggleClass("maxh360");
|
||||
$("#activity_description_<%= @user_activity_id %>").toggleClass("lh18");
|
||||
$("#intro_content_show_<%= @user_activity_id %>").hide();
|
||||
$("#intro_content_hide_<%= @user_activity_id %>").show();
|
||||
});
|
||||
$("#intro_content_hide_<%= @user_activity_id %>").click(function(){
|
||||
$("#activity_description_<%= @user_activity_id %>").toggleClass("maxh360");
|
||||
$("#activity_description_<%= @user_activity_id %>").toggleClass("lh18");
|
||||
$("#intro_content_hide_<%= @user_activity_id %>").hide();
|
||||
$("#intro_content_show_<%= @user_activity_id %>").show();
|
||||
});
|
|
@ -44,9 +44,7 @@
|
|||
<option value="1">
|
||||
<%= l(:label_account_identity_student) %>
|
||||
</option>
|
||||
<option value="2">
|
||||
<%= l(:label_account_identity_enterprise) %>
|
||||
</option>
|
||||
|
||||
<option value="3">
|
||||
<%= l(:label_account_identity_developer) %>
|
||||
</option>
|
||||
|
|
|
@ -148,7 +148,7 @@
|
|||
<% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
|
||||
<div class="mt10">
|
||||
<% projects = activity.student_work_projects.where("is_leader = 1") %>
|
||||
<div class="fl mr5 fontGrey3">
|
||||
<div class="fl mr20 fontGrey3 w80">
|
||||
已关联项目:<%='各小组尚未将小组项目关联到本次作业。' if projects.empty? %>
|
||||
</div>
|
||||
<% projects.each do |pro| %>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
$(function () {
|
||||
init_activity_KindEditor_data(<%= activity.id%>, null, "87%", "<%= activity.class.to_s %>");
|
||||
showNormalImage('activity_description_<%= activity.id %>');
|
||||
if ($("#intro_content_<%= activity.id %>").height() > 360) {
|
||||
if ($("#intro_content_<%= activity.id %>").height() > 810) {
|
||||
$("#intro_content_show_<%= activity.id %>").show();
|
||||
}
|
||||
$("#intro_content_show_<%= activity.id %>").click(function () {
|
||||
|
|
|
@ -149,7 +149,7 @@
|
|||
<% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
|
||||
<div class="mt10">
|
||||
<% projects = activity.student_work_projects.where("is_leader = 1") %>
|
||||
<div class="fl mr5 fontGrey3">
|
||||
<div class="fl mr20 fontGrey3 w80">
|
||||
已关联项目:<%='各小组尚未将小组项目关联到本次作业。' if projects.empty? %>
|
||||
</div>
|
||||
<% projects.each do |pro| %>
|
||||
|
|
|
@ -86,9 +86,7 @@
|
|||
<div class="homepagePostReply">
|
||||
<div class="topBorder" style="display: <%= count>0 ? 'none': '' %>"></div>
|
||||
<div class="homepagePostReplyBanner" style="display: <%= count>0 ? '': 'none' %>">
|
||||
<div class="homepagePostReplyBannerCount" onclick="expand_reply_input('#reply_input_<%= user_activity_id %>');">回复(
|
||||
<%=count %>
|
||||
)</div>
|
||||
<div class="homepagePostReplyBannerCount" onclick="expand_reply_input('#reply_input_<%= user_activity_id %>');">回复(<%=count %>)</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>
|
||||
|
|
|
@ -152,7 +152,7 @@
|
|||
<% if homework_common.homework_type == 3 && homework_common.homework_detail_group.base_on_project == 1 %>
|
||||
<div class="mt10">
|
||||
<% projects = homework_common.student_work_projects.where("is_leader = 1") %>
|
||||
<div class="fl mr5 fontGrey3">
|
||||
<div class="fl mr20 fontGrey3 w80">
|
||||
已关联项目:<%='各小组尚未将小组项目关联到本次作业。' if projects.empty? %>
|
||||
</div>
|
||||
<% projects.each do |pro| %>
|
||||
|
|
|
@ -67,6 +67,7 @@ RedmineApp::Application.routes.draw do
|
|||
|
||||
get '/', to: 'organizations#show', defaults: { id: 5 }, constraints: {subdomain: 'micros'}
|
||||
get '/', to: 'organizations#show', defaults: { id: 23 }, constraints: {subdomain: 'nubot'}
|
||||
get '/', to: 'organizations#show', defaults: { id: 1 }, constraints: {subdomain: 'team'}
|
||||
|
||||
resources :org_member do
|
||||
member do
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
class DropMessageForForgeActivities < ActiveRecord::Migration
|
||||
def up
|
||||
forge_activities = ForgeActivity.where("forge_act_type =?", "Message")
|
||||
forge_activities.each do |fa|
|
||||
# 删除项目动态中,讨论区也会多一条记录问题
|
||||
if fa.forge_act && !fa.forge_act.parent_id.nil?
|
||||
fa.delete
|
||||
end
|
||||
end
|
||||
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 => 20151231023610) do
|
||||
ActiveRecord::Schema.define(:version => 20160105073350) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
|
|
@ -216,8 +216,8 @@ a.menuGrey:hover {color:#fe7d68;}
|
|||
#navSearchAlert {display:none;}
|
||||
.homepagePostReplyjournal{margin-left: 15px; float: left;}
|
||||
|
||||
.lh18 {line-height: 18px;}
|
||||
.maxh360 {max-height: 360px;}
|
||||
/*.lh18 {line-height: 18px;}*/
|
||||
/*.maxh360 {max-height: 360px;}*/
|
||||
|
||||
/*邮件邀请*/
|
||||
.box_main{ width:345px; margin:0 auto;}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -962,12 +962,6 @@ a:hover.Reply_pic{border:1px solid #64bdd9;}
|
|||
margin-bottom: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.maxh360 {
|
||||
max-height: 360px;
|
||||
}
|
||||
.lh18 {
|
||||
line-height: 18px;
|
||||
}
|
||||
.homepagePostIntro {
|
||||
font-size: 14px;
|
||||
color: #484848;
|
||||
|
|
|
@ -958,3 +958,7 @@ span.at a{color:#269ac9;text-decoration: none;}
|
|||
.sectionContent span {width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:inline-block; height:20px; vertical-align:top;}
|
||||
.orgDirection {width:392px; background-color:#f1f1f1; height:30px; vertical-align:middle; line-height:30px; color:#585858; padding-left:10px;}
|
||||
.orgSendSearch {border:1px solid #dddddd; outline:none; width:262px; height:22px; padding-left:10px; float:left;}
|
||||
|
||||
/*文本描述展开高度*/
|
||||
.maxh360 {max-height: 810px;}
|
||||
.lh18 { line-height: 18px;}
|
Loading…
Reference in New Issue