travis-web/app/templates/repos.hbs
2015-07-14 17:57:08 +02:00

72 lines
2.0 KiB
Handlebars

<div class="search search--sidebar">
<div class="search-inner">
{{input value=controller.search placeholder="Search all repositories"}}
</div>
</div>
{{view 'repos-list-tabs'}}
{{#if showRunningJobs}}
<div class="tabbody sidebar-list">
<div>
{{render "runningJobs"}}
</div>
<hr class="sidebar-seperator">
<div>
{{render "queue"}}
</div>
</div>
{{else}}
<div class="tabbody sidebar-list">
{{#if isLoaded}}
{{#collection 'repos-list' content=this}}
{{#with view.repo as repo}}
<div class="tile tile--sidebar {{repo.lastBuildState}}">
<h2 class="tile-title">
{{#if repo.slug}}
<span class="icon icon--job {{repo.lastBuildState}}"></span>
{{#link-to "repo" repo class="slug"}}{{repo.slug}}{{/link-to}}
{{/if}}
</h2>
{{#with repo.lastBuildHash as lastBuild}}
{{#if repo.slug}}
{{#if lastBuild.id}}
<p class="tile-title float-right">
<span class="icon icon--hash"></span>
{{#link-to "build" repo lastBuild.id
class="last_build"}}{{lastBuild.number}}{{/link-to}}
</p>
{{/if}}
{{/if}}
{{/with}}
<p>
<span class="icon icon--clock"></span>
Duration:
<abbr class="duration" title={{lastBuildStartedAt}}>
{{format-duration repo.lastBuildDuration}}
</abbr>
</p>
<p>
<span class="icon icon--cal"></span>
Finished:
<abbr class="finished_at timeago" title={{lastBuildFinishedAt}}>
{{format-time repo.lastBuildFinishedAt}}
</abbr>
</p>
</div>
{{/with}}
{{else}}
<p class="empty">{{noReposMessage}}</p>
{{/collection}}
{{else}}
{{loading-indicator center=true}}
{{/if}}
</div>
{{/if}}