Skip to content

Commit d2dcd85

Browse files
committed
去掉边栏热门节点功能,没有价值;
1 parent 0d21d68 commit d2dcd85

File tree

6 files changed

+5
-21
lines changed

6 files changed

+5
-21
lines changed

Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ GEM
195195
json (1.8.0)
196196
jwt (0.1.8)
197197
multi_json (>= 1.5)
198-
kgio (2.7.4)
198+
kgio (2.8.1)
199199
launchy (2.1.0)
200200
addressable (~> 2.2.6)
201201
letter_opener (0.0.2)
@@ -286,7 +286,7 @@ GEM
286286
activesupport (= 4.0.0)
287287
rake (>= 0.8.7)
288288
thor (>= 0.18.1, < 2.0)
289-
raindrops (0.8.0)
289+
raindrops (0.12.0)
290290
rake (10.1.0)
291291
redcarpet (2.2.2)
292292
redis (3.0.2)
@@ -373,7 +373,7 @@ GEM
373373
uglifier (2.1.1)
374374
execjs (>= 0.3.0)
375375
multi_json (~> 1.0, >= 1.0.2)
376-
unicorn (4.2.1)
376+
unicorn (4.6.3)
377377
kgio (~> 2.6)
378378
rack
379379
raindrops (~> 0.7)

app/cells/topics_cell.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@ def sidebar_statistics
2121
render
2222
end
2323

24-
# 热门节点
25-
cache :sidebar_hot_nodes, :expires_in => 1.days
26-
def sidebar_hot_nodes
27-
@hot_nodes = Node.hots.limit(10)
28-
render
29-
end
30-
3124
# 置顶话题
3225
cache :sidebar_suggest_topics do |cell|
3326
CacheVersion.topic_last_suggested_at

app/views/topics/_sidebar_for_topic_index.html.erb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@
33
<%= render_cell :topics, :sidebar_suggest_topics %>
44
<%= render_cell :topics, :tips %>
55
<%= raw SiteConfig.topic_index_sidebar_html %>
6-
<%= render_cell :topics, :sidebar_hot_nodes %>
76
<%= render_cell :topics, :sidebar_statistics %>
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
<%= render "sidebar_box_node_new_topic" %>
2-
<%= raw SiteConfig.topic_index_sidebar_html %>
3-
<%= render_cell :topics, :sidebar_hot_nodes %>
2+
<%= raw SiteConfig.topic_index_sidebar_html %>
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
<%= render "sidebar_box_new_topic" %>
2-
<%= raw SiteConfig.topic_index_sidebar_html %>
3-
<%= render_cell :topics, :sidebar_hot_nodes %>
2+
<%= raw SiteConfig.topic_index_sidebar_html %>

spec/cells/topics_cell_spec.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@
2121
end
2222
end
2323

24-
describe "sidebar_hot_nodes" do
25-
it "should render sidebar hot nodes" do
26-
render_cell(:topics, :sidebar_hot_nodes).should have_css("div.hot_nodes li", :count => 1)
27-
end
28-
end
29-
3024
describe "sidebar_suggest_topics" do
3125
it "should render sidebar_suggest_topics" do
3226
render_cell(:topics, :sidebar_suggest_topics).should have_css("div.suggest_topics", :count => 1)

0 commit comments

Comments
 (0)