aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Sak <joe@joesak.com>2012-03-26 14:46:49 -0700
committerJoe Sak <joe@joesak.com>2012-03-26 14:46:49 -0700
commit2a00257420c2e9da28d8996136ae1b222c8a2b40 (patch)
tree0fa4ded6b1892748e866f59231df48d6fdb6a765
parentcb88d9508e9f2ca8fa9a1d0dd507228d4e15605e (diff)
parent0c78cd138d06997116bc4d6c54f721a6d28d39b7 (diff)
downloadrefinerycms-blog-2a00257420c2e9da28d8996136ae1b222c8a2b40.tar.gz
refinerycms-blog-2a00257420c2e9da28d8996136ae1b222c8a2b40.tar.bz2
refinerycms-blog-2a00257420c2e9da28d8996136ae1b222c8a2b40.zip
Merge pull request #211 from nicinabox/master
Add draft label
-rw-r--r--app/views/refinery/blog/admin/posts/_form.html.erb11
-rw-r--r--app/views/refinery/blog/admin/posts/_post.html.erb6
-rw-r--r--config/locales/en.yml1
3 files changed, 13 insertions, 5 deletions
diff --git a/app/views/refinery/blog/admin/posts/_form.html.erb b/app/views/refinery/blog/admin/posts/_form.html.erb
index 9bfd42a..a977754 100644
--- a/app/views/refinery/blog/admin/posts/_form.html.erb
+++ b/app/views/refinery/blog/admin/posts/_form.html.erb
@@ -9,6 +9,13 @@
<%= f.label :title -%>
<%= f.text_field :title, :class => 'larger widest' -%>
</div>
+
+ <div class="field">
+ <p>
+ <%= f.check_box :draft %>
+ <%= f.label :draft, t('.save_as_draft'), :class => "stripped" %>
+ </p>
+ </div>
<div class='field'>
<div id='page-tabs' class='clearfix ui-tabs ui-widget ui-widget-content ui-corner-all'>
@@ -50,10 +57,6 @@
:id => 'toggle_advanced_options',
:title => t('.toggle_advanced_options') %>
</p>
- <span id='draft_field'>
- <%= f.check_box :draft %>
- <%= f.label :draft, t('.save_as_draft'), :class => "stripped" %>
- </span>
</div>
<div id='more_options' style="display:none;">
<div class="hemisquare">
diff --git a/app/views/refinery/blog/admin/posts/_post.html.erb b/app/views/refinery/blog/admin/posts/_post.html.erb
index b5018f3..fea3eb8 100644
--- a/app/views/refinery/blog/admin/posts/_post.html.erb
+++ b/app/views/refinery/blog/admin/posts/_post.html.erb
@@ -2,8 +2,12 @@
<span class='title'>
<%= post.title %>
<span class="preview">
- <%= post.published_at.try(:strftime, '%b %d, %Y') || 'draft' %>
<%= " by #{post.author.username}" if post.author.present? %>
+ <% if post.draft? %>
+ <span class="label notice"><%= t('refinery.blog.admin.posts.post.draft') %></span>
+ <% else %>
+ <%= post.published_at.strftime('%b %d, %Y') %>
+ <% end %>
</span>
</span>
<span class='actions'>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index a3268c1..1d40e6d 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -57,6 +57,7 @@ en:
view_live_html: 'View this blog post live <br/><em>(opens in a new window)</em>'
edit: Edit this blog post
delete: Remove this blog post forever
+ draft: Draft
settings:
notification_recipients:
value: Send notifications to