-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Trung Lê
committed
Aug 27, 2012
1 parent
5a045bd
commit c4d976b
Showing
9 changed files
with
65 additions
and
46 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<cite><%= author_link(comment) %></cite> says: | ||
<br> | ||
<br/> | ||
<small class="commentmetadata"><a href="#comment-<%= comment.id %>" title=""><%= format_comment_date(comment.created_at) %></a></small> | ||
<p><%=raw comment.body_html %></p> | ||
<p><%== comment.body_html %></p> |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<%=raw page.body_html %> | ||
<%== page.body_html %> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<% content_for(:page_title) do -%> | ||
<%= page_title(@page) -%> | ||
<%= page_title(@page) -%> | ||
<% end -%> | ||
<%= render :partial => 'pages/page', :locals => {:page => @page} %> | ||
<%= render @page %> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
<h2><%= link_to(post.title, post_path(post)) %></h2> | ||
<div class="entrybody"> | ||
<%=raw post.body_html %> | ||
<div class="entry-body"> | ||
<%== post.body_html %> | ||
</div> | ||
<div class="meta"> | ||
<ul> | ||
<li class="date">Posted on <%= format_post_date(post.published_at) %></li> | ||
<li class="comments"><%= link_to(pluralize(post.approved_comments.size, "comment"), post_path(post, :anchor => 'comments')) %></li> | ||
<li class="comments"><%= link_to pluralize(post.approved_comments.size, "comment"), post_path(post, :anchor => 'comments') %></li> | ||
<% unless post.tags.empty? -%> | ||
<li class="tags">Tagged <%= linked_tag_list(post.tags) %></li> | ||
<li class="tags">Tagged <%= linked_tag_list(post.tags) %></li> | ||
<% end -%> | ||
</ul> | ||
</div> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
<% content_for(:page_title) do %><%= posts_title(@tag) %><% end -%> | ||
<% content_for(:head) do %><%= auto_discovery_link_tag(:atom, @tag.nil? ? formatted_posts_path(:format => 'atom') : posts_path(:tag => @tag, :format => 'atom')) %><% end -%> | ||
<% content_for :page_title do -%> | ||
<%= posts_title(@tag) %> | ||
<% end -%> | ||
<% content_for :head do -%> | ||
<%= auto_discovery_link_tag(:atom, @tag.nil? ? formatted_posts_path(:format => 'atom') : posts_path(:tag => @tag, :format => 'atom')) %> | ||
<% end -%> | ||
<% if @posts.empty? -%> | ||
<p>There are no posts yet.</p> | ||
<% else -%> | ||
<% @posts.each do |post| -%> | ||
<div class="post post-<%= post.id %>"> | ||
<%= render :partial => 'post', :locals => {:post => post} %> | ||
<div class="post" id="<%= dom_id(post) %>"> | ||
<%= render post %> | ||
</div> | ||
<% end -%> | ||
<% if more_content? -%> | ||
<div class="related">Looking for more? Head on over to the <%= link_to("archives", archives_path) %>.</div> | ||
<div class="related">Looking for more? Head on over to the <%= link_to 'archives', archives_path %>.</div> | ||
<% end -%> | ||
<% end -%> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,42 @@ | ||
<% content_for(:page_title) do -%> | ||
<%= post_title(@post) -%> | ||
<% content_for :page_title do -%> | ||
<%= post_title @post -%> | ||
<% end -%> | ||
<%= render :partial => 'posts/post', :locals => {:post => @post} %> | ||
<%= render @post %> | ||
|
||
<ol class="commentlist"> | ||
<% @post.approved_comments.each do |comment| -%> | ||
<li<%=raw cycle(' class="alt"', '') %> id="comment-<%= comment.id %>"> | ||
<%= render :partial => 'comments/comment', :locals => {:comment => comment} %> | ||
</li> | ||
<li<%=raw cycle(' class="alt"', '') %> id="comment-<%= comment.id %>"> | ||
<%= render comment %> | ||
</li> | ||
<% end -%> | ||
</ol> | ||
<div class="related">Looking for more? Head on over to the <%= link_to("archives", archives_path) %>.</div> | ||
|
||
<div class="related">Looking for more? Head on over to the <%= link_to 'archives', archives_path %>.</div> | ||
|
||
<h2>Post a comment</h2> | ||
<% unless @comment.errors.empty? -%> | ||
<div class="errors"> | ||
<h3>Comment not added!</h3> | ||
<ul> | ||
<% @comment.errors.sort_by(&:first).each do |error| -%> | ||
<li><%= format_comment_error(error) %></li> | ||
<% end -%> | ||
</ul> | ||
</div> | ||
<% end -%> | ||
<%= form_for([@post, @comment]) do |form| -%> | ||
<div> | ||
<p><%= form.text_field 'author' %><label for="comment_author"><small>Name or <a href="http://openidexplained.com/">OpenID</a> (required)</small></label></p> | ||
<p><%= form.text_area 'body' %><br><small>(<a href="http://lesstile.rubyforge.org">lesstile enabled</a> - surround code blocks with ---)</small></p> | ||
<p><%= submit_tag "Add Comment" %></p> | ||
</div> | ||
<% unless @comment.errors.empty? -%> | ||
<div class="errors"> | ||
<h3>Comment not added!</h3> | ||
<ul> | ||
<% @comment.errors.sort_by(&:first).each do |error| -%> | ||
<li><%= format_comment_error(error) %></li> | ||
<% end -%> | ||
</ul> | ||
</div> | ||
<% end -%> | ||
|
||
<div> | ||
<%= form_for [@post, @comment] do |form| -%> | ||
<p> | ||
<%= form.text_field 'author' %> | ||
<%= form.label :author %> | ||
<small>Name or <%= link_to 'OpenID', 'http://openidexplained.com/' %> (required)</small> | ||
</p> | ||
<p> | ||
<%= form.text_area 'body' %><br/> | ||
<small>(<%= link_to 'lesstile enabled', 'http://lesstile.rubyforge.org' %> - surround code blocks with ---)</small> | ||
</p> | ||
<p><%= form.submit 'Add Comment' %></p> | ||
<% end -%> | ||
</div> |