1 contributor
<%
my $user = param('user');
my $project = param('project');
my $branch = param('rev1');
my $rev2_abs = param('rev2_abs');
my ($remote_user, $remote_project, $remote_branch) = split /\//, $rev2_abs, 3;
# Branches
my $git = app->git;
my $branches = $git->branches($user, $project);
my $branch_names = [map { $_->{name} } @$branches];
my $remote_branches = $git->branches($remote_user, $remote_project);
my $remote_branch_names = [map { $_->{name} } @$remote_branches];
%>
% layout 'common', title => "Pull $user/$project/$branch...$rev2_abs";
%= include 'include/header';
%= javascript begin
$('document').ready(function () {
// Scroll to right
$('#graph').scrollLeft(1000);
});
% end
<div class="container">
<h3>Pull</h3>
<form action="<%= url_for->query(op => 'pull') %>" method="post">
<div class="row" style="font-size:22px">
<div class="span5">
<div class="well" style="text-align:center">
<div style="color:blue;margin-bottom:15px">
%= "$user / $project";
</div>
% param(branch_select => $rev1);
%= select_field 'branch_select' => ['-' => '', @$branch_names];
<div>
% param(branch => $rev1);
%= text_field 'branch';
</div>
%= submit_button 'Pull', style => "width:100px", class => "btn", ;
<button class="btn" style="width:100px">Clear</button>
</div>
</div>
<div class="span2">
<div style="padding: 19px;text-align:center;font-size:26px">
⇐
</div>
</div>
<div class="span5">
<div class="well" style="text-align:center">
<div style="color:green;margin-bottom:15px">
%= "$remote_user / $remote_project";
</div>
% param(remote_branch => $remote_branch);
%= select_field 'remote_branch' => $remote_branch_names;
</div>
</div>
</div>
</form>
</div>
%= include '/include/footer';