forum memocount error, footer margin

This commit is contained in:
yan 2014-04-28 20:37:12 +08:00
parent 6ac503eac5
commit a191b634c5
4 changed files with 4 additions and 4 deletions

2
.gitignore vendored
View File

@ -1,7 +1,7 @@
/.project
/.idea
/.bundle
*.swp
/config/database.yml
/files/*
/log/*

View File

@ -1,7 +1,7 @@
class Forum < ActiveRecord::Base
include Redmine::SafeAttributes
has_many :topics, :class_name => 'Memo', :conditions => "#{Memo.table_name}.parent_id IS NULL", :order => "#{Memo.table_name}.created_at DESC", :dependent => :destroy
has_many :memos, :dependent => :destroy
has_many :memos, :dependent => :destroy, conditions: "parent_id IS NULL"
belongs_to :creator, :class_name => "User", :foreign_key => 'creator_id'
safe_attributes 'name',
'description',

View File

@ -1,6 +1,6 @@
<!-- added by fq -->
<!--display the board-->
<div class="borad-topic-count">共有 <%=link_to memos.count %> 个贴子</div>
<div class="borad-topic-count">共有 <%=link_to @forum.memos.count %> 个贴子</div>
<div style="padding-top: 10px">
<% if memos.any? %>
<% memos.each do |topic| %>

View File

@ -1,7 +1,7 @@
<!--add by huang-->
<div class="clearfix"></div>
<div id="footer" style="margin-left:-5px;padding-top: 50px;clear: both;font-size: 12px;">
<div style="border-top:solid 1px #C6E9F1;width:940px;margin-left:auto;margin-right:auto;margin-bottom: 5px;margin-top: -50px;"></div>
<div style="border-top:solid 1px #C6E9F1;width: auto;margin-top: 80px;"></div>
<div class="base_footer">
<div align="center">