{% extends 'base.html' %}

{% block body %}
<form name="comunicazione" method="POST">
  <table class='table table-striped table-hover'>
    <thead class='thead-dark'>
      <tr>
	<th scope='col'>Id</th>
        <th scope='col'>From</th>
        <th scope='col'>Soggetto</th>
      </tr>
    </thead>
    <tbody>
      {% csrf_token %}
      {% for com in comunicazione %}
        <tr>
	  <td><input type='submit' class='btn btn-primary' name="edit" value="{{ com.id }}"></td>
	  <td> {{ com.mittente }} </td>
	  <td> {{ com.soggetto }}</td>
  	</tr>
      {% endfor %} 
    </tbody>
  </table>
  <div>
    <button type='submit' class='btn btn-primary' name='Nuovo' value=''>Nuovo</button>
    <input type='submit' class="btn btn-primary" name="indietro" value="Indietro">
  </div>
</form>
{% endblock %}

{% block bodybottom %}
{% endblock %}

