diff options
author | Philip Arndt <git@arndt.io> | 2014-12-04 09:04:29 -0800 |
---|---|---|
committer | Philip Arndt <git@arndt.io> | 2014-12-04 13:44:21 -0800 |
commit | f5118848fc971ed9fcd8f501def89f4db65875cd (patch) | |
tree | 4e70055e86b76f8b8f4fad0bd8038d82b095f724 /app | |
parent | 494e38d2f14cd3549d10bafd382d1ab71e5266d1 (diff) | |
download | refinerycms-blog-f5118848fc971ed9fcd8f501def89f4db65875cd.tar.gz refinerycms-blog-f5118848fc971ed9fcd8f501def89f4db65875cd.tar.bz2 refinerycms-blog-f5118848fc971ed9fcd8f501def89f4db65875cd.zip |
Upgrade translation picker API.
Diffstat (limited to 'app')
-rw-r--r-- | app/views/refinery/blog/admin/posts/_post.html.erb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/app/views/refinery/blog/admin/posts/_post.html.erb b/app/views/refinery/blog/admin/posts/_post.html.erb index eb9cc9d..6457c7b 100644 --- a/app/views/refinery/blog/admin/posts/_post.html.erb +++ b/app/views/refinery/blog/admin/posts/_post.html.erb @@ -2,12 +2,14 @@ <span class='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 %> + <% post.translations.reject {|t| t.title.blank? }.each do |translation| %> + <%= link_to refinery.edit_blog_admin_post_path(post, :switch_locale => translation.locale), + :class => 'locale' do %> + <div class="locale_icon <%= translation.locale %>"> + <%= refinery_icon_tag('locale-blue.svg', :size => '24x24') %> + <span class="code"><%= translation.locale.upcase %></span> + </div> + <% end %> <% end %> <%= post.published_at.try(:strftime, '%b %d, %Y') || 'draft' %> |