Display caches link only to logged in users
This commit is contained in:
parent
85fc6c5cf4
commit
b0b0c76bc4
|
@ -10,7 +10,7 @@
|
||||||
<li>
|
<li>
|
||||||
{{#link-to "requests" view.repo}}Requests{{/link-to}}
|
{{#link-to "requests" view.repo}}Requests{{/link-to}}
|
||||||
</li>
|
</li>
|
||||||
{{#if config.endpoints.caches}}
|
{{#if view.displayCachesLink}}
|
||||||
<li>
|
<li>
|
||||||
{{#link-to "caches" view.repo}}Caches{{/link-to}}
|
{{#link-to "caches" view.repo}}Caches{{/link-to}}
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
`import Ember from 'ember'`
|
`import Ember from 'ember'`
|
||||||
`import BasicView from 'travis/views/basic'`
|
`import BasicView from 'travis/views/basic'`
|
||||||
|
`import config from 'travis/config/environment'`
|
||||||
|
|
||||||
View = BasicView.extend
|
View = BasicView.extend
|
||||||
templateName: 'repos/show/tools'
|
templateName: 'repos/show/tools'
|
||||||
|
@ -72,6 +73,10 @@ View = BasicView.extend
|
||||||
@get('hasPushPermission')
|
@get('hasPushPermission')
|
||||||
).property('hasPushPermission')
|
).property('hasPushPermission')
|
||||||
|
|
||||||
|
displayCachesLink: (->
|
||||||
|
@get('hasPushPermission') && config.endpoints.caches
|
||||||
|
).property('hasPushPermission')
|
||||||
|
|
||||||
displayStatusImages: (->
|
displayStatusImages: (->
|
||||||
@get('hasPermission')
|
@get('hasPermission')
|
||||||
).property('hasPermission')
|
).property('hasPermission')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user