/
profile_detail.html
209 lines (195 loc) · 8.02 KB
/
profile_detail.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
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
{% extends "people/profile_base.html" %}
{% load static %}
{% load i18n %}
{% load avatar_tags %}
{% load activity_tags %}
{% load pagination_tags %}
{% block title %} {% trans "Profile of " %}{{ profile.first_name|default:profile.username }}{% endblock %}
{% block head %}
{% if TWITTER_CARD %}
{% include "people/_profile_twittercard.html" %}
{% endif %}
{% if OPENGRAPH_ENABLED %}
{% include "people/_profile_opengraph.html" %}
{% endif %}
{{ block.super }}
{% endblock %}
{% block body_class %}people explore{% endblock %}
{% block body %}
<div class="page-header">
<h2 class="page-title">{{ profile.name_long }}</h2>
</div>
<div class="col-xs-3 col-md-2 profile-image">
{% autoescape off %}{% avatar profile 240 %}{% endautoescape %}
</div>
<div class="col-xs-9 col-md-7 profile-details">
{% if user.is_authenticated %}
{% if user == profile %}
{% for group in profile.group_list_all %}
<div ng-if="group.logo_url != ''" class="col-xs-1 pull-right group-logo">
<a href="{{ group.get_absolute_url }}" ><img src="{{ group.logo_url }}" alt="{{ group.title }}" /></a>
</div>
<!-- <div class="col-xs-6 col-md-8">
<h5>
<a href="{{ group.get_absolute_url }}">{{ group.title }}</a>
{% if group.email %} <a href="mailto:{{ group.email }}"><i class="fa fa-envelope-o"></i></a>{% endif %}
</h5>
</div> -->
{% endfor %}
{% else %}
{% for group in profile.group_list_public %}
<div ng-if="group.logo_url != ''" class="col-xs-1 pull-right group-logo">
<a href="{{ group.get_absolute_url }}" ><img src="{{ group.logo_url }}" alt="{{ group.title }}" /></a>
</div>
<!-- <div class="col-xs-6 col-md-8">
<h5>
<a href="{{ group.get_absolute_url }}">{{ group.title }}</a>
{% if group.email %} <a href="mailto:{{ group.email }}"><i class="fa fa-envelope-o"></i></a>{% endif %}
</h5>
</div> -->
{% endfor %}
{% endif %}
{% endif %}
<h3>{{ profile.first_name|default:profile.name_long }}</h3>
<table class="table table-user-profile">
<tbody>
{% if user.is_authenticated and user == profile or user.is_superuser or user.is_staff %}
{% if SHOW_PROFILE_EMAIL %}
<tr>
<td class="table-user-profile-attribute">{% trans 'Email' %}</td>
{% if profile.email %}
<td><a href="mailto:{{ profile.email }}">{{ profile.email }}</a></td>
{% else %}
<td>{% trans 'Not provided.' %}</td>
{% endif %}
</tr>
{% endif %}
<tr>
<td class="table-user-profile-attribute">{% trans 'Organization' %}</td>
<td>{{ profile.organization | default:_('Not provided.') }}</td>
</tr>
<tr>
<td class="table-user-profile-attribute">{% trans 'Description' %}</td>
<td>{{ profile.profile | default:_('Not provided.') }}</td>
</tr>
<tr>
<td class="table-user-profile-attribute">{% trans 'Position Name' %}</td>
<td>{{ profile.position | default:_('Not provided.') }}</td>
</tr>
<tr>
<td class="table-user-profile-attribute">{% trans 'Location' %}</td>
<td>{{ profile.location | default:_('Not provided.') }}</td>
</tr>
<tr>
<td class="table-user-profile-attribute">{% trans 'Voice' %}</td>
{% if profile.voice %}
<td><a href="tel:{{ profile.voice }}">{{ profile.voice }}</a></td>
{% else %}
<td>{% trans "Not provided" %}.</td>
{% endif %}
</tr>
<tr>
<td class="table-user-profile-attribute">{% trans 'Fax' %}</td>
<td>{{ profile.fax | default:_('Not provided.') }}</td>
</tr>
<tr>
<td class="table-user-profile-attribute">{% trans 'Keywords' %}</td>
<td>
{% if profile.keyword_list %}
{% for keyword in profile.keyword_list %}
<span class="label label-default">{{ keyword }}</span>
{% endfor %}
{% else %}
{% trans 'Not provided' %}
{% endif %}
</td>
</tr>
{% else %}
<tr>
<td class="table-user-profile-attribute">{% trans 'Organization' %}</td>
<td>{{ profile.organization | default:_('Not provided.') }}</td>
</tr>
{% endif %}
</tbody>
</table>
{% if USE_GEOSERVER and DISPLAY_WMS_LINKS %}
<p>
{% if request.user.is_authenticated and access_token %}
<a href="{% url 'capabilities_user' profile.username %}?access_token={{access_token}}">
{% else %}
<a href="{% url 'capabilities_user' profile.username %}">
{% endif %}
<i class="fa fa-map"></i> {% trans 'User layers WMS GetCapabilities document' %}</a></p>
{% endif %}
</div>
<div class="col-xs-12 col-md-3">
<ul class="list-group">
<li class="list-group-item"><a href="{% url "message_create" profile.pk %}"><i class="fa fa-paper-plane-o"></i> {% trans "Message User" %}</a></li>
</ul>
{% if user == profile %}
<ul class="list-group">
{% if not READ_ONLY_MODE %}
<li class="list-group-item"><a href="{% url "profile_edit" user.username %}"><i class="fa fa-edit"></i> {% trans "Edit profile" %}</a></li>
{% endif %}
{% if not AVAILABLE_SOCIAL_APPS_COUNT == 0 %}
<li class="list-group-item"><a href="{% url "socialaccount_connections" %}"><i class="fa fa-sign-in"></i> {% trans "Connected social accounts" %}</a></li>
{% endif %}
<li class="list-group-item"><a href="{% url "account_email" %}"><i class="fa fa-envelope-o"></i> {% trans "Associated e-mails" %}</a></li>
{% if not READ_ONLY_MODE %}
<li class="list-group-item"><a href="{% url "account_change_password" %}"><i class="fa fa-lock"></i> {% trans "Set/Change password" %}</a></li>
{% endif %}
</ul>
<ul class="list-group">
<li class="list-group-item"><a href="{% url "user-activity" profile.username %}"><i class="fa fa-fire"></i> {% trans "My Activities" %}</a></li>
</ul>
<ul class="list-group">
{% if USE_NOTIFICATIONS %}
<li class="list-group-item"><a href="{% url "pinax_notifications:notice_settings" %}"><i class="fa fa-bell"></i> {% trans "Notifications" %}</a></li>
{% endif %}
{% if perms.announcements.can_manage %}
<li class="list-group-item"><a href="{% url "announcements_list" %}"><i class="fa fa-bullhorn"></i> {% trans "Announcements" %}</a></li>
{% endif %}
</ul>
<ul class="list-group">
{% if not READ_ONLY_MODE %}
<li class="list-group-item"><a href="{% url "geonode.invitations:geonode-send-invite" %}"><i class="fa fa-edit"></i> {% trans "Invite Users" %}</a></li>
{% endif %}
{% if user.is_superuser or user.is_staff %}
<li class="list-group-item"><a href="{{ OGC_SERVER.default.WEB_UI_LOCATION }}"><i class="fa fa-gears"></i> {% trans "GeoServer" %}</a></li>
<li class="list-group-item"><a href="{% url "admin:index" %}"><i class="fa fa-cog"></i> {% trans "Admin" %}</a></li>
{% endif %}
</ul>
{% else %}
{% if user.is_superuser and not READ_ONLY_MODE %}
<ul class="list-group">
<li class="list-group-item"><a href="{% url "profile_edit" profile.username %}"><i class="fa fa-edit"></i> {% trans "Edit profile" %}</a></li>
</ul>
{% endif %}
<ul class="list-group">
<li class="list-group-item"><a href="{% url "user-activity" profile.username %}"><i class="fa fa-fire"></i> {% trans "User Activities" %}</a></li>
</ul>
{% endif %}
</div>
<div class="col-xs-12 col-md-9">
<h4>{% trans "Resources" %}</h4>
<div class="col-md-12">
{% include "people/_profile_filters.html" %}
</div>
<div class="col-md-12">
{% include "search/_sort_filters.html" %}
</div>
<div class=" col-xs-12 col-md-12">
{% include 'base/_resourcebase_snippet.html' %}
</div>
<div class="col-md-12">
{% include 'search/_pagination.html' %}
</div>
</div>
{% endblock %}
{% block extra_script %}
{{ block.super }}
<script type="text/javascript">
SEARCH_URL = '{% url 'api_dispatch_list' api_name='api' resource_name='base' %}?owner__username={{profile.username}}';
</script>
{% include 'search/search_scripts.html' %}
{% endblock %}