Merge pull request #2315 from koenpunt/gh-issue-513
Added compare switch
This commit is contained in:
commit
40c6d87175
4 changed files with 15 additions and 2 deletions
BIN
app/assets/images/switch_icon.png
Normal file
BIN
app/assets/images/switch_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
|
@ -300,3 +300,12 @@
|
|||
color: #fff;
|
||||
font-family: $monospace;
|
||||
}
|
||||
|
||||
|
||||
.commits-compare-switch{
|
||||
background: url('switch_icon.png');
|
||||
width: 16px;
|
||||
height: 18px;
|
||||
text-indent: -9999px;
|
||||
display: inline-block;
|
||||
}
|
|
@ -13,12 +13,16 @@
|
|||
= text_field_tag :from, params[:from], placeholder: "master", class: "xlarge"
|
||||
= "..."
|
||||
= text_field_tag :to, params[:to], placeholder: "aa8b4ef", class: "xlarge"
|
||||
- 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
|
||||
.actions
|
||||
= submit_tag "Compare", class: "btn primary wide commits-compare-btn"
|
||||
|
||||
|
||||
|
||||
:javascript
|
||||
$(function() {
|
||||
var availableTags = #{@project.ref_names.to_json};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue