{% extends "kegadmin/base.html" %}
{% load kegweblib %}
{% load crispy_forms_tags %}

{% block title %}Kegbot Admin | {{ block.super }}{% endblock %}
{% block pagetitle %}Kegbot Admin{% endblock %}

{% block kegadmin-main %}
<ul class="badge-list">
{% badge num_users "User" do_pluralize=True %}
{% badge num_new_users "New User" do_pluralize=True %}
</ul>

{% if redis_error %}
<div class="alert alert-error">
  <h4>Redis Connection Error</h4>
    <p>
      Connection to the Redis server failed; some features of Kegbot may
      not work correctly until it is fixed.
    </p>
    <p>
      Error message was: {{ redis_error }}
    </p>
</div>
{% endif %}

{% if DEBUG and not EMBEDDED %}
<div class="alert alert-warning">
  <h4>Warning: Debug Mode</h4>
   Kegbot Server is running in DEBUG mode.  For
   performance and security reasons, you should disable DEBUG mode by
   setting <code>DEBUG = False</code> in <code>local_settings.py</code>.
</div>
{% endif %}

{% if not email_configured and not EMBEDDED %}
<div class="alert alert-warning">
  <h4>Warning: E-Mail Configuration Problem</h4>
   E-mail is not properly configured; no mails will be sent.  Please
   <a href="https://kegbot.org/docs/server/extras/">read the docs</a>
   for more information (hint: set <code>EMAIL_BACKEND</code> and
   <code>EMAIL_FROM_ADDRESS</code> in <code>local_settings.py</code>).
</div>
{% endif %}

{% if checkin %}
{% for news in checkin.news %}
<div class="alert alert-info">
	<h4>{{ news.title }}</h4>
	{{ news.body }}
</div>
{% endfor %}
{% endif %}

{% endblock %}
