sync
This commit is contained in:
Binary file not shown.
@@ -1,5 +1,6 @@
|
||||
class CommentsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
before_filter :member_only, :only => [:update, :create]
|
||||
|
||||
def index
|
||||
@posts = Post.commented_before(params[:before_date] || Time.now).limit(8)
|
||||
|
||||
18
app/presenters/paginators/post_version.rb
Normal file
18
app/presenters/paginators/post_version.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
module Paginators
|
||||
class PostVersion < Base
|
||||
attr_accessor :post_set
|
||||
|
||||
def initialize(post_set)
|
||||
@post_set = post_set
|
||||
end
|
||||
|
||||
def numbered_pagination_html(template)
|
||||
raise NotImplementedError
|
||||
end
|
||||
|
||||
protected
|
||||
def sequential_link(template)
|
||||
template.post_versions_path(:before_time => post_set.posts[-1].last_commented_at, :page => nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -6,7 +6,7 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<aside class="sidebar">
|
||||
<aside id="sidebar">
|
||||
<section id="search-box">
|
||||
<h1>Search</h1>
|
||||
<% form_tag(posts_path, :method => "get") do %>
|
||||
@@ -69,7 +69,7 @@
|
||||
</section>
|
||||
</aside>
|
||||
|
||||
<section class="content">
|
||||
<section id="content">
|
||||
<h1>Posts</h1>
|
||||
<%= @post_set.presenter.post_previews_html %>
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ div#page aside#sidebar {
|
||||
width: 20%;
|
||||
float: left; }
|
||||
div#page aside#sidebar > section {
|
||||
margin-bottom: 2em; }
|
||||
margin-bottom: 1em; }
|
||||
div#page section#content {
|
||||
width: 75%;
|
||||
float: left;
|
||||
|
||||
@@ -173,7 +173,7 @@ div#page {
|
||||
}
|
||||
|
||||
aside#sidebar > section {
|
||||
margin-bottom: 2em;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
section#content {
|
||||
|
||||
Reference in New Issue
Block a user