Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Mod: 更新TODO

> Mod: 每页显示20条问题
> Mod: 显示问题的创建时间而不是最后更新时间
  • Loading branch information...
commit ec135579ff5868325a47d0ebff04cb42e9f2906a 1 parent f34dc40
nowa nowa authored
3  TODO
@@ -2,4 +2,5 @@
2 2 * 创建Log Model
3 3 * 答案显示投票人
4 4 * IE显示差异化
5   -* Fav icon以及Logo更换
  5 +* Fav icon以及Logo更换
  6 +* Ask的comments是否不要内嵌,因为要加入到timeline的话,内嵌可能有问题
2  app/controllers/asks_controller.rb
@@ -5,7 +5,7 @@ class AsksController < ApplicationController
5 5 before_filter :require_user_text, :only => [:update_topic,:spam, :mute, :unmute, :follow, :unfollow]
6 6
7 7 def index
8   - @per_page = 10
  8 + @per_page = 20
9 9 @asks = Ask.normal.recent.includes(:user,:last_answer,:last_answer_user,:topics).paginate(:page => params[:page], :per_page => @per_page)
10 10 set_seo_meta("最新提出的问题")
11 11 end
2  app/controllers/home_controller.rb
@@ -4,7 +4,7 @@ class HomeController < ApplicationController
4 4 before_filter :require_user
5 5
6 6 def index
7   - @per_page = 10
  7 + @per_page = 20
8 8 @asks = Ask.normal.includes(:user,:last_answer,:last_answer_user,:topics)
9 9 .exclude_ids(current_user.muted_ask_ids)
10 10 .desc(:answered_at,:id)
2  app/views/asks/show.html.erb
@@ -210,7 +210,7 @@
210 210 <% end %>
211 211 • <a class="spam<%= ' spamed' if spamed?(@ask) %>" onclick="return spamAsk(this,'<%= @ask.id %>');" title="问题被<%= Setting.ask_spam_max %>个网友评价为烂问题后,问题将会自动删除" href="#">烂问题</a>
212 212 <% if !@ask.spams_count.blank? %>(<span id="spams_count"><%= @ask.spams_count %></span>人认为)<% end %>
213   - • <span class="date"><%= l @ask.updated_at.getlocal, :format => :short %></span>
  213 + • <span class="date"><%= l @ask.created_at.getlocal, :format => :short %></span>
214 214 </div>
215 215 </div>
216 216

0 comments on commit ec13557

Please sign in to comment.
Something went wrong with that request. Please try again.