| 145 | | return '' unless category_enable? |
| 146 | | module Category |
| 147 | | class Tagcloud_Info < Info |
| 148 | | def years |
| 149 | | now_year = Time.now.year |
| 150 | | now_month = Time.now.month |
| 151 | | r = Hash.new |
| 152 | | |
| 153 | | months = [ |
| 154 | | ['01'],['01','02'],['01','02','03'],['02','03','04'],['03','04','05'], |
| 155 | | ['04','05','06'],['05','06','07'],['06','07','08'],['07','08','09'], |
| 156 | | ['08','09','10'],['09','10','11'],['10','11','12'] |
| 157 | | ][now_month - 1] |
| 158 | | |
| 159 | | r[now_year.to_s] = months |
| 160 | | case now_month |
| 161 | | when 1 |
| 162 | | r["#{now_year - 1}"] = ['11','12'] |
| 163 | | when 2 |
| 164 | | r["#{now_year - 1}"] = ['12'] |
| | 145 | if category_enable? |
| | 146 | module Category |
| | 147 | class Tagcloud_Info < Info |
| | 148 | def years |
| | 149 | now_year = Time.now.year |
| | 150 | now_month = Time.now.month |
| | 151 | r = Hash.new |
| | 152 | |
| | 153 | months = [ |
| | 154 | ['01'],['01','02'],['01','02','03'],['02','03','04'],['03','04','05'], |
| | 155 | ['04','05','06'],['05','06','07'],['06','07','08'],['07','08','09'], |
| | 156 | ['08','09','10'],['09','10','11'],['10','11','12'] |
| | 157 | ][now_month - 1] |
| | 158 | |
| | 159 | r[now_year.to_s] = months |
| | 160 | case now_month |
| | 161 | when 1 |
| | 162 | r["#{now_year - 1}"] = ['11','12'] |
| | 163 | when 2 |
| | 164 | r["#{now_year - 1}"] = ['12'] |
| | 165 | end |
| | 166 | r |