gitlab-org--gitlab-foss/app/views/projects/buttons/_dropdown.html.haml
2015-07-31 13:56:15 +02:00

32 lines
1.1 KiB
Text

- if current_user
%span.dropdown
%a.dropdown-toggle.btn.btn-new{href: '#', "data-toggle" => "dropdown"}
= icon('plus')
%ul.dropdown-menu
- if can?(current_user, :create_issue, @project)
%li
= link_to url_for_new_issue do
= icon('exclamation-circle fw')
New issue
- if can?(current_user, :create_merge_request, @project)
%li
= link_to new_namespace_project_merge_request_path(@project.namespace, @project) do
= icon('tasks fw')
New merge request
- if can?(current_user, :create_snippet, @project)
%li
= link_to new_namespace_project_snippet_path(@project.namespace, @project) do
= icon('file-text-o fw')
New snippet
- if can?(current_user, :push_code, @project)
%li.divider
%li
= link_to new_namespace_project_branch_path(@project.namespace, @project) do
= icon('code-fork fw')
New branch
%li
= link_to new_namespace_project_tag_path(@project.namespace, @project) do
= icon('tags fw')
New tag