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
ba7c65a6
Commit
ba7c65a6
authored
Aug 01, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds export form and enables export button by default
parent
54e3361f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
32 deletions
+40
-32
projects.scss
app/assets/stylesheets/pages/projects.scss
+2
-2
new.html.haml
app/views/import/gitlab_projects/new.html.haml
+38
-12
new.html.haml
app/views/projects/new.html.haml
+0
-18
No files found.
app/assets/stylesheets/pages/projects.scss
View file @
ba7c65a6
...
...
@@ -534,7 +534,7 @@ a.deploy-project-label {
transform
:
translateX
(
-50%
);
@media
(
min-width
:
$screen-lg-min
)
{
left
:
-3
5
px
;
left
:
-3
0
px
;
top
:
50%
;
padding
:
10px
0
;
width
:
20px
;
...
...
@@ -554,7 +554,7 @@ a.deploy-project-label {
@media
(
min-width
:
$screen-lg-min
)
{
bottom
:
0
;
left
:
-2
5
px
;
left
:
-2
0
px
;
right
:
auto
;
height
:
100%
;
width
:
1px
;
...
...
app/views/import/gitlab_projects/new.html.haml
View file @
ba7c65a6
...
...
@@ -5,21 +5,47 @@
Import an exported GitLab project
%hr
=
form_tag
import_gitlab_project_path
,
class:
'form-horizontal'
,
multipart:
true
do
%p
Project will be imported as
%strong
#{
@namespace
.
name
}
/
#{
@path
}
=
form_for
import_gitlab_project_path
,
class:
'form-horizontal'
,
multipart:
true
do
|
f
|
.row
.form-group.col-xs-12.col-sm-6
=
f
.
label
:namespace_id
,
class:
'label-light'
do
%span
Project path
.form-group
.input-group
-
if
current_user
.
can_select_namespace?
.input-group-addon
=
root_url
=
f
.
select
:namespace_id
,
namespaces_options
(
namespace_id_from
(
params
)
||
:current_user
,
display_path:
true
,
extra_group:
namespace_id_from
(
params
)),
{},
{
class:
'select2 js-select-namespace'
,
tabindex:
1
}
-
else
.input-group-addon.static-namespace
#{
root_url
}#{
current_user
.
username
}
/
=
f
.
hidden_field
:namespace_id
,
value:
current_user
.
namespace_id
.form-group.col-xs-12.col-sm-6.project-path
=
f
.
label
:path
,
class:
'label-light'
do
%span
Project name
=
f
.
text_field
:path
,
placeholder:
"my-awesome-project"
,
class:
"js-path-name form-control"
,
tabindex:
2
,
autofocus:
true
,
required:
true
%p
.row
.form-group.col-md-12
To move or copy an entire GitLab project from another GitLab installation to this one, navigate to the original project's settings page, generate an export file, and upload it here.
.form-group
.row
.form-group.col-sm-12
=
hidden_field_tag
:namespace_id
,
@namespace
.
id
=
hidden_field_tag
:path
,
@path
=
label_tag
:file
,
class:
'control-label'
do
%span
GitLab project export
.col-sm-10
=
f
.
label
:file
,
class:
'label-light'
do
%span
GitLab project export
.form-group
=
file_field_tag
:file
,
class:
''
.row
.form-actions
=
submit_tag
'Import project'
,
class:
'btn btn-create'
=
f
.
submit
'Import project'
,
class:
'btn btn-create'
=
link_to
'Cancel'
,
new_project_path
,
class:
'btn btn-cancel'
:javascript
// get the path url and append it in the inputS
$
(
'.js-path-name'
).
val
(
gl
.
utils
.
getParameterValues
(
'path'
));
app/views/projects/new.html.haml
View file @
ba7c65a6
...
...
@@ -67,7 +67,6 @@
%button
.btn.js-toggle-button.import_git
{
type:
"button"
}
=
icon
(
'git'
,
text:
'Repo by URL'
)
.import_gitlab_project.has-tooltip
{
data:
{
container:
'body'
}
}
-
if
gitlab_project_import_enabled?
=
link_to
new_import_gitlab_project_path
,
class:
'btn btn_import_gitlab_project project-submit'
do
=
icon
(
'gitlab'
,
text:
'GitLab export'
)
...
...
@@ -127,9 +126,6 @@
%p
Please wait a moment, this page will automatically refresh when ready.
:javascript
var
importBtnTooltip
=
"Please enter a valid project name."
;
var
$importBtnWrapper
=
$
(
'.import_gitlab_project'
);
$
(
'.how_to_import_link'
).
bind
(
'click'
,
function
(
e
)
{
e
.
preventDefault
();
var
import_modal
=
$
(
this
).
next
(
".modal"
).
show
();
...
...
@@ -144,25 +140,11 @@
$
(
".btn_import_gitlab_project"
).
attr
(
"href"
,
_href
+
'?namespace_id='
+
$
(
"#project_namespace_id"
).
val
()
+
'&path='
+
$
(
"#project_path"
).
val
());
});
$
(
'.btn_import_gitlab_project'
).
attr
(
'disabled'
,
$
(
'#project_path'
).
val
().
trim
().
length
===
0
);
$importBtnWrapper
.
attr
(
'title'
,
importBtnTooltip
);
$
(
'#new_project'
).
submit
(
function
(){
var
$path
=
$
(
'#project_path'
);
$path
.
val
(
$path
.
val
().
trim
());
});
$
(
'#project_path'
).
keyup
(
function
(){
if
(
$
(
this
).
val
().
trim
().
length
!==
0
)
{
$
(
'.btn_import_gitlab_project'
).
attr
(
'disabled'
,
false
);
$importBtnWrapper
.
attr
(
'title'
,
''
);
$importBtnWrapper
.
removeClass
(
'has-tooltip'
);
}
else
{
$
(
'.btn_import_gitlab_project'
).
attr
(
'disabled'
,
true
);
$importBtnWrapper
.
addClass
(
'has-tooltip'
);
}
});
$
(
'#project_import_url'
).
disable
();
$
(
'.import_git'
).
click
(
function
(
event
)
{
$projectImportUrl
=
$
(
'#project_import_url'
);
...
...
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