Display settings link in the cog menu
This commit is contained in:
parent
c18222ea51
commit
ac6b394ec4
|
@ -11,6 +11,12 @@
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{#if view.displaySettingsLink}}
|
||||||
|
<li>
|
||||||
|
{{#linkTo "profile.repo.settings" view.repo}}Settings{{/linkTo}}
|
||||||
|
</li>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
{{#if view.displayStatusImages}}
|
{{#if view.displayStatusImages}}
|
||||||
<a href="#" id="status-image-popup" name="status-images" class="open-popup" {{action "statusImages" target="view"}}>
|
<a href="#" id="status-image-popup" name="status-images" class="open-popup" {{action "statusImages" target="view"}}>
|
||||||
|
|
|
@ -115,6 +115,11 @@ Travis.reopen
|
||||||
permissions.contains parseInt(@get('repo.id'))
|
permissions.contains parseInt(@get('repo.id'))
|
||||||
).property('currentUser.permissions.length', 'repo.id')
|
).property('currentUser.permissions.length', 'repo.id')
|
||||||
|
|
||||||
|
hasPushPermission: (->
|
||||||
|
if permissions = @get('currentUser.pushPermissions')
|
||||||
|
permissions.contains parseInt(@get('repo.id'))
|
||||||
|
).property('currentUser.pushPermissions.length', 'repo.id')
|
||||||
|
|
||||||
hasAdminPermission: (->
|
hasAdminPermission: (->
|
||||||
if permissions = @get('currentUser.adminPermissions')
|
if permissions = @get('currentUser.adminPermissions')
|
||||||
permissions.contains parseInt(@get('repo.id'))
|
permissions.contains parseInt(@get('repo.id'))
|
||||||
|
@ -124,6 +129,10 @@ Travis.reopen
|
||||||
Travis.Urls.statusImage(@get('slug'))
|
Travis.Urls.statusImage(@get('slug'))
|
||||||
).property('slug')
|
).property('slug')
|
||||||
|
|
||||||
|
displaySettingsLink: (->
|
||||||
|
@get('hasPushPermission')
|
||||||
|
).property('hasPushPermission')
|
||||||
|
|
||||||
displayStatusImages: (->
|
displayStatusImages: (->
|
||||||
@get('hasPermission')
|
@get('hasPermission')
|
||||||
).property('hasPermission')
|
).property('hasPermission')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user