travis-web/assets/scripts/app/templates/profile/tabs/hooks.hbs
2014-01-21 17:57:35 +01:00

67 lines
1.9 KiB
Handlebars

<p class="tip">
{{{t profiles.show.message.your_repos}}}
</p>
{{#if allHooks.isLoaded}}
{{#if user.isSyncing}}
<p class="message loading">
<span>Please wait while we sync from GitHub</span>
</p>
{{else}}
<p class="message">
Last synchronized from GitHub: {{formatTime user.syncedAt}}
<a class="sync_now button" {{action "sync"}}>
Sync now
</a>
</p>
<ul id="hooks">
{{#each hook in hooks}}
<li {{bind-attr class="hook.active:active"}}>
<a {{bind-attr href="hook.urlGithub"}} rel="nofollow">{{hook.slug}}</a>
{{#if hook.isSaving}}<span class="loading"></span>{{/if}}
<p class="description">{{hook.description}}</p>
<div class="controls">
<a {{bind-attr href="hook.urlGithubAdmin"}} class="github-admin tool-tip" title="Github service hooks admin page"></a>
{{travis-switch action="toggle" target=hook}}
</div>
</li>
{{else}}
<li>
{{#if unAdminisetableHooks.length}}
You do not have any repositories, which you can manage
{{else}}
You do not seem to have any repositories that we could sync.
{{/if}}
</li>
{{/each}}
</ul>
{{#if unAdminisetableHooks.length}}
<div id="unadministerable-hooks">
<h3>Repositories without admin access</h3>
<p class="tip">
These are the repositories, which we synced, but you do not seem to have admin access for them.
</p>
<ul>
{{#each hook in unAdminisetableHooks}}
<li {{bind-attr class="hook.active:active"}}>
<a {{bind-attr href="hook.urlGithub"}} rel="nofollow">{{hook.slug}}</a>
<p class="description">{{hook.description}}</p>
</li>
{{/each}}
</ul>
</div>
{{/if}}
{{/if}}
{{else}}
<p class="message loading">
<span>Loading</span>
</p>
{{/if}}