Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
birger
users
Commits
37c4b1d5
Commit
37c4b1d5
authored
Dec 07, 2020
by
o@immerda.ch
Browse files
grammar fix
parent
816a3861
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/controllers/application_controller.rb
View file @
37c4b1d5
...
...
@@ -98,20 +98,20 @@ class ApplicationController < ActionController::Base
end
helper_method
:resource_enabled?
def
any_resource
s
_enabled?
def
any_resource_enabled?
!
(
session
[
:possible_resources
]
||
{}).
empty?
end
helper_method
:any_resource
s
_enabled?
helper_method
:any_resource_enabled?
def
resource_exists?
(
resource
)
(
session
[
:existing_resources
]
||
{})[
resource
].
present?
end
helper_method
:resource_exists?
def
any_resource
s
_exist?
def
any_resource_exist?
!
(
session
[
:existing_resources
]
||
[]).
empty?
end
helper_method
:any_resource
s
_exist?
helper_method
:any_resource_exist?
def
list_of_canonical_resources
# TODO: move to api
...
...
app/views/application/_menu.html.erb
View file @
37c4b1d5
...
...
@@ -19,7 +19,7 @@
pgpkeys:
{},
invites:
({}
if
allow_invites?
),
delete_account:
{},
services:
({
divider:
true
}
if
any_resource
s
_enabled?
||
any_resource_exists?
),
services:
({
divider:
true
}
if
(
any_resource_enabled?
||
any_resource_exists?
)
)
,
new_resource:
({}
if
feature_toggle?
(
'resource'
)),
}.
merge
(
list_of_canonical_resources
.
map
do
|
name
|
...
...
Write
Preview
Supports
Markdown
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