From e0faf6843746464d85a0cfbfc071226c2d62148d Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 13 Dec 2017 16:19:58 +0000 Subject: [PATCH 1/1] Remove new issue notifications for now This can be re-implemented later. --- app/controllers/reports_controller.rb | 1 - app/models/notifier.rb | 11 ----------- app/views/notifier/new_issue_notification.html.erb | 5 ----- config/locales/en.yml | 5 ----- 4 files changed, 22 deletions(-) delete mode 100644 app/views/notifier/new_issue_notification.html.erb diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index 781c3af66..b5740d146 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -18,7 +18,6 @@ class ReportsController < ApplicationController if @report.save @report.issue.save # FIXME: reopen issue if necessary - # FIXME: new issue notification (or via model observer) redirect_to root_path, :notice => t("issues.create.successful_report") else redirect_to new_report_path(:reportable_type => @report.issue.reportable_type, :reportable_id => @report.issue.reportable_id), :notice => t("issues.create.provide_details") diff --git a/app/models/notifier.rb b/app/models/notifier.rb index 54eb9b418..8f9e3e295 100644 --- a/app/models/notifier.rb +++ b/app/models/notifier.rb @@ -189,17 +189,6 @@ class Notifier < ActionMailer::Base end end - def new_issue_notification(issue_id, recipient) - with_recipient_locale recipient do - @url = url_for(:host => SERVER_URL, - :controller => "issues", - :action => "show", - :id => issue_id) - subject = I18n.t("notifier.new_issue_notification.subject") - mail :to => recipient.email, :subject => subject - end - end - private def set_shared_template_vars diff --git a/app/views/notifier/new_issue_notification.html.erb b/app/views/notifier/new_issue_notification.html.erb deleted file mode 100644 index b38dca4b7..000000000 --- a/app/views/notifier/new_issue_notification.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -

<%= t("notifier.new_issue_notification.greeting") %>

- -

<%= t("notifier.new_issue_notification.new_issue") %>

- -

<%= link_to t("notifier.new_issue_notification.url"), @url %>

\ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index 7c127ffc7..f52cc4e69 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1388,11 +1388,6 @@ en: partial_changeset_without_comment: "without comment" details: "More details about the changeset can be found at %{url}." unsubscribe: 'To unsubscribe from updates to this changeset, visit %{url} and click "Unsubscribe".' - new_issue_notification: - subject: "[OpenStreetMap] New Issue" - greeting: "Hi," - new_issue: "A new issue has been created" - url: You can view the issue here message: inbox: title: "Inbox" -- 2.43.2