azienda.welcome.html 3.6 KB

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