-
Notifications
You must be signed in to change notification settings - Fork 2k
/
read.html
118 lines (110 loc) · 4 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
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
{% extends "page.html" %}
{% set user = c.user_dict %}
{% block subtitle %}{{ user.display_name }}{% 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 c.is_myself %}
<li>{% link_for _('Dashboard'), controller='user', action='dashboard', class_='btn', icon='dashboard' %}</li>
{% else %}
<li>{{ h.follow_button('user', user.id) }}</li>
{% endif %}
{% 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">
<header class="module-content">
<ul class="nav nav-tabs">
<li class="active"><a href="#datasets" data-toggle="tab"><i class="icon-sitemap"></i>{{ _('Datasets') }}</a></li>
<li><a href="#activity" data-toggle="tab"><i class="icon-time"></i>{{ _('Activity Stream') }}</a></li>
</ul>
</header>
<section id="datasets" class="module-content tab-content active clearfix">
<h2 class="tab-heading">{{ _('Datasets') }}</h2>
{% if user.datasets %}
{% snippet 'snippets/package_list.html', packages=user.datasets %}
{% else %}
{% if c.is_myself %}
<p class="empty">
{{ _('You haven\'t created any datasets.') }}
{% link_for _('Create one now?'), controller='package', action='new' %}.
</p>
{% else %}
<p class="empty">
{{ _('User hasn\'t created any datasets.') }}
</p>
{% endif %}
{% endif %}
</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 %}
<div class="module profile-info">
<section class="module-content">
<div class="avatar">{{ h.linked_gravatar(user.email_hash, 180) }}</div>
<h1 class="heading">{{ user.fullname or _('No full name provided') }}</h1>
{% if c.about_formatted %}
{{ c.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 class="nums">
<dl>
<dt>{{ _('Followers') }}</dt>
<dd>{{ c.num_followers }}</dd>
</dl>
<dl>
<dt>{{ _('Datasets') }}</dt>
<dd>{{ user.number_administered_packages }}</dd>
</dl>
<dl>
<dt>{{ _('Edits') }}</dt>
<dd>{{ user.number_of_edits }}</dd>
</dl>
</div>
<div class="info">
<dl>
{% if user.name.startswith('http://') or user.name.startswith('https://') %}
<dt>{{ _('Open ID') }}</dt>
<dd>{{ user.name|urlize(25) }}{# Be great if this just showed the domain #}</dd>
{% else %}
<dt>{{ _('Username') }}</dt>
<dd>{{ user.name }}</dd>
{% endif %}
</dl>
{% if c.is_myself %}
<dl>
<dt>{{ _('Email') }} <span class="label" title="{{ _('This means only you can see this') }}">{{ _('Private') }}</span></dt>
<dd>{{ user.email }}</dd>
</dl>
{% endif %}
<dl>
<dt>{{ _('Member Since') }}</dt>
<dd>{{ h.render_datetime(user.created) }}</dd>
</dl>
{% if c.is_myself %}
<dl>
<dt class="key">{{ _('API Key') }} <span class="label" title="{{ _('This means only you can see this') }}">{{ _('Private') }}</span></dt>
<dd class="value"><code>{{ user.apikey }}</code></dd>
</dl>
{% endif %}
</div>
</section>
</div>
{% endblock %}