From 5be3c6e9b405bf03ad69226e8235e3d6618adbf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=A4fer?= Date: Wed, 15 Sep 2010 23:24:56 +0200 Subject: [PATCH] Add a button to delete notes, make it clear this deletes only the notes and doesn't revert changes to the issue. #1725 --- app/helpers/journals_helper.rb | 4 ++++ config/locales/de.yml | 2 ++ config/locales/en.yml | 2 ++ 3 files changed, 8 insertions(+) diff --git a/app/helpers/journals_helper.rb b/app/helpers/journals_helper.rb index c8d53f253be..d87ce1cc010 100644 --- a/app/helpers/journals_helper.rb +++ b/app/helpers/journals_helper.rb @@ -27,6 +27,10 @@ def render_notes(issue, journal, options={}) links << link_to_in_place_notes_editor(image_tag('edit.png'), "journal-#{journal.id}-notes", { :controller => 'journals', :action => 'edit', :id => journal }, :title => l(:button_edit)) if editable + links << link_to(image_tag('delete.png'), + {:controller => 'journals', :action => 'edit', :id => journal, :notes => ""}, + :method => :post, :confirm => (journal.details.empty? ? l(:text_are_you_sure) : l(:text_notes_destroy_confirmation)), + :title => l(:button_delete_notes)) if editable end content << content_tag('div', links.join(' '), :class => 'contextual') unless links.empty? content << textilizable(journal, :notes) diff --git a/config/locales/de.yml b/config/locales/de.yml index 5ec7073b3e6..266090d8967 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -799,6 +799,7 @@ de: button_check_all: Alles auswählen button_uncheck_all: Alles abwählen button_delete: Löschen + button_delete_notes: Kommentar löschen button_create: Anlegen button_create_and_continue: Anlegen + nächstes Ticket button_test: Testen @@ -904,6 +905,7 @@ de: text_own_membership_delete_confirmation: "Sie sind dabei, einige oder alle Ihre Berechtigungen zu entfernen. Es ist möglich, dass Sie danach das Projekt nicht mehr ansehen oder bearbeiten dürfen.\nSind Sie sicher, dass Sie dies tun möchten?" text_zoom_in: Zoom in text_zoom_out: Zoom out + text_notes_destroy_confirmation: "Es wird nur der Kommentar gelöscht und nicht die Änderung(en) am Ticket rückgängig gemacht.\nSind Sie sicher, dass Sie dies tun möchten?" default_role_manager: Manager default_role_developer: Entwickler diff --git a/config/locales/en.yml b/config/locales/en.yml index cc4e311857d..977911ac769 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -782,6 +782,7 @@ en: button_check_all: Check all button_uncheck_all: Uncheck all button_delete: Delete + button_delete_notes: Delete notes button_create: Create button_create_and_continue: Create and continue button_test: Test @@ -887,6 +888,7 @@ en: text_own_membership_delete_confirmation: "You are about to remove some or all of your permissions and may no longer be able to edit this project after that.\nAre you sure you want to continue?" text_zoom_in: Zoom in text_zoom_out: Zoom out + text_notes_destroy_confirmation: "This will only delete the notes and not revert changes to this issue.\nAre you sure you want to continue?" default_role_manager: Manager default_role_developer: Developer