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 /.project
/.idea /.idea
/.bundle /.bundle
*.swp
/config/database.yml /config/database.yml
/files/* /files/*
/log/* /log/*

View File

@ -1,7 +1,7 @@
class Forum < ActiveRecord::Base class Forum < ActiveRecord::Base
include Redmine::SafeAttributes 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 :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' belongs_to :creator, :class_name => "User", :foreign_key => 'creator_id'
safe_attributes 'name', safe_attributes 'name',
'description', 'description',

View File

@ -1,6 +1,6 @@
<!-- added by fq --> <!-- added by fq -->
<!--display the board--> <!--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"> <div style="padding-top: 10px">
<% if memos.any? %> <% if memos.any? %>
<% memos.each do |topic| %> <% memos.each do |topic| %>

View File

@ -1,7 +1,7 @@
<!--add by huang--> <!--add by huang-->
<div class="clearfix"></div> <div class="clearfix"></div>
<div id="footer" style="margin-left:-5px;padding-top: 50px;clear: both;font-size: 12px;"> <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 class="base_footer">
<div align="center"> <div align="center">