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