travis-web/app/templates/caches.hbs
Piotr Sarnacki bfb4946df8 Show caches also if there're no caches for push builds
This commit fixes caches view to show caches also if only PR caches
exist. Previous version checked for pushes only.
2015-05-06 11:34:02 +02:00

29 lines
1.1 KiB
Handlebars

{{#if cachesExist}}
<div class="caches-header">
<h1 class="caches-title">All caches <small>(<a href="http://docs.travis-ci.com/user/caching/" title="">documentation</a>)</small></h1>
<a href="#" {{action "deleteRepoCache"}} {{bind-attr class="isDeleting:deleting :delete-repo-caches :button--delete"}}>
Delete all repository caches
</a>
</div>
{{#if model.pushes.length}}
<h2 class="caches-title">Pushes</h2>
<ul id="caches" class="caches">
{{#each cache in model.pushes }}
{{caches-item cache=cache repo=repo caches=model.pushes}}
{{/each}}
</ul>
{{/if}}
{{#if model.pullRequests.length}}
<h2 class="caches-title">Pull Requests</h2>
<ul class="caches">
{{#each cache in model.pullRequests }}
{{caches-item cache=cache repo=repo caches=model.pullRequests}}
{{/each}}
</ul>
{{/if}}
{{else}}
<p class="caches-helptext">No caches have been created yet,<br>read more on <a href="http://docs.travis-ci.com/user/caching/" title="">how to setup caching with your build</a>.</p>
{{/if}}