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

17 lines
488 B
Plaintext

.lineForm.fork
= form_tag '', :id => 'branch_changer', :'data-action' => controller_name do
= select_tag :branch, branch_selector_options(project),
:class => 'sel80', :id => 'branch_selector'
.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();
});
});