<!DOCTYPE html>
{% load pipeline i18n %}
{% load static %}
{% load documents %}
{% load alerts %}
<html>
<head lang="{{ LANGUAGE_CODE }}">
    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
    <link rel="icon" href="{{ STATIC_URL }}img/pr-icon.png" type="image/png" />
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    {% stylesheet 'documents' %}
    <title>{% block title %}{% block titleextra %}{% endblock %} ::
        {% trans "Platforma Redakcyjna" %}{% endblock title %}</title>
    {% block add_css %}{% endblock %}
</head>
<body>
<!--#include file='/pozor.html'-->


<nav class="navbar navbar-expand-md navbar-dark bg-dark">
  <a class="navbar-brand" href="{% url 'documents_document_list' %}">
	  <img src="{% static "img/wl-orange.png" %}" alt="Platforma">
  </a>
  <ul class="navbar-nav mr-auto">
        {% main_tabs %}
    </ul>

    <ul class="navbar-nav">

      {% get_alerts as alerts %}
      {% if alerts.count %}
        <div class="nav-item dropdown">
          <a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" title="Alert">
            🔔
            <span class="badge badge-danger">{{ alerts.count }}</span>
          </a>
          <div class="dropdown-menu dropdown-menu-right" style="max-width:400px; overflow: hidden;">
            {% for alert in alerts.items %}
              <a class="dropdown-item" href="{{ alert.book.get_absolute_url }}">
                {{ alert.book }}<br>
                {{ alert.rule.description }}
                {% if alert.comment %}
                  <br><small>{{ alert.comment }}</small>
                {% endif %}
              </a>
            {% endfor %}
          </div>
        </div>
      {% endif %}
      {% include "registration/head_login.html" %}
    </ul>
</nav>

<div class="container mt-4 mb-4">
  {% block content %}
    <div class="row">
      <div class="col-lg-8">
        {% block leftcolumn %}
        {% endblock leftcolumn %}
      </div>
      <div class="col-lg-4">
        {% block rightcolumn %}
        {% endblock rightcolumn %}
      </div>
    </div>
  {% endblock content %}
</div>


<script
    src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"
    integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ"
    crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>

{% javascript 'documents' %}
{% block add_js %}{% endblock %}
{% block extrabody %}
{% endblock %}
</body>
</html>
