BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
6552ec3d
Commit
6552ec3d
authored
Oct 04, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fork-layout-cleanup' into 'master'
Cleanup the fork layout See merge request gitlab-org/gitlab-ce!14617
parents
8ace5fc1
193bc526
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
78 additions
and
108 deletions
+78
-108
project_fork.js
app/assets/javascripts/project_fork.js
+2
-3
avatar.scss
app/assets/stylesheets/framework/avatar.scss
+2
-0
projects.scss
app/assets/stylesheets/pages/projects.scss
+41
-58
new.html.haml
app/views/projects/forks/new.html.haml
+32
-46
fork.rb
features/steps/project/fork.rb
+1
-1
No files found.
app/assets/javascripts/project_fork.js
View file @
6552ec3d
export
default
()
=>
{
export
default
()
=>
{
$
(
'.
fork-thumbnail a
'
).
on
(
'click'
,
function
forkThumbnailClicked
()
{
$
(
'.
js-fork-thumbnail
'
).
on
(
'click'
,
function
forkThumbnailClicked
()
{
if
(
$
(
this
).
hasClass
(
'disabled'
))
return
false
;
if
(
$
(
this
).
hasClass
(
'disabled'
))
return
false
;
$
(
'.fork-namespaces'
).
hide
();
return
$
(
'.js-fork-content'
).
toggle
();
return
$
(
'.save-project-loader'
).
show
();
});
});
};
};
app/assets/stylesheets/framework/avatar.scss
View file @
6552ec3d
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
&
.s60
{
@include
avatar-size
(
60px
,
12px
);
}
&
.s60
{
@include
avatar-size
(
60px
,
12px
);
}
&
.s70
{
@include
avatar-size
(
70px
,
14px
);
}
&
.s70
{
@include
avatar-size
(
70px
,
14px
);
}
&
.s90
{
@include
avatar-size
(
90px
,
15px
);
}
&
.s90
{
@include
avatar-size
(
90px
,
15px
);
}
&
.s100
{
@include
avatar-size
(
100px
,
15px
);
}
&
.s110
{
@include
avatar-size
(
110px
,
15px
);
}
&
.s110
{
@include
avatar-size
(
110px
,
15px
);
}
&
.s140
{
@include
avatar-size
(
140px
,
15px
);
}
&
.s140
{
@include
avatar-size
(
140px
,
15px
);
}
&
.s160
{
@include
avatar-size
(
160px
,
20px
);
}
&
.s160
{
@include
avatar-size
(
160px
,
20px
);
}
...
@@ -78,6 +79,7 @@
...
@@ -78,6 +79,7 @@
&
.s60
{
font-size
:
32px
;
line-height
:
58px
;
}
&
.s60
{
font-size
:
32px
;
line-height
:
58px
;
}
&
.s70
{
font-size
:
34px
;
line-height
:
70px
;
}
&
.s70
{
font-size
:
34px
;
line-height
:
70px
;
}
&
.s90
{
font-size
:
36px
;
line-height
:
88px
;
}
&
.s90
{
font-size
:
36px
;
line-height
:
88px
;
}
&
.s100
{
font-size
:
36px
;
line-height
:
98px
;
}
&
.s110
{
font-size
:
40px
;
line-height
:
108px
;
font-weight
:
$gl-font-weight-normal
;
}
&
.s110
{
font-size
:
40px
;
line-height
:
108px
;
font-weight
:
$gl-font-weight-normal
;
}
&
.s140
{
font-size
:
72px
;
line-height
:
138px
;
}
&
.s140
{
font-size
:
72px
;
line-height
:
138px
;
}
&
.s160
{
font-size
:
96px
;
line-height
:
158px
;
}
&
.s160
{
font-size
:
96px
;
line-height
:
158px
;
}
...
...
app/assets/stylesheets/pages/projects.scss
View file @
6552ec3d
...
@@ -499,73 +499,56 @@ a.deploy-project-label {
...
@@ -499,73 +499,56 @@ a.deploy-project-label {
}
}
}
}
.fork-namespaces
{
.fork-thumbnail
{
.row
{
height
:
200px
;
-webkit-flex-wrap
:
wrap
;
width
:
calc
((
100%
/
2
)
-
#{
$gl-padding
*
2
}
);
display
:
-
webkit-flex
;
display
:
flex
;
flex-wrap
:
wrap
;
justify-content
:
flex-start
;
.fork-thumbnail
{
@media
(
min-width
:
$screen-md-min
)
{
border-radius
:
$border-radius-base
;
width
:
calc
((
100%
/
4
)
-
#{
$gl-padding
*
2
}
);
background-color
:
$white-light
;
}
border
:
1px
solid
$border-white-light
;
height
:
202px
;
margin
:
$gl-padding
;
text-align
:
center
;
width
:
169px
;
&
:hover:not
(
.disabled
),
@media
(
min-width
:
$screen-lg-min
)
{
&
.forked
{
width
:
calc
((
100%
/
5
)
-
#{
$gl-padding
*
2
}
);
background-color
:
$row-hover
;
}
border-color
:
$row-hover-border
;
}
.no-avatar
{
&
:hover:not
(
.disabled
),
width
:
100px
;
&
.forked
{
height
:
100px
;
background-color
:
$row-hover
;
background-color
:
$gray-light
;
border-color
:
$row-hover-border
;
border
:
1px
solid
$white-normal
;
}
margin
:
0
auto
;
border-radius
:
50%
;
i
{
font-size
:
100px
;
color
:
$white-normal
;
}
}
a
{
.avatar-container
,
display
:
block
;
.identicon
{
width
:
100%
;
float
:
none
;
height
:
100%
;
margin-left
:
auto
;
padding-top
:
$gl-padding
;
margin-right
:
auto
;
color
:
$gl-text-color
;
}
&
.disabled
{
opacity
:
.3
;
cursor
:
not
-
allowed
;
&
:hover
{
text-decoration
:
none
;
}
}
.caption
{
min-height
:
30px
;
padding
:
$gl-padding
0
;
}
}
img
{
a
{
border-radius
:
50%
;
display
:
block
;
max-width
:
100px
;
width
:
100%
;
}
height
:
100%
;
padding-top
:
$gl-padding
;
text-decoration
:
none
;
&
.disabled
{
opacity
:
.3
;
cursor
:
not
-
allowed
;
}
}
}
}
}
}
.fork-thumbnail-container
{
display
:
flex
;
flex-wrap
:
wrap
;
margin-left
:
-
$gl-padding
;
margin-right
:
-
$gl-padding
;
>
h5
{
width
:
100%
;
}
}
.project-template
,
.project-template
,
.project-import
{
.project-import
{
.form-group
{
.form-group
{
...
...
app/views/projects/forks/new.html.haml
View file @
6552ec3d
...
@@ -9,50 +9,36 @@
...
@@ -9,50 +9,36 @@
%br
%br
Forking a repository allows you to make changes without affecting the original project.
Forking a repository allows you to make changes without affecting the original project.
.col-lg-9
.col-lg-9
.fork-namespaces
-
if
@namespaces
.
present?
-
if
@namespaces
.
present?
.fork-thumbnail-container.js-fork-content
%label
.label-light
%h5
.prepend-top-0.append-bottom-0.prepend-left-default.append-right-default
%span
Click to fork the project
Click to fork the project
-
@namespaces
.
each
do
|
namespace
|
-
@namespaces
.
in_groups_of
(
6
,
false
)
do
|
group
|
-
avatar
=
namespace_icon
(
namespace
,
100
)
.row
-
can_create_project
=
current_user
.
can?
(
:create_projects
,
namespace
)
-
group
.
each
do
|
namespace
|
-
forked_project
=
namespace
.
find_fork_of
(
@project
)
-
avatar
=
namespace_icon
(
namespace
,
100
)
-
fork_path
=
forked_project
?
project_path
(
forked_project
)
:
project_forks_path
(
@project
,
namespace_key:
namespace
.
id
)
-
if
fork
=
namespace
.
find_fork_of
(
@project
)
.bordered-box.fork-thumbnail.text-center.prepend-left-default.append-right-default.prepend-top-default.append-bottom-default
{
class:
[(
"disabled"
unless
can_create_project
),
(
"forked"
if
forked_project
)]
}
.fork-thumbnail.forked
=
link_to
fork_path
,
=
link_to
project_path
(
fork
)
do
method:
"POST"
,
-
if
/no_((\w*)_)*avatar/
.
match
(
avatar
)
class:
[(
"js-fork-thumbnail"
unless
forked_project
),
(
"disabled has-tooltip"
unless
can_create_project
)],
.no-avatar
title:
(
_
(
'You have reached your project limit'
)
unless
can_create_project
)
do
=
icon
'question'
-
if
/no_((\w*)_)*avatar/
.
match
(
avatar
)
-
else
=
project_identicon
(
namespace
,
class:
"avatar s100 identicon"
)
=
image_tag
avatar
-
else
.caption
.avatar-container.s100
=
namespace
.
human_name
=
image_tag
(
avatar
,
class:
"avatar s100"
)
-
else
%h5
.prepend-top-default
-
can_create_project
=
current_user
.
can?
(
:create_projects
,
namespace
)
=
namespace
.
human_name
.fork-thumbnail
{
class:
(
"disabled"
unless
can_create_project
)
}
-
else
=
link_to
project_forks_path
(
@project
,
namespace_key:
namespace
.
id
),
%strong
method:
"POST"
,
No available namespaces to fork the project.
class:
(
"disabled has-tooltip"
unless
can_create_project
),
%p
.prepend-top-default
title:
(
_
(
'You have reached your project limit'
)
unless
can_create_project
)
do
You must have permission to create a project in a namespace before forking.
-
if
/no_((\w*)_)*avatar/
.
match
(
avatar
)
.no-avatar
=
icon
'question'
-
else
=
image_tag
avatar
.caption
=
namespace
.
human_name
-
else
%label
.label-light
%span
No available namespaces to fork the project.
%br
%small
You must have permission to create a project in a namespace before forking.
.save-project-loader.hide
.save-project-loader.hide
.js-fork-content
.
center
%h2
.text-
center
%h2
=
icon
(
'spinner spin'
)
%i
.fa.fa-spinner.fa-spin
Forking repository
Forking repository
%p
.text-center
%p
Please wait a moment, this page will automatically refresh when ready.
Please wait a moment, this page will automatically refresh when ready.
features/steps/project/fork.rb
View file @
6552ec3d
...
@@ -26,7 +26,7 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps
...
@@ -26,7 +26,7 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps
end
end
step
'I fork to my namespace'
do
step
'I fork to my namespace'
do
page
.
within
'.fork-
namespaces
'
do
page
.
within
'.fork-
thumbnail-container
'
do
click_link
current_user
.
name
click_link
current_user
.
name
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment