azienda.welcome.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. {% if 'UTENTE' in permesso %}
  8. <button type="submit" class='btn btn-primary' name="utenti" value="{{ azienda.id }}">Dipendenti</button>
  9. {% endif %}
  10. {% if 'DOCUMENTO' in permesso %}
  11. <button type='submit' class="btn btn-primary" name="documenti" value='{{ azienda.id }}'>Documenti</button>
  12. {% endif %}
  13. {% if 'ATTIVITA' in permesso %}
  14. {% if listaAttivitaxAzienda %}
  15. <button type 'submit' class='btn btn-primary' name="xx" value='{{ azienda.id }}'>Attività proprie</button>
  16. {% else %}
  17. <button type='submit' class='btn btn-primary' name="attivita" value='{{ azienda.id }}'>Tutte le Attività</button>
  18. {% endif %}
  19. {% endif %}
  20. {% if 'COMUNICAZIONE' in permesso %}
  21. <button type='submit' class='btn btn-primary' name='comunicazioni' value='{{ azienda.id }}'>Comunicazioni</button>
  22. {% endif %}
  23. {% if 'AZIENDA.EDIT' in permesso %}
  24. <button type='submit' class='btn btn-primary' name='parazienda' value='{{ azienda.id }}'>Par.Azienda</button>
  25. {% endif %}
  26. {% if 'SEDE.EDIT' in permesso %}
  27. <button type='submit' class='btn btn-primary' name='parsede' value='{{ sede.id }}' {% if not sede.id %} disabled {% endif %}>Par.Sede</button>
  28. {% endif %}
  29. {% endif %}
  30. </form>
  31. </div>
  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'>Dipendente</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'>Dipendente</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.nome }}</td>
  84. <td> {{ attivita.documento.documento }}</td>
  85. </tr>
  86. {% endfor %}
  87. </tbody>
  88. </table>
  89. {% endif %}
  90. </div>
  91. {% endblock %}