From 7ef802127e4e05163315c6e4bc153a9437293898 Mon Sep 17 00:00:00 2001 From: Lukas Matt Date: Mon, 28 Apr 2014 09:15:43 -0400 Subject: [PATCH] Added confirm-dialog to report-delete-button * changed button description * replaced links with buttons --- app/assets/stylesheets/report.css.scss | 6 +++--- app/views/report/index.html.haml | 9 +++++++-- config/locales/diaspora/en.yml | 3 ++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/app/assets/stylesheets/report.css.scss b/app/assets/stylesheets/report.css.scss index 61816777a..2ee1789e7 100644 --- a/app/assets/stylesheets/report.css.scss +++ b/app/assets/stylesheets/report.css.scss @@ -1,10 +1,10 @@ #reports { padding-top: 2em; - span { - display: block; - } .content { float: left; + span { + display: block; + } } .options { float: right; diff --git a/app/views/report/index.html.haml b/app/views/report/index.html.haml index a45b048ca..b5026c643 100644 --- a/app/views/report/index.html.haml +++ b/app/views/report/index.html.haml @@ -16,7 +16,12 @@ = t('report.reason_label', text: r.text) %div.options %span - = link_to t('report.review_link'), report_path(r.id, :type => r.item_type), method: :put + = button_to t('report.review_link'), report_path(r.id, :type => r.item_type), + :class => "button", + method: :put %span - = link_to t('report.delete_link'), report_path(r.id, :type => r.item_type), method: :delete + = button_to t('report.delete_link'), report_path(r.id, :type => r.item_type), + :data => { :confirm => t('report.confirm_deletion') }, + :class => "button delete", + method: :delete %div.clear diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 3401ec951..5fc467451 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -892,7 +892,8 @@ en: reported_label: "Reported by %{person}" reason_label: "Reason: %{text}" review_link: "Mark as reviewed" - delete_link: "Delete post" + delete_link: "Delete item" + confirm_deletion: "Are you sure to delete the item?" status: marked: "The report was marked as reviewed" destroyed: "The post was destroyed"