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,4 +1,7 @@
|
|||
<div id="repo" {{bindAttr class="view.class"}}>
|
||||
{{#if view.isEmpty}}
|
||||
{{view Travis.ReposEmptyView}}
|
||||
{{else}}
|
||||
{{#if view.repo.isLoaded}}
|
||||
{{#with view.repo}}
|
||||
<h3>
|
||||
|
@ -34,5 +37,6 @@
|
|||
<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