add an empty repos view
This commit is contained in:
parent
d84b5dfd0a
commit
28346ce233
|
@ -34,5 +34,7 @@
|
|||
</div>
|
||||
{{/if}}
|
||||
{{/with}}
|
||||
{{else}}
|
||||
<p class="empty"></p>
|
||||
{{/collection}}
|
||||
</div>
|
||||
|
|
|
@ -1,38 +1,42 @@
|
|||
<div id="repo" {{bindAttr class="view.class"}}>
|
||||
{{#if view.repo.isLoaded}}
|
||||
{{#with view.repo}}
|
||||
<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}}
|
||||
|
||||
{{#if view.isEmpty}}
|
||||
{{view Travis.ReposEmptyView}}
|
||||
{{else}}
|
||||
<span>Loading</span>
|
||||
{{/if}}
|
||||
{{#if view.repo.isLoaded}}
|
||||
{{#with view.repo}}
|
||||
<h3>
|
||||
<a {{bindAttr href="view.urlGithub"}}>{{slug}}</a>
|
||||
</h3>
|
||||
|
||||
<div class="tab">
|
||||
{{outlet pane}}
|
||||
</div>
|
||||
<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}}
|
||||
<span>Loading</span>
|
||||
{{/if}}
|
||||
|
||||
<div class="tab">
|
||||
{{outlet pane}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -2,12 +2,17 @@
|
|||
RepoView: Travis.View.extend
|
||||
templateName: 'repos/show'
|
||||
|
||||
reposBinding: 'Travis.app.router.reposController' # TODO ugh :/
|
||||
repoBinding: 'controller.repo'
|
||||
|
||||
class: (->
|
||||
'loading' unless @get('repo.isLoaded')
|
||||
'loading' if !@get('repo.isLoaded') && !@get('isEmpty')
|
||||
).property('repo.isLoaded')
|
||||
|
||||
isEmpty: (->
|
||||
@get('repos.length') == 0
|
||||
).property('repos.length')
|
||||
|
||||
urlGithub: (->
|
||||
Travis.Urls.githubRepo(@get('repo.slug'))
|
||||
).property('repo.slug'),
|
||||
|
@ -20,6 +25,9 @@
|
|||
Travis.Urls.githubNetwork(@get('repo.slug'))
|
||||
).property('repo.slug'),
|
||||
|
||||
ReposEmptyView: Travis.View.extend
|
||||
template: ''
|
||||
|
||||
RepoShowTabsView: Travis.View.extend
|
||||
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