65 lines
2.6 KiB
HTML
65 lines
2.6 KiB
HTML
<!-- Copyright (C) 2019 Storj Labs, Inc.
|
|
See LICENSE for copying information. -->
|
|
|
|
{{define "referralOffers"}}
|
|
<div class="offers-table mt-2 mb-5 container">
|
|
<div class="row">
|
|
<div class="col col-heading">Name</div>
|
|
<div class="col col-heading">Give Credit</div>
|
|
<div class="col col-heading">Get Credit</div>
|
|
<div class="col col-heading">Redeemable Capacity</div>
|
|
<div class="col col-heading">Created</div>
|
|
<div class="col col-heading">Expiration</div>
|
|
<div class="col col-heading">Status</div>
|
|
</div><hr>
|
|
<div class="row offer-heading ">
|
|
<p class="offer-type">Default Offer</p>
|
|
</div>
|
|
{{$defaultOffer := .ReferralOffers.Default}}
|
|
{{if not $defaultOffer.IsEmpty}}
|
|
<div class="row data-row">
|
|
<div class="col ml-3">{{$defaultOffer.Name}}</div>
|
|
<div class="col">${{$defaultOffer.InviteeCredit}}</div>
|
|
<div class="col">${{$defaultOffer.AwardCredit}}</div>
|
|
<div class="col">∞</div>
|
|
<div class="col">{{printf "%.10s" $defaultOffer.CreatedAt}}</div>
|
|
<div class="col">∞</div>
|
|
<div class="col"></div>
|
|
</div><hr>
|
|
{{end}}
|
|
<div class="row offer-heading ">
|
|
<p class="offer-type">Current Offer</p>
|
|
</div>
|
|
{{$currentOffer := .ReferralOffers.Active}}
|
|
{{if not $currentOffer.IsEmpty}}
|
|
<div class="row data-row">
|
|
<div class="col ml-3">{{$currentOffer.Name}}</div>
|
|
<div class="col">${{$currentOffer.InviteeCredit}}</div>
|
|
<div class="col">${{$currentOffer.AwardCredit}}</div>
|
|
<div class="col">{{$currentOffer.RedeemableCap}}</div>
|
|
<div class="col">{{printf "%.10s" $currentOffer.CreatedAt}}</div>
|
|
<div class="col">{{printf "%.10s" $currentOffer.ExpiresAt}}</div>
|
|
<div class="col stop-offer">
|
|
<span data-toggle="modal" data-target=".stop-referral-offer-modal">
|
|
<strong>Live ·</strong>
|
|
</span>
|
|
</div>
|
|
</div><hr>
|
|
{{end}}
|
|
{{template "stopReferralOffer" .}}
|
|
<div class="row offer-heading ">
|
|
<p class="offer-type">Discontinued Offers</p>
|
|
</div>
|
|
{{range .ReferralOffers.Done}}
|
|
<div class="row data-row">
|
|
<div class="col ml-3">{{.Name}}</div>
|
|
<div class="col">${{.InviteeCredit}}</div>
|
|
<div class="col">${{.AwardCredit}}</div>
|
|
<div class="col">{{.RedeemableCap}}</div>
|
|
<div class="col">{{printf "%.10s" .CreatedAt}}</div>
|
|
<div class="col">{{printf "%.10s" .ExpiresAt}}</div>
|
|
<div class="col">off</div>
|
|
</div><hr>
|
|
{{end}}
|
|
</div>
|
|
{{end}} |