Commit 040ee6f8 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Reorganize elements in project sidebar

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 7da7a790
......@@ -45,11 +45,6 @@
}
}
.project-home-dropdown {
margin-left: 10px;
float: right;
}
.project-home-row {
@extend .clearfix;
margin-bottom: 15px;
......@@ -81,7 +76,7 @@
margin-top: -3px;
position: absolute;
right: 0;
width: 260px;
width: 265px;
text-align: right;
.btn {
......@@ -317,3 +312,13 @@ table.table.protected-branches-list tr.no-border {
float: left;
margin-right: 10px;
}
.project-home-dropdown {
margin-top: 8px;
a {
padding: 4px 10px;
color: #888;
border-color: #ddd;
}
}
......@@ -12,6 +12,11 @@
.navbar-collapse.collapse
%ul.nav.navbar-nav
- if @project && @repository
%li
.project-home-dropdown
= render "projects/dropdown"
%li.hidden-sm.hidden-xs
= render 'layouts/search'
%li.visible-sm.visible-xs
......
.clearfix
.append-bottom-20
= render "shared/clone_panel"
- unless @project.empty_repo?
.well
%h4 Repository
%ul.nav.nav-pills
%li= link_to pluralize(number_with_delimiter(@repository.commit_count), 'commit'), namespace_project_commits_path(@project.namespace, @project, @ref || @repository.root_ref)
%li= link_to pluralize(number_with_delimiter(@repository.branch_names.count), 'branch'), namespace_project_branches_path(@project.namespace, @project)
%li= link_to pluralize(number_with_delimiter(@repository.tag_names.count), 'tag'), namespace_project_tags_path(@project.namespace, @project)
%hr
= link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: @ref || @repository.root_ref), class: 'btn btn-sm' do
%i.fa.fa-exchange
Compare code
- if can?(current_user, :download_code, @project)
&nbsp;
= render 'projects/repositories/download_archive', split_button: true, btn_class: 'btn-group-sm'
- unless @project.empty_repo?
.well
%h4 Contribute
......@@ -20,22 +40,7 @@
%i.fa.fa-fw.fa-exclamation-circle
New issue
.well
%h4 Repository
%ul.nav.nav-pills
%li= link_to pluralize(number_with_delimiter(@repository.commit_count), 'commit'), namespace_project_commits_path(@project.namespace, @project, @ref || @repository.root_ref)
%li= link_to pluralize(number_with_delimiter(@repository.branch_names.count), 'branch'), namespace_project_branches_path(@project.namespace, @project)
%li= link_to pluralize(number_with_delimiter(@repository.tag_names.count), 'tag'), namespace_project_tags_path(@project.namespace, @project)
%hr
= link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: @ref || @repository.root_ref), class: 'btn btn-sm' do
%i.fa.fa-exchange
Compare code
- if can?(current_user, :download_code, @project)
&nbsp;
= render 'projects/repositories/download_archive', split_button: true, btn_class: 'btn-group-sm'
.append-bottom-20
= render "shared/clone_panel"
- if @project.archived?
.alert.alert-warning
......@@ -51,24 +56,23 @@
%br
= link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project)
-#- unless @project.empty_repo?
-#- if version = @repository.version
- detail_url = changelog_url(@project) || version_url(@project)
= link_to detail_url, class: 'btn btn-block' do
%i.fa.fa-file-text-o
Version:
%span.count
= @repository.blob_by_oid(version.id).data
.prepend-top-10
- @project.ci_services.each do |ci_service|
- if ci_service.active? && ci_service.respond_to?(:builds_path)
%hr
- if ci_service.respond_to?(:status_img_path)
= link_to ci_service.builds_path, :'data-no-turbolink' => 'data-no-turbolink' do
= image_tag ci_service.status_img_path, alt: "build status"
- else
%span.light CI provided by
= link_to ci_service.title, ci_service.builds_path, :'data-no-turbolink' => 'data-no-turbolink'
- if version = @repository.version
.well
%h4
Version
.pull-right
= link_to version_url(@project) do
= @repository.blob_by_oid(version.id).data
.well
%h4
CI
.pull-right
- @project.ci_services.each do |ci_service|
- if ci_service.active? && ci_service.respond_to?(:builds_path)
- if ci_service.respond_to?(:status_img_path)
= link_to ci_service.builds_path, :'data-no-turbolink' => 'data-no-turbolink' do
= image_tag ci_service.status_img_path, alt: "build status"
- else
%span.light CI provided by
= link_to ci_service.title, ci_service.builds_path, :'data-no-turbolink' => 'data-no-turbolink'
- if current_user
.dropdown.pull-right
%a.dropdown-toggle.btn.btn-new{href: '#', "data-toggle" => "dropdown"}
%a.dropdown-toggle.btn.btn-sm{href: '#', "data-toggle" => "dropdown"}
%i.fa.fa-bars
%ul.dropdown-menu
- if @project.issues_enabled && can?(current_user, :write_issue, @project)
......
......@@ -35,9 +35,4 @@
- else
= link_to new_namespace_project_fork_path(@project.namespace, @project), title: "Fork project", class: 'btn btn-sm btn-default' do
= link_to_toggle_fork
%hr
-#.project-home-row.hidden-xs
- if current_user && !empty_repo
.project-home-dropdown
= render "dropdown"
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