azienda.welcome.html 3.4 KB

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