mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
Refactor PaymentsView to use view in template
This commit is contained in:
parent
680eb04285
commit
ddf351aac7
2 changed files with 2 additions and 7 deletions
|
@ -10,7 +10,7 @@ block content
|
|||
a(href="/account", data-i18n="nav.account")
|
||||
li.active(data-i18n="account.payments")
|
||||
|
||||
if payments.models.length
|
||||
if view.payments.models.length
|
||||
table.table.table-striped
|
||||
tr
|
||||
th(data-i18n="account.purchased")
|
||||
|
@ -18,7 +18,7 @@ block content
|
|||
th(data-i18n="account.service")
|
||||
th(data-i18n="account.price")
|
||||
th(data-i18n="account.gems")
|
||||
for payment in payments.models
|
||||
for payment in view.payments.models
|
||||
- var service = payment.get('service')
|
||||
tr
|
||||
if payment.get('productID')
|
||||
|
|
|
@ -11,8 +11,3 @@ module.exports = class PaymentsView extends RootView
|
|||
super(options)
|
||||
@payments = new CocoCollection([], { url: '/db/payment', model: Payment, comparator:'_id' })
|
||||
@supermodel.loadCollection(@payments, 'payments', {cache: false})
|
||||
|
||||
getRenderData: ->
|
||||
c = super()
|
||||
c.payments = @payments
|
||||
c
|
||||
|
|
Loading…
Reference in a new issue