Commit ca3e134c authored by Fatih Acet's avatar Fatih Acet Committed by Rémy Coutable

Merge branch '17810-fork-page-ux-is-outdated' into 'master'

Updated fork page UI

## What does this MR do?

Updates fork page to new UI.

## Are there points in the code the reviewer needs to double check?

😕 

## Why was this MR needed?

'coz new forks page looks awesome, that's why!

## What are the relevant issue numbers?

Closes #17810.

## Screenshots (if relevant)

![Screen_Shot_2016-07-07_at_03.43.45](/uploads/d4be046d1a6b043f3691633b7ec396c6/Screen_Shot_2016-07-07_at_03.43.45.png)

[youtube video](https://youtu.be/YpXPCxWGCnY)

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !5007
parent 20702d80
...@@ -333,13 +333,47 @@ a.deploy-project-label { ...@@ -333,13 +333,47 @@ a.deploy-project-label {
} }
.fork-namespaces { .fork-namespaces {
.row {
-webkit-flex-wrap: wrap;
display: -webkit-flex;
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
.fork-thumbnail { .fork-thumbnail {
@include border-radius($border-radius-base);
background-color: $white-light;
border: 1px solid $border-white-light;
height: 202px;
margin: $gl-padding;
text-align: center; text-align: center;
margin-bottom: $gl-padding; width: 169px;
&:hover, &.forked {
background-color: $row-hover;
border-color: $row-hover-border;
}
.no-avatar {
width: 100px;
height: 100px;
background-color: $gray-light;
border: 1px solid $gray-dark;
margin: 0 auto;
@include border-radius(50%);
i {
font-size: 100px;
color: $gray-dark;
}
}
a {
display: block;
width: 100%;
height: 100%;
padding-top: $gl-padding;
color: $gl-gray;
.caption { .caption {
padding: $gl-padding 0;
min-height: 30px; min-height: 30px;
padding: $gl-padding 0;
}
} }
img { img {
...@@ -347,6 +381,7 @@ a.deploy-project-label { ...@@ -347,6 +381,7 @@ a.deploy-project-label {
max-width: 100px; max-width: 100px;
} }
} }
}
} }
.project-import { .project-import {
......
- page_title "Fork project" - page_title "Fork project"
- if @namespaces.present?
%h3.page-title Fork project
%p.lead
Click to fork the project to a user or group
%hr
.row.prepend-top-default
.col-lg-3
%h4.prepend-top-0
Fork project
%p
A fork is a copy of a project.
%br
Forking a repository allows you to make changes without affecting the original project.
.col-lg-9
.fork-namespaces .fork-namespaces
- if @namespaces.present?
%label.label-light
%span
Click to fork the project to a user or group
- @namespaces.in_groups_of(6, false) do |group| - @namespaces.in_groups_of(6, false) do |group|
.row .row
- group.each do |namespace| - group.each do |namespace|
.col-md-2.col-sm-3 - avatar = namespace_icon(namespace, 100)
- if fork = namespace.find_fork_of(@project) - if fork = namespace.find_fork_of(@project)
.fork-thumbnail .fork-thumbnail.forked
= link_to project_path(fork), title: "Visit project fork", class: 'has-tooltip' do = link_to project_path(fork) do
= image_tag namespace_icon(namespace, 100) - if /no_((\w*)_)*avatar/.match(avatar)
.no-avatar
= icon 'question'
- else
= image_tag avatar
.caption .caption
%strong
= namespace.human_name = namespace.human_name
%div.text-primary
Already forked
- else - else
.fork-thumbnail .fork-thumbnail
= link_to namespace_project_forks_path(@project.namespace, @project, namespace_key: namespace.id), title: "Fork here", method: "POST", class: 'has-tooltip' do = link_to namespace_project_forks_path(@project.namespace, @project, namespace_key: namespace.id), method: "POST" do
= image_tag namespace_icon(namespace, 100) - if /no_((\w*)_)*avatar/.match(avatar)
.no-avatar
= icon 'question'
- else
= image_tag avatar
.caption .caption
%strong
= namespace.human_name = namespace.human_name
- else
%p.light %label.label-light
Fork is a copy of a project repository. %span
No available namespaces to fork the project.
%br %br
Forking a repository allows you to do changes without affecting the original project. %small
- else
%h3 No available namespaces to fork the project
%p.slead
You must have permission to create a project in a namespace before forking. You must have permission to create a project in a namespace before forking.
.save-project-loader.hide .save-project-loader.hide
.center .center
%h2 %h2
%i.fa.fa-spinner.fa-spin %i.fa.fa-spinner.fa-spin
......
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