azienda.welcome.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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 'AZIENDA.DOCUMENTO' in permesso %}
  14. <button type='submit' class="btn btn-primary" name="azienda.documenti" value='{{ azienda.id }}'>Documenti Aziendali</button>
  15. {% endif %}
  16. {% if 'ATTIVITA' in permesso %}
  17. {% if listaAttivitaxAzienda %}
  18. <button type 'submit' class='btn btn-primary' name="xx" value='{{ azienda.id }}'>Attività proprie</button>
  19. {% else %}
  20. <button type='submit' class='btn btn-primary' name="attivita" value='{{ azienda.id }}'>Tutte le Attività</button>
  21. {% endif %}
  22. {% endif %}
  23. {% if 'COMUNICAZIONE' in permesso %}
  24. <button type='submit' class='btn btn-primary' name='comunicazioni' value='{{ azienda.id }}'>Comunicazioni</button>
  25. {% endif %}
  26. {% if 'AZIENDA.EDIT' in permesso %}
  27. <button type='submit' class='btn btn-primary' name='parazienda' value='{{ azienda.id }}'>Par.Azienda</button>
  28. {% endif %}
  29. {% if 'SEDE.EDIT' in permesso %}
  30. <button type='submit' class='btn btn-primary' name='parsede' value='{{ sede.id }}' {% if not sede.id %} disabled {% endif %}>Par.Sede</button>
  31. {% endif %}
  32. {% endif %}
  33. {% if "AMMINISTRATORE.EDITSELF" in permesso or "AMMINISTRATORE.EDIT" in permesso %}
  34. <button type='submit' class='btn btn-primary' name='paramm' value='{{ admin.id }}'>Par.Amministratore</button>
  35. {% endif %}
  36. {% if 'LOG.ALL' in permesso %}
  37. <button type='submit' class='btn btn-primary' name='logall'>Tutti i Log</button>
  38. {% endif %}
  39. </form>
  40. </div>
  41. {% endblock %}
  42. {% block bottom %}
  43. <div><br></div>
  44. <div class='form-outline mb-3 text-center btn-primary h3'>
  45. {% if listaAttivitaxAzienda %}
  46. Elenco di tutte le attività registrate per l'azienda ...
  47. {% else %}
  48. Elenco attivita' registrate sul proprio account
  49. {% endif %}
  50. </div>
  51. <div>
  52. {% if listaAttivitaxAzienda %}
  53. <table class='table table-striped table-hover'>
  54. <thead class='thead-dark'>
  55. <tr>
  56. <th scope='col'>Data</th>
  57. <th scope='col'>Causale</th>
  58. <th scope='col'>Dipendente</th>
  59. <th scope='col'>Amministratore</th>
  60. <th scope='col'>documento</th>
  61. </tr>
  62. </thead>
  63. <tbody>
  64. {% for attivita in listaAttivitaxAzienda %}
  65. <tr>
  66. <td> {{ attivita.data | date:'d/m/Y H:i' }} </td>
  67. <td> {{ attivita.causale.nome }} </td>
  68. <td> {{ attivita.utente.nome }} </td>
  69. <td> {{ attivita.amministratore.username }}</td>
  70. <td> {{ attivita.documento.documento }}</td>
  71. </tr>
  72. {% endfor %}
  73. </tbody>
  74. </table>
  75. {% else %}
  76. <table class='table table-striped table-hover'>
  77. <thead class='thead-dark'>
  78. <tr>
  79. <th scope='col'>Data</th>
  80. <th scope='col'>Causale</th>
  81. <th scope='col'>Dipendente</th>
  82. <th scope='col'>Amministratore</th>
  83. <th scope='col'>Documento</th>
  84. </tr>
  85. </thead>
  86. <tbody>
  87. {% for attivita in listaAttivitaxAmministrazione %}
  88. <tr>
  89. <td>{{ attivita.data | date:'d/m/Y H:i' }} </td>
  90. <td>{{ attivita.causale.nome }} </td>
  91. <td>{{ attivita.utente.nome }} </td>
  92. <td>{{ attivita.amministratore.nome }}</td>
  93. <td>{{ attivita.documento.documento }}</td>
  94. </tr>
  95. {% endfor %}
  96. </tbody>
  97. </table>
  98. {% endif %}
  99. </div>
  100. {% endblock %}