_dropdown.html.haml 1.38 KB
Newer Older
1 2 3
- if current_user
  .dropdown.pull-right
    %a.dropdown-toggle.btn.btn-new{href: '#', "data-toggle" => "dropdown"}
4
      %i.fa.fa-bars
5 6 7 8
    %ul.dropdown-menu
      - if @project.issues_enabled && can?(current_user, :write_issue, @project)
        %li
          = link_to url_for_new_issue, title: "New Issue" do
9
            New issue
10 11
      - if @project.merge_requests_enabled && can?(current_user, :write_merge_request, @project)
        %li
Vinnie Okada's avatar
Vinnie Okada committed
12
          = link_to new_namespace_project_merge_request_path(@project.namespace, @project), title: "New Merge Request" do
13
            New merge request
14 15
      - if @project.snippets_enabled && can?(current_user, :write_snippet, @project)
        %li
Vinnie Okada's avatar
Vinnie Okada committed
16
          = link_to new_namespace_project_snippet_path(@project.namespace, @project), title: "New Snippet" do
17 18 19
            New snippet
      - if can?(current_user, :admin_team_member, @project)
        %li
Vinnie Okada's avatar
Vinnie Okada committed
20
          = link_to new_namespace_project_team_member_path(@project.namespace, @project), title: "New project member" do
21
            New project member
22 23 24
      - if can? current_user, :push_code, @project
        %li.divider
        %li
Vinnie Okada's avatar
Vinnie Okada committed
25
          = link_to new_namespace_project_branch_path(@project.namespace, @project) do
26
            %i.fa.fa-code-fork
27 28
            Git branch
        %li
Vinnie Okada's avatar
Vinnie Okada committed
29
          = link_to new_namespace_project_tag_path(@project.namespace, @project) do
30
            %i.fa.fa-tag
31 32 33
            Git tag