Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-11-14 17:06:39 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-11-14 17:06:39 +0300
commit2388fdd7c6274dad8c10f5bc517f0a8b1aa28aa3 (patch)
tree9f862ed410b9a4d774c4791159291083ccc2c392 /app/views/projects/forks
parentd2c3c98e3cf88dd59a2a1a0d94e711e31c11b2cd (diff)
Improve fork to namespaces feature
* Show namespace thumbnail differently if project was already forked * Show loading spinner when click on fork * Fork link navigates to personal namespace only if no manageable groups exists Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views/projects/forks')
-rw-r--r--app/views/projects/forks/new.html.haml47
1 files changed, 33 insertions, 14 deletions
diff --git a/app/views/projects/forks/new.html.haml b/app/views/projects/forks/new.html.haml
index db7486b00e8..54f2cef023b 100644
--- a/app/views/projects/forks/new.html.haml
+++ b/app/views/projects/forks/new.html.haml
@@ -2,18 +2,37 @@
%p.lead Select namespace where to fork this project
%hr
-- @namespaces.in_groups_of(6, false) do |group|
- .row
- - group.each do |namespace|
- .col-md-2.col-sm-3
- .thumbnail
- = link_to project_fork_path(@project, namespace_id: namespace.id), title: "Fork here", method: "POST" do
- - if namespace.kind_of?(Group)
- = image_tag group_icon(namespace.path)
- - else
- = image_tag avatar_icon(namespace.owner.email, 200)
- .caption
- %h4=namespace.human_name
- %p
- = namespace.path
+.fork-namespaces
+ - @namespaces.in_groups_of(6, false) do |group|
+ .row
+ - group.each do |namespace|
+ .col-md-2.col-sm-3
+ - if fork = namespace.find_fork_of(@project)
+ .thumbnail.fork-exists-thumbnail
+ = link_to project_path(fork), title: "Visit project fork", class: 'has_tooltip' do
+ = image_tag namespace_icon(namespace, 200)
+ .caption
+ %h4=namespace.human_name
+ %p
+ = namespace.path
+ - else
+ .thumbnail.fork-thumbnail
+ = link_to project_fork_path(@project, namespace_id: namespace.id), title: "Fork here", method: "POST", class: 'has_tooltip' do
+ = image_tag namespace_icon(namespace, 200)
+ .caption
+ %h4=namespace.human_name
+ %p
+ = namespace.path
+
+ %p.light
+ Fork is a copy of a project repository.
+ %br
+ Forking a repository allows you to do changes without affecting the original project.
+
+.save-project-loader.hide
+ .center
+ %h2
+ %i.fa.fa-spinner.fa-spin
+ Forking repository
+ %p Please wait a moment, this page will automatically refresh when ready.