{% extends "base.html" %}
{% load static i18n %}
{% block css %}
{{ block.super }}
<link href="{% static 'css/acp_calendar.css' %}" rel="stylesheet">
{% endblock css %}
{% block content %}
<h2>Fiscal Years</h2>
<form action="" method="post">
  {% csrf_token %}
  <input class="btn btn-primary" role="button" type="submit" name="update_fiscal_year"
         value="{% trans 'Update Fiscal Year' %}">
  <input class="btn btn-primary" role="button" type="submit" name="check_initial_data"
         value="{% trans 'Check Initial Data' %}">
</form>
<div>
  <div class="row">
    <div class="col-md-4">First date: {{ first_holiday.date }}</div>
    <div class="col-md-4">Last date: {{ last_holiday.date }}</div>
    <div class="col-md-4">{% trans 'Holiday count' %}: {{ holiday_count }}</div>
  </div>
</div>
<div>
  {% if years.count != 0 %}
  <div class="row">
  {% for year in years %}

    <div class="col-md-3">
      <a href="{% url 'calendar:fiscal-year-calendar'  year %}">
        Fiscal Year {{ year }}
      </a>
    </div>

  {% endfor %}
  </div>
  {% endif %}
</div>
{% for not_loaded in not_found %}
<div class="row">
  <div class="col-md-4">
    {{ not_loaded.date }}
  </div>
  <div class="col-md-4">
    {{ not_loaded.holiday_type }}
  </div>
</div>
{% endfor %}
<h2>API Calls</h2>
<div>
  <a href="{% url 'calendar:calendar-api:holiday-list' %}">
    Holiday List
  </a>
</div>
<div>
  <a href="{% url 'calendar:calendar-api:holiday-list-year' 2016%}">
    Holiday List for 2016
  </a>
</div>
<div>
  <a href="{% url 'calendar:calendar-api:working_month' 2016 11%}">
    Holiday month for 2016 on november
  </a>
</div>
<div>
  <a href="{% url 'calendar:calendar-api:working_delta' '2015-11-01' 30%}">
    Date for 30 working days after Nov. 1st 2015
  </a>
</div>
<div>
  <a href="{% url 'calendar:calendar-api:working_days' '2015-11-01' '2015-12-31' %}">
    Working days between  Nov. 1st 2015 and Dec. 31st 2015
  </a>
</div>
<div class="version">Version: {{ version }}</div>
{% endblock content %}
