Commit 55795b7c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Improve breadcrumbs

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 1555146a
......@@ -59,12 +59,6 @@ pre {
color: #FFF
}
.breadcrumb > li + li:before {
content: "/";
padding: 0;
color: #666;
}
.str-truncated {
@include str-truncated;
}
......
......@@ -199,20 +199,6 @@ $list-group-active-bg: $bg_style_color;
color: #3c763d;
}
// Breadcrumb
ul.breadcrumb {
background: white;
border: none;
li {
display: inline;
text-shadow: 0 1px 0 white
}
a {
font-size: 16px;
}
}
/**
* fix to keep tooltips position in top navigation bar
*
......
......@@ -115,10 +115,6 @@
line-height: 2;
}
.commit-breadcrumb {
padding: 0;
}
.commit-info-row {
margin-bottom: 10px;
.avatar {
......@@ -210,3 +206,10 @@ li.commit {
}
}
}
.commits-feed-holder {
float: right;
.btn {
padding: 4px 12px;
}
}
......@@ -239,3 +239,15 @@ ul.nav.nav-projects-tabs {
.vs-private {
color: $bg_success;
}
.breadcrumb.repo-breadcrumb {
padding: 2px 0;
background: white;
border: none;
font-size: 16px;
> li + li:before {
padding: 0 3px;
color: #999;
}
}
......@@ -4,10 +4,6 @@
width: 100%;
}
.breadcrumb {
padding: 2px 0;
}
.tree_progress {
display: none;
margin: 20px;
......
......@@ -76,15 +76,13 @@ module CommitsHelper
# Add the root project link and the arrow icon
crumbs = content_tag(:li) do
content_tag(:span, nil, class: 'arrow') +
link_to(@project.name, project_commits_path(@project, @ref))
link_to(@project.path, project_commits_path(@project, @ref))
end
if @path
parts = @path.split('/')
parts.each_with_index do |part, i|
crumbs += content_tag(:span, ' / ', class: 'divider')
crumbs += content_tag(:li) do
# The text is just the individual part, but the link needs all the parts before it
link_to part, project_commits_path(@project, tree_join(@ref, parts[0..i].join('/')))
......
%ul.nav.nav-tabs
%li= render partial: 'shared/ref_switcher', locals: {destination: 'commits'}
= nav_link(controller: [:commit, :commits]) do
= link_to 'Commits', project_commits_path(@project, @repository.root_ref)
= nav_link(controller: :compare) do
......@@ -19,9 +17,3 @@
= nav_link(controller: :repositories, action: :stats) do
= link_to stats_project_repository_path(@project) do
Stats
- if current_user && current_controller?(:commits) && current_user.private_token
%li.pull-right.hidden-sm
= link_to project_commits_path(@project, @ref, {format: :atom, private_token: current_user.private_token}), title: "Feed" do
%i.icon-rss
= render "head"
- if @path.present?
%ul.breadcrumb.commit-breadcrumb
%li.light
History for
.tree-ref-holder
= render 'shared/ref_switcher', destination: 'commits'
- if current_user && current_user.private_token
.commits-feed-holder.hidden-xs.hidden-sm
= link_to project_commits_path(@project, @ref, {format: :atom, private_token: current_user.private_token}), title: "Feed", class: 'btn' do
%i.icon-rss
Commits feed
%ul.breadcrumb.repo-breadcrumb
= commits_breadcrumbs
%li.active
commits
%div{id: dom_id(@project)}
#commits-list= render "commits"
......
%ul.breadcrumb
%ul.breadcrumb.repo-breadcrumb
%li
= link_to project_tree_path(@project, @ref) do
= @project.path
......
......@@ -3,7 +3,7 @@
- if can? current_user, :download_code, @project
.tree-download-holder
= render 'projects/repositories/download_archive', ref: @ref, btn_class: 'btn-group-small pull-right hidden-xs', split_button: true
= render 'projects/repositories/download_archive', ref: @ref, btn_class: 'btn-group-small pull-right hidden-xs hidden-sm', split_button: true
#tree-holder.tree-holder.clearfix
= render "tree", tree: @tree
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