2012-05-11 19:23:09 +01:00
|
|
|
|
- if can? :pull, @project
|
|
|
|
|
.r{:style => "display: block"}=link_to t("project_menu.pull_request"), '#', :class => 'button', :id => 'send_pull_request'
|
|
|
|
|
=form_for PullRequest.new, :url => new_project_pull_requests_path, :html => { :method => :post, :class => :form } do |f|
|
|
|
|
|
=hidden_field_tag :ref, @treeish
|
|
|
|
|
:javascript
|
|
|
|
|
$(function () {
|
|
|
|
|
$('#send_pull_request').click(function(){
|
|
|
|
|
$('#new_pull_request').submit();
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2012-04-10 15:15:15 +01:00
|
|
|
|
- if can? :fork, @project
|
2012-04-10 19:05:06 +01:00
|
|
|
|
.r#fork-and-edit= link_to t('layout.projects.fork_and_edit'), '#forkModal', :class => 'button', 'data-toggle' => 'modal'
|
|
|
|
|
#forkModal.modal{:style => 'display: none;'}
|
|
|
|
|
.modal-header
|
|
|
|
|
%a.close{"data-dismiss" => "modal"} ×
|
|
|
|
|
%h3=t 'layout.projects.fork_modal_header'
|
2012-05-02 10:18:07 +01:00
|
|
|
|
.modal-footer=render 'choose_fork', :owner => current_user
|
2012-04-10 19:05:06 +01:00
|
|
|
|
- Group.can_own_project(current_user).each do |group|
|
2012-05-02 10:18:07 +01:00
|
|
|
|
.modal-footer=render 'choose_fork', :owner => group
|
2012-04-10 15:15:15 +01:00
|
|
|
|
- if can? :create, @project.build_lists.new
|
|
|
|
|
.r{:style => "display: block"}= link_to t('layout.projects.new_build_list'), new_project_build_list_path(@project), :class => 'button'
|