codecombat/app/templates/account/payments-view.jade

39 lines
1.2 KiB
Text
Raw Normal View History

2014-11-25 14:09:29 -05:00
extends /templates/base
block content
ol.breadcrumb
li
a(href="/")
span.glyphicon.glyphicon-home
li
a(href="/account", data-i18n="nav.account")
2014-11-25 14:09:29 -05:00
li.active(data-i18n="account.payments")
- console.log('render', view.payments.size())
if view.payments.size()
2014-11-25 14:09:29 -05:00
table.table.table-striped
tr
th(data-i18n="account.purchased")
2014-11-25 14:09:29 -05:00
th(data-i18n="account.paid_on")
th(data-i18n="account.service")
th(data-i18n="account.price")
th(data-i18n="account.gems")
for payment in view.payments.models
2014-11-25 14:09:29 -05:00
- var service = payment.get('service')
tr
if payment.get('productID') === 'custom'
td= payment.get('description')
else if payment.get('productID')
td(data-i18n='account.gems')
else
td(data-i18n='subscribe.stripe_description')
td= moment(payment.getCreationDate()).format('l')
2014-11-25 14:09:29 -05:00
if service === 'ios'
td(data-i18n="account.service_apple")
td= payment.get('ios').localPrice
else
td(data-i18n="account.service_web")
td $#{(payment.get('amount')/100).toFixed(2)}
td= payment.get('gems') || '-'