Display settings link in the cog menu
This commit is contained in:
parent
c18222ea51
commit
ac6b394ec4
|
@ -11,6 +11,12 @@
|
|||
</a>
|
||||
</li>
|
||||
{{/if}}
|
||||
{{#if view.displaySettingsLink}}
|
||||
<li>
|
||||
{{#linkTo "profile.repo.settings" view.repo}}Settings{{/linkTo}}
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
</ul>
|
||||
{{#if view.displayStatusImages}}
|
||||
<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'))
|
||||
).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: (->
|
||||
if permissions = @get('currentUser.adminPermissions')
|
||||
permissions.contains parseInt(@get('repo.id'))
|
||||
|
@ -124,6 +129,10 @@ Travis.reopen
|
|||
Travis.Urls.statusImage(@get('slug'))
|
||||
).property('slug')
|
||||
|
||||
displaySettingsLink: (->
|
||||
@get('hasPushPermission')
|
||||
).property('hasPushPermission')
|
||||
|
||||
displayStatusImages: (->
|
||||
@get('hasPermission')
|
||||
).property('hasPermission')
|
||||
|
|
Loading…
Reference in New Issue
Block a user