{% extends "cranefly/layout.html" %}
{% import "cranefly/macros.html" as macros with context %}

{% block title %}{{ macros.page_title(title=_('Error')) }}{% endblock %}
      
{% block content %}
<div class="row">
  <div class="span8 offset2 error-page">
    <div class="page-header">
      <h1><span class="error-color">403</span> {% trans %}You Are Banned{% endtrans %}</h1>
    </div>
    {% if banned_user %}
      {% if ban.reason_user %}
      <p class="lead">{% trans username=banned_user.username %}{{ username }}, your account has been banned for following reason:{% endtrans %}</p>
      {% else %}
      <p class="lead">{% trans username=banned_user.username %}{{ username }}, your account has been banned.{% endtrans %}</p>
      {% endif %}
    {% else %}
      {% if ban.reason_user %}
      <p class="lead">{% trans %}Guest, your IP Address has been banned from accessing this page for following reason:{% endtrans %}</p>
      {% else %}
      <p class="lead">{% trans %}Guest, your IP Address has been banned from accessing this page.{% endtrans %}</p>
      {% endif %}
    {% endif %}
    {% if ban.reason_user %}
    <div class="error-ban-reason">
      {{ ban.reason_user|markdown|safe }}
      {% if ban.expires %}
      <p class="error-ban-expires">{% trans ban_expires=ban.expires|date %}Your ban will expire on {{ ban_expires }}{% endtrans %}</p>
      {% endif %}
    </div>
    {% elif ban.expires %}
    <p class="error-ban-expires">{% trans ban_expires=ban.expires|date %}Your ban will expire on {{ ban_expires }}{% endtrans %}</p>
    {% endif %}
    <div class="error-protips">
      <a href="{% url 'index' %}"><i class="icon-home icon-white"></i> {% trans %}Return to board index{% endtrans %}</a>
    </div>
  </div>
</div>
{% endblock %}