From a7e30d65a97a9c519f9a3ec8fc49c9efc86a51b4 Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Mon, 9 Apr 2018 12:28:47 -0500 Subject: [PATCH] Add .breadcrumb-item for breadcrumb > li --- app/helpers/commits_helper.rb | 4 ++-- app/views/projects/artifacts/file.html.haml | 4 ++-- app/views/projects/blob/_breadcrumb.html.haml | 4 ++-- app/views/projects/find_file/show.html.haml | 4 ++-- app/views/projects/tree/_tree_header.html.haml | 6 +++--- app/views/snippets/index.html.haml | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb index 7cc56de24e4..c02bfea1f4d 100644 --- a/app/helpers/commits_helper.rb +++ b/app/helpers/commits_helper.rb @@ -27,7 +27,7 @@ module CommitsHelper return unless @project && @ref # Add the root project link and the arrow icon - crumbs = content_tag(:li) do + crumbs = content_tag(:li, class: 'breadcrumb-item') do link_to( @project.path, project_commits_path(@project, @ref) @@ -38,7 +38,7 @@ module CommitsHelper parts = @path.split('/') parts.each_with_index do |part, i| - crumbs << content_tag(:li) do + crumbs << content_tag(:li, class: 'breadcrumb-item') do # The text is just the individual part, but the link needs all the parts before it link_to( part, diff --git a/app/views/projects/artifacts/file.html.haml b/app/views/projects/artifacts/file.html.haml index 2942d618a42..49e6f1ea22b 100644 --- a/app/views/projects/artifacts/file.html.haml +++ b/app/views/projects/artifacts/file.html.haml @@ -5,11 +5,11 @@ .tree-holder .nav-block %ul.breadcrumb.repo-breadcrumb - %li + %li.breadcrumb-item = link_to 'Artifacts', browse_project_job_artifacts_path(@project, @build) - path_breadcrumbs do |title, path| - title = truncate(title, length: 40) - %li + %li.breadcrumb-item - if path == @path = link_to file_project_job_artifacts_path(@project, @build, path) do %strong= title diff --git a/app/views/projects/blob/_breadcrumb.html.haml b/app/views/projects/blob/_breadcrumb.html.haml index 1c148de9678..a4fb5f6ba88 100644 --- a/app/views/projects/blob/_breadcrumb.html.haml +++ b/app/views/projects/blob/_breadcrumb.html.haml @@ -5,12 +5,12 @@ = render 'shared/ref_switcher', destination: 'blob', path: @path %ul.breadcrumb.repo-breadcrumb - %li + %li.breadcrumb-item = link_to project_tree_path(@project, @ref) do = @project.path - path_breadcrumbs do |title, path| - title = truncate(title, length: 40) - %li + %li.breadcrumb-item - if path == @path = link_to project_blob_path(@project, tree_join(@ref, path)) do %strong= title diff --git a/app/views/projects/find_file/show.html.haml b/app/views/projects/find_file/show.html.haml index a3467eb6f05..a966bfb2dd9 100644 --- a/app/views/projects/find_file/show.html.haml +++ b/app/views/projects/find_file/show.html.haml @@ -5,10 +5,10 @@ .tree-ref-holder = render 'shared/ref_switcher', destination: 'find_file', path: @path %ul.breadcrumb.repo-breadcrumb - %li + %li.breadcrumb-item = link_to project_tree_path(@project, @ref) do = @project.path - %li.file-finder + %li.file-finder.breadcrumb-item %input#file_find.form-control.file-finder-input{ type: "text", placeholder: _('Find by path'), autocomplete: 'off' } .tree-content-holder diff --git a/app/views/projects/tree/_tree_header.html.haml b/app/views/projects/tree/_tree_header.html.haml index dea6ea2fb4c..3385182ee8a 100644 --- a/app/views/projects/tree/_tree_header.html.haml +++ b/app/views/projects/tree/_tree_header.html.haml @@ -8,15 +8,15 @@ - addtotree_toggle_attributes = { title: _("You can only add files when you are on a branch"), data: { container: 'body' }, class: 'disabled has-tooltip' } %ul.breadcrumb.repo-breadcrumb - %li + %li.breadcrumb-item = link_to project_tree_path(@project, @ref) do = @project.path - path_breadcrumbs do |title, path| - %li + %li.breadcrumb-item = link_to truncate(title, length: 40), project_tree_path(@project, tree_join(@ref, path)) - if current_user - %li + %li.breadcrumb-item %a.btn.add-to-tree{ addtotree_toggle_attributes } = sprite_icon('plus', size: 16, css_class: 'pull-left') = sprite_icon('arrow-down', size: 16, css_class: 'pull-left') diff --git a/app/views/snippets/index.html.haml b/app/views/snippets/index.html.haml index 7e4918a6085..cae1a3bf3c5 100644 --- a/app/views/snippets/index.html.haml +++ b/app/views/snippets/index.html.haml @@ -1,10 +1,10 @@ - page_title "By #{@user.name}", "Snippets" %ol.breadcrumb - %li + %li.breadcrumb-item = link_to snippets_path do Snippets - %li + %li.breadcrumb-item = @user.name .pull-right.hidden-xs = link_to user_path(@user) do