This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 308
/
connected-accounts.html
116 lines (105 loc) · 4.57 KB
/
connected-accounts.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
{% from 'templates/auth.html' import auth_button with context %}
<h2>Connected Accounts</h2>
<table id="accounts">
{% for platform in website.platforms %}
{% set account = accounts.get(platform.name, None) %}
<tr>
<td class="account-type">
<img src="/assets/{{ platform.name }}.png" />
</td>
<td class="account-details">
{% if account == None %}
{% if not user.ANON and user.participant == participant %}
{% call auth_button(platform.name, 'connect') %}
Connect a {{ platform.display_name }} account
{% endcall %}
{% else %}
No {{ platform.display_name }} account connected.
{% endif %}
{% else %}
<a rel="me" href="{{ account.html_url|e }}"
><img class="avatar" src="{{ get_avatar_url(account)|e }}"
/>{{ account.user_name|e }}
{% if account.display_name and account.display_name != account.user_name %}
({{ account.display_name|e }})
{% endif %}
</a>
<div class="account-type">on {{ platform.display_name }}</div>
{% endif %}
</td>
</tr>
{% endfor %}
<tr>
<td class="account-type">
<img src="/assets/balanced-avatar.png" />
</td>
<td class="account-details">
{% if user.participant == participant %}
<a href="/credit-card.html">Credit card</a>:
<!--
These spans are here because otherwise Chrome effs up the
unicode(?!)
-->
<span>{% if participant.last_bill_result != "" %}✘{% else %}✔{% endif %}</span>
<a href="/bank-account.html">Bank account</a>:
<span>{% if participant.last_ach_result != "" %}✘{% else %}✔{% endif %}</span>
{% else %}
Credit card:
<span>{% if participant.last_bill_result != "" %}✘{% else %}✔{% endif %}</span>
Bank account:
<span>{% if participant.last_ach_result != "" %}✘{% else %}✔{% endif %}</span>
{% endif %}
<div class="account-type">{% if user.ADMIN and participant.balanced_customer_href %}
<a href="https://dashboard.balancedpayments.com/#/{{ participant.balanced_customer_href[4:] }}"
>on Balanced Payments</a>{% else %}on Balanced Payments{% endif %}</div>
</td>
</tr>
<tr>
<td class="account-type">
<img src="/assets/bitcoin.png" />
</td>
<td class="account-details">
{% if not user.ANON and user.participant == participant %}
<div class="bitcoin">
{% else %}
<div>
{% endif %}
{% if participant.bitcoin_address %}
<a rel="me" href="http://blockchain.info/address/{{ participant.bitcoin_address }}">
{{ participant.bitcoin_address }}
</a>
{% if not user.ANON and user.participant == participant %}
<div class="edit-bitcoin">
(<a href="javascript:;" class="toggle-bitcoin">Edit</a>) Bitcoin address
</div>
{% else %}
<div class="account-type">
Bitcoin address
</div>
{% endif %}
{% else %}
{% if not user.ANON and user.participant == participant %}
Add a <a href="javascript:;" class="toggle-bitcoin">Bitcoin address</a>.
{% else %}
No Bitcoin receiving address.
{% endif %}
{% endif %}
</div>
<form class="bitcoin-submit">
<div class="address">
<input type="text" class="bitcoin hidden"
{% if participant.bitcoin_address %}
value="{{ participant.bitcoin_address }}"
{% endif %}
>
</div>
<div class="buttons">
<button type="submit" class="bitcoin hidden">Save</button>
<button type="cancel" class="bitcoin cancel hidden">Cancel</button>
</div>
</form>
</td>
</tr>
</table>