aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin/blog/posts/_form.html.erb2
-rw-r--r--app/views/blog/shared/_categories.html.erb2
-rw-r--r--app/views/blog/shared/_post.html.erb44
3 files changed, 26 insertions, 22 deletions
diff --git a/app/views/admin/blog/posts/_form.html.erb b/app/views/admin/blog/posts/_form.html.erb
index bf964e9..941dd03 100644
--- a/app/views/admin/blog/posts/_form.html.erb
+++ b/app/views/admin/blog/posts/_form.html.erb
@@ -44,6 +44,8 @@
</li>
<% end %>
</ul>
+ <h3><%= t('admin.blog.posts.form.published_at') %></h3>
+ <%= f.datetime_select :published_at %>
</div>
<div class='hemisquare right_side'>
</div>
diff --git a/app/views/blog/shared/_categories.html.erb b/app/views/blog/shared/_categories.html.erb
index fa26ceb..305e731 100644
--- a/app/views/blog/shared/_categories.html.erb
+++ b/app/views/blog/shared/_categories.html.erb
@@ -2,7 +2,7 @@
<ul id='categories'>
<% @blog_categories.each do |category| %>
<li<%= " class='selected'" if @category.present? and @category.id == category.id %>>
- <%= link_to "#{category.title} (#{category.posts.count})", blog_category_url(category) %>
+ <%= link_to "#{category.title} (#{category.post_count})", blog_category_url(category) %>
</li>
<% end %>
</ul> \ No newline at end of file
diff --git a/app/views/blog/shared/_post.html.erb b/app/views/blog/shared/_post.html.erb
index 26f5fbf..46fc23b 100644
--- a/app/views/blog/shared/_post.html.erb
+++ b/app/views/blog/shared/_post.html.erb
@@ -1,22 +1,24 @@
-<li>
- <h2><%= link_to post.title, blog_post_url(post) %></h2>
- <p class='posted_at'>
- <%= t('blog.shared.posts.created_at', :when => post.created_at.strftime('%d %B %Y')) %>
- </p>
- <div clas='clearfix'>
- <%= truncate(post.body,
- :length => RefinerySetting.find_or_set(:blog_post_teaser_length, 250),
- :preserve_html_tags => true) %>
- </div>
- <p>
- <%= link_to t('blog.shared.posts.read_more'), blog_post_url(post) %>
+<% if post.live? %>
+ <li>
+ <h2><%= link_to post.title, blog_post_url(post) %></h2>
+ <p class='posted_at'>
+ <%= t('blog.shared.posts.created_at', :when => post.published_at.strftime('%d %B %Y')) %>
+ </p>
+ <div clas='clearfix'>
+ <%= truncate(post.body,
+ :length => RefinerySetting.find_or_set(:blog_post_teaser_length, 250),
+ :preserve_html_tags => true) %>
+ </div>
+ <p>
+ <%= link_to t('blog.shared.posts.read_more'), blog_post_url(post) %>
- <span class='comment_count'>
- <% if post.comments.any? %>
- (<%= pluralize(post.comments.count, t('blog.shared.comments.singular')) %>)
- <% else %>
- (<%= t('blog.shared.comments.none') %>)
- <% end %>
- </span>
- </p>
-</li> \ No newline at end of file
+ <span class='comment_count'>
+ <% if post.comments.any? %>
+ (<%= pluralize(post.comments.count, t('blog.shared.comments.singular')) %>)
+ <% else %>
+ (<%= t('blog.shared.comments.none') %>)
+ <% end %>
+ </span>
+ </p>
+ </li>
+<% end %> \ No newline at end of file