UX: Move previous alert link from top to bottom of topic body

UX: Move previous alert link from top to bottom of topic body
From 0f6821958724120e6e9273022b358e7a900ac8b1 Mon Sep 17 00:00:00 2001
From: Rishabh Nambiar <5862206+rishabhnambiar@users.noreply.github.com>
Date: Sun, 4 Nov 2018 20:16:16 +0530
Subject: [PATCH] UX: Move previous alert link from top to bottom of topic body


diff --git a/app/jobs/concerns/alert_post_mixin.rb b/app/jobs/concerns/alert_post_mixin.rb
index 970b2fc..0f80d9a 100644
--- a/app/jobs/concerns/alert_post_mixin.rb
+++ b/app/jobs/concerns/alert_post_mixin.rb
@@ -112,7 +112,7 @@ module AlertPostMixin
     created_at = Topic.where(id: topic_id).pluck(:created_at).first
     return "" unless created_at
 
-    "([Previous alert topic created.](#{Discourse.base_url}/t/#{topic_id}) #{local_date(created_at.to_s)})\n\n"
+    "[Previous alert](#{Discourse.base_url}/t/#{topic_id}) #{local_date(created_at.to_s)}\n\n"
   end
 
   def first_post_body(receiver:,
@@ -122,8 +122,8 @@ module AlertPostMixin
 
     output = ""
     output += "#{topic_body}\n\n"
-    output += "#{prev_topic_link(prev_topic_id)}\n\n" if prev_topic_id
-    output += "#{render_alerts(alert_history)}\n"
+    output += "#{render_alerts(alert_history)}\n\n"
+    output += "#{prev_topic_link(prev_topic_id)}\n" if prev_topic_id
   end
 
   def revise_topic(topic:, title:, raw:, datacenters:, firing: nil, high_priority: false)

GitHub