diff options
author | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2012-10-01 17:58:13 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2012-10-01 17:58:13 +0400 |
commit | 69751aac32f505a87a40af638dbf14f69f85315e (patch) | |
tree | 347cff712fd0781cf1813f72b8ccc6c3af921a72 /app/helpers/events_helper.rb | |
parent | 663dd6fad6e0a992f7ba1ccff4e58de84463abe6 (diff) |
Refactoring event views
Diffstat (limited to 'app/helpers/events_helper.rb')
-rw-r--r-- | app/helpers/events_helper.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb index 9ad438dcc0f..2c466aba4f2 100644 --- a/app/helpers/events_helper.rb +++ b/app/helpers/events_helper.rb @@ -19,4 +19,18 @@ module EventsHelper [event.action_name, target].join(" ") end + + def event_image event + event_image_path = if event.push? + "event_push.png" + elsif event.merged? + "event_mr_merged.png" + end + + return nil unless event_image_path + + content_tag :div, class: 'event_icon' do + image_tag event_image_path + end + end end |