Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
55f6eadc
Commit
55f6eadc
authored
Oct 17, 2018
by
Rubén Dávila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport from gitlab-org/gitlab-ee!6878
parent
eceb873c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
12 deletions
+15
-12
app/assets/javascripts/api.js
app/assets/javascripts/api.js
+1
-0
app/services/projects/create_service.rb
app/services/projects/create_service.rb
+1
-1
app/views/groups/edit.html.haml
app/views/groups/edit.html.haml
+1
-0
app/views/projects/new.html.haml
app/views/projects/new.html.haml
+1
-1
app/views/projects/project_templates/_built_in_templates.html.haml
.../projects/project_templates/_built_in_templates.html.haml
+3
-3
spec/migrations/delete_inconsistent_internal_id_records_spec.rb
...igrations/delete_inconsistent_internal_id_records_spec.rb
+8
-7
No files found.
app/assets/javascripts/api.js
View file @
55f6eadc
...
@@ -5,6 +5,7 @@ import axios from './lib/utils/axios_utils';
...
@@ -5,6 +5,7 @@ import axios from './lib/utils/axios_utils';
const
Api
=
{
const
Api
=
{
groupsPath
:
'
/api/:version/groups.json
'
,
groupsPath
:
'
/api/:version/groups.json
'
,
groupPath
:
'
/api/:version/groups/:id
'
,
groupPath
:
'
/api/:version/groups/:id
'
,
subgroupsPath
:
'
/api/:version/groups/:id/subgroups
'
,
namespacesPath
:
'
/api/:version/namespaces.json
'
,
namespacesPath
:
'
/api/:version/namespaces.json
'
,
groupProjectsPath
:
'
/api/:version/groups/:id/projects.json
'
,
groupProjectsPath
:
'
/api/:version/groups/:id/projects.json
'
,
projectsPath
:
'
/api/:version/projects.json
'
,
projectsPath
:
'
/api/:version/projects.json
'
,
...
...
app/services/projects/create_service.rb
View file @
55f6eadc
...
@@ -9,7 +9,7 @@ module Projects
...
@@ -9,7 +9,7 @@ module Projects
end
end
def
execute
def
execute
if
@params
[
:template_name
]
&
.
present?
if
@params
[
:template_name
].
present?
return
::
Projects
::
CreateFromTemplateService
.
new
(
current_user
,
params
).
execute
return
::
Projects
::
CreateFromTemplateService
.
new
(
current_user
,
params
).
execute
end
end
...
...
app/views/groups/edit.html.haml
View file @
55f6eadc
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
.settings-content
.settings-content
=
render
'shared/badges/badge_settings'
=
render
'shared/badges/badge_settings'
=
render_if_exists
'groups/custom_project_templates_setting'
=
render_if_exists
'groups/templates_setting'
,
expanded:
expanded
=
render_if_exists
'groups/templates_setting'
,
expanded:
expanded
%section
.settings.gs-advanced.no-animate
#js-advanced-settings
{
class:
(
'expanded'
if
expanded
)
}
%section
.settings.gs-advanced.no-animate
#js-advanced-settings
{
class:
(
'expanded'
if
expanded
)
}
...
...
app/views/projects/new.html.haml
View file @
55f6eadc
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
.project-template
.project-template
.form-group
.form-group
%div
%div
=
render
'project_templates'
,
f:
f
=
render
'project_templates'
,
f:
f
,
project:
@project
.tab-pane.import-project-pane.js-toggle-container
{
id:
'import-project-pane'
,
class:
active_when
(
active_tab
==
'import'
),
role:
'tabpanel'
}
.tab-pane.import-project-pane.js-toggle-container
{
id:
'import-project-pane'
,
class:
active_when
(
active_tab
==
'import'
),
role:
'tabpanel'
}
-
if
import_sources_enabled?
-
if
import_sources_enabled?
...
...
app/views/projects/project_templates/_built_in_templates.html.haml
View file @
55f6eadc
...
@@ -9,9 +9,9 @@
...
@@ -9,9 +9,9 @@
.text-muted
.text-muted
=
template
.
description
=
template
.
description
.controls.d-flex.align-items-center
.controls.d-flex.align-items-center
%label
.btn.btn-success.template-button.choose-template.append-right-10.append-bottom-0
{
for:
template
.
name
}
%a
.btn.btn-default.append-right-10
{
href:
template
.
preview
,
rel:
'noopener noreferrer'
,
target:
'_blank'
,
data:
{
track_label:
"create_from_template"
,
track_property:
"template_preview"
,
track_event:
"click_button"
,
track_value:
template
.
name
}
}
=
_
(
"Preview"
)
%label
.btn.btn-success.template-button.choose-template.append-bottom-0
{
for:
template
.
name
}
%input
{
type:
"radio"
,
autocomplete:
"off"
,
name:
"project[template_name]"
,
id:
template
.
name
,
value:
template
.
name
,
data:
{
track_label:
"create_from_template"
,
track_property:
"template_use"
,
track_event:
"click_button"
}
}
%input
{
type:
"radio"
,
autocomplete:
"off"
,
name:
"project[template_name]"
,
id:
template
.
name
,
value:
template
.
name
,
data:
{
track_label:
"create_from_template"
,
track_property:
"template_use"
,
track_event:
"click_button"
}
}
%span
%span
=
_
(
"Use template"
)
=
_
(
"Use template"
)
%a
.btn.btn-default
{
href:
template
.
preview
,
rel:
'noopener noreferrer'
,
target:
'_blank'
,
data:
{
track_label:
"create_from_template"
,
track_property:
"template_preview"
,
track_event:
"click_button"
,
track_value:
template
.
name
}
}
=
_
(
"Preview"
)
spec/migrations/delete_inconsistent_internal_id_records_spec.rb
View file @
55f6eadc
...
@@ -94,17 +94,18 @@ describe DeleteInconsistentInternalIdRecords, :migration do
...
@@ -94,17 +94,18 @@ describe DeleteInconsistentInternalIdRecords, :migration do
end
end
context
'for milestones (by group)'
do
context
'for milestones (by group)'
do
# milestones (by group) is a little different than all of the other models
# milestones (by group) is a little different than most of the other models
let!
(
:group1
)
{
create
(
:group
)
}
let
(
:groups
)
{
table
(
:namespaces
)
}
let!
(
:group2
)
{
create
(
:group
)
}
let
(
:group1
)
{
groups
.
create
(
name:
'Group 1'
,
type:
'Group'
,
path:
'group_1'
)
}
let!
(
:group3
)
{
create
(
:group
)
}
let
(
:group2
)
{
groups
.
create
(
name:
'Group 2'
,
type:
'Group'
,
path:
'group_2'
)
}
let
(
:group3
)
{
groups
.
create
(
name:
'Group 2'
,
type:
'Group'
,
path:
'group_3'
)
}
let
(
:internal_id_query
)
{
->
(
group
)
{
InternalId
.
where
(
usage:
InternalId
.
usages
[
'milestones'
],
namespace:
group
)
}
}
let
(
:internal_id_query
)
{
->
(
group
)
{
InternalId
.
where
(
usage:
InternalId
.
usages
[
'milestones'
],
namespace:
group
)
}
}
before
do
before
do
3
.
times
{
create
(
:milestone
,
group
:
group1
)
}
3
.
times
{
create
(
:milestone
,
group
_id:
group1
.
id
)
}
3
.
times
{
create
(
:milestone
,
group
:
group2
)
}
3
.
times
{
create
(
:milestone
,
group
_id:
group2
.
id
)
}
3
.
times
{
create
(
:milestone
,
group
:
group3
)
}
3
.
times
{
create
(
:milestone
,
group
_id:
group3
.
id
)
}
internal_id_query
.
call
(
group1
).
first
.
tap
do
|
iid
|
internal_id_query
.
call
(
group1
).
first
.
tap
do
|
iid
|
iid
.
last_value
=
iid
.
last_value
-
2
iid
.
last_value
=
iid
.
last_value
-
2
...
...
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