讨论区局部优化
This commit is contained in:
parent
5fd3e7d3a2
commit
9549d695f6
|
@ -37,16 +37,6 @@ class MessagesController < ApplicationController
|
|||
|
||||
# Show a topic and its replies
|
||||
def show
|
||||
=begin
|
||||
if @course
|
||||
topic_id = params[:r]?params[:r]:params[:id]
|
||||
parent_id = params[:id]
|
||||
url = course_boards_path(@course,:topic_id => topic_id,:parent_id=>parent_id);
|
||||
redirect_to url
|
||||
return;
|
||||
end
|
||||
=end
|
||||
|
||||
@isReply = true
|
||||
page = params[:page]
|
||||
# Find the page of the requested reply
|
||||
|
@ -54,16 +44,7 @@ class MessagesController < ApplicationController
|
|||
offset = @topic.children.count(:conditions => ["#{Message.table_name}.id < ?", params[:r].to_i])
|
||||
page = 1 + offset / REPLIES_PER_PAGE
|
||||
end
|
||||
|
||||
@reply_count = @topic.children.count
|
||||
# @reply_pages = Paginator.new @reply_count, REPLIES_PER_PAGE, page
|
||||
# @replies = @topic.children.
|
||||
# includes(:author, :attachments, {:board => :project}).
|
||||
# reorder("#{Message.table_name}.created_on DESC").
|
||||
# limit(@reply_pages.per_page).
|
||||
# offset(@reply_pages.offset).
|
||||
# all
|
||||
|
||||
@reply = Message.new(:subject => "RE: #{@message.subject}")
|
||||
if @course
|
||||
messages_replies = @topic.children.
|
||||
|
|
|
@ -2,19 +2,6 @@
|
|||
<%= import_ke(enable_at: false, prettify: false) %>
|
||||
<%= javascript_include_tag "create_kindeditor" %>
|
||||
<% end %>
|
||||
|
||||
<style type="text/css">
|
||||
/*回复框*/
|
||||
/*.homepagePostReplyInputContainer .ke-toolbar {display: none; width: 400px; border: none; background: none; padding: 0px 0px;}*/
|
||||
/*.homepagePostReplyInputContainer .ke-toolbar-icon {line-height: 26px; font-size: 14px; padding-left: 26px;}*/
|
||||
/*.homepagePostReplyInputContainer .ke-toolbar-icon-url {background-image: url(/images/public_icon.png)}*/
|
||||
/*.homepagePostReplyInputContainer .ke-outline {padding: 0px 0px; line-height: 26px; font-size: 14px;}*/
|
||||
/*.homepagePostReplyInputContainer .ke-icon-emoticons {background-position: 0px -671px; width: 50px; height: 26px;}*/
|
||||
/*.homepagePostReplyInputContainer .ke-icon-emoticons:hover {background-position: -79px -671px; width: 50px; height: 26px;}*/
|
||||
/*.homepagePostReplyInputContainer .ke-outline {border: none;}*/
|
||||
/*.homepagePostReplyInputContainer .ke-inline-block {display: none;}*/
|
||||
/*.homepagePostReplyInputContainer .ke-container {float: left;}*/
|
||||
</style>
|
||||
<% if topics %>
|
||||
<% topics.each do |topic| %>
|
||||
<script>
|
||||
|
@ -49,14 +36,7 @@
|
|||
<% 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>-->
|
||||
<%= link_to "点击展开更多",boards_topic_path(@board, :course_id => @board.course.id ,:page => page),:id => "show_more_course_topic",:remote => "true",:class => "loadMore mt10 f_grey"%>
|
||||
<% end %>
|
||||
<% end%>
|
||||
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
$("#show_more_course_topic").mouseover(function () {
|
||||
$("#more_topic_link").click();
|
||||
});
|
||||
</script>-->
|
||||
|
|
|
@ -192,6 +192,4 @@ function nh_init_board(params){
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id,:host=>Setting.host_user), :alt => "用户头像" %>
|
||||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
<%#= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
|
|
Loading…
Reference in New Issue