59 lines
1.6 KiB
HTML
59 lines
1.6 KiB
HTML
{% extends "base.html" %}
|
|
{% load avatar_tags %}
|
|
{% load static %}
|
|
{% load i18n %}
|
|
|
|
{% block title %}User: {{ object.username }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
|
|
<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>
|
|
{% else %}
|
|
<h2>{{ object.username }}</h2>
|
|
{% endif %}
|
|
|
|
{% if object == request.user %}
|
|
<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
|
|
<th>Language
|
|
<th>Approved
|
|
<th>Actions
|
|
</thead>
|
|
<tbody>
|
|
{% for case in case_studies %}
|
|
<tr>
|
|
<td>{{ case.entry_name }}
|
|
<td>{% if case.language %}{{ case.language }}{% else %}-{% endif %}
|
|
<td>{% if case.approved %}Yes{% else %}No{% endif %}
|
|
<td>
|
|
<a href="{% url 'detail' case.slug %}">View</a>
|
|
{% if enable_edit %} |
|
|
<a href="{% url 'edit' case.id %}">Edit</a>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<p>You have no case studies.</p>
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock content %} |