azienda.welcome.html 3.4 KB

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