Commit 8e0b58d7e7cde0d9afb93f267197f62b9b649cd3
1 parent
ab191963
Exists in
master
and in
4 other branches
render note with attachment for event
Showing
3 changed files
with
17 additions
and
0 deletions
Show diff stats
app/assets/stylesheets/sections/events.scss
... | ... | @@ -52,6 +52,15 @@ |
52 | 52 | padding-left: 5px; |
53 | 53 | display: inline-block; |
54 | 54 | color: #555; |
55 | + | |
56 | + .note-file-attach { | |
57 | + margin-left: -25px; | |
58 | + float: left; | |
59 | + .note-image-attach { | |
60 | + margin-left: 0px; | |
61 | + max-width: 200px; | |
62 | + } | |
63 | + } | |
55 | 64 | } |
56 | 65 | .event-note-icon { |
57 | 66 | color: #777; | ... | ... |
app/assets/stylesheets/sections/notes.scss
app/views/events/event/_note.html.haml
... | ... | @@ -24,3 +24,10 @@ |
24 | 24 | %i.icon-comment-alt.event-note-icon |
25 | 25 | %span.event-note |
26 | 26 | = markdown truncate(event.target.note, length: 70) |
27 | + - note = event.target | |
28 | + = link_to note.attachment.url, target: "_blank", class: 'note-file-attach' do | |
29 | + - if note.attachment.image? | |
30 | + = image_tag note.attachment.url, class: 'note-image-attach' | |
31 | + - else | |
32 | + %i.icon-paper-clip | |
33 | + = note.attachment_identifier | ... | ... |