diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-04-05 19:47:12 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-04-05 19:47:12 +0300 |
commit | ff4471a3cd1d29228a67e582bc54bed952c0a8ee (patch) | |
tree | 7ba2bd2094936744d4f4f118a875a99941d20c8d /app/views/events | |
parent | c33d5e16fe5f5dde4f270adaf7fb6fe5b9552018 (diff) | |
download | gitlab-ce-ff4471a3cd1d29228a67e582bc54bed952c0a8ee.tar.gz |
Get rid of event decorator. Use event data hash instead commit objects to increase perfomance
Diffstat (limited to 'app/views/events')
-rw-r--r-- | app/views/events/_event_push.atom.haml | 10 | ||||
-rw-r--r-- | app/views/events/event/_push.html.haml | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/app/views/events/_event_push.atom.haml b/app/views/events/_event_push.atom.haml index d09e6e03f01..e44b366040f 100644 --- a/app/views/events/_event_push.atom.haml +++ b/app/views/events/_event_push.atom.haml @@ -1,12 +1,12 @@ -%div{:xmlns => "http://www.w3.org/1999/xhtml"} +%div{xmlns: "http://www.w3.org/1999/xhtml"} - event.commits.first(15).each do |commit| %p - %strong= commit.author_name - = link_to "(##{commit.short_id})", project_commit_path(event.project, :id => commit.id) + %strong= commit[:author][:name] + = link_to "(##{commit[:id][0...8]})", project_commit_path(event.project, id: commit[:id]) %i at - = commit.committed_date.strftime("%Y-%m-%d %H:%M:%S") - %blockquote= simple_format(escape_once(commit.safe_message)) + = commit[:timestamp].to_time.to_s(:short) + %blockquote= simple_format(escape_once(commit[:message])) - if event.commits_count > 15 %p %i diff --git a/app/views/events/event/_push.html.haml b/app/views/events/event/_push.html.haml index 119b8e828d0..f2b8dc4238c 100644 --- a/app/views/events/event/_push.html.haml +++ b/app/views/events/event/_push.html.haml @@ -21,5 +21,5 @@ %li.commits-stat - if event.commits_count > 2 %span ... and #{event.commits_count - 2} more commits. - = link_to project_compare_path(event.project, from: event.parent_commit.id, to: event.last_commit.id) do - %strong Compare → #{event.parent_commit.id[0..7]}...#{event.last_commit.id[0..7]} + = link_to project_compare_path(event.project, from: event.commit_from, to: event.commit_to) do + %strong Compare → #{event.commit_from[0..7]}...#{event.commit_to[0..7]} |