##// END OF EJS Templates
user/user-groups: render description in unified way with support of metatags
marcink -
r4025:884a595d default
parent child Browse files
Show More
@@ -1,64 +1,76 b''
1 1 <%namespace name="base" file="/base/base.mako"/>
2 <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
3
2 4 <div class="panel panel-default user-profile">
3 5 <div class="panel-heading">
4 6 <h3 class="panel-title">${_('My Profile')}</h3>
5 7 <a href="${h.route_path('my_account_edit')}" class="panel-edit">${_('Edit')}</a>
6 8 </div>
7 9
8 10 <div class="panel-body fields">
9 11 <div class="field">
10 12 <div class="label">
11 13 ${_('Photo')}:
12 14 </div>
13 15 <div class="input">
14 16 <div class="text-as-placeholder">
15 17 %if c.visual.use_gravatar:
16 18 ${base.gravatar(c.user.email, 100)}
17 19 %else:
18 20 ${base.gravatar(c.user.email, 100)}
19 21 %endif
20 22 </div>
21 23 </div>
22 24 </div>
23 25 <div class="field">
24 26 <div class="label">
25 27 ${_('Username')}:
26 28 </div>
27 29 <div class="input">
28 30 <div class="text-as-placeholder">
29 31 ${c.user.username}
30 32 </div>
31 33 </div>
32 34 </div>
33 35 <div class="field">
34 36 <div class="label">
35 37 ${_('First Name')}:
36 38 </div>
37 39 <div class="input">
38 40 <div class="text-as-placeholder">
39 41 ${c.user.first_name}
40 42 </div>
41 43 </div>
42 44 </div>
43 45 <div class="field">
44 46 <div class="label">
45 47 ${_('Last Name')}:
46 48 </div>
47 49 <div class="input">
48 50 <div class="text-as-placeholder">
49 51 ${c.user.last_name}
50 52 </div>
51 53 </div>
52 54 </div>
53 55 <div class="field">
54 56 <div class="label">
57 ${_('Description')}:
58 </div>
59 <div class="input">
60 <div class="text-as-placeholder">
61 ${dt.render_description(c.user.description, c.visual.stylify_metatags)}
62 </div>
63 </div>
64 </div>
65 <div class="field">
66 <div class="label">
55 67 ${_('Email')}:
56 68 </div>
57 69 <div class="input">
58 70 <div class="text-as-placeholder">
59 71 ${c.user.email or _('Missing email, please update your user email address.')}
60 72 </div>
61 73 </div>
62 74 </div>
63 75 </div>
64 76 </div> No newline at end of file
@@ -1,462 +1,475 b''
1 1 ## DATA TABLE RE USABLE ELEMENTS
2 2 ## usage:
3 3 ## <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
4 4 <%namespace name="base" file="/base/base.mako"/>
5 5
6 6 <%def name="metatags_help()">
7 7 <table>
8 8 <%
9 9 example_tags = [
10 10 ('state','[stable]'),
11 11 ('state','[stale]'),
12 12 ('state','[featured]'),
13 13 ('state','[dev]'),
14 14 ('state','[dead]'),
15 15 ('state','[deprecated]'),
16 16
17 17 ('label','[personal]'),
18 18 ('generic','[v2.0.0]'),
19 19
20 20 ('lang','[lang =&gt; JavaScript]'),
21 21 ('license','[license =&gt; LicenseName]'),
22 22
23 23 ('ref','[requires =&gt; RepoName]'),
24 24 ('ref','[recommends =&gt; GroupName]'),
25 25 ('ref','[conflicts =&gt; SomeName]'),
26 26 ('ref','[base =&gt; SomeName]'),
27 27 ('url','[url =&gt; [linkName](https://rhodecode.com)]'),
28 28 ('see','[see =&gt; http://rhodecode.com]'),
29 29 ]
30 30 %>
31 31 % for tag_type, tag in example_tags:
32 32 <tr>
33 33 <td>${tag|n}</td>
34 34 <td>${h.style_metatag(tag_type, tag)|n}</td>
35 35 </tr>
36 36 % endfor
37 37 </table>
38 38 </%def>
39 39
40 <%def name="render_description(description, stylify_metatags)">
41 <%
42 tags = []
43 if stylify_metatags:
44 tags, description = h.extract_metatags(description)
45 %>
46 % for tag_type, tag in tags:
47 ${h.style_metatag(tag_type, tag)|n,trim}
48 % endfor
49 <code style="white-space: pre-wrap">${description}</code>
50 </%def>
51
40 52 ## REPOSITORY RENDERERS
41 53 <%def name="quick_menu(repo_name)">
42 54 <i class="icon-more"></i>
43 55 <div class="menu_items_container hidden">
44 56 <ul class="menu_items">
45 57 <li>
46 58 <a title="${_('Summary')}" href="${h.route_path('repo_summary',repo_name=repo_name)}">
47 59 <span>${_('Summary')}</span>
48 60 </a>
49 61 </li>
50 62 <li>
51 63 <a title="${_('Commits')}" href="${h.route_path('repo_commits',repo_name=repo_name)}">
52 64 <span>${_('Commits')}</span>
53 65 </a>
54 66 </li>
55 67 <li>
56 68 <a title="${_('Files')}" href="${h.route_path('repo_files:default_commit',repo_name=repo_name)}">
57 69 <span>${_('Files')}</span>
58 70 </a>
59 71 </li>
60 72 <li>
61 73 <a title="${_('Fork')}" href="${h.route_path('repo_fork_new',repo_name=repo_name)}">
62 74 <span>${_('Fork')}</span>
63 75 </a>
64 76 </li>
65 77 </ul>
66 78 </div>
67 79 </%def>
68 80
69 81 <%def name="repo_name(name,rtype,rstate,private,archived,fork_of,short_name=False,admin=False)">
70 82 <%
71 83 def get_name(name,short_name=short_name):
72 84 if short_name:
73 85 return name.split('/')[-1]
74 86 else:
75 87 return name
76 88 %>
77 89 <div class="${'repo_state_pending' if rstate == 'repo_state_pending' else ''} truncate">
78 90 ##NAME
79 91 <a href="${h.route_path('edit_repo',repo_name=name) if admin else h.route_path('repo_summary',repo_name=name)}">
80 92
81 93 ##TYPE OF REPO
82 94 %if h.is_hg(rtype):
83 95 <span title="${_('Mercurial repository')}"><i class="icon-hg" style="font-size: 14px;"></i></span>
84 96 %elif h.is_git(rtype):
85 97 <span title="${_('Git repository')}"><i class="icon-git" style="font-size: 14px"></i></span>
86 98 %elif h.is_svn(rtype):
87 99 <span title="${_('Subversion repository')}"><i class="icon-svn" style="font-size: 14px"></i></span>
88 100 %endif
89 101
90 102 ##PRIVATE/PUBLIC
91 103 %if private is True and c.visual.show_private_icon:
92 104 <i class="icon-lock" title="${_('Private repository')}"></i>
93 105 %elif private is False and c.visual.show_public_icon:
94 106 <i class="icon-unlock-alt" title="${_('Public repository')}"></i>
95 107 %else:
96 108 <span></span>
97 109 %endif
98 110 ${get_name(name)}
99 111 </a>
100 112 %if fork_of:
101 113 <a href="${h.route_path('repo_summary',repo_name=fork_of.repo_name)}"><i class="icon-code-fork"></i></a>
102 114 %endif
103 115 %if rstate == 'repo_state_pending':
104 116 <span class="creation_in_progress tooltip" title="${_('This repository is being created in a background task')}">
105 117 (${_('creating...')})
106 118 </span>
107 119 %endif
108 120
109 121 </div>
110 122 </%def>
111 123
112 124 <%def name="repo_desc(description, stylify_metatags)">
113 125 <%
114 126 tags, description = h.extract_metatags(description)
115 127 %>
116 128
117 129 <div class="truncate-wrap">
118 130 % if stylify_metatags:
119 131 % for tag_type, tag in tags:
120 132 ${h.style_metatag(tag_type, tag)|n}
121 133 % endfor
122 134 % endif
123 135 ${description}
124 136 </div>
125 137
126 138 </%def>
127 139
128 140 <%def name="last_change(last_change)">
129 141 ${h.age_component(last_change, time_is_local=True)}
130 142 </%def>
131 143
132 144 <%def name="revision(name,rev,tip,author,last_msg, commit_date)">
133 145 <div>
134 146 %if rev >= 0:
135 147 <code><a title="${h.tooltip('%s\n%s\n\n%s' % (author, commit_date, last_msg))}" class="tooltip" href="${h.route_path('repo_commit',repo_name=name,commit_id=tip)}">${'r%s:%s' % (rev,h.short_id(tip))}</a></code>
136 148 %else:
137 149 ${_('No commits yet')}
138 150 %endif
139 151 </div>
140 152 </%def>
141 153
142 154 <%def name="rss(name)">
143 155 %if c.rhodecode_user.username != h.DEFAULT_USER:
144 156 <a title="${h.tooltip(_('Subscribe to %s rss feed')% name)}" href="${h.route_path('rss_feed_home', repo_name=name, _query=dict(auth_token=c.rhodecode_user.feed_token))}"><i class="icon-rss-sign"></i></a>
145 157 %else:
146 158 <a title="${h.tooltip(_('Subscribe to %s rss feed')% name)}" href="${h.route_path('rss_feed_home', repo_name=name)}"><i class="icon-rss-sign"></i></a>
147 159 %endif
148 160 </%def>
149 161
150 162 <%def name="atom(name)">
151 163 %if c.rhodecode_user.username != h.DEFAULT_USER:
152 164 <a title="${h.tooltip(_('Subscribe to %s atom feed')% name)}" href="${h.route_path('atom_feed_home', repo_name=name, _query=dict(auth_token=c.rhodecode_user.feed_token))}"><i class="icon-rss-sign"></i></a>
153 165 %else:
154 166 <a title="${h.tooltip(_('Subscribe to %s atom feed')% name)}" href="${h.route_path('atom_feed_home', repo_name=name)}"><i class="icon-rss-sign"></i></a>
155 167 %endif
156 168 </%def>
157 169
158 170 <%def name="user_gravatar(email, size=16)">
159 171 <div class="rc-user tooltip" title="${h.tooltip(h.author_string(email))}">
160 172 ${base.gravatar(email, 16)}
161 173 </div>
162 174 </%def>
163 175
164 176 <%def name="repo_actions(repo_name, super_user=True)">
165 177 <div>
166 178 <div class="grid_edit">
167 179 <a href="${h.route_path('edit_repo',repo_name=repo_name)}" title="${_('Edit')}">
168 180 Edit
169 181 </a>
170 182 </div>
171 183 <div class="grid_delete">
172 184 ${h.secure_form(h.route_path('edit_repo_advanced_delete', repo_name=repo_name), request=request)}
173 185 ${h.submit('remove_%s' % repo_name,_('Delete'),class_="btn btn-link btn-danger",
174 186 onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo_name+"');")}
175 187 ${h.end_form()}
176 188 </div>
177 189 </div>
178 190 </%def>
179 191
180 192 <%def name="repo_state(repo_state)">
181 193 <div>
182 194 %if repo_state == 'repo_state_pending':
183 195 <div class="tag tag4">${_('Creating')}</div>
184 196 %elif repo_state == 'repo_state_created':
185 197 <div class="tag tag1">${_('Created')}</div>
186 198 %else:
187 199 <div class="tag alert2" title="${h.tooltip(repo_state)}">invalid</div>
188 200 %endif
189 201 </div>
190 202 </%def>
191 203
192 204
193 205 ## REPO GROUP RENDERERS
194 206 <%def name="quick_repo_group_menu(repo_group_name)">
195 207 <i class="icon-more"></i>
196 208 <div class="menu_items_container hidden">
197 209 <ul class="menu_items">
198 210 <li>
199 211 <a href="${h.route_path('repo_group_home', repo_group_name=repo_group_name)}">${_('Summary')}</a>
200 212 </li>
201 213
202 214 </ul>
203 215 </div>
204 216 </%def>
205 217
206 218 <%def name="repo_group_name(repo_group_name, children_groups=None)">
207 219 <div>
208 220 <a href="${h.route_path('repo_group_home', repo_group_name=repo_group_name)}">
209 221 <i class="icon-repo-group" title="${_('Repository group')}" style="font-size: 14px"></i>
210 222 %if children_groups:
211 223 ${h.literal(' &raquo; '.join(children_groups))}
212 224 %else:
213 225 ${repo_group_name}
214 226 %endif
215 227 </a>
216 228 </div>
217 229 </%def>
218 230
219 231 <%def name="repo_group_desc(description, personal, stylify_metatags)">
220 232
221 233 <%
234 if stylify_metatags:
222 235 tags, description = h.extract_metatags(description)
223 236 %>
224 237
225 238 <div class="truncate-wrap">
226 239 % if personal:
227 240 <div class="metatag" tag="personal">${_('personal')}</div>
228 241 % endif
229 242
230 243 % if stylify_metatags:
231 244 % for tag_type, tag in tags:
232 245 ${h.style_metatag(tag_type, tag)|n}
233 246 % endfor
234 247 % endif
235 248 ${description}
236 249 </div>
237 250
238 251 </%def>
239 252
240 253 <%def name="repo_group_actions(repo_group_id, repo_group_name, gr_count)">
241 254 <div class="grid_edit">
242 255 <a href="${h.route_path('edit_repo_group',repo_group_name=repo_group_name)}" title="${_('Edit')}">Edit</a>
243 256 </div>
244 257 <div class="grid_delete">
245 258 ${h.secure_form(h.route_path('edit_repo_group_advanced_delete', repo_group_name=repo_group_name), request=request)}
246 259 ${h.submit('remove_%s' % repo_group_name,_('Delete'),class_="btn btn-link btn-danger",
247 260 onclick="return confirm('"+_ungettext('Confirm to delete this group: %s with %s repository','Confirm to delete this group: %s with %s repositories',gr_count) % (repo_group_name, gr_count)+"');")}
248 261 ${h.end_form()}
249 262 </div>
250 263 </%def>
251 264
252 265
253 266 <%def name="user_actions(user_id, username)">
254 267 <div class="grid_edit">
255 268 <a href="${h.route_path('user_edit',user_id=user_id)}" title="${_('Edit')}">
256 269 ${_('Edit')}
257 270 </a>
258 271 </div>
259 272 <div class="grid_delete">
260 273 ${h.secure_form(h.route_path('user_delete', user_id=user_id), request=request)}
261 274 ${h.submit('remove_',_('Delete'),id="remove_user_%s" % user_id, class_="btn btn-link btn-danger",
262 275 onclick="return confirm('"+_('Confirm to delete this user: %s') % username+"');")}
263 276 ${h.end_form()}
264 277 </div>
265 278 </%def>
266 279
267 280 <%def name="user_group_actions(user_group_id, user_group_name)">
268 281 <div class="grid_edit">
269 282 <a href="${h.route_path('edit_user_group', user_group_id=user_group_id)}" title="${_('Edit')}">Edit</a>
270 283 </div>
271 284 <div class="grid_delete">
272 285 ${h.secure_form(h.route_path('user_groups_delete', user_group_id=user_group_id), request=request)}
273 286 ${h.submit('remove_',_('Delete'),id="remove_group_%s" % user_group_id, class_="btn btn-link btn-danger",
274 287 onclick="return confirm('"+_('Confirm to delete this user group: %s') % user_group_name+"');")}
275 288 ${h.end_form()}
276 289 </div>
277 290 </%def>
278 291
279 292
280 293 <%def name="user_name(user_id, username)">
281 294 ${h.link_to(h.person(username, 'username_or_name_or_email'), h.route_path('user_edit', user_id=user_id))}
282 295 </%def>
283 296
284 297 <%def name="user_profile(username)">
285 298 ${base.gravatar_with_user(username, 16)}
286 299 </%def>
287 300
288 301 <%def name="user_group_name(user_group_name)">
289 302 <div>
290 303 <i class="icon-user-group" title="${_('User group')}"></i>
291 304 ${h.link_to_group(user_group_name)}
292 305 </div>
293 306 </%def>
294 307
295 308
296 309 ## GISTS
297 310
298 311 <%def name="gist_gravatar(full_contact)">
299 312 <div class="gist_gravatar">
300 313 ${base.gravatar(full_contact, 30)}
301 314 </div>
302 315 </%def>
303 316
304 317 <%def name="gist_access_id(gist_access_id, full_contact)">
305 318 <div>
306 319 <b>
307 320 <a href="${h.route_path('gist_show', gist_id=gist_access_id)}">gist: ${gist_access_id}</a>
308 321 </b>
309 322 </div>
310 323 </%def>
311 324
312 325 <%def name="gist_author(full_contact, created_on, expires)">
313 326 ${base.gravatar_with_user(full_contact, 16)}
314 327 </%def>
315 328
316 329
317 330 <%def name="gist_created(created_on)">
318 331 <div class="created">
319 332 ${h.age_component(created_on, time_is_local=True)}
320 333 </div>
321 334 </%def>
322 335
323 336 <%def name="gist_expires(expires)">
324 337 <div class="created">
325 338 %if expires == -1:
326 339 ${_('never')}
327 340 %else:
328 341 ${h.age_component(h.time_to_utcdatetime(expires))}
329 342 %endif
330 343 </div>
331 344 </%def>
332 345
333 346 <%def name="gist_type(gist_type)">
334 347 %if gist_type != 'public':
335 348 <div class="tag">${_('Private')}</div>
336 349 %endif
337 350 </%def>
338 351
339 352 <%def name="gist_description(gist_description)">
340 353 ${gist_description}
341 354 </%def>
342 355
343 356
344 357 ## PULL REQUESTS GRID RENDERERS
345 358
346 359 <%def name="pullrequest_target_repo(repo_name)">
347 360 <div class="truncate">
348 361 ${h.link_to(repo_name,h.route_path('repo_summary',repo_name=repo_name))}
349 362 </div>
350 363 </%def>
351 364
352 365 <%def name="pullrequest_status(status)">
353 366 <i class="icon-circle review-status-${status}"></i>
354 367 </%def>
355 368
356 369 <%def name="pullrequest_title(title, description)">
357 370 ${title}
358 371 </%def>
359 372
360 373 <%def name="pullrequest_comments(comments_nr)">
361 374 <i class="icon-comment"></i> ${comments_nr}
362 375 </%def>
363 376
364 377 <%def name="pullrequest_name(pull_request_id, target_repo_name, short=False)">
365 378 <a href="${h.route_path('pullrequest_show',repo_name=target_repo_name,pull_request_id=pull_request_id)}">
366 379 % if short:
367 380 #${pull_request_id}
368 381 % else:
369 382 ${_('Pull request #%(pr_number)s') % {'pr_number': pull_request_id,}}
370 383 % endif
371 384 </a>
372 385 </%def>
373 386
374 387 <%def name="pullrequest_updated_on(updated_on)">
375 388 ${h.age_component(h.time_to_utcdatetime(updated_on))}
376 389 </%def>
377 390
378 391 <%def name="pullrequest_author(full_contact)">
379 392 ${base.gravatar_with_user(full_contact, 16)}
380 393 </%def>
381 394
382 395
383 396 ## ARTIFACT RENDERERS
384 397 <%def name="repo_artifact_name(repo_name, file_uid, artifact_display_name)">
385 398 <a href="${h.route_path('repo_artifacts_get', repo_name=repo_name, uid=file_uid)}">
386 399 ${artifact_display_name or '_EMPTY_NAME_'}
387 400 </a>
388 401 </%def>
389 402
390 403 <%def name="repo_artifact_uid(repo_name, file_uid)">
391 404 <code>${h.shorter(file_uid, size=24, prefix=True)}</code>
392 405 <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${h.route_url('repo_artifacts_get', repo_name=repo_name, uid=file_uid)}" title="${_('Copy the full url')}"></i>
393 406 </%def>
394 407
395 408 <%def name="repo_artifact_sha256(artifact_sha256)">
396 409 <div class="code">${h.shorter(artifact_sha256, 12)}<i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${artifact_sha256}" title="${_('Copy the sha256 ({})').format(artifact_sha256)}"></i></div>
397 410 </%def>
398 411
399 412 <%def name="repo_artifact_actions(repo_name, file_store_id, file_uid)">
400 413 ## <div class="grid_edit">
401 414 ## <a href="#Edit" title="${_('Edit')}">${_('Edit')}</a>
402 415 ## </div>
403 416 <div class="grid_edit">
404 417 <a href="${h.route_path('repo_artifacts_info', repo_name=repo_name, uid=file_store_id)}" title="${_('Info')}">${_('Info')}</a>
405 418 </div>
406 419 % if h.HasRepoPermissionAny('repository.admin')(c.repo_name):
407 420 <div class="grid_delete">
408 421 ${h.secure_form(h.route_path('repo_artifacts_delete', repo_name=repo_name, uid=file_store_id), request=request)}
409 422 ${h.submit('remove_',_('Delete'),id="remove_artifact_%s" % file_store_id, class_="btn btn-link btn-danger",
410 423 onclick="return confirm('"+_('Confirm to delete this artifact: %s') % file_uid+"');")}
411 424 ${h.end_form()}
412 425 </div>
413 426 % endif
414 427 </%def>
415 428
416 429 <%def name="markup_form(form_id, form_text='', help_text=None)">
417 430
418 431 <div class="markup-form">
419 432 <div class="markup-form-area">
420 433 <div class="markup-form-area-header">
421 434 <ul class="nav-links clearfix">
422 435 <li class="active">
423 436 <a href="#edit-text" tabindex="-1" id="edit-btn_${form_id}">${_('Write')}</a>
424 437 </li>
425 438 <li class="">
426 439 <a href="#preview-text" tabindex="-1" id="preview-btn_${form_id}">${_('Preview')}</a>
427 440 </li>
428 441 </ul>
429 442 </div>
430 443
431 444 <div class="markup-form-area-write" style="display: block;">
432 445 <div id="edit-container_${form_id}">
433 446 <textarea id="${form_id}" name="${form_id}" class="comment-block-ta ac-input">${form_text if form_text else ''}</textarea>
434 447 </div>
435 448 <div id="preview-container_${form_id}" class="clearfix" style="display: none;">
436 449 <div id="preview-box_${form_id}" class="preview-box"></div>
437 450 </div>
438 451 </div>
439 452
440 453 <div class="markup-form-area-footer">
441 454 <div class="toolbar">
442 455 <div class="toolbar-text">
443 456 ${(_('Parsed using %s syntax') % (
444 457 ('<a href="%s">%s</a>' % (h.route_url('%s_help' % c.visual.default_renderer), c.visual.default_renderer.upper())),
445 458 )
446 459 )|n}
447 460 </div>
448 461 </div>
449 462 </div>
450 463 </div>
451 464
452 465 <div class="markup-form-footer">
453 466 % if help_text:
454 467 <span class="help-block">${help_text}</span>
455 468 % endif
456 469 </div>
457 470 </div>
458 471 <script type="text/javascript">
459 472 new MarkupForm('${form_id}');
460 473 </script>
461 474
462 475 </%def>
@@ -1,76 +1,87 b''
1 1 <%namespace name="base" file="/base/base.mako"/>
2 <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
2 3
3 4 <div class="panel panel-default user-profile">
4 5 <div class="panel-heading">
5 6 <h3 class="panel-title">${_('User Group Profile')}</h3>
6 7 %if c.is_super_admin:
7 8 ${h.link_to(_('Edit'), h.route_path('edit_user_group', user_group_id=c.user_group.users_group_id), class_='panel-edit')}
8 9 %endif
9 10 </div>
10 11
11 12 <div class="panel-body user-profile-content fields">
12 13 <div class="field">
13 14 <div class="label">
14 15 ${_('Group Name')}:
15 16 </div>
16 17 <div class="input">
17 18 <div class="text-as-placeholder">
18 19 ${c.user_group.users_group_name}
19 20 </div>
20 21 </div>
21 22 </div>
22 23 <div class="field">
23 24 <div class="label">
25 ${_('Description')}:
26 </div>
27 <div class="input">
28 <div class="text-as-placeholder">
29 <div class="user-hovercard-bio">${dt.render_description(c.user_group.user_group_description, c.visual.stylify_metatags)}</div>
30 </div>
31 </div>
32 </div>
33 <div class="field">
34 <div class="label">
24 35 ${_('Owner')}:
25 36 </div>
26 37 <div class="group_member">
27 38 ${base.gravatar(c.user_group.user.email, 16)}
28 39 <span class="username user">${h.link_to_user(c.user_group.user)}</span>
29 40
30 41 </div>
31 42 </div>
32 43 <div class="field">
33 44 <div class="label">
34 45 ${_('Active')}:
35 46 </div>
36 47 <div class="input">
37 48 <div class="text-as-placeholder">
38 49 ${c.user_group.users_group_active}
39 50 </div>
40 51 </div>
41 52 </div>
42 53 % if not c.anonymous:
43 54 <div class="field">
44 55 <div class="label">
45 56 ${_('Members')}:
46 57 </div>
47 58
48 59 <div class="input">
49 60 <div class="text-as-placeholder">
50 61 <table id="group_members_placeholder" class="rctable group_members">
51 62 <th>${_('Username')}</th>
52 63 % if c.group_members:
53 64 % for user in c.group_members:
54 65 <tr>
55 66 <td id="member_user_${user.user_id}" class="td-author">
56 67 <div class="group_member">
57 68 ${base.gravatar(user.email, 16)}
58 69 <span class="username user">${h.link_to(h.person(user), h.route_path('user_edit',user_id=user.user_id))}</span>
59 70 <input type="hidden" name="__start__" value="member:mapping">
60 71 <input type="hidden" name="member_user_id" value="${user.user_id}">
61 72 <input type="hidden" name="type" value="existing" id="member_${user.user_id}">
62 73 <input type="hidden" name="__end__" value="member:mapping">
63 74 </div>
64 75 </td>
65 76 </tr>
66 77 % endfor
67 78 % else:
68 79 <tr><td colspan="2">${_('No members yet')}</td></tr>
69 80 % endif
70 81 </table>
71 82 </div>
72 83 </div>
73 84 </div>
74 85 % endif
75 86 </div>
76 87 </div> No newline at end of file
@@ -1,67 +1,78 b''
1 1 <%namespace name="base" file="/base/base.mako"/>
2 <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
2 3
3 4 <div class="panel panel-default user-profile">
4 5 <div class="panel-heading">
5 6 <h3 class="panel-title">${_('User Profile')}</h3>
6 7 %if c.is_super_admin:
7 8 ${h.link_to(_('Edit'), h.route_path('user_edit', user_id=c.user.user_id), class_='panel-edit')}
8 9 %endif
9 10 </div>
10 11
11 12 <div class="panel-body user-profile-content fields">
12 13 <div class="field">
13 14 <div class="label">
14 15 ${_('Photo')}:
15 16 </div>
16 17 <div class="input">
17 18 <div class="text-as-placeholder">
18 19 %if c.visual.use_gravatar:
19 20 ${base.gravatar(c.user.email, 100)}
20 21 %else:
21 22 ${base.gravatar(c.user.email, 100)}
22 23 %endif
23 24 </div>
24 25 </div>
25 26 </div>
26 27 <div class="field">
27 28 <div class="label">
28 29 ${_('Username')}:
29 30 </div>
30 31 <div class="input">
31 32 <div class="text-as-placeholder">
32 33 ${c.user.username}
33 34 </div>
34 35 </div>
35 36 </div>
36 37 <div class="field">
37 38 <div class="label">
38 39 ${_('First name')}:
39 40 </div>
40 41 <div class="input">
41 42 <div class="text-as-placeholder">
42 43 ${c.user.first_name}
43 44 </div>
44 45 </div>
45 46 </div>
46 47 <div class="field">
47 48 <div class="label">
48 49 ${_('Last name')}:
49 50 </div>
50 51 <div class="input">
51 52 <div class="text-as-placeholder">
52 53 ${c.user.last_name}
53 54 </div>
54 55 </div>
55 56 </div>
56 57 <div class="field">
57 58 <div class="label">
59 ${_('Description')}:
60 </div>
61 <div class="input">
62 <div class="text-as-placeholder">
63 ${dt.render_description(c.user.description, c.visual.stylify_metatags)}
64 </div>
65 </div>
66 </div>
67 <div class="field">
68 <div class="label">
58 69 ${_('Email')}:
59 70 </div>
60 71 <div class="input">
61 72 <div class="text-as-placeholder">
62 73 ${(c.user.email or _('Missing email, please update your user email address.'))}
63 74 </div>
64 75 </div>
65 76 </div>
66 77 </div>
67 78 </div> No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now