From a9288cc3bd998d7c179b080f56eccd6a56f59133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20FRERE?= Date: Thu, 24 Oct 2013 12:41:20 +0200 Subject: Adds a button to delete the displayed translation of a blog post --- app/views/refinery/blog/admin/posts/_form.html.erb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'app/views') 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') %> -- cgit v1.2.3