diff options
author | randx <dmitriy.zaporozhets@gmail.com> | 2012-09-27 18:13:26 +0400 |
---|---|---|
committer | randx <dmitriy.zaporozhets@gmail.com> | 2012-09-27 18:13:26 +0400 |
commit | afecb250a42222aa3ac9b373897582da27e2e49e (patch) | |
tree | 604bbe62ce376728ebf3486a10fcf9352ec6a797 /app/views/events | |
parent | e0d0c1b225e6d693b7a43b09b74f97dd70444433 (diff) |
Dont show compare link if only one commit in push
Diffstat (limited to 'app/views/events')
-rw-r--r-- | app/views/events/_event_push.html.haml | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/views/events/_event_push.html.haml b/app/views/events/_event_push.html.haml index 9b7f10d9dd2..b5273b5423a 100644 --- a/app/views/events/_event_push.html.haml +++ b/app/views/events/_event_push.html.haml @@ -18,9 +18,10 @@ - few_commits.each do |commit| = render "events/commit", commit: commit, project: project - %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]} + - if event.commits_count > 1 + %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]} .clearfix |