Note.List.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. {% extends 'base.html' %}
  2. {% block top %}
  3. <p>
  4. utente che sta effettuando gli aggiornamenti {{ utenteautorizzato.mail }}@{{ utenteautorizzato.domain.nome }}
  5. </p>
  6. {% if dominio %}
  7. <p>
  8. Dominio su cui si sta' lavorando: {{ dominio.nome }}
  9. </p>
  10. {% endif %}
  11. {% if alias %}
  12. <p>
  13. si stanno effettuando aggiornamenti su: {{ user.mail }}@{{ user.domain.nome }}
  14. </p>
  15. {% endif %}
  16. {% endblock %}
  17. {% block body %}
  18. <form name='newnota' method='post'>
  19. {% csrf_token %}
  20. <button class="btn btn-primary" type="submit" name='Nuova Nota' value="Nuovo alias">Nuova Nota</button>
  21. </form>
  22. <table class='table'>
  23. <thead>
  24. <tr>
  25. <th scope='col'>Nota</th>
  26. <th scope='col'>Data</th>
  27. <th scope='col'>Livello</th>
  28. <th scope='col'>*</th>
  29. <th scope='col'>Attività</th>
  30. </tr>
  31. </thead>
  32. <tbody>
  33. <form name="notelist" method="POST">
  34. {% csrf_token %}
  35. {% for n in note %}
  36. <tr>
  37. <th scope='row'>{{ n.soggetto }}</th>
  38. <td> {{ n.timestamp }} </td>
  39. <td> {{ n.livello.nome }} </td>
  40. <td>{% if n.enabled %}*{% else %}-{% endif %}</td>
  41. <td><button class="btn btn-primary" type="submit" name='edit' value="{{ n.id }}">Edit</button>
  42. <button class="btn btn-primary" type="button" data-toggle="modal" data-target="#ConfirmDisable{{ n.id }}" name='disable' value="{{ n.id }}" {% if not u.enabled %} disabled {% endif %} {% if u.locked %} disabled {% endif %}>Disable</button>
  43. <button class="btn btn-primary" type="submit" name='enable' value="{{ n.id }}" {% if u.enabled %} disabled {% endif %}>Enable</button></td>
  44. </tr>
  45. <!-- Modal -->
  46. <div class="modal fade" id="ConfirmDisable{{ n.id }}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
  47. <div class="modal-dialog" role="document">
  48. <div class="modal-content">
  49. <div class="modal-header">
  50. <h5 class="modal fade" id="exampleModalLongTitle">Conferma Disattivazione</h5>
  51. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  52. <span aria-hidden="true">&times;</span>
  53. </button>
  54. </div>
  55. <div class="modal-body">
  56. Sei sicuro di voler disattivare questo Alias?
  57. </div>
  58. <div class="modal-footer">
  59. <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
  60. <button type="submit" class="btn btn-primary" name="disable" value="{{ n.id }}">Conferma</button>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. {% endfor %}
  66. </form>
  67. </tbody>
  68. {% endblock %}