/
read.html
91 lines (85 loc) · 3.41 KB
/
read.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
{% extends "page.html" %}
{% set user = c.user_dict %}
{% block title %}{{ user.display_name }} - {{ super() }}{% endblock %}
{% block breadcrumb_content %}
<li>{% link_for _('Users'), controller='user', action='index' %}</li>
{% with title = _('Your Profile') if c.is_myself else user.display_name %}
<li class="active">{% link_for title|truncate(35), controller='user', action='read', id=user.name %}</li>
{% endwith %}
{% endblock %}
{% block actions_content %}
{% if h.check_access('user_update', user) %}
<li>{% link_for _('Edit'), controller='user', action='edit', id=user.name, class_='btn', icon='cog' %}</li>
{% endif %}
{% endblock %}
{% block primary_content %}
<article class="module profile">
<section class="module-content profile-info">
<header class="media">
<span class="media-image">{{ h.linked_gravatar(user.email_hash, 150) }}</span>
<div class="description">
<h1 class="heading">{{ user.fullname or _('No full name provided') }}</h1>
{% if user.about_formatted %}
{{ user.about_formatted }}
{% else %}
<p class="empty">
{% if c.is_myself %}
{% trans %}You have not provided a biography.{% endtrans %}
{% else %}
{% trans %}This user has no biography.{% endtrans %}
{% endif %}
</p>
{% endif %}
</div>
</header>
<ul class="listing unstyled">
<li>
{% if user.name.startswith('http://') or user.name.startswith('https://') %}
<b class="key">{{ _('Open ID') }}:</b>
{{ user.name|urlize(25) }}{# Be great if this just showed the domain #}
{% else %}
<b class="key">{{ _('Username') }}:</b>
<span class="value">{{ user.name }}</span>
{% endif %}
</li>
{% if c.is_myself %}
<li>
<b class="key">{{ _('Email') }}:</b>
<span class="value">{{ user.email }}</span>
</li>
{% endif %}
<li>
<b class="key">{{ _('Member Since') }}:</b>
<span class="value">{{ h.render_datetime(user.created) }}</span>
</li>
{% if c.is_myself %}
<li>
<b class="key">{{ _('API Key') }}:</b>
<span class="value">{{ user.apikey }}</span>
</li>
{% endif %}
<li>
<b class="key">{{ _('Datasets') }}::</b>
<span class="value">{{ user.number_administered_packages }}</span>
<b class="key" class="inline">{{ _('Edits') }}:</b>
<span class="value">{{ user.number_of_edits }}</span>
</li>
</ul>
<ul class="nav nav-tabs">
<li class="active"><a href="#datasets" data-toggle="tab">{{ _('Datasets') }}</a></li>
<li><a href="#activity" data-toggle="tab">{{ _('Activity Stream') }}</a></li>
</ul>
</section>
<section id="datasets" class="module-content tab-content active clearfix">
<h2 class="tab-heading">{{ _('Datasets') }}</h2>
{% snippet 'snippets/package_list.html', packages=user.datasets %}
</section>
<section id="activity" class="module-content module-activity tab-content">
<h2 class="tab-heading">{{ _('Activity Stream') }}</h2>
{{ c.user_activity_stream | safe }}
</section>
</article>
{% endblock %}
{% block secondary_content %}
{% snippet 'user/snippets/user_search.html' %}
{% endblock %}