summaryrefslogtreecommitdiff
path: root/app/views/projects/branches
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/projects/branches')
-rw-r--r--app/views/projects/branches/index.html.haml20
1 files changed, 12 insertions, 8 deletions
diff --git a/app/views/projects/branches/index.html.haml b/app/views/projects/branches/index.html.haml
index 77b405f1f39..6f806e3ce53 100644
--- a/app/views/projects/branches/index.html.haml
+++ b/app/views/projects/branches/index.html.haml
@@ -9,26 +9,30 @@
- if can? current_user, :push_code, @project
.nav-controls
- = link_to new_namespace_project_branch_path(@project.namespace, @project), class: 'btn btn-create' do
- New branch
+ = 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 }
.dropdown.inline
%button.dropdown-toggle.btn{type: 'button', 'data-toggle' => 'dropdown'}
%span.light
- - if @sort.present?
- = @sort.humanize
+ - if params[:sort].present?
+ = params[:sort].humanize
- else
Name
%b.caret
%ul.dropdown-menu.dropdown-menu-align-right
%li
- = link_to namespace_project_branches_path(sort: nil) do
- Name
- = link_to namespace_project_branches_path(sort: 'recently_updated') do
+ = link_to filter_branches_path(sort: nil) do
+ = sort_title_name
+ = link_to filter_branches_path(sort: 'recently_updated') do
= sort_title_recently_updated
- = link_to namespace_project_branches_path(sort: 'last_updated') do
+ = link_to filter_branches_path(sort: 'last_updated') do
= sort_title_oldest_updated
+ = link_to new_namespace_project_branch_path(@project.namespace, @project), class: 'btn btn-create' do
+ New branch
- if @branches.any?
%ul.content-list.all-branches
- @branches.each do |branch|
= render "projects/branches/branch", branch: branch
= paginate @branches, theme: 'gitlab'
+ - else
+ .nothing-here-block No branches to show