forked from hackorum-dev/hackorum
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_note.html.slim
More file actions
26 lines (23 loc) · 1.03 KB
/
_note.html.slim
File metadata and controls
26 lines (23 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
- author_name = display_name_for_user(note.author)
.note-card
.note-meta
.note-author = author_name
span.note-time = smart_time_display(note.updated_at || note.created_at)
- if note.last_editor && note.last_editor_id != note.author_id
span.note-edit-info = "edited by #{display_name_for_user(note.last_editor)}"
.note-body = simple_format(note.body)
- if note.note_tags.any?
.note-tags
- note.note_tags.each do |tag|
span.note-tag ##{tag.tag}
- if note.note_mentions.any?
.note-mentions
span.note-mentions-label Mentions:
- note.note_mentions.each do |mention|
span.note-mention = note_mention_label(mention)
- if current_user&.id == note.author_id
.note-actions-row
details.note-edit-toggle
summary Edit
= render "notes/form", note: note, topic: note.topic, message: note.message, submit_text: "Update note"
= button_to "Delete", note_path(note), method: :delete, class: "note-delete-button", form: { data: { turbo_confirm: "Delete this note?" } }