add an empty repos view
This commit is contained in:
parent
d84b5dfd0a
commit
28346ce233
|
@ -34,5 +34,7 @@
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/with}}
|
{{/with}}
|
||||||
|
{{else}}
|
||||||
|
<p class="empty"></p>
|
||||||
{{/collection}}
|
{{/collection}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,38 +1,42 @@
|
||||||
<div id="repo" {{bindAttr class="view.class"}}>
|
<div id="repo" {{bindAttr class="view.class"}}>
|
||||||
{{#if view.repo.isLoaded}}
|
{{#if view.isEmpty}}
|
||||||
{{#with view.repo}}
|
{{view Travis.ReposEmptyView}}
|
||||||
<h3>
|
|
||||||
<a {{bindAttr href="view.urlGithub"}}>{{slug}}</a>
|
|
||||||
</h3>
|
|
||||||
|
|
||||||
<p class="description">{{description}}</p>
|
|
||||||
|
|
||||||
<ul class="github-stats">
|
|
||||||
<li class="language">
|
|
||||||
{{lastBuildLanguage}}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="watchers" title="Watchers" {{bindAttr href="view.urlGithubWatchers"}}>
|
|
||||||
{{stats.watchers}}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="forks" title="Forks" {{bindAttr href="view.urlGithubNetwork"}}>
|
|
||||||
{{stats.forks}}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
{{view Travis.RepoShowTabsView}}
|
|
||||||
{{view Travis.RepoShowToolsView}}
|
|
||||||
{{/with}}
|
|
||||||
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<span>Loading</span>
|
{{#if view.repo.isLoaded}}
|
||||||
{{/if}}
|
{{#with view.repo}}
|
||||||
|
<h3>
|
||||||
|
<a {{bindAttr href="view.urlGithub"}}>{{slug}}</a>
|
||||||
|
</h3>
|
||||||
|
|
||||||
<div class="tab">
|
<p class="description">{{description}}</p>
|
||||||
{{outlet pane}}
|
|
||||||
</div>
|
<ul class="github-stats">
|
||||||
|
<li class="language">
|
||||||
|
{{lastBuildLanguage}}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="watchers" title="Watchers" {{bindAttr href="view.urlGithubWatchers"}}>
|
||||||
|
{{stats.watchers}}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="forks" title="Forks" {{bindAttr href="view.urlGithubNetwork"}}>
|
||||||
|
{{stats.forks}}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
{{view Travis.RepoShowTabsView}}
|
||||||
|
{{view Travis.RepoShowToolsView}}
|
||||||
|
{{/with}}
|
||||||
|
|
||||||
|
{{else}}
|
||||||
|
<span>Loading</span>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
<div class="tab">
|
||||||
|
{{outlet pane}}
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,17 @@
|
||||||
RepoView: Travis.View.extend
|
RepoView: Travis.View.extend
|
||||||
templateName: 'repos/show'
|
templateName: 'repos/show'
|
||||||
|
|
||||||
|
reposBinding: 'Travis.app.router.reposController' # TODO ugh :/
|
||||||
repoBinding: 'controller.repo'
|
repoBinding: 'controller.repo'
|
||||||
|
|
||||||
class: (->
|
class: (->
|
||||||
'loading' unless @get('repo.isLoaded')
|
'loading' if !@get('repo.isLoaded') && !@get('isEmpty')
|
||||||
).property('repo.isLoaded')
|
).property('repo.isLoaded')
|
||||||
|
|
||||||
|
isEmpty: (->
|
||||||
|
@get('repos.length') == 0
|
||||||
|
).property('repos.length')
|
||||||
|
|
||||||
urlGithub: (->
|
urlGithub: (->
|
||||||
Travis.Urls.githubRepo(@get('repo.slug'))
|
Travis.Urls.githubRepo(@get('repo.slug'))
|
||||||
).property('repo.slug'),
|
).property('repo.slug'),
|
||||||
|
@ -20,6 +25,9 @@
|
||||||
Travis.Urls.githubNetwork(@get('repo.slug'))
|
Travis.Urls.githubNetwork(@get('repo.slug'))
|
||||||
).property('repo.slug'),
|
).property('repo.slug'),
|
||||||
|
|
||||||
|
ReposEmptyView: Travis.View.extend
|
||||||
|
template: ''
|
||||||
|
|
||||||
RepoShowTabsView: Travis.View.extend
|
RepoShowTabsView: Travis.View.extend
|
||||||
templateName: 'repos/show/tabs'
|
templateName: 'repos/show/tabs'
|
||||||
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
5fb464fb
|
102985b4
|
Loading…
Reference in New Issue
Block a user