gitlab-org--gitlab-foss/app/views/projects/_dropdown.html.haml

38 lines
1.6 KiB
Text
Raw Normal View History

- if current_user
.dropdown.pull-right
%a.dropdown-toggle.btn.btn-new{href: '#', "data-toggle" => "dropdown"}
2014-10-01 18:21:29 -04:00
%i.fa.fa-bars
%ul.dropdown-menu
- if @project.issues_enabled && can?(current_user, :write_issue, @project)
%li
= link_to url_for_new_issue(@project, only_path: true), title: "New Issue" do
2015-04-06 09:12:26 -04:00
%i.fa.fa-fw.fa-exclamation-circle
New issue
- if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project)
%li
= link_to new_namespace_project_merge_request_path(@project.namespace, @project), title: "New Merge Request" do
2015-04-06 09:12:26 -04:00
%i.fa.fa-fw.fa-tasks
New merge request
- if @project.snippets_enabled && can?(current_user, :write_snippet, @project)
%li
= link_to new_namespace_project_snippet_path(@project.namespace, @project), title: "New Snippet" do
2015-04-06 09:12:26 -04:00
%i.fa.fa-fw.fa-file-text-o
New snippet
- if can?(current_user, :admin_project_member, @project)
%li
= link_to namespace_project_project_members_path(@project.namespace, @project), title: "New project member" do
2015-04-06 09:12:26 -04:00
%i.fa.fa-fw.fa-users
New project member
- if can? current_user, :push_code, @project
%li.divider
%li
= link_to new_namespace_project_branch_path(@project.namespace, @project) do
2015-04-06 09:12:26 -04:00
%i.fa.fa-fw.fa-code-fork
New branch
%li
= link_to new_namespace_project_tag_path(@project.namespace, @project) do
2015-04-06 09:12:26 -04:00
%i.fa.fa-fw.fa-tag
New tag