Rename properties/bindings for unadministerable hooks.

This commit is contained in:
Mathias Meyer 2014-02-18 11:52:32 +01:00
parent 81cf02cd3b
commit b2bfb6c3e9
3 changed files with 10 additions and 9 deletions

View File

@ -2,7 +2,7 @@ Travis.AccountIndexController = Em.Controller.extend
needs: ['profile', 'currentUser'] needs: ['profile', 'currentUser']
hooksBinding: 'controllers.profile.hooks' hooksBinding: 'controllers.profile.hooks'
allHooksBinding: 'controllers.profile.allHooks' allHooksBinding: 'controllers.profile.allHooks'
unAdminisetableHooksBinding: 'controllers.profile.unAdminisetableHooks' hooksWithoutAdminBinding: 'controllers.profile.hooksWithoutAdmin'
userBinding: 'controllers.currentUser' userBinding: 'controllers.currentUser'
sync: -> sync: ->

View File

@ -43,7 +43,7 @@ Travis.ProfileController = Travis.Controller.extend
@get('allHooks').filter (hook) -> hook.get('admin') @get('allHooks').filter (hook) -> hook.get('admin')
).property('allHooks.length', 'allHooks') ).property('allHooks.length', 'allHooks')
unAdminisetableHooks: (-> hooksWithoutAdmin: (->
@reloadHooks() unless hooks = @get('allHooks') @reloadHooks() unless hooks = @get('allHooks')
@get('allHooks').filter (hook) -> !hook.get('admin') @get('allHooks').filter (hook) -> !hook.get('admin')
).property('allHooks.length', 'allHooks') ).property('allHooks.length', 'allHooks')

View File

@ -1,5 +1,6 @@
<p class="tip"> <p class="tip">
Flick the switches below to turn on the Travis service hook for your projects, then push to GitHub. Enable your projects below by flicking the switch, add a <a href="https://docs.travis-ci.com">.travis.yml</a> to your project, and push a new commit to
GitHub.
</p> </p>
{{#if allHooks.isLoaded}} {{#if allHooks.isLoaded}}
@ -29,25 +30,25 @@
</li> </li>
{{else}} {{else}}
<li> <li>
{{#if unAdminisetableHooks.length}} {{#if hooksWithoutAdmin.length}}
You do not have any repositories, which you can manage Sorry, but we can't find any repositories you have admin access to.
{{else}} {{else}}
You do not seem to have any repositories that we could sync. Sorry, it seems like we couldn't find any repositories you have access to on GitHub.
{{/if}} {{/if}}
</li> </li>
{{/each}} {{/each}}
</ul> </ul>
{{#if unAdminisetableHooks.length}} {{#if hooksWithoutAdmin.length}}
<div id="unadministerable-hooks"> <div id="unadministerable-hooks">
<h3>Repositories without admin access</h3> <h3>Repositories without admin access</h3>
<p class="tip"> <p class="tip">
These are the repositories, which we synced, but you do not seem to have admin access for them. You only have pull or push access to the repositories below.
</p> </p>
<ul> <ul>
{{#each hook in unAdminisetableHooks}} {{#each hook in hooksWithoutAdmin}}
<li {{bind-attr class="hook.active:active"}}> <li {{bind-attr class="hook.active:active"}}>
<a {{bind-attr href="hook.urlGithub"}} rel="nofollow">{{hook.slug}}</a> <a {{bind-attr href="hook.urlGithub"}} rel="nofollow">{{hook.slug}}</a>
<p class="description">{{hook.description}}</p> <p class="description">{{hook.description}}</p>