Merge branch 'profile-new' of github.com:travis-ci/travis-web into profile-new
This commit is contained in:
commit
de41d97229
|
@ -3,4 +3,8 @@
|
||||||
Controller = Ember.ArrayController.extend
|
Controller = Ember.ArrayController.extend
|
||||||
tab: 'accounts'
|
tab: 'accounts'
|
||||||
|
|
||||||
|
userName: (->
|
||||||
|
@get('user.name') || @get('user.login')
|
||||||
|
).property('user.login', 'user.name')
|
||||||
|
|
||||||
`export default Controller`
|
`export default Controller`
|
||||||
|
|
|
@ -4,6 +4,13 @@ Route = TravisRoute.extend
|
||||||
model: ->
|
model: ->
|
||||||
@store.find('account', { all: true })
|
@store.find('account', { all: true })
|
||||||
|
|
||||||
|
setupController: (controller, model) ->
|
||||||
|
user = model.filterBy('type', 'user')[0]
|
||||||
|
orgs = model.filterBy('type', 'organization')
|
||||||
|
|
||||||
|
controller.set('user', user)
|
||||||
|
controller.set('organizations', orgs)
|
||||||
|
|
||||||
renderTemplate: ->
|
renderTemplate: ->
|
||||||
@_super.apply(this, arguments)
|
@_super.apply(this, arguments)
|
||||||
@render 'profile_accounts', outlet: 'left', into: 'profile'
|
@render 'profile_accounts', outlet: 'left', into: 'profile'
|
||||||
|
|
|
@ -5,19 +5,15 @@
|
||||||
<img src="//placehold.it/50x50" alt="">
|
<img src="//placehold.it/50x50" alt="">
|
||||||
</div>
|
</div>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<h1>Justine Arreche</h1>
|
<h1>{{userName}}</h1>
|
||||||
<p>Repositories <strong>12</strong></p>
|
<p>Repositories <strong>{{user.reposCount}}</strong></p>
|
||||||
<p class="profile-user-last">Token: <strong>dfigsd90u34r2hwa9ru239ur2</strong></p>
|
<p class="profile-user-last">Token: <strong>{{auth.currentUser.token}}</strong></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<section class="profile-orgs">
|
<section class="profile-orgs">
|
||||||
<h1>Organizations</h1>
|
<h1>Organizations</h1>
|
||||||
{{#collection "accounts-list" contentBinding="controller"}}
|
{{#collection "accounts-list" contentBinding="organizations"}}
|
||||||
|
|
||||||
{{#if view.account.type == user}}
|
|
||||||
hello user
|
|
||||||
{{/if}}
|
|
||||||
{{#link-to "account" view.account class="name"}}
|
{{#link-to "account" view.account class="name"}}
|
||||||
<div class="media">
|
<div class="media">
|
||||||
<div class="media-elem">
|
<div class="media-elem">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user