2017-10-31 14:57:26 +00:00
|
|
|
{% extends "base.html" %}
|
2019-03-04 12:17:12 +00:00
|
|
|
{% load avatar_tags %}
|
2017-10-31 14:57:26 +00:00
|
|
|
{% load static %}
|
|
|
|
{% load i18n %}
|
|
|
|
|
|
|
|
{% block title %}User: {{ object.username }}{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<div class="container">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm-12">
|
|
|
|
|
2019-03-04 12:17:12 +00:00
|
|
|
<img src="{% avatar_url user %}">
|
|
|
|
|
|
|
|
{% if object.first_name and object.last_name %}
|
|
|
|
<h2>{{ object.first_name }} {{ object.last_name }} <i>({{ object.username }})</i></h2>
|
2019-03-04 12:39:27 +00:00
|
|
|
{% else %}
|
|
|
|
<h2>{{ object.username }}</h2>
|
2017-10-31 14:57:26 +00:00
|
|
|
{% endif %}
|
2019-03-04 12:17:12 +00:00
|
|
|
|
2017-10-31 14:57:26 +00:00
|
|
|
{% if object == request.user %}
|
2019-03-04 12:39:27 +00:00
|
|
|
<a class="btn btn-primary" href="{% url 'profile:update' %}">{% trans 'Change Name' %}</a>
|
|
|
|
<a class="btn btn-primary mx-1" href="{% url 'avatar_change' %}">Change Avatar</a>
|
|
|
|
|
|
|
|
<h3>Your case studies</h3>
|
|
|
|
|
|
|
|
{% if case_studies %}
|
|
|
|
<table class="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Name
|
2019-03-04 20:37:39 +00:00
|
|
|
<th>Language
|
2019-03-04 12:39:27 +00:00
|
|
|
<th>Approved
|
|
|
|
<th>Actions
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for case in case_studies %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ case.entry_name }}
|
2019-03-04 20:37:39 +00:00
|
|
|
<td>{% if case.language %}{{ case.language }}{% else %}-{% endif %}
|
2019-03-04 12:39:27 +00:00
|
|
|
<td>{% if case.approved %}Yes{% else %}No{% endif %}
|
2019-03-04 19:48:29 +00:00
|
|
|
<td>
|
2019-03-07 09:15:18 +00:00
|
|
|
<a href="{% url 'detail' case.slug %}">View</a>
|
|
|
|
{% if enable_edit %} |
|
2019-03-04 19:48:29 +00:00
|
|
|
<a href="{% url 'edit' case.id %}">Edit</a>
|
2019-03-07 09:15:18 +00:00
|
|
|
{% endif %}
|
2019-03-04 12:39:27 +00:00
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{% else %}
|
|
|
|
<p>You have no case studies.</p>
|
|
|
|
{% endif %}
|
2017-10-31 14:57:26 +00:00
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
2019-03-04 12:39:27 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-10-31 14:57:26 +00:00
|
|
|
</div>
|
|
|
|
{% endblock content %}
|