gitlab-org--gitlab-foss/app/views/projects/issues/_new_branch.html.haml
Yorick Peterse 0426647069 Load the "New Branch" button asynchronously
This button depends on Issue#can_be_worked_on? which in turn depends on
Issue#related_branches. By rendering this button asynchronously we can
finally remove all usages of Issue#related_branches and
Issue#referenced_merge_requests from the issues "show" page.
2016-04-28 16:13:48 -04:00

13 lines
700 B
Text

- if can?(current_user, :push_code, @project)
.pull-right
#new-branch{'data-path' => can_create_branch_namespace_project_issue_path(@project.namespace, @project, @issue)}
= link_to namespace_project_branches_path(@project.namespace, @project, branch_name: @issue.to_branch_name, issue_iid: @issue.iid), method: :post, class: 'btn has-tooltip', title: @issue.to_branch_name, disabled: 'disabled' do
.checking
%i.fa.fa-spinner.fa-spin
Checking branches
.available(style="display: none")
%i.fa.fa-code-fork
New branch
.unavailable(style="display: none")
%i.fa.fa-exclamation-triangle
New branch unavailable