diff options
author | Koen Punt <koen@koenpunt.nl> | 2012-12-20 14:42:05 +0100 |
---|---|---|
committer | Koen Punt <koen@koenpunt.nl> | 2012-12-20 14:42:05 +0100 |
commit | d11f9a632c19b6579bc9d0a676208c38a357fb57 (patch) | |
tree | 92d85d155c13e961d7bbd68350efaa9afb47d5a2 | |
parent | 9916e8d6dc66b0a4f71bf88bae55d8077204b5f6 (diff) | |
download | gitlab-ce-d11f9a632c19b6579bc9d0a676208c38a357fb57.tar.gz |
only show switch if from and to are set
-rw-r--r-- | app/views/compare/_form.html.haml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/compare/_form.html.haml b/app/views/compare/_form.html.haml index 088b6ad9158..123c1c457f8 100644 --- a/app/views/compare/_form.html.haml +++ b/app/views/compare/_form.html.haml @@ -13,7 +13,8 @@ = text_field_tag :from, params[:from], placeholder: "master", class: "xlarge" = "..." = text_field_tag :to, params[:to], placeholder: "aa8b4ef", class: "xlarge" - = link_to 'switch', {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has_tooltip', title: 'Switch base of comparison'} + - if params[:to] && params[:from] + = link_to 'switch', {from: params[:to], to: params[:from]}, {class: 'commits-compare-switch has_tooltip', title: 'Switch base of comparison'} - if @refs_are_same .alert %span Refs are the same |