rosa-build/app/views/projects/base/_branch_select.html.haml

15 lines
504 B
Plaintext

.lineForm.fork
= select_tag :branch, branch_selector_options(project), :id => 'branch_selector', :class => 'sel80'
%form{:action => '', :method => :get, :id => 'branch_changer', :'data-action' => "#{controller_name}"}
.fork
%p #{t('layout.projects.current_branch')}:
.both
:javascript
$(document).ready(function() {
$('select#branch_selector').live('change', function(e) {
$form = $('form#branch_changer');
$form.attr('action', $(this).val());
$form.submit();
});
});