-
Notifications
You must be signed in to change notification settings - Fork 2k
/
read_base.html
89 lines (83 loc) · 3 KB
/
read_base.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
{% extends "page.html" %}
{% set user = c.user_dict %}
{% block subtitle %}{{ user.display_name }} - {{ _('Users') }}{% endblock %}
{% block breadcrumb_content %}
{{ h.build_nav('user_index', _('Users')) }}
{{ h.build_nav('user_datasets', user.display_name|truncate(35), id=user.name) }}
{% endblock %}
{% block content_action %}
{% if h.check_access('user_update', user) %}
{% link_for _('Edit'), controller='user', action='edit', id=user.name, class_='btn', icon='wrench' %}
{% endif %}
{% endblock %}
{% block content_primary_nav %}
{{ h.build_nav_icon('user_datasets', _('Datasets'), id=user.name) }}
{{ h.build_nav_icon('user_activity_stream', _('Activity Stream'), id=user.name) }}
{% endblock %}
{% block secondary_content %}
<div class="module context-info">
<section class="module-content">
{% block secondary_content_inner %}
<div class="image">{{ h.linked_gravatar(user.email_hash, 190) }}</div>
<h1 class="heading">{{ user.display_name }}</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>{{ h.SI_number_span(user.num_followers) }}</dd>
</dl>
<dl>
<dt>{{ _('Datasets') }}</dt>
<dd>{{ h.SI_number_span(user.number_administered_packages) }}</dd>
</dl>
<dl>
<dt>{{ _('Edits') }}</dt>
<dd>{{ h.SI_number_span(user.number_of_edits) }}</dd>
</dl>
</div>
{% if c.is_myself == false %}
<div class="follow_button">
{{ h.follow_button('user', user.id) }}</li>
</div>
{% endif %}
<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>
{% endblock %}
</section>
</div>
{% endblock %}