From 51a8c24cfeccf772cdb293bc7fac05c33b1a6d1b Mon Sep 17 00:00:00 2001 From: kidhab Date: Mon, 18 Sep 2023 16:49:08 +0200 Subject: [PATCH] Remove feedback form --- app/controllers/feedback_controller.rb | 12 ------------ app/mailers/mailer.rb | 14 -------------- app/views/feedback/new.html.haml | 9 --------- app/views/layouts/application.html.haml | 1 - app/views/mailer/feedback.text.haml | 3 --- config/app_config.yml.SAMPLE | 2 -- config/locales/de.yml | 14 -------------- config/locales/en.yml | 14 -------------- config/locales/es.yml | 14 -------------- config/locales/fr.yml | 14 -------------- config/locales/nl.yml | 14 -------------- config/locales/tr.yml | 14 -------------- config/routes.rb | 4 ---- 13 files changed, 129 deletions(-) delete mode 100644 app/controllers/feedback_controller.rb delete mode 100644 app/views/feedback/new.html.haml delete mode 100644 app/views/mailer/feedback.text.haml diff --git a/app/controllers/feedback_controller.rb b/app/controllers/feedback_controller.rb deleted file mode 100644 index b4e5ea7e4..000000000 --- a/app/controllers/feedback_controller.rb +++ /dev/null @@ -1,12 +0,0 @@ -class FeedbackController < ApplicationController - def new; end - - def create - if params[:message].present? - Mailer.feedback(current_user, params[:message]).deliver_now - redirect_to root_url, notice: t('.notice') - else - render action: 'new' - end - end -end diff --git a/app/mailers/mailer.rb b/app/mailers/mailer.rb index 90c8a062c..c6eb0e3a8 100644 --- a/app/mailers/mailer.rb +++ b/app/mailers/mailer.rb @@ -99,15 +99,6 @@ def negative_balance(user, transaction) subject: I18n.t('mailer.negative_balance.subject') end - def feedback(user, feedback) - @user = user - @feedback = feedback - - mail to: feedback_recipients, - from: user, - subject: I18n.t('mailer.feedback.subject') - end - def not_enough_users_assigned(task, user) @task = task @user = user @@ -179,9 +170,4 @@ def format_address(email, name) address.display_name = name address.format end - - # use the (new) feedback_recipients option, but fallback to error_recipients for backwards compatibility - def feedback_recipients - FoodsoftConfig[:notification][:feedback_recipients] || FoodsoftConfig[:notification][:error_recipients] - end end diff --git a/app/views/feedback/new.html.haml b/app/views/feedback/new.html.haml deleted file mode 100644 index d2320550a..000000000 --- a/app/views/feedback/new.html.haml +++ /dev/null @@ -1,9 +0,0 @@ -- title t('.title') - -%p= t('.first_paragraph') -%p= t('.second_paragraph') - -= form_tag feedback_path do - = text_area_tag :message, nil, class: 'input-xxlarge', rows: 10, required: 'required' - .form-actions - = submit_tag t('.send'), class: 'btn btn-primary' \ No newline at end of file diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index c1b1cf009..e7f1be916 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -16,7 +16,6 @@ = link_to FoodsoftConfig[:name], FoodsoftConfig[:homepage], target: '_blank' - if FoodsoftConfig[:help_url] %li= link_to t('.help'), FoodsoftConfig[:help_url], target: '_blank' - %li= link_to t('.feedback.title'), new_feedback_path, title: t('.feedback.desc') .clearfix .navbar diff --git a/app/views/mailer/feedback.text.haml b/app/views/mailer/feedback.text.haml deleted file mode 100644 index 67bdfd0c3..000000000 --- a/app/views/mailer/feedback.text.haml +++ /dev/null @@ -1,3 +0,0 @@ -= raw t '.header', user: show_user(@user), date: I18n.l(Time.now, :format => :short) -\ -= raw @feedback diff --git a/config/app_config.yml.SAMPLE b/config/app_config.yml.SAMPLE index b43b79354..bcebd6528 100644 --- a/config/app_config.yml.SAMPLE +++ b/config/app_config.yml.SAMPLE @@ -143,8 +143,6 @@ default: &defaults notification: error_recipients: - admin@foodcoop.test - feedback_recipients: - - support@foodcoop.test sender_address: "\"Foodsoft Error\" " email_prefix: "[Foodsoft]" diff --git a/config/locales/de.yml b/config/locales/de.yml index 6a957ec25..78932978a 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -779,14 +779,6 @@ de: not_found: text: Diese Seite existiert anscheinend nicht. Entschuldigung! title: Seite nicht gefunden - feedback: - create: - notice: Das Feedback wurde erfolgreich verschickt. Vielen Dank! - new: - first_paragraph: Fehler gefunden? Vorschlag? Idee? Kritik? Wir freuen uns über jegliches Feedback. - second_paragraph: Bitte beachte, dass das Foodsoft Team nur die Software wartet. Bei Fragen zur Organisation in Deiner Foodcoop, kontaktiere besser die entsprechenden Ansprechpartner. - send: Absenden - title: Gib Feedback finance: balancing: close: @@ -1232,9 +1224,6 @@ de: footer: revision: Revision %{revision} header: - feedback: - desc: Fehler gefunden? Vorschlag? Idee? Kritik? - title: Feedback help: Hilfe logout: Abmelden ordergroup: Meine Bestellgruppe @@ -1269,9 +1258,6 @@ de: title: Neues Passwort mailer: dateformat: "%d. %b" - feedback: - header: "%{user} schrieb am %{date}:" - subject: Feedback zur Foodsoft from_via_foodsoft: "%{name} via Foodsoft" invite: subject: Einladung in die Foodcoop diff --git a/config/locales/en.yml b/config/locales/en.yml index b4f41c5cd..bf00fed22 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -779,14 +779,6 @@ en: not_found: text: This page does not appear to exist, sorry! title: Page not found - feedback: - create: - notice: Your feedback was sent successfully. Thanks a lot! - new: - first_paragraph: Found a bug? Suggestions? Ideas? Reviews? We are happy to hear any feedback. - second_paragraph: Please be aware that the Foodsoft Team is only responsible for the maintenance of the software. For questions regarding the organisation of your Foodcoop, please contact the appropriate contact person. - send: Send - title: Give feedback finance: balancing: close: @@ -1232,9 +1224,6 @@ en: footer: revision: revision %{revision} header: - feedback: - desc: Found a bug? Suggestions? Ideas? Review? - title: Feedback help: Help logout: Logout ordergroup: My ordergroup @@ -1269,9 +1258,6 @@ en: title: New password mailer: dateformat: "%d %b" - feedback: - header: "%{user} wrote at %{date}:" - subject: Feedback for Foodsoft from_via_foodsoft: "%{name} via Foodsoft" invite: subject: Invitation to the Foodcoop diff --git a/config/locales/es.yml b/config/locales/es.yml index d722a872b..15b78f4b6 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -779,14 +779,6 @@ es: not_found: text: Esta página parece no existir. ¡Lo sentimos! title: Página no encontrada - feedback: - create: - notice: Tus comentarios fueron enviados con éxito. ¡Muchas gracias! - new: - first_paragraph: '¿Encontraste un error? ¿Tienes sugerencias, ideas o comentarios? Nos gustaría recibir tus comentarios.' - second_paragraph: Tenga en cuenta que el equipo de Foodsoft es el único responsable del mantenimiento del software. Para preguntas relacionadas con la organización de tu Foodcoop, por favor contacta a la persona de contacto apropiada. - send: Enviar - title: Enviar comentarios finance: balancing: close: @@ -1232,9 +1224,6 @@ es: footer: revision: revisión %{revision} header: - feedback: - desc: '¿Encontrase algún error? ¿Sugerencias? ¿Ideas?' - title: Sugerencias help: Ayuda logout: Salir ordergroup: Mis grupos de pedido @@ -1269,9 +1258,6 @@ es: title: Nueva contraseña mailer: dateformat: "%d %b" - feedback: - header: "%{user} escribió %{date}:" - subject: Comentarios para Foodsoft from_via_foodsoft: "%{name} vía Foodsoft" invite: subject: Invitación al Foodcoop diff --git a/config/locales/fr.yml b/config/locales/fr.yml index dd79dab38..a49d70c38 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -493,14 +493,6 @@ fr: general: Un problème a été rencontré. general_again: Une erreur s'est produite. Merci de réessayer. general_msg: 'Une erreur s''est produite: %{msg}' - feedback: - create: - notice: Ton commentaire a été transmis avec succès. Merci - new: - first_paragraph: Tu as trouvé une erreur? Tu as une proposition, une idée, une critique? Envoie un commentaire! - second_paragraph: "Petite remarque: l'équipe de Foodsoft s'occupe seulement de la maintenance du logiciel.\nPour les questions concernants l'organisation de ta boufcoop, il faut contacter les personnes concernées." - send: Transmettre - title: Laisser un commentaire finance: balancing: close: @@ -841,9 +833,6 @@ fr: footer: revision: révision %{revision} header: - feedback: - desc: Tu as trouvé une erreur? Tu as des propositions, des idées, des critiques? - title: Retours help: Aide logout: Déconnexion ordergroup: Ta cellule @@ -876,9 +865,6 @@ fr: submit: Sauvegarder le nouveau mot de passe title: Nouveau mot de passe mailer: - feedback: - header: "Le %{date}, %{user} a écrit:" - subject: Feedback pour Foodsoft invite: subject: Invitation à participer à une Bouffecoop text: | diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 1faaea628..7a6ee0607 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -779,14 +779,6 @@ nl: not_found: text: Deze pagina bestaat niet, sorry! title: Pagina niet gevonden - feedback: - create: - notice: Bericht verstuurd. Vriendelijk bedankt! - new: - first_paragraph: Probleem gevonden? Voorstel? Idee? Verbeterpunt? We horen graag je feedback. - second_paragraph: Dit bericht wordt verstuurd naar de ontwikkelaars van de bestelsoftware. Voor vragen over de organisatie van je foodcoop kun je je tot de lokale organisatie wenden. - send: Verzenden - title: Feedback geven finance: balancing: close: @@ -1232,9 +1224,6 @@ nl: footer: revision: revisie %{revision} header: - feedback: - desc: Foutje gevonden? Suggesties? Ideeën? Commentaar? - title: Feedback help: Help logout: Uitloggen ordergroup: Mijn huishouden @@ -1269,9 +1258,6 @@ nl: title: Nieuw wachtwoord mailer: dateformat: "%d %b" - feedback: - header: "%{user} schreef op %{date}:" - subject: Feedback van %{email} from_via_foodsoft: "%{name} via Foodsoft" invite: subject: Uitnodiging voor de foodcoop diff --git a/config/locales/tr.yml b/config/locales/tr.yml index 76408463f..e8a7b94c9 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -778,14 +778,6 @@ tr: not_found: text: Bu sayfa mevcut değil, üzgünüz! title: Sayfa bulunamadı - feedback: - create: - notice: Geri bildiriminiz başarıyla gönderildi. Teşekkür ederiz! - new: - first_paragraph: Bir hata buldunuz mu? Önerileriniz mi var? Fikirleriniz mi? Geri bildirimlerinizi duymaktan mutluluk duyarız. - second_paragraph: Lütfen unutmayın, Foodsoft ekibi yalnızca yazılımın bakımından sorumludur. Foodcoop'unuzun organizasyonuyla ilgili sorularınız için uygun kişiye başvurmanız gerekmektedir. - send: Gönder - title: Geri Bildirim Ver finance: balancing: close: @@ -1230,9 +1222,6 @@ tr: footer: revision: revizyon %{revision} header: - feedback: - desc: Bir hata mı buldunuz? Öneriler? Fikirler? İnceleme? - title: Geri bildirim help: Yardım logout: Çıkış yap ordergroup: Benim sipariş grubum @@ -1267,9 +1256,6 @@ tr: title: Yeni şifre mailer: dateformat: "%d %b" - feedback: - header: "%{user} tarafından %{date} tarihinde yazıldı:" - subject: Foodsoft için geri bildirim from_via_foodsoft: "%{name} Foodsoft aracılığıyla" invite: subject: Foodcoop Davetiyesi diff --git a/config/routes.rb b/config/routes.rb index 8fea34b01..cd7903a20 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -288,10 +288,6 @@ end end - ############## Feedback - - resource :feedback, only: %i[new create], controller: 'feedback' - ############## The rest resources :users, only: [:index]