Improve project fork page

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2015-09-10 13:14:25 +02:00
parent 6933da1ee0
commit df51b029ab
No known key found for this signature in database
GPG key ID: 161B5D6A44D3D88A
2 changed files with 20 additions and 27 deletions

View file

@ -203,26 +203,18 @@ ul.nav.nav-projects-tabs {
}
.fork-namespaces {
.thumbnail {
.fork-thumbnail {
text-align: center;
margin-bottom: $gl-padding;
&.fork-exists-thumbnail {
border-color: #EEE;
.caption {
color: #999;
}
.caption {
padding: $gl-padding 0;
min-height: 30px;
}
&.fork-thumbnail {
border-color: #AAA;
&:hover {
background-color: $hover;
}
}
a {
text-decoration: none;
img {
@include border-radius(50%);
max-width: 100px;
}
}
}

View file

@ -10,21 +10,22 @@
- group.each do |namespace|
.col-md-2.col-sm-3
- if fork = namespace.find_fork_of(@project)
.thumbnail.fork-exists-thumbnail
.fork-thumbnail
= link_to project_path(fork), title: "Visit project fork", class: 'has_tooltip' do
= image_tag namespace_icon(namespace, 200)
= image_tag namespace_icon(namespace, 100)
.caption
%h4=namespace.human_name
%p
= namespace.path
%strong
= namespace.human_name
%div.text-primary
Already forked
- else
.thumbnail.fork-thumbnail
.fork-thumbnail
= link_to namespace_project_fork_path(@project.namespace, @project, namespace_key: namespace.id), title: "Fork here", method: "POST", class: 'has_tooltip' do
= image_tag namespace_icon(namespace, 200)
= image_tag namespace_icon(namespace, 100)
.caption
%h4=namespace.human_name
%p
= namespace.path
%strong
= namespace.human_name
%p.light
Fork is a copy of a project repository.