{% extends "lara_processes_base.html" %}

{% block title %}Table-Table{% endblock %}

{% block top %} 
  <h1> LARA Device Table</h1>
  <p> </p> 
{% endblock %}

{% block main_content %}
{% if lara_device_list %}

   <table class="report">
   <caption>{{ table_caption }}</caption>
   <thead>
       <tr>
          <th rowspan=2 > Name </th> <th rowspan=2 > Full name </th> <th rowspan=2 > Warrenty </th>
       </tr>
   </thead> 
   <tbody>
    {% for item in lara_device_list %}
       <tr><td><a href="{% url 'lara_processes:device_details' item.device_id %}" title={{ item.full_name }}> {{ item.name }} </a> </td> <td> {{ item.full_name }} </td> <td> {{ item.end_of_warrenty_date }} </td> </tr>
    {% endfor %}
   </tbody>
   </table>
    
{% else %}
    <p>No devices are available.</p>
{% endif %}

{% endblock %}

