{% extends "base.html" %}
{% load avatar_tags %}
{% load static %}
{% block title %}User: {{ object.username }}{% endblock %}

{% block content %}
<div class="container">

  <div class="row">
    <div class="col-sm-12">

      <h2>{{ object.username }}</h2>
    </div>
  </div>

{% if object == request.user or request.user.perms.cases.can_view_all %}
<div class="row">

  <div class="col-sm-12 ">
    {% if object == request.user %}
    <a class="btn btn-primary" href="{% url 'users:update' %}">My Info</a>
    <a class="btn btn-primary" href="{% url 'account_email' %}">E-Mail</a>
    <a class="btn btn-info" href="{% url 'avatar_change' %}">Avatar</a>
    {% endif %}
    {% if object == request.user or request.user.perms.cases.can_view_all %}
    <a class="btn btn-info" href="{% url 'cases:list' %}?user={{object.username}}">Cases</a>
    {% endif %}
  </div>

</div>
<!-- End Action buttons -->
{% endif %}

{% endblock content %}

{% extends "base.html" %}
{% load avatar_tags %}
{% load static %}
{% block title %}User: {{ object.username }}{% endblock %}

{% block content %}
<div class="row">
  <div class="col-sm-12">
    <h2>{{ object.username }}</h2>
  </div>
</div>
{% if object == request.user or perms.case.can_view_all %}
<div class="row">

  <div class="col-sm-12 ">
    {% if object == request.user %}
    <a class="btn btn-primary" href="{% url 'users:update' %}">My Info</a>
    <a class="btn btn-primary" href="{% url 'account_email' %}">E-Mail</a>
    <a class="btn btn-info" href="{% url 'avatar_change' %}">Avatar</a>
    {% endif %}
    {% if object == request.user or perms.case.can_view_all %}
    <a class="btn btn-info" href="{% url 'cases:list' %}?user={{object.username}}">Cases</a>
    {% endif %}
  </div>

</div>
<!-- End Action buttons -->
{% endif %}

{% endblock content %}

Fix cases link in user detail
Fix cases link in user detail
