{% extends 'layouts/master-page' %}
{% block title %}Most recent entries{% endblock %}
{% block head %}
 <!-- css -->
  <link href="/static/css/custom/filter.css" rel="stylesheet" />

  <!-- javascript -->
  <script type="text/javascript" src="/static/js/custom/filter.js"></script>
  <script type="text/javascript" src="/static/js/custom/pager.js"></script>
  <script type="text/javascript">
    $(document).ready(function(){
      setSettings();
      {% if errors %}
        setStatus("An error occured while parsing the filters. Please verify the input fields, like the dates", "danger");
      {% endif %}
    })
    function setSettings(){
      {% if settings is defined %}
        {% for key, val in settings.items() %}
          if($("#{{key}}").is(":checkbox")){
            if("{{val}}" === "on"){$("#{{key}}").prop('checked', true);}
          }else{
            $("#{{key}}").val("{{val}}");
          }
        {% endfor %}
        cvssSelectDisable()
        timeSelectDisable()
      {%endif%}
    }

  </script>
{% endblock %}
{% block content %}
  <!-- Filter options -->
  {% include 'subpages/filters.html' %}
  <!-- Pager -->
  {% include 'subpages/pager.html' %}
  <!-- Search results -->
  {% include 'subpages/table.html' %}
  <!-- Pager -->
  {% include 'subpages/pager.html' %}
  
{% endblock %}
