azienda.welcome.html 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. {% extends 'base.html' %}
  2. {% block body %}
  3. <form name="azienda" method="POST">
  4. <table class='table table-striped table-hover'>
  5. <thead class='thead-dark'>
  6. <tr>
  7. <th scope='col'>Azienda</th>
  8. <th scope='col'>Partita Iva</th>
  9. </tr>
  10. </thead>
  11. <tbody>
  12. {% csrf_token %}
  13. {% for az in azienda %}
  14. <tr>
  15. <td>{{ az.nome }} </td>
  16. <td>{{ az.partitaita }}</td>
  17. <td><button type="submit" class='btn btn-primary' name="utenti" value="{{ az.id }}">Utenti</button>
  18. <button type='submit' class="btn btn-primary" name="documenti" value='{{ az.id }}'>Documenti</button>
  19. {% if listaAttivitaxAzienda %}
  20. <button type 'submit' class='btn btn-primary' name="xx" value='{{ az.id }}'>Attività proprie</button>
  21. {% else %}
  22. <button type='submit' class='btn btn-primary' name="attivita" value='{{ az.id }}'>Tutte le Attività</button>
  23. {% endif %}
  24. <button type='submit' class='btn btn-primary' name='comunicazioni' value='{{ az.id }}'>Comunicazioni</button>
  25. </td>
  26. </tr>
  27. {% endfor %}
  28. </tbody>
  29. </table>
  30. <div>
  31. </form>
  32. {% endblock %}
  33. {% block bodybottom %}
  34. <div><br><br></div>
  35. <div class='form-outline mb-3 text-center btn-primary h3'>
  36. {% if listaAttivitaxAzienda %}
  37. Elenco di tutte le attività registrate per l'azienda ...
  38. {% else %}
  39. Elenco attivita' registrate sul proprio account
  40. {% endif %}
  41. </div>
  42. <div>
  43. {% if listaAttivitaxAzienda %}
  44. <table class='table table-striped table-hover'>
  45. <thead class='thead-dark'>
  46. <tr>
  47. <th scope='col'>Data</th>
  48. <th scope='col'>Causale</th>
  49. <th scope='col'>Utente</th>
  50. <th scope='col'>Amministratore</th>
  51. <th scope='col'>documento</th>
  52. </tr>
  53. </thead>
  54. <tbody>
  55. {% for attivita in listaAttivitaxAzienda %}
  56. <tr>
  57. <td> {{ attivita.data | date:'d/m/Y H:i' }} </td>
  58. <td> {{ attivita.causale.nome }} </td>
  59. <td> {{ attivita.utente.nome }} </td>
  60. <td> {{ attivita.amministratore.username }}</td>
  61. <td> {{ attivita.documento.documento }}</td>
  62. </tr>
  63. {% endfor %}
  64. </tbody>
  65. </table>
  66. {% else %}
  67. <table class='table table-striped table-hover'>
  68. <thead class='thead-dark'>
  69. <tr>
  70. <th scope='col'>Data</th>
  71. <th scope='col'>Causale</th>
  72. <th scope='col'>Utente</th>
  73. <th scope='col'>Amministratore</th>
  74. <th scope='col'>documento</th>
  75. </tr>
  76. </thead>
  77. <tbody>
  78. {% for attivita in listaAttivitaxAmministrazione %}
  79. <tr>
  80. <td> {{ attivita.data | date:'d/m/Y H:i' }} </td>
  81. <td> {{ attivita.causale.nome }} </td>
  82. <td> {{ attivita.utente.nome }} </td>
  83. <td> {{ attivita.amministratore.username }}</td>
  84. <td> {{ attivita.documento.documento }}</td>
  85. </tr>
  86. {% endfor %}
  87. </tbody>
  88. </table>
  89. {% endif %}
  90. </div>
  91. {% endblock %}