azienda.welcome.html 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. <input type='submit' class="btn btn-primary" name="ritorna" value="Logout">
  32. </td>
  33. </form>
  34. {% endblock %}
  35. {% block bodybottom %}
  36. <div><br><br></div>
  37. <div class='form-outline mb-3 text-center btn-primary h3'>
  38. {% if listaAttivitaxAzienda %}
  39. Elenco di tutte le attività registrate per l'azienda ...
  40. {% else %}
  41. Elenco attivita' registrate sul proprio account
  42. {% endif %}
  43. </div>
  44. <div>
  45. {% if listaAttivitaxAzienda %}
  46. <table class='table table-striped table-hover'>
  47. <thead class='thead-dark'>
  48. <tr>
  49. <th scope='col'>Data</th>
  50. <th scope='col'>Causale</th>
  51. <th scope='col'>Utente</th>
  52. <th scope='col'>Amministratore</th>
  53. <th scope='col'>documento</th>
  54. </tr>
  55. </thead>
  56. <tbody>
  57. {% for attivita in listaAttivitaxAzienda %}
  58. <tr>
  59. <td> {{ attivita.data | date:'d/m/Y H:i' }} </td>
  60. <td> {{ attivita.causale.nome }} </td>
  61. <td> {{ attivita.utente.nome }} </td>
  62. <td> {{ attivita.amministratore.username }}</td>
  63. <td> {{ attivita.documento.documento }}</td>
  64. </tr>
  65. {% endfor %}
  66. </tbody>
  67. </table>
  68. {% else %}
  69. <table class='table table-striped table-hover'>
  70. <thead class='thead-dark'>
  71. <tr>
  72. <th scope='col'>Data</th>
  73. <th scope='col'>Causale</th>
  74. <th scope='col'>Utente</th>
  75. <th scope='col'>Amministratore</th>
  76. <th scope='col'>documento</th>
  77. </tr>
  78. </thead>
  79. <tbody>
  80. {% for attivita in listaAttivitaxAmministrazione %}
  81. <tr>
  82. <td> {{ attivita.data | date:'d/m/Y H:i' }} </td>
  83. <td> {{ attivita.causale.nome }} </td>
  84. <td> {{ attivita.utente.nome }} </td>
  85. <td> {{ attivita.amministratore.username }}</td>
  86. <td> {{ attivita.documento.documento }}</td>
  87. </tr>
  88. {% endfor %}
  89. </tbody>
  90. </table>
  91. {% endif %}
  92. </div>
  93. {% endblock %}