debian-mirror-gitlab/app/views/projects/branches/index.html.haml

46 lines
1.9 KiB
Text
Raw Normal View History

- @no_container = true
2015-09-11 14:41:01 +05:30
- page_title "Branches"
2014-09-02 18:07:02 +05:30
= render "projects/commits/head"
2017-09-10 17:25:29 +05:30
- if show_new_nav?
- add_to_breadcrumbs("Repository", project_tree_path(@project))
2016-08-24 12:49:21 +05:30
%div{ class: container_class }
2017-08-17 22:00:37 +05:30
.top-area.adjust
2017-09-10 17:25:29 +05:30
- if can?(current_user, :admin_project, @project)
.nav-text
Protected branches can be managed in
= link_to 'project settings', project_protected_branches_path(@project)
2016-09-13 17:45:13 +05:30
.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 }
2017-08-17 22:00:37 +05:30
.dropdown.inline>
%button.dropdown-menu-toggle{ type: 'button', 'data-toggle' => 'dropdown' }
2016-09-13 17:45:13 +05:30
%span.light
2017-08-17 22:00:37 +05:30
= branches_sort_options_hash[@sort]
= icon('chevron-down')
%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)
2016-09-13 17:45:13 +05:30
- if can? current_user, :push_code, @project
2017-09-10 17:25:29 +05:30
= link_to project_merged_branches_path(@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
2017-08-17 22:00:37 +05:30
Delete merged branches
2017-09-10 17:25:29 +05:30
= link_to new_project_branch_path(@project), class: 'btn btn-create' do
2016-08-24 12:49:21 +05:30
New branch
2016-09-13 17:45:13 +05:30
2016-08-24 12:49:21 +05:30
- if @branches.any?
%ul.content-list.all-branches
- @branches.each do |branch|
= render "projects/branches/branch", branch: branch
= paginate @branches, theme: 'gitlab'
2016-08-24 12:49:21 +05:30
- else
.nothing-here-block No branches to show
2017-09-10 17:25:29 +05:30
= render 'projects/branches/delete_protected_modal'