2022-11-29 15:46:33 +00:00
|
|
|
{% extends "base.html.j2" %}
|
|
|
|
{% import "materialize/wtf.html.j2" as wtf %}
|
|
|
|
|
2023-03-22 11:06:33 +00:00
|
|
|
|
2022-11-29 15:46:33 +00:00
|
|
|
{% block page_content %}
|
2022-12-13 14:01:04 +00:00
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col s12">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-content">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col s1"></div>
|
|
|
|
<div class="col s3">
|
2023-03-22 11:06:33 +00:00
|
|
|
<p> </p>
|
2023-04-12 14:49:04 +00:00
|
|
|
<br>
|
2023-03-22 11:06:33 +00:00
|
|
|
<img src="{{ url_for('.user_avatar', user_id=user.id) }}" alt="user-image" class="circle responsive-img">
|
2022-12-13 14:01:04 +00:00
|
|
|
</div>
|
|
|
|
<div class="col s1"></div>
|
|
|
|
<div class="col s7">
|
2022-11-29 15:46:33 +00:00
|
|
|
<div class="row">
|
2022-12-13 14:01:04 +00:00
|
|
|
<div class="col s12">
|
2023-03-21 09:50:29 +00:00
|
|
|
<h1>{{ user.username }}</h1>
|
|
|
|
{% if user.role.name != 'User' %}
|
|
|
|
<span class="chip">{{ user.role.name }}</span>
|
|
|
|
{% endif %}
|
2023-03-14 12:32:32 +00:00
|
|
|
{% if user.is_public %}
|
2023-03-21 09:50:29 +00:00
|
|
|
<span class="chip white-text" style="background-color: #4caf50;">Public Profile</span>
|
2023-03-14 12:32:32 +00:00
|
|
|
{% else %}
|
2023-03-21 09:50:29 +00:00
|
|
|
<span class="chip white-text" style="background-color: #f44336;">Private Profile</span>
|
2023-03-14 12:32:32 +00:00
|
|
|
{% endif %}
|
2023-03-22 11:06:33 +00:00
|
|
|
{% if user.has_profile_privacy_setting('SHOW_MEMBER_SINCE') %}
|
|
|
|
<span class="chip">Member since: {{ user.member_since.strftime('%Y-%m-%d') }}</span>
|
|
|
|
{% endif %}
|
|
|
|
{% if user.has_profile_privacy_setting('SHOW_LAST_SEEN') %}
|
|
|
|
<span class="chip">Last seen: {{ user.last_seen.strftime('%Y-%m-%d') }}</span>
|
|
|
|
{% endif %}
|
2022-11-29 15:46:33 +00:00
|
|
|
</div>
|
2022-12-13 14:01:04 +00:00
|
|
|
<div class="col 12">
|
2022-12-05 08:40:02 +00:00
|
|
|
{% if user.location %}
|
2023-03-22 11:06:33 +00:00
|
|
|
<p> </p>
|
|
|
|
<p><i class="material-icons left">location_on</i>{{ user.location }}</p>
|
2022-11-30 13:36:42 +00:00
|
|
|
{% endif %}
|
2022-11-29 15:46:33 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-12-13 14:01:04 +00:00
|
|
|
<p></p>
|
|
|
|
<br>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col s1"></div>
|
|
|
|
<div class="col s8">
|
2023-04-12 14:49:04 +00:00
|
|
|
{% if user.about_me %}
|
|
|
|
<blockquote>
|
|
|
|
<h5>About me</h5>
|
|
|
|
<p>{{ user.about_me }}</p>
|
|
|
|
</blockquote>
|
|
|
|
{% endif %}
|
|
|
|
<p></p>
|
|
|
|
<br>
|
2022-12-13 14:01:04 +00:00
|
|
|
<table>
|
|
|
|
{% if user.full_name %}
|
|
|
|
<tr>
|
|
|
|
<td><span class="material-icons">person</span></td>
|
|
|
|
<td>{{ user.full_name }} </td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
2023-03-22 11:06:33 +00:00
|
|
|
{% if user.has_profile_privacy_setting('SHOW_EMAIL') %}
|
2022-12-13 14:01:04 +00:00
|
|
|
<tr>
|
|
|
|
<td><span class="material-icons">email</span></td>
|
|
|
|
<td>{{ user.email }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
|
|
|
{% if user.website %}
|
|
|
|
<tr>
|
|
|
|
<td><span class="material-icons">laptop</span></td>
|
|
|
|
<td><a href="{{ user.website }}">{{ user.website }}</a></td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
|
|
|
{% if user.organization %}
|
|
|
|
<tr>
|
|
|
|
<td><span class="material-icons">business</span></td>
|
|
|
|
<td>{{ user.organization }}</td>
|
|
|
|
</tr>
|
|
|
|
{% endif %}
|
|
|
|
</table>
|
2023-03-22 11:06:33 +00:00
|
|
|
<p> </p>
|
2022-12-05 15:25:54 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-03-22 11:06:33 +00:00
|
|
|
{% if current_user == user %}
|
|
|
|
<div class="card-action">
|
|
|
|
<p class="right-align">
|
|
|
|
<a class="btn waves-effect waves-light" href="{{ url_for('settings.settings') }}">Edit profile</a>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2022-12-13 14:01:04 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-01-31 07:59:42 +00:00
|
|
|
<div class="row">
|
|
|
|
<div class="col s6">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-content">
|
2023-03-01 13:09:15 +00:00
|
|
|
<h4>Followed corpora</h4>
|
|
|
|
<div class="followed-corpus-list no-autoinit"></div>
|
2023-01-31 07:59:42 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col s6">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-content">
|
|
|
|
<h4>Public corpora</h4>
|
2023-03-01 13:09:15 +00:00
|
|
|
<div class="public-corpus-list no-autoinit"></div>
|
2023-01-31 07:59:42 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-12-13 14:01:04 +00:00
|
|
|
</div>
|
2022-11-29 15:46:33 +00:00
|
|
|
{% endblock page_content %}
|
2022-12-13 14:01:04 +00:00
|
|
|
|
2023-03-14 12:32:32 +00:00
|
|
|
{% block scripts %}
|
|
|
|
{{ super() }}
|
|
|
|
<script>
|
|
|
|
let followedCorpusList = new FollowedCorpusList(document.querySelector('.followed-corpus-list'));
|
2023-03-22 11:06:33 +00:00
|
|
|
followedCorpusList.add(
|
|
|
|
[
|
|
|
|
{% for corpus in user.followed_corpora %}
|
2023-03-28 12:11:46 +00:00
|
|
|
{{ corpus.to_json_serializeable()|tojson }},
|
2023-03-22 11:06:33 +00:00
|
|
|
{% endfor %}
|
|
|
|
]
|
|
|
|
);
|
2023-03-14 12:32:32 +00:00
|
|
|
let publicCorpusList = new PublicCorpusList(document.querySelector('.public-corpus-list'));
|
2023-03-22 11:06:33 +00:00
|
|
|
publicCorpusList.add(
|
|
|
|
[
|
|
|
|
{% for corpus in user.corpora if corpus.is_public %}
|
2023-03-28 12:11:46 +00:00
|
|
|
{{ corpus.to_json_serializeable()|tojson }},
|
2023-03-22 11:06:33 +00:00
|
|
|
{% endfor %}
|
|
|
|
]
|
|
|
|
);
|
2023-03-14 12:32:32 +00:00
|
|
|
</script>
|
|
|
|
{% endblock scripts %}
|