This repository has been archived by the owner on Nov 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 128
/
account.tt
233 lines (220 loc) · 10.9 KB
/
account.tt
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<form action="<@ u('My','account') @>" method="post" id="formMyAccount">
<div class="text account">
<div>
<!--<h2>Welcome to your DuckDuckGo community account!</h2>!-->
<div class="alert warning">
<div class="close-warning"></div>
<strong>Tip:</strong> You do not need to share personal information to have or use this account.
</div>
</div>
<@ IF xmpp_userhost != 'dukgo.com' @>
<div>
<div class="alert warning"><div class="close-warning"></div>This account will not work on the live system <a href="https://dukgo.com/">https://dukgo.com/</a>.</div>
<p class="note"><strong>Note: </strong>This is a development system, no data is used for the production environment! All data you enter here is only for testing!</div>
</div>
<@ END @>
<@ IF c.user.admin @>
<div>
<a href="<@ u('Admin','index') @>"><div style="width:100%;height:64px" class="box-highlight developer"><p style="width:100%"><strong>Admin area</strong></p></div></a>
<div class="clear"></div><br/>
</div>
<@ END @>
<!-- LANGUAGES TABLE !-->
<div class="box">
<div class="box-inner">
<table class="account-table" cellspacing="0" cellpadding="0">
<tr>
<th></th>
<th class="account-table_caption">Your Languages</th>
<th class="account-table_caption">Grade</th>
<th class="account-table_BTNadd" id="btnAddNewLanguage">
<@ IF !add_new_language @>
<a href="<@ u('My','account',{ add_new_language => 1 }) @>" class="BTN_submitSmall">Add New Language</a>
<@ END @>
</th>
</tr>
<colgroup>
<col class="account-table_flags" />
<col class=""/>
<col class="" />
<col class="account-table_BTNS" />
</colgroup>
<tbody>
<@ IF c.user.languages @>
<@ FOR user_language IN c.user.user_languages @>
<tr>
<td><img src="<@ user_language.language.flag_url @>" alt="flag" width="16" height="11" /></td>
<td><@ user_language.language.name_in_local @></td>
<td>
<select name="language_grade_<@ user_language.language.id @>">
<option value="1" <@ IF user_language.grade == 1 @>selected="selected"<@ END @>>Basic ability</option>
<option value="2" <@ IF user_language.grade == 2 @>selected="selected"<@ END @>>Intermediate ability</option>
<option value="3" <@ IF user_language.grade == 3 @>selected="selected"<@ END @>>Advanced level</option>
<option value="4" <@ IF user_language.grade == 4 @>selected="selected"<@ END @>>"Near Native" level</option>
<option value="5" <@ IF user_language.grade == 5 @>selected="selected"<@ END @>>Native</option>
<option value="6" <@ IF user_language.grade == 6 @>selected="selected"<@ END @>>Professional proficiency</option>
</select>
</td>
<td class="account-table_BTNS">
<input type="submit" name="update_language_<@ user_language.language.id @>" class="BTN_submitSmall" value="Update" />
<a href="<@ u('My','account',{ remove_language => user_language.language.id }) @>" class="removeLanguage BTN_delete">Remove</a>
<br/>
</td>
</tr>
<@ END @>
<@ END @>
<tr id="formAddUserLanguage">
<td></td>
<td>
<select id="language_id" name="language_id">
<option value="0"><@ l('Please select your language') @></option>
<@ FOREACH list_language IN languages @>
<option value="<@ list_language.id @>" <@ IF c.req.params.locale == list_language.locale @>selected="selected"<@ END @>>
[<@ list_language.locale @>] <@ list_language.name_in_local @>
</option>
<@ END @>
</select>
</td>
<td>
<select name="language_grade" id="grade">
<option value="0"><@ l('Please select your grade of the language') @></option>
<option value="1">Basic ability</option>
<option value="2">Intermediate ability</option>
<option value="3">Advanced level</option>
<option value="4">"Near Native" level</option>
<option value="5">Native</option>
<option value="6">Professional proficiency</option>
</select>
</td>
<td class="account-table_BTNS">
<input type="submit" name="add_language" value="<@ l('Add Language') @>" class="BTN_submitSmall">
</td>
</tr>
</tbody>
</table>
<div id="account-table_ftr">
<div id="account-table_ftrLeft">* <span style="text-decoration:underline">Grade references</span></div>
<div id="account-table_ftrRight">
Are you trying to add a new language that is not listed? <a href="<@ u('Base','requestlanguage') @>"><strong>Request it over here</strong></a>!
</div>
</div>
<div class="tooltip" id="gradeReference">
<h7><strong>Languages Grade References</strong></h7>
<ol>
<li><strong>Basic ability:</strong> Enough to understand written material or simple questions in this language.</li>
<li><strong>Intermediate ability:</strong> Enough for editing or discussions.</li>
<li><strong>Advanced level:</strong> Though you can write in this language with no problem, some small errors might occur.</li>
<li><strong>"Near-native" level:</strong> Although it's not your first language from birth, your ability is something like that of a native speaker.</li>
<li><strong>Native:</strong> You have grown up with this language in your environment.</li>
<li><strong>Professional proficiency:</strong> You are earning your money with work in this language (like writer, translator, etc.)
</ol>
</div>
</div>
<@ IF c.user.languages @>
<a href="<@ u('Translate','index') @>"><div style="width:100%;height:64px" class="box-highlight translation"><p style="width:100%">Help us translate <strong>DuckDuckGo</strong> into your languages.</p></div></a>
<@ END @>
<div class="clear"></div>
</div>
<div class="box">
<div class="box-inner">
<!-- ACCOUNT TABLE !-->
<table class="account-table" cellspacing="0" cellpadding="0">
<tr>
<th class="account-table_caption">Your Account</th>
<th style="width:200px" class="account-table_BTNadd"><a href="<@ u('My','delete') @>" class="BTN_delete">Delete your account</a></th>
</tr>
<colgroup>
<col />
<col />
</colgroup>
<tbody>
<tr>
<td><@ l('Your email') @> (optional)
<@ IF c.user.data.email @>
: <@ c.user.data.email @>
<@ END @>
</td>
<td class="account-table_BTNS">
<a href="<@ u('My','email') @>" class="BTN_submitSmall">
<@ IF c.user.data.email @>Change email<@ ELSE @>Add email<@ END @>
</a>
</td>
</tr>
<tr>
<td>Your password</td>
<td class="account-table_BTNS">
<a href="<@ u('My','changepw') @>" class="BTN_submitSmall">Change password</a>
</td>
</tr>
<tr>
<td>
<@ IF c.user.public @>
<@ l('Your %s is publicly visible','<a href="'_ u('Userpage','home',c.user.username) _'">' _ l('account') _ '</a>') @>
<@ ELSE @>
<@ l('Your account is not publicly visible yet') @>
<@ END @>
</td>
<td class="account-table_BTNS">
<a href="<@ u('My','public') @>" class="BTN_submitSmall">
<@ IF c.user.public @><@ l('Make it private') @><@ ELSE @><@ l('Make it public') @><@ END @>
</a>
</td>
</tr>
<@ IF c.user.public @>
<tr>
<td>
Your <a href="https://www.gravatar.com">Gravatar</a> email
</td>
<td class="account-table_BTNS">
<a href="javascript:" id="add_gravatar_email" class="BTN_submitSmall">Change Gravatar email</a>
</td>
</tr>
<@ END @>
</tbody>
</table>
</div>
</div>
<@ IF c.user.public @>
<div class="box" id="set_gravatar_email">
<div class="box-inner">
<@ IF c.user.data.gravatar_email @>
<h4><@ c.user.data.gravatar_url @><span><@ l('Your Gravatar') @></span></h4>
<@ ELSE @>
<h4><span><@ l('Set your Gravatar email') @></span></h4>
<@ END @>
<label for="gravatar_email" aria-describedby="errorInvalidEmail" class="gravatar_label">
<@ l('Gravatar email') @>:
</label>
<input type="text" class="form-input" name="gravatar_email" id="gravatar_email" value="<@ c.user.data.gravatar_email @>">
<input type="submit" class="BTN_submitSmall" style="float:right;" value="<@ l('Set Gravatar email') @>" name="set_gravatar_email" id="set_gravatar_email">
<div id="error_gravatar_invalid_email" class="error" id="errorInvalidGravatarEmail">
<@ l('You must give a valid email.') @>
</div>
<br/>
<@ IF c.user.data.gravatar_email @>
<input type="submit" class="BTN_submitSmall" style="float:right;" value="<@ l('Delete Gravatar email') @>" name="unset_gravatar_email" id="unset_gravatar_email">
<@ END @>
<br/><br/>
<a href="http://gravatar.com/">More information about Gravatar</a>
</div>
</div>
<@ END @>
<div></div>
<div>
<!-- CHAT !-->
<div class="box">
<div class="box-inner">
<h4><@ l('Your chat (XMPP/Jabber)') @></h4>
<p>We provide a public XMPP/Jabber server bound to this account, which you can add to your prefered client. You can find a list of clients <a href="http://xmpp.org/xmpp-software/clients/">here</a>. XMPP is an open-standard instant communication protocol, like ICQ, MSN or Yahoo. More information you can find on the <a href="http://en.wikipedia.org/wiki/Jabber">Wikipedia Page</a>. You can see directions of how to get set up using the Pidgin client <a href="https://duck.co/topic/duckduckgo-s-new-public-xmpp-jabber-service-on-dukgo-com">here</a>.</p>
<p>
<strong>Username:</strong> <@ c.user.username @><br />
<strong>Domain:</strong> <@ xmpp_userhost @><br />
<strong>Resource:</strong> <@ l('whatever you want') @><br />
<strong>XMPP/Jabber Address</strong>: <@ c.user.username @>@<@ xmpp_userhost @>
</p>
<p class="button"><a href="<@ u('Help','view','xmpp') @>"><@ l('Instructions for using the XMPP/Jabber server') @></a>
</div>
</div>
<div></div>
</div>
</form>