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
Léo-Paul Géneau
gitlab-ce
Commits
48ee697b
Commit
48ee697b
authored
Sep 11, 2018
by
Martin Wortschack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove 'Geo' and 'Templates' template from CE and display menu items for EE only
parent
b4c7e722
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
25 deletions
+21
-25
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+9
-1
app/views/admin/application_settings/geo.html.haml
app/views/admin/application_settings/geo.html.haml
+0
-6
app/views/admin/application_settings/templates.html.haml
app/views/admin/application_settings/templates.html.haml
+0
-8
app/views/layouts/nav/sidebar/_admin.html.haml
app/views/layouts/nav/sidebar/_admin.html.haml
+12
-10
No files found.
app/helpers/application_helper.rb
View file @
48ee697b
...
...
@@ -6,7 +6,15 @@ require 'uri'
module
ApplicationHelper
# See https://docs.gitlab.com/ee/development/ee_features.html#code-in-app-views
def
render_if_exists
(
partial
,
locals
=
{})
render
(
partial
,
locals
)
if
lookup_context
.
exists?
(
partial
,
[],
true
)
render
(
partial
,
locals
)
if
partial_exists?
(
partial
)
end
def
partial_exists?
(
partial
)
lookup_context
.
exists?
(
partial
,
[],
true
)
end
def
view_exists?
(
partial
)
lookup_context
.
exists?
(
partial
,
[],
false
)
end
# Check if a particular controller is the current one
...
...
app/views/admin/application_settings/geo.html.haml
deleted
100644 → 0
View file @
b4c7e722
-
breadcrumb_title
"Geo"
-
page_title
"Geo"
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
expanded
=
Rails
.
env
.
test?
=
render_if_exists
'admin/application_settings/geo'
,
expanded:
expanded
app/views/admin/application_settings/templates.html.haml
deleted
100644 → 0
View file @
b4c7e722
-
breadcrumb_title
"Templates"
-
page_title
"Templates"
-
@content_class
=
"limit-container-width"
unless
fluid_layout
-
expanded
=
Rails
.
env
.
test?
=
render_if_exists
'admin/application_settings/templates'
,
expanded:
expanded
=
render_if_exists
'admin/application_settings/custom_templates_form'
,
expanded:
expanded
app/views/layouts/nav/sidebar/_admin.html.haml
View file @
48ee697b
...
...
@@ -219,11 +219,12 @@
=
link_to
repository_admin_application_settings_path
,
title:
_
(
'Repository'
)
do
%span
=
_
(
'Repository'
)
%li
.divider.fly-out-top-item
=
nav_link
(
path:
'application_settings#templates'
)
do
=
link_to
templates_admin_application_settings_path
,
title:
_
(
'Templates'
)
do
%span
=
_
(
'Templates'
)
-
if
view_exists?
(
'admin/application_settings/templates'
)
%li
.divider.fly-out-top-item
=
nav_link
(
path:
'application_settings#templates'
)
do
=
link_to
templates_admin_application_settings_path
,
title:
_
(
'Templates'
)
do
%span
=
_
(
'Templates'
)
%li
.divider.fly-out-top-item
=
nav_link
(
path:
'application_settings#ci_cd'
)
do
=
link_to
ci_cd_admin_application_settings_path
,
title:
_
(
'CI/CD'
)
do
...
...
@@ -244,11 +245,12 @@
=
link_to
network_admin_application_settings_path
,
title:
_
(
'Network'
)
do
%span
=
_
(
'Network'
)
%li
.divider.fly-out-top-item
=
nav_link
(
path:
'application_settings#geo'
)
do
=
link_to
geo_admin_application_settings_path
,
title:
_
(
'Geo'
)
do
%span
=
_
(
'Geo'
)
-
if
view_exists?
(
'admin/application_settings/geo'
)
%li
.divider.fly-out-top-item
=
nav_link
(
path:
'application_settings#geo'
)
do
=
link_to
geo_admin_application_settings_path
,
title:
_
(
'Geo'
)
do
%span
=
_
(
'Geo'
)
%li
.divider.fly-out-top-item
=
nav_link
(
path:
'application_settings#preferences'
)
do
=
link_to
preferences_admin_application_settings_path
,
title:
_
(
'Preferences'
)
do
...
...
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