diff options
author | Jérémy FRERE <frere.jeremy@gmail.com> | 2013-10-24 12:41:20 +0200 |
---|---|---|
committer | Philip Arndt <git@p.arndt.io> | 2015-05-14 09:52:29 +1200 |
commit | a9288cc3bd998d7c179b080f56eccd6a56f59133 (patch) | |
tree | b4658ea330aab2f713151058b40cbbd1f2ac127a /app/views | |
parent | bb0d3b0da633053c0236bdbe5a9452ae9655fda7 (diff) | |
download | refinerycms-blog-a9288cc3bd998d7c179b080f56eccd6a56f59133.tar.gz refinerycms-blog-a9288cc3bd998d7c179b080f56eccd6a56f59133.tar.bz2 refinerycms-blog-a9288cc3bd998d7c179b080f56eccd6a56f59133.zip |
Adds a button to delete the displayed translation of a blog post
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/refinery/blog/admin/posts/_form.html.erb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/views/refinery/blog/admin/posts/_form.html.erb b/app/views/refinery/blog/admin/posts/_form.html.erb index 1d52c56..5cb061e 100644 --- a/app/views/refinery/blog/admin/posts/_form.html.erb +++ b/app/views/refinery/blog/admin/posts/_form.html.erb @@ -106,7 +106,14 @@ <%= render "/refinery/admin/form_actions", :f => f, :continue_editing => true, - :delete_title => t('delete', :scope => 'refinery.blog.admin.posts.post') %> + :delete_title => t('delete', :scope => 'refinery.blog.admin.posts.post'), + :before_delete_button => (link_to(t('delete_translation', :scope => 'refinery.blog.admin.posts.post'), + refinery.delete_translation_blog_admin_post_path(@post, :locale_to_delete => Globalize.locale), + :method => :post, + :data => { + :confirm => t('delete_translation_confirmation', :scope => 'refinery.blog.admin.posts.post') + }, + :class => "button confirm-delete") if Refinery::I18n.frontend_locales.many? && @post.translations.size > 1) %> <% end -%> <% content_for :stylesheets, stylesheet_link_tag('refinery/blog/backend') %> |