summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-11 15:47:01 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-11 15:47:01 +0200
commit8e0b58d7e7cde0d9afb93f267197f62b9b649cd3 (patch)
tree7a1cb880a31803d22f1ee513c1a38fbafa47b42b
parentab19196391f6383cd11a9f2f748bc2a90287fcc4 (diff)
downloadgitlab-ce-8e0b58d7e7cde0d9afb93f267197f62b9b649cd3.tar.gz
render note with attachment for event
-rw-r--r--app/assets/stylesheets/sections/events.scss9
-rw-r--r--app/assets/stylesheets/sections/notes.scss1
-rw-r--r--app/views/events/event/_note.html.haml7
3 files changed, 17 insertions, 0 deletions
diff --git a/app/assets/stylesheets/sections/events.scss b/app/assets/stylesheets/sections/events.scss
index ff810147178..df8fd8d6458 100644
--- a/app/assets/stylesheets/sections/events.scss
+++ b/app/assets/stylesheets/sections/events.scss
@@ -52,6 +52,15 @@
padding-left: 5px;
display: inline-block;
color: #555;
+
+ .note-file-attach {
+ margin-left: -25px;
+ float: left;
+ .note-image-attach {
+ margin-left: 0px;
+ max-width: 200px;
+ }
+ }
}
.event-note-icon {
color: #777;
diff --git a/app/assets/stylesheets/sections/notes.scss b/app/assets/stylesheets/sections/notes.scss
index 648cb210e9c..1f92a3a835d 100644
--- a/app/assets/stylesheets/sections/notes.scss
+++ b/app/assets/stylesheets/sections/notes.scss
@@ -273,6 +273,7 @@ ul.notes {
}
+
.note-form-actions {
background: #F9F9F9;
height: 45px;
diff --git a/app/views/events/event/_note.html.haml b/app/views/events/event/_note.html.haml
index ef5035fca7f..ac380a9a5e3 100644
--- a/app/views/events/event/_note.html.haml
+++ b/app/views/events/event/_note.html.haml
@@ -24,3 +24,10 @@
%i.icon-comment-alt.event-note-icon
%span.event-note
= markdown truncate(event.target.note, length: 70)
+ - note = event.target
+ = link_to note.attachment.url, target: "_blank", class: 'note-file-attach' do
+ - if note.attachment.image?
+ = image_tag note.attachment.url, class: 'note-image-attach'
+ - else
+ %i.icon-paper-clip
+ = note.attachment_identifier