Commit afecb250a42222aa3ac9b373897582da27e2e49e

Authored by randx
1 parent e0d0c1b2

Dont show compare link if only one commit in push

Showing 1 changed file with 6 additions and 5 deletions   Show diff stats
app/views/events/_event_push.html.haml
... ... @@ -18,9 +18,10 @@
18 18 - few_commits.each do |commit|
19 19 = render "events/commit", commit: commit, project: project
20 20  
21   - %li.commits-stat
22   - - if event.commits_count > 2
23   - %span ... and #{event.commits_count - 2} more commits.
24   - = link_to project_compare_path(event.project, from: event.parent_commit.id, to: event.last_commit.id) do
25   - %strong Compare → #{event.parent_commit.id[0..7]}...#{event.last_commit.id[0..7]}
  21 + - if event.commits_count > 1
  22 + %li.commits-stat
  23 + - if event.commits_count > 2
  24 + %span ... and #{event.commits_count - 2} more commits.
  25 + = link_to project_compare_path(event.project, from: event.parent_commit.id, to: event.last_commit.id) do
  26 + %strong Compare → #{event.parent_commit.id[0..7]}...#{event.last_commit.id[0..7]}
26 27 .clearfix
... ...