azienda.welcome.html 3.9 KB

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