From ca032b659bf83c342533f80139fbc8b31d265424 Mon Sep 17 00:00:00 2001 From: xianbo Date: Mon, 21 Apr 2014 20:21:36 +0800 Subject: [PATCH 01/15] fix --- .gitignore | 3 +- Gemfile.lock | 111 --------------------------------------------------- 2 files changed, 2 insertions(+), 112 deletions(-) delete mode 100644 Gemfile.lock diff --git a/.gitignore b/.gitignore index cf96fa998..6ba93364d 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,5 @@ /public/images/avatars/* /Gemfile /Gemfile.lock -/db/schema.da +/db/schema.rb + diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index d60847b17..000000000 --- a/Gemfile.lock +++ /dev/null @@ -1,111 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - actionmailer (3.2.13) - actionpack (= 3.2.13) - mail (~> 2.5.3) - actionpack (3.2.13) - activemodel (= 3.2.13) - activesupport (= 3.2.13) - builder (~> 3.0.0) - erubis (~> 2.7.0) - journey (~> 1.0.4) - rack (~> 1.4.5) - rack-cache (~> 1.2) - rack-test (~> 0.6.1) - sprockets (~> 2.2.1) - activemodel (3.2.13) - activesupport (= 3.2.13) - builder (~> 3.0.0) - activerecord (3.2.13) - activemodel (= 3.2.13) - activesupport (= 3.2.13) - arel (~> 3.0.2) - tzinfo (~> 0.3.29) - activeresource (3.2.13) - activemodel (= 3.2.13) - activesupport (= 3.2.13) - activesupport (3.2.13) - i18n (= 0.6.1) - multi_json (~> 1.0) - acts-as-taggable-on (2.4.1) - rails (>= 3, < 5) - arel (3.0.2) - builder (3.0.0) - coderay (1.0.9) - erubis (2.7.0) - fastercsv (1.5.0) - hike (1.2.3) - i18n (0.6.1) - journey (1.0.4) - jquery-rails (2.0.3) - railties (>= 3.1.0, < 5.0) - thor (~> 0.14) - json (1.8.0) - mail (2.5.4) - mime-types (~> 1.16) - treetop (~> 1.4.8) - mime-types (1.23) - multi_json (1.7.6) - mysql2 (0.3.11-x86-mingw32) - net-ldap (0.3.1) - polyglot (0.3.3) - rack (1.4.5) - rack-cache (1.2) - rack (>= 0.4) - rack-openid (1.3.1) - rack (>= 1.1.0) - ruby-openid (>= 2.1.8) - rack-ssl (1.3.3) - rack - rack-test (0.6.2) - rack (>= 1.0) - rails (3.2.13) - actionmailer (= 3.2.13) - actionpack (= 3.2.13) - activerecord (= 3.2.13) - activeresource (= 3.2.13) - activesupport (= 3.2.13) - bundler (~> 1.0) - railties (= 3.2.13) - railties (3.2.13) - actionpack (= 3.2.13) - activesupport (= 3.2.13) - rack-ssl (~> 1.3.2) - rake (>= 0.8.7) - rdoc (~> 3.4) - thor (>= 0.14.6, < 2.0) - rake (10.0.4) - rdoc (3.12.2) - json (~> 1.4) - ruby-openid (2.1.8) - sprockets (2.2.2) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - thor (0.18.1) - tilt (1.4.1) - treetop (1.4.14) - polyglot - polyglot (>= 0.3.1) - tzinfo (0.3.37) - -PLATFORMS - x86-mingw32 - -DEPENDENCIES - activerecord-jdbc-adapter (= 1.2.5) - activerecord-jdbcmysql-adapter - acts-as-taggable-on - builder (= 3.0.0) - coderay (~> 1.0.6) - fastercsv (~> 1.5.0) - i18n (~> 0.6.0) - jquery-rails (~> 2.0.2) - mysql2 (~> 0.3.11) - net-ldap (~> 0.3.1) - rack-openid - rails (= 3.2.13) - rdoc (>= 2.4.2) - ruby-openid (~> 2.1.4) From a191b634c508d224dd0c5417ea63fd105e6178af Mon Sep 17 00:00:00 2001 From: yan Date: Mon, 28 Apr 2014 20:37:12 +0800 Subject: [PATCH 02/15] forum memocount error, footer margin --- .gitignore | 2 +- app/models/forum.rb | 2 +- app/views/forums/_show_topics.html.erb | 2 +- app/views/layouts/_base_footer.html.erb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index dca762ab6..d53811d1e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ /.project /.idea /.bundle - +*.swp /config/database.yml /files/* /log/* diff --git a/app/models/forum.rb b/app/models/forum.rb index aa7f16cd3..e6b16df39 100644 --- a/app/models/forum.rb +++ b/app/models/forum.rb @@ -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', diff --git a/app/views/forums/_show_topics.html.erb b/app/views/forums/_show_topics.html.erb index 3e7d4947b..7f8017897 100644 --- a/app/views/forums/_show_topics.html.erb +++ b/app/views/forums/_show_topics.html.erb @@ -1,6 +1,6 @@ -
共有 <%=link_to memos.count %> 个贴子
+
共有 <%=link_to @forum.memos.count %> 个贴子
<% if memos.any? %> <% memos.each do |topic| %> diff --git a/app/views/layouts/_base_footer.html.erb b/app/views/layouts/_base_footer.html.erb index 0f2334656..5ef65ed72 100644 --- a/app/views/layouts/_base_footer.html.erb +++ b/app/views/layouts/_base_footer.html.erb @@ -1,7 +1,7 @@
+
    From c2284deaf72ad16d42d68922442bbd6e6139488d Mon Sep 17 00:00:00 2001 From: yanxd Date: Thu, 8 May 2014 18:40:10 +0800 Subject: [PATCH 15/15] =?UTF-8?q?application.css=20=E5=88=86=E9=A1=B5css?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/themes/redpenny-master/stylesheets/application.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/themes/redpenny-master/stylesheets/application.css b/public/themes/redpenny-master/stylesheets/application.css index 2c93cca06..c1aa1ff81 100644 --- a/public/themes/redpenny-master/stylesheets/application.css +++ b/public/themes/redpenny-master/stylesheets/application.css @@ -1467,7 +1467,7 @@ div.pagination span { div.pagination span.current-page { /*color: rgb(153, 153, 153); add by huang*/ - color:#e2f4ff; + /*color:#e2f4ff;*/ cursor: default; }