2015-09-25 13:03:44 -04:00
|
|
|
extends /templates/base
|
|
|
|
|
|
|
|
block content
|
|
|
|
|
|
|
|
if me.get('anonymous')
|
|
|
|
p(data-i18n="account_settings.not_logged_in") Log in or create an account to change your settings.
|
|
|
|
|
|
|
|
else
|
|
|
|
ol.breadcrumb
|
|
|
|
li
|
|
|
|
a(href="/")
|
|
|
|
span.glyphicon.glyphicon-home
|
|
|
|
li
|
|
|
|
a(href="/account", data-i18n="nav.account")
|
2015-10-23 11:49:05 -04:00
|
|
|
li.active(data-i18n="account.prepaid_codes")
|
2015-09-25 13:03:44 -04:00
|
|
|
|
|
|
|
.row
|
|
|
|
.col-md-12
|
|
|
|
.panel.panel-default
|
|
|
|
.panel-heading
|
|
|
|
.panel-title
|
|
|
|
a(data-toggle="collapse" href="#purchasepanel")
|
|
|
|
span(data-i18n="account_prepaid.purchase_code")
|
2015-09-25 18:21:48 -04:00
|
|
|
.panel-collapse.collapse(class=ppcQuery ? "": "in")#purchasepanel
|
2015-09-25 13:03:44 -04:00
|
|
|
.panel-body
|
2015-10-23 11:49:05 -04:00
|
|
|
p(data-i18n="account_prepaid.purchase_code1")
|
|
|
|
p(data-i18n="account_prepaid.purchase_code2")
|
|
|
|
p(data-i18n="account_prepaid.purchase_code3")
|
2015-09-25 13:03:44 -04:00
|
|
|
.form-horizontal
|
|
|
|
.form-group
|
2015-10-23 11:49:05 -04:00
|
|
|
label.control-label.col-md-2(for="users", data-i18n="account_prepaid.users")
|
2015-09-25 13:03:44 -04:00
|
|
|
.col-md-2
|
2015-10-21 17:16:44 -04:00
|
|
|
input#users-input.form-control(name="users", type="number", value="#{purchase.users}", min=1)
|
2015-09-25 13:03:44 -04:00
|
|
|
.form-group
|
2015-10-23 11:49:05 -04:00
|
|
|
label.control-label.col-md-2(for="months", data-i18n="account_prepaid.months")
|
2015-09-25 13:03:44 -04:00
|
|
|
.col-md-2
|
2015-10-21 17:16:44 -04:00
|
|
|
input#months-input.form-control(name="months", type="number", value="#{purchase.months}", min=1)
|
2015-09-25 13:03:44 -04:00
|
|
|
.form-group
|
|
|
|
label.control-label.col-md-2(data-i18n="account_prepaid.purchase_total")
|
|
|
|
.col-md-10
|
|
|
|
p.form-control-static $
|
2015-12-14 14:10:37 -05:00
|
|
|
span#total #{(purchase.total/100).toFixed(2)}
|
2015-10-21 17:16:44 -04:00
|
|
|
button#purchase-btn.btn.btn-success.pull-right(data-i18n="account_prepaid.purchase_button")
|
2015-09-25 13:03:44 -04:00
|
|
|
.row
|
|
|
|
.col-md-12
|
|
|
|
.panel.panel-default
|
|
|
|
.panel-heading
|
|
|
|
.panel-title
|
|
|
|
a(data-toggle="collapse" href="#redeempanel")
|
|
|
|
span(data-i18n="account_prepaid.redeem_codes")
|
|
|
|
.panel-collapse.collapse.in#redeempanel
|
|
|
|
.panel-body
|
2015-09-25 18:21:48 -04:00
|
|
|
p
|
2015-10-23 11:49:05 -04:00
|
|
|
span(data-i18n="account_prepaid.prepaid_code")
|
|
|
|
span.spr :
|
2015-09-25 18:21:48 -04:00
|
|
|
input.input-ppc(name="ppc", type="text", value="#{ppc}", required)
|
|
|
|
if ppcInfo && ppcInfo.length > 0
|
|
|
|
p
|
|
|
|
each info in ppcInfo
|
|
|
|
div
|
|
|
|
!= info
|
|
|
|
p
|
|
|
|
span.spr
|
2015-10-23 11:49:05 -04:00
|
|
|
button#lookup-code-btn.btn.btn-info(data-i18n="account_prepaid.lookup_code")
|
2015-09-25 18:21:48 -04:00
|
|
|
span
|
2015-10-23 11:49:05 -04:00
|
|
|
button#redeem-code-btn.btn.btn-success(data-i18n="account_prepaid.apply_account")
|
2015-09-25 13:03:44 -04:00
|
|
|
.row
|
|
|
|
.col-md-12
|
2015-12-14 14:10:37 -05:00
|
|
|
#codes-panel.panel.panel-default
|
2015-09-25 13:03:44 -04:00
|
|
|
.panel-heading
|
|
|
|
.panel-title
|
|
|
|
a(data-toggle="collapse" href="#codeslist")
|
|
|
|
span(data-i18n="account_prepaid.your_codes")
|
|
|
|
.panel-collapse.collapse.in#codeslist
|
|
|
|
.panel-body
|
|
|
|
if codes && codes.length
|
|
|
|
table.table.table-striped
|
|
|
|
tr
|
|
|
|
th
|
2015-10-23 11:49:05 -04:00
|
|
|
span.spr(data-i18n="[title]account_prepaid.copy_link;general.code", title="You can copy the code's link and send it to someone.")
|
2015-09-25 13:03:44 -04:00
|
|
|
span.glyphicon.glyphicon-question-sign(aria-hidden="true")
|
2015-10-23 11:49:05 -04:00
|
|
|
th(data-i18n="account_prepaid.months")
|
2015-11-17 19:21:04 -05:00
|
|
|
th Remaining Users
|
|
|
|
th Total Users
|
2015-10-23 11:49:05 -04:00
|
|
|
th(data-i18n="user.status")
|
2015-09-25 13:03:44 -04:00
|
|
|
for code in codes.models
|
|
|
|
if code.get('type') === 'terminal_subscription'
|
|
|
|
- var owner = (code.get('creator') == me.id ? true : false)
|
|
|
|
- var properties = code.get('properties')
|
|
|
|
- var redeemers = code.get('redeemers')
|
2015-11-17 19:21:04 -05:00
|
|
|
- var redeemed = redeemers ? redeemers.length : 0
|
2015-09-25 13:03:44 -04:00
|
|
|
tr
|
|
|
|
td
|
|
|
|
a(href="/account/prepaid?_ppc=#{code.get('code')}")= code.get('code')
|
|
|
|
td= properties.months || '-'
|
|
|
|
if owner
|
|
|
|
td= code.get('maxRedeemers') - redeemed
|
2015-11-17 19:21:04 -05:00
|
|
|
td= code.get('maxRedeemers')
|
2015-10-23 11:49:05 -04:00
|
|
|
td(data-i18n="account.purchased")
|
2015-09-25 13:03:44 -04:00
|
|
|
else
|
2015-11-17 19:21:04 -05:00
|
|
|
td -
|
|
|
|
td -
|
2015-10-23 11:49:05 -04:00
|
|
|
td(data-i18n="account_prepaid.redeemed")
|
2015-09-25 13:03:44 -04:00
|
|
|
else
|
2015-10-23 11:49:05 -04:00
|
|
|
p(data-i18n="account_prepaid.no_codes")
|