]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/note_helper.rb
Merge remote-tracking branch 'upstream/pull/5643'
[rails.git] / app / helpers / note_helper.rb
index 2e9850aef060f2b6549de5cdecac599d95fbdd9a..0ba5032288b7c7b7ebb9803a00fc230506372775 100644 (file)
@@ -1,6 +1,14 @@
 module NoteHelper
   include ActionView::Helpers::TranslationHelper
 
+  def note_description(author, description)
+    if !author.nil? && author.status == "deleted"
+      RichText.new("text", t("notes.show.description_when_author_is_deleted"))
+    else
+      description
+    end
+  end
+
   def note_event(event, at, by)
     if by.nil?
       t("notes.show.event_#{event}_by_anonymous_html",