Commit 3b88a6e0 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'project-page' into 'master'

Restructure project sidebar and add more icons.

I moved the repository stuff down (including the clone bar), and the project/contribution stuff up. I also added more icons, to the sidebar and tabs on other pages.

---

![Screen_Shot_2015-05-12_at_10.29.36](https://gitlab.com/gitlab-org/gitlab-ce/uploads/ada4a77a07913571e5ac4f00fdd182b9/Screen_Shot_2015-05-12_at_10.29.36.png)

See merge request !633
parents 071f07b6 4346c39b
...@@ -29,10 +29,6 @@ ...@@ -29,10 +29,6 @@
.commits-feed-holder { .commits-feed-holder {
float: right; float: right;
.btn {
padding: 4px 12px;
}
} }
li.commit { li.commit {
......
...@@ -249,7 +249,8 @@ ul.nav.nav-projects-tabs { ...@@ -249,7 +249,8 @@ ul.nav.nav-projects-tabs {
} }
.breadcrumb.repo-breadcrumb { .breadcrumb.repo-breadcrumb {
padding: 2px 0; padding: 0;
line-height: 34px;
background: white; background: white;
border: none; border: none;
font-size: 16px; font-size: 16px;
......
...@@ -106,17 +106,9 @@ ...@@ -106,17 +106,9 @@
} }
} }
.tree-download-holder .btn {
padding: 4px 12px;
}
.tree-ref-holder { .tree-ref-holder {
float: left; float: left;
margin-right: 15px; margin-right: 15px;
.select2-container .select2-choice, .select2-container.select2-drop-above .select2-choice {
padding: 4px 12px;
}
} }
.readme-holder { .readme-holder {
......
...@@ -26,15 +26,15 @@ module IconsHelper ...@@ -26,15 +26,15 @@ module IconsHelper
end end
def public_icon def public_icon
icon('globe') icon('globe fw')
end end
def internal_icon def internal_icon
icon('shield') icon('shield fw')
end end
def private_icon def private_icon
icon('lock') icon('lock fw')
end end
def file_type_icon_class(type, mode, name) def file_type_icon_class(type, mode, name)
......
.clearfix .clearfix
.append-bottom-20
= render "shared/clone_panel"
- unless @project.empty_repo? - unless @project.empty_repo?
.well .well
%h4.visibility-level-label %h4.visibility-level-label
= 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"
%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)
.actions - if @repository.changelog || @repository.license || @repository.contribution_guide
= link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: @ref || @repository.root_ref), class: 'btn btn-sm' do %ul.nav.nav-pills
%i.fa.fa-exchange - if @repository.changelog
Compare code %li.hidden-xs
= link_to changelog_url(@project) do
= icon("list-alt fw")
Changelog
- if @repository.license
%li
= link_to license_url(@project) do
= icon("check-circle-o fw")
License
- if @repository.contribution_guide
%li
= link_to contribution_guide_url(@project) do
= icon("info-circle fw")
Contribution guide
- if can?(current_user, :download_code, @project)
 
= render 'projects/repositories/download_archive', split_button: true, btn_class: 'btn-group-sm'
- unless @project.empty_repo?
.well
%h4 Contribute
%ul.nav.nav-pills
- if @repository.changelog
%li.hidden-xs
= link_to changelog_url(@project) do
Changelog
- if @repository.contribution_guide
%li.hidden-xs
= link_to contribution_guide_url(@project) do
Contribution guide
- if @repository.license
%li
= link_to license_url(@project) do
License
.actions .actions
= link_to url_for_new_issue(@project, only_path: true), title: "New Issue", class: 'btn btn-sm' do - if can? current_user, :write_issue, @project
%i.fa.fa-fw.fa-exclamation-circle = link_to url_for_new_issue(@project, only_path: true), title: "New Issue", class: 'btn btn-sm append-right-10' do
New issue = icon("exclamation-circle fw")
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
%i.fa.fa-plus = icon("plus fw")
New Merge Request New Merge Request
- if forked_from_project = @project.forked_from_project
- if @project.archived?
.alert.alert-warning
%h4
%i.fa.fa-exclamation-triangle
Archived project!
%p Repository is read-only
- if @project.forked_from_project
.well .well
%h4 %h4
= icon("code-fork fw")
Forked from Forked from
.pull-right .pull-right
= link_to @project.forked_from_project.namespace.try(:name), project_path(@project.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
- if version = @repository.version - @project.ci_services.each do |ci_service|
.well - if ci_service.active? && ci_service.respond_to?(:builds_path)
%h4 .well
Version %h4
.pull-right = icon("check fw")
= link_to version_url(@project) do = ci_service.title
= @repository.blob_by_oid(version.id).data .pull-right
- 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
= link_to 'view builds', ci_service.builds_path, :'data-no-turbolink' => 'data-no-turbolink'
- @project.ci_services.each do |ci_service| - unless @project.empty_repo?
- if ci_service.active? && ci_service.respond_to?(:builds_path)
.well .well
%h4 %h4
= ci_service.title = icon("archive fw")
.pull-right Repository
- if ci_service.respond_to?(:status_img_path)
= link_to ci_service.builds_path, :'data-no-turbolink' => 'data-no-turbolink' do %ul.nav.nav-pills
= image_tag ci_service.status_img_path, alt: "build status" %li
- else = link_to namespace_project_commits_path(@project.namespace, @project, @ref || @repository.root_ref) do
= link_to 'view builds', ci_service.builds_path, :'data-no-turbolink' => 'data-no-turbolink' = icon("history fw")
= pluralize(number_with_delimiter(@repository.commit_count), 'commit')
%li
= link_to namespace_project_branches_path(@project.namespace, @project) do
= icon("code-fork fw")
= pluralize(number_with_delimiter(@repository.branch_names.count), 'branch')
%li
= link_to namespace_project_tags_path(@project.namespace, @project) do
= icon("tags fw")
= 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)
= render 'projects/repositories/download_archive', split_button: true, btn_class: 'btn-group-sm'
= render "shared/clone_panel"
- if @project.archived?
.alert.alert-warning
%h4
= icon("exclamation-triangle fw")
Archived project!
%p Repository is read-only
%ul.nav.nav-tabs %ul.nav.nav-tabs
%li.active %li.active
= link_to '#tab-activity', 'data-toggle' => 'tab' do = link_to '#tab-activity', 'data-toggle' => 'tab' do
= icon("tachometer")
Activity Activity
- if @repository.readme - if @repository.readme
%li %li
= link_to '#tab-readme', 'data-toggle' => 'tab' do = link_to '#tab-readme', 'data-toggle' => 'tab' do
= icon("file-text-o")
Readme Readme
.tab-content .tab-content
.tab-pane.active#tab-activity .tab-pane.active#tab-activity
......
%ul.nav.nav-tabs %ul.nav.nav-tabs
= nav_link(controller: [:commit, :commits]) do = nav_link(controller: [:commit, :commits]) do
= link_to namespace_project_commits_path(@project.namespace, @project, @ref || @repository.root_ref) do = link_to namespace_project_commits_path(@project.namespace, @project, @ref || @repository.root_ref) do
= icon("history")
Commits Commits
%span.badge= number_with_precision(@repository.commit_count, precision: 0, delimiter: ',') %span.badge= number_with_precision(@repository.commit_count, precision: 0, delimiter: ',')
= nav_link(controller: :compare) do = nav_link(controller: :compare) do
= link_to 'Compare', namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: @ref || @repository.root_ref) = link_to namespace_project_compare_index_path(@project.namespace, @project, from: @repository.root_ref, to: @ref || @repository.root_ref) do
= icon("exchange")
Compare
= nav_link(html_options: {class: branches_tab_class}) do = nav_link(html_options: {class: branches_tab_class}) do
= link_to namespace_project_branches_path(@project.namespace, @project) do = link_to namespace_project_branches_path(@project.namespace, @project) do
= icon("code-fork")
Branches Branches
%span.badge.js-totalbranch-count= @repository.branches.size %span.badge.js-totalbranch-count= @repository.branches.size
= nav_link(controller: :tags) do = nav_link(controller: :tags) do
= link_to namespace_project_tags_path(@project.namespace, @project) do = link_to namespace_project_tags_path(@project.namespace, @project) do
= icon("tags")
Tags Tags
%span.badge.js-totaltags-count= @repository.tags.length %span.badge.js-totaltags-count= @repository.tags.length
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
- if can? current_user, :download_code, @project - if can? current_user, :download_code, @project
.tree-download-holder .tree-download-holder
= render 'projects/repositories/download_archive', ref: @ref, btn_class: 'btn-group-sm pull-right hidden-xs hidden-sm', split_button: true = render 'projects/repositories/download_archive', ref: @ref, btn_class: 'btn-group pull-right hidden-xs hidden-sm', split_button: true
#tree-holder.tree-holder.clearfix #tree-holder.tree-holder.clearfix
= render "tree", tree: @tree = 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