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('/')))
......@@ -195,11 +193,11 @@ module CommitsHelper
def commit_person_link(commit, options = {})
source_name = commit.send "#{options[:source]}_name".to_sym
source_email = commit.send "#{options[:source]}_email".to_sym
user = User.find_for_commit(source_email, source_name)
person_name = user.nil? ? source_name : user.name
person_email = user.nil? ? source_email : user.email
text = if options[:avatar]
avatar = image_tag(avatar_icon(person_email, options[:size]), class: "avatar #{"s#{options[:size]}" if options[:size]}", width: options[:size], alt: "")
%Q{#{avatar} <span class="commit-#{options[:source]}-name">#{person_name}</span>}
......
%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
= commits_breadcrumbs
.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