Created
March 4, 2012 11:48
-
-
Save elpeo/1972632 to your computer and use it in GitHub Desktop.
search_control for section link
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: ja/search_control.rb | |
=================================================================== | |
--- ja/search_control.rb (リビジョン 3712) | |
+++ ja/search_control.rb (作業コピー) | |
@@ -61,6 +61,7 @@ | |
Search_control_categories = [ | |
[ '最新', 'latest' ], | |
[ '一日分', 'day' ], | |
+ [ 'セクション', 'section' ], | |
[ '一月分', 'month' ], | |
[ '長年', 'nyear' ], | |
[ 'カテゴリー', 'category' ] | |
Index: search_control.rb | |
=================================================================== | |
--- search_control.rb (リビジョン 3712) | |
+++ search_control.rb (作業コピー) | |
@@ -38,6 +38,7 @@ | |
{ # agent: generic | |
'latest' => 'f', | |
'day' => 't', | |
+ 'section' => 'f', | |
'month' => 'f', | |
'nyear' => 'f', | |
'category' => 'f', | |
@@ -45,6 +46,7 @@ | |
{ # agent: 'Comaneci_bot' | |
'latest' => 't', | |
'day' => 'f', | |
+ 'section' => 'f', | |
'month' => 'f', | |
'nyear' => 'f', | |
'category' => 'f', | |
@@ -203,7 +205,9 @@ | |
# view | |
view = '' | |
follow = 'follow' | |
- if /^(latest|day|month|nyear)$/ =~ @mode then | |
+ if section_mode? then | |
+ view = 'section' | |
+ elsif /^(latest|day|month|nyear)$/ =~ @mode then | |
view = @mode | |
elsif /^category/ =~ @mode then | |
view = 'category' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment