Merge branch 'dev_hjq' of http://repository.trustie.net/xianbo/trustie2 into dev_hjq
This commit is contained in:
commit
c13558f78f
|
@ -103,7 +103,7 @@ class BoardsController < ApplicationController
|
|||
@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").
|
||||
reorder("#{Message.table_name}.sticky DESC, #{Message.table_name}.created_on desc").
|
||||
includes(:last_reply).
|
||||
limit(@topic_pages.per_page).
|
||||
offset(@topic_pages.offset).
|
||||
|
|
|
@ -91,8 +91,10 @@ class Project < ActiveRecord::Base
|
|||
|
||||
has_many :tags, :through => :project_tags, :class_name => 'Tag'
|
||||
has_many :project_tags, :class_name => 'ProjectTags'
|
||||
# 动态级联删除
|
||||
has_many :forge_activities, :class_name => 'ForgeActivity', :dependent => :destroy
|
||||
# 关联虚拟表
|
||||
has_many :forge_messages, :class_name =>'ForgeMessage', :as => :forge_message, :dependent => :destroy
|
||||
has_many :forge_messages, :class_name =>'ForgeMessage', :as => :forge_message, :dependent => :destroy
|
||||
|
||||
belongs_to :organization
|
||||
|
||||
|
|
|
@ -51,9 +51,9 @@
|
|||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'talk_edit fr',
|
||||
:style => ' margin-right: 10px;') if topic.destroyable_by?(User.current) %>
|
||||
<%# if topic.sticky? %>
|
||||
<!--<a href="javascript:void(0)" class="talk_up fr c_red" style="margin-right: 10px;"><%#= l(:label_board_sticky)%></a>-->
|
||||
<%# end %>
|
||||
<% if topic.sticky? %>
|
||||
<a href="javascript:void(0)" class="talk_up fr c_red" style="margin-right: 10px;"><%= l(:label_board_sticky)%></a>
|
||||
<% end %>
|
||||
<script>
|
||||
//$(function(){if($("#contentmessage<%#=topic.id %>").height()>182){$("#project_show_<%#= topic.id%>").show();}});
|
||||
//解决由于图片加载慢造成div高度不够 以至于展开按钮不显示的bug
|
||||
|
|
Loading…
Reference in New Issue