]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/note_helper.rb
Improves note's unit test with the latest dropping
[rails.git] / app / helpers / note_helper.rb
index 0ba5032288b7c7b7ebb9803a00fc230506372775..7a75a4ff53c22ea2b0da5816978e03bf8846ea1a 100644 (file)
@@ -1,9 +1,11 @@
 module NoteHelper
   include ActionView::Helpers::TranslationHelper
 
-  def note_description(author, description)
+  def note_description(author, description, first_comment)
     if !author.nil? && author.status == "deleted"
       RichText.new("text", t("notes.show.description_when_author_is_deleted"))
+    elsif first_comment&.event != "opened"
+      RichText.new("text", t("notes.show.description_when_there_is_no_opening_comment"))
     else
       description
     end