讨论区单个帖子页面的二级回复

This commit is contained in:
cxt 2015-10-12 17:19:55 +08:00
parent c6cca9f17e
commit ebb7ed1f1a
13 changed files with 331 additions and 118 deletions

View File

@ -90,65 +90,66 @@ class BoardsController < ApplicationController
end
end
end
sort_init 'updated_on', 'desc'
sort_update 'created_on' => "#{Message.table_name}.created_on",
'replies' => "#{Message.table_name}.replies_count",
'updated_on' => "COALESCE(last_replies_messages.created_on, #{Message.table_name}.created_on)"
@topic_count = @board ? @board.topics.count : 0
if @project
@topic_pages = Paginator.new @topic_count, per_page_option, params['page']
#现在发布帖子的时候置顶功能已经没有了。所以取消这个置顶排序 #{Message.table_name}.sticky DESC,
@topics = @board.topics.
reorder("#{Message.table_name}.created_on desc").
includes(:last_reply).
limit(@topic_pages.per_page).
offset(@topic_pages.offset).
preload(:author, {:last_reply => :author}).
all
elsif @course
#
# board_topics = @board ? @board.topics.reorder("#{Message.table_name}.sticky DESC, #{Message.table_name}.created_on desc").
# includes(:last_reply).
# # limit(@topic_pages.per_page).
# # offset(@topic_pages.offset).
#
# preload(:author, {:last_reply => :author}).
# all : []
# @topics = paginateHelper board_topics,10
if (@board)
limit = 10;
#pageno = params[:page];
#if(pageno == nil || pageno=='')
# dw_topic = nil;
# if( params[:parent_id]!=nil && params[:parent_id]!='' )
# dw_topic = @board.topics.where(id:params[:parent_id]).first();
# end
# if( dw_topic != nil )
# dw_count = @board.topics.where('(sticky>?) or (sticky=? and created_on>?)',dw_topic.sticky,dw_topic.sticky,dw_topic.created_on).count();
# dw_count = dw_count+1;
# pageno = dw_count%10==0 ? (dw_count/limit) : (dw_count/limit+1)
# end
#end
#if(pageno == nil || pageno=='')
# pageno=1;
#end
@topic_count = @board.topics.count();
@topic_pages = (params[:page] ? params[:page].to_i + 1 : 0) *10
@topics = @board.topics.reorder("#{Message.table_name}.sticky DESC, #{Message.table_name}.created_on desc").
limit(limit).offset(@topic_pages).includes(:last_reply).
preload(:author, {:last_reply => :author}).all();
else
@topics = [];
end
end
@message = Message.new(:board => @board)
#modify by nwb
respond_to do |format|
format.js
format.html {
sort_init 'updated_on', 'desc'
sort_update 'created_on' => "#{Message.table_name}.created_on",
'replies' => "#{Message.table_name}.replies_count",
'updated_on' => "COALESCE(last_replies_messages.created_on, #{Message.table_name}.created_on)"
@topic_count = @board ? @board.topics.count : 0
if @project
@topic_pages = Paginator.new @topic_count, per_page_option, params['page']
#现在发布帖子的时候置顶功能已经没有了。所以取消这个置顶排序 #{Message.table_name}.sticky DESC,
@topics = @board.topics.
reorder("#{Message.table_name}.created_on desc").
includes(:last_reply).
limit(@topic_pages.per_page).
offset(@topic_pages.offset).
preload(:author, {:last_reply => :author}).
all
elsif @course
#
# board_topics = @board ? @board.topics.reorder("#{Message.table_name}.sticky DESC, #{Message.table_name}.created_on desc").
# includes(:last_reply).
# # limit(@topic_pages.per_page).
# # offset(@topic_pages.offset).
#
# preload(:author, {:last_reply => :author}).
# all : []
# @topics = paginateHelper board_topics,10
if( @board )
limit = 10;
pageno = params[:page];
if(pageno == nil || pageno=='')
dw_topic = nil;
if( params[:parent_id]!=nil && params[:parent_id]!='' )
dw_topic = @board.topics.where(id:params[:parent_id]).first();
end
if( dw_topic != nil )
dw_count = @board.topics.where('(sticky>?) or (sticky=? and created_on>?)',dw_topic.sticky,dw_topic.sticky,dw_topic.created_on).count();
dw_count = dw_count+1;
pageno = dw_count%10==0 ? (dw_count/limit) : (dw_count/limit+1)
end
end
if(pageno == nil || pageno=='')
pageno=1;
end
@topic_count = @board.topics.count();
@topic_pages = Paginator.new @topic_count, limit, pageno
@topics = @board.topics.reorder("#{Message.table_name}.sticky DESC, #{Message.table_name}.created_on desc").
limit(limit).offset(@topic_pages.offset).includes(:last_reply).
preload(:author, {:last_reply => :author}).all();
else
@topics = [];
end
end
@message = Message.new(:board => @board)
#modify by nwb
if @project
render :action => 'show', :layout => 'base_projects'
elsif @course
@ -158,10 +159,10 @@ class BoardsController < ApplicationController
}
format.atom {
@messages = @board.messages.
reorder('created_on DESC').
includes(:author, :board).
limit(Setting.feeds_limit.to_i).
all
reorder('created_on DESC').
includes(:author, :board).
limit(Setting.feeds_limit.to_i).
all
if @project
render_feed(@messages, :title => "#{@project}: #{@board}")
elsif @course

View File

@ -17,18 +17,9 @@
$("#Container").css("width","1000px");
});
</script>
<div class="homepageRight mt0 ml10">
<div class="homepageRightBanner">
<div class="NewsBannerName">
<% if User.current.language == "zh"%>
<%= h @board.name %>
<% else %>
<%= l(:project_module_boards) %>
<% end %>
</div>
</div>
<% @topics.each do |topic| if @topics %>
<% if topics%>
<% topics.each do |topic| %>
<script>
function expand_reply(container, btnid) {
var target = $(container);
@ -77,15 +68,14 @@
<%= render :partial => 'users/course_message', :locals => {:activity => topic, :user_activity_id => topic.id} %>
<% end %>
<% end %>
<% end %>
<!-- <%# if course_activities.count == 10 %>
<div id="show_more_course_activities" class="loadMore mt10 f_grey">展开更多<%#= link_to "", course_activity_path(@course.id, :type => type, :page => page), :id => "more_course_activities_link", :remote => "true", :class => "none" %></div>
<%# end %>
<% if topics.count == 10 %>
<div id="show_more_course_topic" class="loadMore mt10 f_grey">展开更多<%= link_to "", boards_topic_path(@board, :course_id => @board.course.id ,:page => page), :id => "more_topic_link", :remote => "true", :class => "none" %></div>
<% end %>
<% end%>
<script type="text/javascript">
$("#show_more_course_activities").mouseover(function () {
$("#more_course_activities_link").click();
$("#show_more_course_topic").mouseover(function () {
$("#more_topic_link").click();
});
</script>-->
</div>
</script>

View File

@ -30,11 +30,20 @@
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
<%#= javascript_include_tag "/assets/kindeditor/kindeditor-min" %>
<% if @project %>
<% if @project %>
<%= render :partial => 'project_show', locals: {project: @project} %>
<% elsif @course %>
<%= render :partial => 'course_show', locals: {course: @course} %>
<% end %>
<% elsif @course %>
<div class="homepageRight mt0 ml10">
<div class="homepageRightBanner">
<div class="NewsBannerName">
课程讨论区
</div>
</div>
<%= render :partial => 'course_show', :locals => {:topics => @topics, :page => 0} %>
</div>
<% end %>
<script type="text/javascript">//侧导航

View File

@ -0,0 +1 @@
$("#show_more_course_topic").replaceWith("<%= escape_javascript( render :partial => 'boards/course_show',:locals => {:topics => @topics, :page => @page} )%>");

View File

@ -1,5 +1,5 @@
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_activity_KindEditor","forum" %>
<style type="text/css">
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_activity_KindEditor" %>
<!--<style type="text/css">
/*回复框*/
div.ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
span.ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
@ -10,7 +10,7 @@
div.ke-toolbar .ke-outline{border:none;}
.ke-inline-block{display: none;}
div.ke-container{float:left;}
</style>
</style>-->
<script type="text/javascript">
$(function(){
$("#RSide").removeAttr("id");
@ -83,7 +83,12 @@
<div class="cl"></div>
<div class="postDetailCreater">
<%= link_to @topic.author.name, user_path(@topic.author), :class => "linkBlue2", :target=> "_blank"%></div>
<% if @topic.try(:author).try(:realname) == ' ' %>
<%= link_to @topic.try(:author), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
<% else %>
<%= link_to @topic.try(:author).try(:realname), user_path(@topic.author,:host=>Setting.host_user), :class => "linkBlue2", :target=> "_blank" %>
<% end %>
</div>
<div class="postDetailDate mb5"><%= format_date( @topic.created_on)%></div>
<div class="cl"></div>
<div class="memo-content upload_img break_word" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >
@ -115,8 +120,33 @@
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
</div>
<div class="homepagePostReplyDes">
<div class="homepagePostReplyPublisher"><a href="<%=user_path(reply.author)%>" class="newsBlue mr10 f14"><%= reply.author.name%></a><%= format_date(reply.created_on) %></div>
<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 %>
</div>
<div class="homepagePostReplyContent"><%= reply.content.html_safe%></div>
<div style="margin-top: -7px; margin-bottom: 5px">
<%= format_date(reply.created_on) %>
<%= link_to(
l(:button_reply),
{:action => 'quote', :id => reply},
:remote => true,
:method => 'get',
:class => 'fr newsBlue',
:title => l(:button_reply)) if !@topic.locked? && authorize_for('messages', 'reply') %>
<%= link_to(
l(:button_delete),
{:action => 'destroy', :id => reply},
:method => :post,
:class => 'fr newsGrey mr10',
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete)
) if reply.course_destroyable_by?(User.current) %>
</div>
<p id="reply_message_<%= reply.id%>"></p>
</div>
<div class="cl"></div>
</div>
@ -125,22 +155,37 @@
<% end %>
<div class="cl"></div>
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @topic.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
<div class="talkWrapMsg" nhname="about_talk_reply">
<em class="talkWrapArrow"></em>
<div class="cl"></div>
<div class="talkConIpt ml5 mb10" id="reply<%= @topic.id %>">
<% if !@topic.locked? && authorize_for_course('messages', 'reply') %>
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message_form'} do |f| %>
<%= render :partial => 'form_course', :locals => {:f => f, :replying => true} %>
<%= link_to l(:button_cancel), "javascript:void(0)", :onclick => 'course_board_canel_message_replay();', :class => "blue_btn grey_btn fr c_white mt10 mr5" %>
<%= link_to l(:button_submit),"javascript:void(0)",:onclick => 'course_board_submit_message_replay();' ,:class => "blue_btn fr c_white mt10" ,:style=>"margin-left: 50px;"%>
<% end %>
<% end %>
<div class="cl"></div>
</div>
</div>
<!--<div class="homepagePostReplyContainer borderBottomNone minHeight48">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%#= @topic.id%>"><%#= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
<div class="homepagePostReplyInputContainer mb10">
<div nhname='new_message_<%= @topic.id%>' style="display:none;">
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => @topic.id, :is_board => 'false'},:method => "post", :remote => true) do |f|%>
<div nhname='new_message_<%#= @topic.id%>' style="display:none;">
<%#= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => @topic.id, :is_board => 'false'},:method => "post", :remote => true) do |f|%>
<input type="hidden" name="quote[quote]" value="">
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @topic.id%>' name="reply[content]"></textarea>
<div nhname='toolbar_container_<%= @topic.id%>' style="float:left; margin-left: 5px; padding-top:3px;"></div>
<a id="new_message_submit_btn_<%= @topic.id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%#= @topic.id%>' name="reply[content]"></textarea>
<div nhname='toolbar_container_<%#= @topic.id%>' style="float:left; margin-left: 5px; padding-top:3px;"></div>
<a id="new_message_submit_btn_<%#= @topic.id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div>
<p nhname='contentmsg_<%= @topic.id%>'></p>
<% end%>
<p nhname='contentmsg_<%#= @topic.id%>'></p>
<%# end%>
</div>
<div class="cl"></div>
</div>
<div class="cl"></div>
</div>
</div>-->
</div>
</div>

View File

@ -0,0 +1,117 @@
<div class="project_r_h">
<h2 class="project_h2">
<%= l(:label_board) %>
</h2>
</div>
<div class="topbar_info02 fl">
<p class="hiddent">
<%= l(:label_user_location) %> :
<%= link_to l(:label_borad_course), course_boards_path(@course) %>
>
<%= link_to @topic.subject, course_board_path(@course, @board) %>
</p>
</div>
<div class="cl"></div>
<div class="problem_main">
<div class="ping_dispic">
<%= link_to image_tag(url_to_avatar(@topic.author),:width => '46',:height => '46'), user_path(@topic.author) %>
</div>
<div class="talk_txt fl">
<p class="problem_tit fl fb c_dblue break_word" >
<%= @topic.subject %>
</p>
<br/>
<p>
由<%= link_to_user_header @topic.author,false,:class=> 'problem_name' %>
添加于<%= format_time(@topic.created_on) %>
</p>
</div>
<%= link_to(
l(:button_delete),
{:action => 'destroy', :id => @topic},
:method => :post,
:data => {:confirm => l(:text_are_you_sure)},
:class => 'talk_edit fr'
) if @message.course_destroyable_by?(User.current) %>
<%= link_to(
l(:button_edit),
{:action => 'edit', :id => @topic},
:class => 'talk_edit fr'
) if @message.course_editable_by?(User.current) %>
<div class="cl"></div>
<div class="talk_info mb10 upload_img break_word"><%= @topic.content.html_safe %></div>
<div class="talk_info mb10"><%= link_to_attachments_course @topic, :author => false %></div>
<!-- <a href="#" class=" link_file ml60">附件爱覅俄方if.zip(27.5kB)</a>-->
<div class="cl"></div>
<% if User.current.logged? %>
<%= toggle_link l(:button_reply), "reply", :focus => 'message_subject',:class => 'talk_edit fr' %>
<% else %>
<%= link_to l(:button_reply), signin_path,:class => 'talk_edit fr' %>
<% end %>
<%= link_to(
l(:button_quote),
{:action => 'quote', :id => @topic},
:remote => true,
:method => 'get',
:class => 'talk_edit fr',
:remote => true) if !@topic.locked? && authorize_for('messages', 'reply') %>
<div class="cl"></div>
</div><!--讨论主类容 end-->
<% unless @replies.empty? %>
<% reply_count = 0 %>
<% @replies.each do |message| %>
<div class="ping_C mb10 ml50" id="<%= "message-#{message.id}" %>">
<div class="ping_dispic"><%= link_to image_tag(url_to_avatar(message.author), :width => '46',:height => '46'), user_path(message.author) %></div>
<div class="ping_discon">
<div class="ping_distop upload_img break_word">
<%= link_to_user_header message.author,false,:class => 'c_blue fb fl mb10 ' %>
<span class="c_grey fr"><%= format_time(message.created_on) %></span>
<div class="cl"></div>
<p><%= textAreailizable message,:content,:attachments => message.attachments %></p>
<%= link_to_attachments_course message, :author => false %>
</div>
<div class="ping_disfoot">
<%= link_to(
l(:button_quote),
{:action => 'quote', :id => message},
:remote => true,
:method => 'get',
:title => l(:button_quote)) if !@topic.locked? && authorize_for('messages', 'reply') %>
<%= link_to(
#image_tag('edit.png'),
l(:button_edit),
{:action => 'edit', :id => message},
:title => l(:button_edit)
) if message.course_editable_by?(User.current) %>
<%= link_to(
#image_tag('delete.png'),
l(:button_delete),
{:action => 'destroy', :id => message},
:method => :post,
:data => {:confirm => l(:text_are_you_sure)},
:title => l(:button_delete)
) if message.course_destroyable_by?(User.current) %>
</div>
<div class="cl"></div>
</div>
<div class="cl"></div>
</div><!---留言内容-->
<% end %>
<% end %>
<% if !@topic.locked? && authorize_for_course('messages', 'reply') %>
<div id="reply" style="display:none;">
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message_form'} do |f| %>
<%= render :partial => 'form_course', :locals => {:f => f, :replying => true} %>
<%= link_to l(:button_submit),"javascript:void(0)",:onclick => 'course_board_submit_message_replay();' ,:class => "blue_btn fl c_white" ,:style=>"margin-left: 50px;"%>
<%= link_to l(:button_cancel), "javascript:void(0)", :onclick => 'course_board_canel_message_replay();', :class => "blue_btn grey_btn fl c_white" %>
<% end %>
</div>
<% end %>
<div class="cl"></div>
<ul class="wlist">
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
</ul>
<% html_title @topic.subject %>

View File

@ -28,16 +28,17 @@
</li>
<li>
<div id="message_quote" class="wiki" style="width: 92%;word-break: break-all;word-wrap: break-word;margin-left: 40px;"></div>
<label class="fl" >
<!--<label class="fl" >
<span class="c_red">*</span>&nbsp;
<%= l(:field_description) %>&nbsp;&nbsp;
</label>
<%#= l(:field_description) %>&nbsp;&nbsp;
</label>-->
<%= text_area :quote,:quote,:style => 'display:none' %>
<%= hidden_field_tag :asset_id,params[:asset_id],:required => false,:style => 'display:none' %>
<% if replying %>
<%= f.kindeditor :content, :editor_id => 'message_content_editor',
:width => '89%',
:height => 300,
:width => '99%',
:height => 100,
:minHeight=>100,
:input_html => { :id => 'message_content',
:class => 'talk_text fl',
:maxlength => 5000 }%>
@ -47,21 +48,24 @@
:owner_type => OwnerTypeHelper::MESSAGE,
:width => '90%',
:height => 300,
:minHeight=>300,
:class => 'talk_text fl',
:input_html => { :id => 'message_content',
:class => 'talk_text fl',
:maxlength => 5000 }%>
<% end %>
<div class="cl"></div>
<p id="message_content_span" class="ml55"></p>
<p id="message_content_span"></p>
</li>
<div class="cl"></div>
<li>
<label class="fl mt10">&nbsp;&nbsp;<%= l(:label_attachment_plural) %>&nbsp;&nbsp;</label>
<div class="fl mt10">
<%= render :partial => 'attachments/form_course', :locals => {:container => @message,:isReply => @isReply} %>
</div>
</li>
<% unless replying %>
<li>
<label class="fl mt10">&nbsp;&nbsp;<%= l(:label_attachment_plural) %>&nbsp;&nbsp;</label>
<div class="fl mt10">
<%= render :partial => 'attachments/form_course', :locals => {:container => @message,:isReply => @isReply} %>
</div>
</li>
<% end %>
<li >
<div class="cl"></div>
</li>

View File

@ -0,0 +1,34 @@
<style type="text/css">
/*回复框*/
.ReplyToMessageInputContainer .ke-toolbar{display:none;width:400px;border:none;background:none;padding:0px 0px;}
.ReplyToMessageInputContainer .ke-toolbar-icon{line-height:26px;font-size:14px;padding-left:26px;}
.ReplyToMessageInputContainer .ke-toolbar-icon-url{background-image:url( /images/public_icon.png )}
.ReplyToMessageInputContainer .ke-outline{padding:0px 0px;line-height:26px;font-size:14px;}
.ReplyToMessageInputContainer .ke-icon-emoticons{background-position:0px -671px;width:50px;height:26px;}
.ReplyToMessageInputContainer .ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
.ReplyToMessageInputContainer .ke-outline{border:none;}
.ReplyToMessageInputContainer .ke-inline-block{display: none;}
.ReplyToMessageInputContainer .ke-container{float:left;}
</style>
<div class="ReplyToMessageContainer borderBottomNone">
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= reply.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
<div class="ReplyToMessageInputContainer mb10">
<div nhname='new_message_<%= reply.id%>'>
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => reply.id,},:method => "post", :remote => true) do |f|%>
<input type="hidden" name="quote[quote]" value="<%= temp.content %>">
<input type="hidden" name="reply[subject]" value="<%= subject %>">
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="reply[content]"></textarea>
<div nhname='toolbar_container_<%= reply.id%>' style="float:left; margin-left: 5px; padding-top:3px;"></div>
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
<div class="cl"></div>
<p nhname='contentmsg_<%= reply.id%>'></p>
<% end%>
</div>
<div class="cl"></div>
</div>
<div class="cl"></div>
</div>

View File

@ -1,8 +1,12 @@
$('#message_subject').val("<%= raw escape_javascript(@subject) %>");
$('#message_quote').html("<%= raw escape_javascript(@temp.content.html_safe) %>");
/*$('#message_subject').val("<%#= raw escape_javascript(@subject) %>");
$('#message_quote').html("<%#= raw escape_javascript(@temp.content.html_safe) %>");
//$('#message_content').val("<#%= raw escape_javascript(@content) %>");
$('#quote_quote').html("<%= raw escape_javascript(@temp.content.html_safe) %>");
$('#quote_quote').html("<%#= raw escape_javascript(@temp.content.html_safe) %>");
showAndScrollTo("reply", "message_content");
$('#message_content').scrollTop = $('#message_content').scrollHeight - $('#message_content').clientHeight;
$("img").removeAttr("align");
$("img").removeAttr("align");*/
$("#reply_message_<%= @message.id%>").replaceWith("<%= escape_javascript(render :partial => 'reply_message', :locals => {:reply => @message,:temp =>@temp,:subject =>@subject}) %>");
$(function(){
init_activity_KindEditor_data(<%= @message.id%>,null,"87%");
});

View File

@ -318,6 +318,7 @@ RedmineApp::Application.routes.draw do
post '/users/:id/user_activities', :to => 'users#show', :as => "user_activities"
post '/courses/:id/course_activity', :to => 'courses#show', :as => 'course_activity'
get '/boards/:id/boards_topic', :to =>'boards#show', :as => 'boards_topic'
#added by young
resources :users do
@ -801,7 +802,11 @@ RedmineApp::Application.routes.draw do
end
end
resources :news, :except => [:show, :edit, :update, :destroy]
resources :boards
# resources :boards do
# member do
# match 'boards_topic', :to => 'boards#boards_topic', :via => :get, :as => "boards_topic"
# end
# end
match '/homework', :to => 'courses#homework', :as => 'homework', :via => :get
resources :activity_notifys do
collection do

View File

@ -119,7 +119,7 @@ a.postTypeGrey:hover {color:#269ac9;}
.borderBottomNone {border-bottom:none !important;}
.topBorder {border-top: 1px solid #e4e4e4;}
div.minHeight48{min-height: 48px;}
.homepagePostReplyBannerCount{width:255px; display:inline-block; margin-left:20px;}
.homepagePostReplyBannerCount{width:255px; display:inline-block; margin-left:15px;}
.homepagePostReplyBannerTime{width:85px; display:inline-block;}
.homepagePostReplyBannerMore{width:330px; display:inline-block; text-align:right;}
.homepagePostReplyInputContainer {width:630px; float:left;}
@ -1072,3 +1072,6 @@ a:hover.AnnexBtn{background: url(images/homepage_icon2.png) -90px -343px no-repe
.postRouteContainer {padding:10px 15px; background-color:#ffffff; border:1px solid #dddddd; margin-top:10px; font-size:14px;}
a.postRouteLink {font-weight:bold; color:#484848;}
a.postRouteLink:hover {text-decoration:underline;}
.ReplyToMessageContainer {border-bottom:1px solid #e3e3e3; width:632px; margin:0px auto; margin-top:15px; min-height:60px;}
.ReplyToMessageInputContainer {width:282px; float:left;}

View File

@ -642,7 +642,7 @@ a.postTypeGrey:hover {color:#269ac9;}
.borderBottomNone {border-bottom:none !important;}
.topBorder {border-top: 1px solid #e4e4e4;}
div.minHeight48{min-height: 48px;}
.homepagePostReplyBannerCount{width:255px; display:inline-block; margin-left:20px;}
.homepagePostReplyBannerCount{width:255px; display:inline-block; margin-left:15px;}
.homepagePostReplyBannerTime{width:85px; display:inline-block;}
.homepagePostReplyBannerMore{width:330px; display:inline-block; text-align:right;}
.homepagePostReplyInputContainer {width:630px; float:left;}

View File

@ -541,7 +541,7 @@ a.postTypeGrey:hover {color:#269ac9;}
.homepagePostReplyBanner {width:708px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;}
.borderBottomNone {border-bottom:none !important;}
.topBorder {border-top: 1px solid #e4e4e4;}
.homepagePostReplyBannerCount{width:255px; display:inline-block; margin-left:20px;}
.homepagePostReplyBannerCount{width:255px; display:inline-block; margin-left:15px;}
.homepagePostReplyBannerTime{width:85px; display:inline-block;}
.homepagePostReplyBannerMore{width:330px; display:inline-block; text-align:right;}
.homepagePostReplyInputContainer {width:690px; margin:0px auto;}