Commit bb750e98 authored by Clement Ho's avatar Clement Ho
Browse files

Add .breadcrumb-item for breadcrumb > li

parent 72a22ddb558c
......@@ -27,7 +27,7 @@ def commits_breadcrumbs
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 @@ def commits_breadcrumbs
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,
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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')
......
- 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment