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