gitlabhq/app/views/commits/compare.html.haml

50 lines
1,021 B
Plaintext
Raw Normal View History

2012-02-06 21:32:04 +01:00
= render "head"
%h3
2012-02-06 21:32:04 +01:00
Compare View
%hr
%div
%p
Fill input field with commit id like
2012-02-06 21:32:04 +01:00
%code '4eedf23'
or branch/tag name like
%code master
2012-02-06 21:32:04 +01:00
& press compare button for commits list, code diff.
%br
= form_tag compare_project_commits_path(@project), method: :get do
2012-02-06 21:32:04 +01:00
.clearfix
= text_field_tag :from, params[:from], placeholder: "master", class: "xlarge"
2012-02-06 21:32:04 +01:00
= "..."
= text_field_tag :to, params[:to], placeholder: "aa8b4ef", class: "xlarge"
2012-02-06 21:32:04 +01:00
.actions
= submit_tag "Compare", class: "btn btn-primary"
2012-02-06 21:32:04 +01:00
- unless @commits.empty?
%div.ui-box
%h5.small Commits (#{@commits.count})
%ul.unstyled= render @commits
2012-02-06 21:32:04 +01:00
- unless @diffs.empty?
%h4 Diff
= render "commits/diffs", diffs: @diffs
2012-02-06 21:32:04 +01:00
:javascript
$(function() {
var availableTags = #{@project.heads.map(&:name).to_json};
$("#from").autocomplete({
2012-02-06 21:32:04 +01:00
source: availableTags,
minLength: 1
});
$("#to").autocomplete({
2012-02-06 21:32:04 +01:00
source: availableTags,
minLength: 1
});
});