Dont show compare link if only one commit in push

This commit is contained in:
randx 2012-09-27 17:13:26 +03:00
parent e0d0c1b225
commit afecb250a4

View file

@ -18,9 +18,10 @@
- few_commits.each do |commit| - few_commits.each do |commit|
= render "events/commit", commit: commit, project: project = render "events/commit", commit: commit, project: project
%li.commits-stat - if event.commits_count > 1
- if event.commits_count > 2 %li.commits-stat
%span ... and #{event.commits_count - 2} more commits. - if event.commits_count > 2
= link_to project_compare_path(event.project, from: event.parent_commit.id, to: event.last_commit.id) do %span ... and #{event.commits_count - 2} more commits.
%strong Compare → #{event.parent_commit.id[0..7]}...#{event.last_commit.id[0..7]} = 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 .clearfix