BigW Consortium Gitlab

index.html.haml 1.89 KB
Newer Older
1
- @no_container = true
2
- page_title "Branches"
3
= render "projects/commits/head"
4

5
%div{ class: container_class }
6
  .top-area.adjust
7
    .nav-text
Ken Ding committed
8 9
      Protected branches can be managed in
      = link_to 'project settings', namespace_project_protected_branches_path(@project.namespace, @project)
10

11 12 13 14
    .nav-controls
      = form_tag(filter_branches_path, method: :get) do
        = search_field_tag :search, params[:search], { placeholder: 'Filter by branch name', id: 'branch-search', class: 'form-control search-text-input input-short', spellcheck: false }

15
      .dropdown.inline>
16
        %button.dropdown-menu-toggle{ type: 'button', 'data-toggle' => 'dropdown' }
17
          %span.light
18
            = branches_sort_options_hash[@sort]
19
          = icon('chevron-down')
20 21 22 23 24 25
        %ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable
          %li.dropdown-header
            Sort by
          - branches_sort_options_hash.each do |value, title|
            %li
              = link_to title, filter_branches_path(sort: value), class: ("is-active" if @sort == value)
26 27

      - if can? current_user, :push_code, @project
28 29
        = link_to namespace_project_merged_branches_path(@project.namespace, @project), class: 'btn btn-inverted btn-remove has-tooltip', title: "Delete all branches that are merged into '#{@project.repository.root_ref}'", method: :delete, data: { confirm: "Deleting the merged branches cannot be undone. Are you sure?", container: 'body' } do
          Delete merged branches
30 31
        = link_to new_namespace_project_branch_path(@project.namespace, @project), class: 'btn btn-create' do
          New branch
32

33
  - if @branches.any?
34 35 36 37
    %ul.content-list.all-branches
      - @branches.each do |branch|
        = render "projects/branches/branch", branch: branch
    = paginate @branches, theme: 'gitlab'
38 39
  - else
    .nothing-here-block No branches to show
40 41

= render 'projects/branches/delete_protected_modal'