Commit d0d596ae authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'project-aside' into 'master'

Use panels instead of well for widgets in project sidebar

Cleaner look and less distractive

![Screenshot_2015-05-28_17.31.27](https://gitlab.com/gitlab-org/gitlab-ce/uploads/d4f8e58f76c7f62c488dd571c313e21e/Screenshot_2015-05-28_17.31.27.png)

See merge request !732
parents ce5928f4 a01737ac
...@@ -209,13 +209,9 @@ ul.nav.nav-projects-tabs { ...@@ -209,13 +209,9 @@ ul.nav.nav-projects-tabs {
line-height: 1.5; line-height: 1.5;
} }
.well { .panel {
padding: 14px; .panel-heading, .panel-footer {
background-color: #fcfcfc;
h4 {
font-weight: normal;
margin: 0;
color: #555;
} }
.actions { .actions {
...@@ -224,10 +220,12 @@ ul.nav.nav-projects-tabs { ...@@ -224,10 +220,12 @@ ul.nav.nav-projects-tabs {
.nav-pills a { .nav-pills a {
padding: 10px; padding: 10px;
font-weight: bold;
color: $gl-link-color;
} }
.nav { .nav {
margin: 10px 0; margin-bottom: 10px;
} }
} }
......
.clearfix .clearfix
- unless @project.empty_repo? - unless @project.empty_repo?
.well .panel.panel-default
%h4.visibility-level-label .panel-heading
= visibility_level_icon(@project.visibility_level) = visibility_level_icon(@project.visibility_level)
= "#{visibility_level_label(@project.visibility_level).capitalize} project" = "#{visibility_level_label(@project.visibility_level).capitalize} project"
- if @repository.changelog || @repository.license || @repository.contribution_guide .panel-body
%ul.nav.nav-pills - if @repository.changelog || @repository.license || @repository.contribution_guide
- if @repository.changelog %ul.nav.nav-pills
%li.hidden-xs - if @repository.changelog
= link_to changelog_url(@project) do %li.hidden-xs
Changelog = link_to changelog_url(@project) do
- if @repository.license Changelog
%li - if @repository.license
= link_to license_url(@project) do %li
License = link_to license_url(@project) do
- if @repository.contribution_guide License
%li - if @repository.contribution_guide
= link_to contribution_guide_url(@project) do %li
Contribution guide = link_to contribution_guide_url(@project) do
Contribution guide
.actions .actions
- if can? current_user, :write_issue, @project - if can? current_user, :write_issue, @project
= link_to url_for_new_issue(@project, only_path: true), title: "New Issue", class: 'btn btn-sm append-right-10' do = link_to url_for_new_issue(@project, only_path: true), title: "New Issue", class: 'btn btn-sm append-right-10' do
= icon("exclamation-circle fw") = icon("exclamation-circle fw")
New Issue New Issue
- if can? current_user, :write_merge_request, @project - if can? current_user, :write_merge_request, @project
= link_to new_namespace_project_merge_request_path(@project.namespace, @project), class: "btn btn-sm", title: "New Merge Request" do = link_to new_namespace_project_merge_request_path(@project.namespace, @project), class: "btn btn-sm", title: "New Merge Request" do
= icon("plus fw") = icon("plus fw")
New Merge Request New Merge Request
- if forked_from_project = @project.forked_from_project - if forked_from_project = @project.forked_from_project
.well .panel-footer
%h4 = icon("code-fork fw")
= icon("code-fork fw") Forked from
Forked from .pull-right
.pull-right = link_to forked_from_project.namespace.try(:name), project_path(forked_from_project)
= link_to forked_from_project.namespace.try(:name), project_path(forked_from_project)
- if version = @repository.version
.well
%h4
= icon("clock-o fw")
Version
.pull-right
= link_to version_url(@project) do
= @repository.blob_by_oid(version.id).data
- @project.ci_services.each do |ci_service| - @project.ci_services.each do |ci_service|
- if ci_service.active? && ci_service.respond_to?(:builds_path) - if ci_service.active? && ci_service.respond_to?(:builds_path)
.well .panel-footer
%h4 = icon("check fw")
= icon("check fw") = ci_service.title
= ci_service.title .pull-right
.pull-right - if ci_service.respond_to?(:status_img_path)
- if ci_service.respond_to?(:status_img_path) = link_to ci_service.builds_path, :'data-no-turbolink' => 'data-no-turbolink' do
= link_to ci_service.builds_path, :'data-no-turbolink' => 'data-no-turbolink' do = image_tag ci_service.status_img_path, alt: "build status", class: 'ci-status-image'
= image_tag ci_service.status_img_path, alt: "build status", class: 'ci-status-image' - else
- else = link_to 'view builds', ci_service.builds_path, :'data-no-turbolink' => 'data-no-turbolink'
= link_to 'view builds', ci_service.builds_path, :'data-no-turbolink' => 'data-no-turbolink'
- unless @project.empty_repo? - unless @project.empty_repo?
.well .panel.panel-default
%h4 .panel-heading
= icon("archive fw") = icon("archive fw")
Repository Repository
.panel-body
%ul.nav.nav-pills
%li
= link_to namespace_project_commits_path(@project.namespace, @project, @ref || @repository.root_ref) do
= pluralize(number_with_delimiter(@repository.commit_count), 'commit')
%li
= link_to namespace_project_branches_path(@project.namespace, @project) do
= pluralize(number_with_delimiter(@repository.branch_names.count), 'branch')
%li
= link_to namespace_project_tags_path(@project.namespace, @project) do
= pluralize(number_with_delimiter(@repository.tag_names.count), 'tag')
%ul.nav.nav-pills .actions
%li = link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: @ref || @repository.root_ref), class: 'btn btn-sm append-right-10' do
= link_to namespace_project_commits_path(@project.namespace, @project, @ref || @repository.root_ref) do %i.fa.fa-exchange
= pluralize(number_with_delimiter(@repository.commit_count), 'commit') Compare code
%li
= link_to namespace_project_branches_path(@project.namespace, @project) do
= pluralize(number_with_delimiter(@repository.branch_names.count), 'branch')
%li
= link_to namespace_project_tags_path(@project.namespace, @project) do
= pluralize(number_with_delimiter(@repository.tag_names.count), 'tag')
.actions
= link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: @ref || @repository.root_ref), class: 'btn btn-sm append-right-10' do
%i.fa.fa-exchange
Compare code
- if can?(current_user, :download_code, @project) - if can?(current_user, :download_code, @project)
= render 'projects/repositories/download_archive', split_button: true, btn_class: 'btn-group-sm' = render 'projects/repositories/download_archive', split_button: true, btn_class: 'btn-group-sm'
- if version = @repository.version
.panel-footer
= icon("clock-o fw")
Version
.pull-right
= link_to version_url(@project) do
= @repository.blob_by_oid(version.id).data
= render "shared/clone_panel" = render "shared/clone_panel"
- if @project.archived? - if @project.archived?
%br
.alert.alert-warning .alert.alert-warning
%h4 %h4
= icon("exclamation-triangle fw") = icon("exclamation-triangle fw")
......
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