Commit 9174020f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix event image preview

parent b3b9b756
...@@ -68,12 +68,10 @@ ...@@ -68,12 +68,10 @@
margin: 0 20px; margin: 0 20px;
} }
.note-file-attach { .note-image-attach {
.note-image-attach { margin-top: 4px;
margin-top: 4px; margin-left: 0px;
margin-left: 0px; max-width: 200px;
max-width: 200px;
}
} }
} }
.event-note-icon { .event-note-icon {
......
...@@ -121,4 +121,8 @@ module EventsHelper ...@@ -121,4 +121,8 @@ module EventsHelper
end end
end end
end end
def event_note(text)
sanitize(markdown(truncate(text, length: 150)), tags: %w(a img b pre p))
end
end end
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
.event-note .event-note
.md .md
%i.icon-comment-alt.event-note-icon %i.icon-comment-alt.event-note-icon
= sanitize(markdown(truncate(event.target.note, length: 150)), tags: %w(a img b pre p)) = event_note(event.target.note)
- note = event.target - note = event.target
- if note.attachment.url - if note.attachment.url
- if note.attachment.image? - if note.attachment.image?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment