diff options
Diffstat (limited to 'app/views/refinery/blog/admin/posts/_post.html.erb')
-rw-r--r-- | app/views/refinery/blog/admin/posts/_post.html.erb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/app/views/refinery/blog/admin/posts/_post.html.erb b/app/views/refinery/blog/admin/posts/_post.html.erb index fea3eb8..781595a 100644 --- a/app/views/refinery/blog/admin/posts/_post.html.erb +++ b/app/views/refinery/blog/admin/posts/_post.html.erb @@ -1,7 +1,16 @@ <li class='clearfix record <%= cycle("on", "on-hover") %>' id="<%= dom_id(post) -%>"> <span class='title'> - <%= post.title %> + <%= post.title.presence || post.translations.detect {|t| t.title.present?}.title %> <span class="preview"> + <% post.translations.each do |translation| %> + <% if translation.title.present? %> + <%= link_to refinery_icon_tag("flags/#{translation.locale}.png", :size => '16x11'), + refinery.edit_blog_admin_post_path(post, :switch_locale => translation.locale), + :class => 'locale' %> + <% end %> + <% end %> + + <%= 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> |