{% extends "base.html" %}
{% load i18n %}

{% block page-title %}{% trans "Dashboard" %}{% endblock %}

{% block navigation %}
  {% activetab "main" "dashboard" %}
  {{ block.super }}
{% endblock %}

{% block sub-navigation %}
  <ul>
    <li><a href="/dashboard/starred">{% trans "Starred bookings" %}</a></li>
    <li><a href="/dashboard/news">{% trans "News" %}</a></li>
  </ul>
{% endblock %}

{% block content %}

  {%  for n in news %}
    <div class="entry">
      <div class="card card-common">
        <div class="card-content">
          <div class="entry-content">
            <div class="entry-main">
              <div class="entry-date">
                {{ n.created|timesince }}
              </div>
              <h3 class="entry-title" style="color:#333;">{{ n.title }}</h3>
              <div class="entry-body">
                {{ n.message }}
              </div>
            </div>
          </div>
          <div class="entry-icons">
            {% include "booking_star.html" %}
          </div>
          <div class="card-bottom">
            <strong>{% trans "Created by" %}:</strong> {{ n.created_by.id|show_user_link }}
          </div>
        </div>
      </div>
    </div>
  {% endfor %}

{% endblock %}
