azienda.welcome.html 3.4 KB

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