sync
This commit is contained in:
Binary file not shown.
@@ -1,5 +1,6 @@
|
|||||||
class CommentsController < ApplicationController
|
class CommentsController < ApplicationController
|
||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
|
before_filter :member_only, :only => [:update, :create]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@posts = Post.commented_before(params[:before_date] || Time.now).limit(8)
|
@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>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<aside class="sidebar">
|
<aside id="sidebar">
|
||||||
<section id="search-box">
|
<section id="search-box">
|
||||||
<h1>Search</h1>
|
<h1>Search</h1>
|
||||||
<% form_tag(posts_path, :method => "get") do %>
|
<% form_tag(posts_path, :method => "get") do %>
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
</section>
|
</section>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
<section class="content">
|
<section id="content">
|
||||||
<h1>Posts</h1>
|
<h1>Posts</h1>
|
||||||
<%= @post_set.presenter.post_previews_html %>
|
<%= @post_set.presenter.post_previews_html %>
|
||||||
|
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ div#page aside#sidebar {
|
|||||||
width: 20%;
|
width: 20%;
|
||||||
float: left; }
|
float: left; }
|
||||||
div#page aside#sidebar > section {
|
div#page aside#sidebar > section {
|
||||||
margin-bottom: 2em; }
|
margin-bottom: 1em; }
|
||||||
div#page section#content {
|
div#page section#content {
|
||||||
width: 75%;
|
width: 75%;
|
||||||
float: left;
|
float: left;
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ div#page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
aside#sidebar > section {
|
aside#sidebar > section {
|
||||||
margin-bottom: 2em;
|
margin-bottom: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
section#content {
|
section#content {
|
||||||
|
|||||||
Reference in New Issue
Block a user