summaryrefslogtreecommitdiff
path: root/app/views/events
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-30 15:34:16 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-30 15:34:16 +0200
commitb76659c5378fbcb61ecefa0db55830465e152d30 (patch)
treed1fea5291cd036e4133683c0e49483dde7679403 /app/views/events
parent16c71a3bab31ab909200fc319f04084e3931e04e (diff)
downloadgitlab-ce-b76659c5378fbcb61ecefa0db55830465e152d30.tar.gz
Re-use event cache with other users unless its personal
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/events')
-rw-r--r--app/views/events/_event.html.haml21
1 files changed, 11 insertions, 10 deletions
diff --git a/app/views/events/_event.html.haml b/app/views/events/_event.html.haml
index 02b1dec753c..b2e5d11279b 100644
--- a/app/views/events/_event.html.haml
+++ b/app/views/events/_event.html.haml
@@ -3,14 +3,15 @@
.event-item-timestamp
#{time_ago_with_tooltip(event.created_at)}
- = cache [event, current_user] do
- = image_tag avatar_icon(event.author_email, 24), class: "avatar s24", alt:''
-
- - if event.push?
- = render "events/event/push", event: event
- - elsif event.commented?
- = render "events/event/note", event: event
- - elsif event.created_project?
+ - if event.created_project?
+ = cache [event, current_user] do
= render "events/event/created_project", event: event
- - else
- = render "events/event/common", event: event \ No newline at end of file
+ - else
+ = cache event do
+ = image_tag avatar_icon(event.author_email, 24), class: "avatar s24", alt:''
+ - if event.push?
+ = render "events/event/push", event: event
+ - elsif event.commented?
+ = render "events/event/note", event: event
+ - else
+ = render "events/event/common", event: event