Ftp.List.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. {% extends 'base.html' %}
  2. {% load ftp_tags %}
  3. {% block top %}
  4. <p>
  5. utente che sta effettuando gli aggiornamenti {{ utenteautorizzato.mail }}@{{ utenteautorizzato.domain.nome }}
  6. </p>
  7. {% if dominio %}
  8. <p>
  9. Dominio su cui si sta' lavorando: {{ dominio.nome }}
  10. </p>
  11. {% endif %}
  12. {% if ftp %}
  13. <p>
  14. si stanno effettuando aggiornamenti su: {{ ftp.user }}@{{ ftp.domain.nome }}
  15. </p>
  16. {% endif %}
  17. {% endblock %}
  18. {% block body %}
  19. <form name='newftp' method='post'>
  20. {% csrf_token %}
  21. {% if 'FTPADD' in securitylist %}
  22. <button class="btn btn-primary" type="submit" name='Nuovo Accesso FTP' value="Nuovo ftp">Nuovo Accesso FTP</button>
  23. {% endif %}
  24. {% if 'FTPBACK' in securitylist %}
  25. <button type 'submit' class='btn btn-secondary' name='BackupAllFTPHTTP'>Backup Tutti Gli Spazi FTP e HTTP</button>
  26. {% endif %}
  27. <button type 'submit' class='btn btn-secondary' name='Ritorna'>Ritorna</button>
  28. </form>
  29. <table class='table'>
  30. <thead>
  31. <tr>
  32. <th scope='col'>#</th>
  33. <th scope='col'>Account</th>
  34. <th scope='col'>Tipo</th>
  35. <th scope='col'>E</th>
  36. <th scope='col'>M</th>
  37. <th scope='col'>l</th>
  38. <th scope='col'>quota</th>
  39. <th scope='col'>Attivit<C3><A0></th>
  40. </tr>
  41. </thead>
  42. <tbody>
  43. <form name="ftplist" method="POST">
  44. {% csrf_token %}
  45. {% for u in ftplist %}
  46. <tr>
  47. <th scope='row'>{{ u.id }}</th>
  48. <td> {{ u.utente }}@{{ u.dominio.nome }} </td>
  49. <td> {{ u.ftpgroup.nomegruppo }} </td>
  50. <!--<td>
  51. {% spaceless %}
  52. {{ u.ftpgroup.home }}
  53. {% if u.ftpgroup.l3 %}{{ u.utente }}.{% endif %}
  54. {{ u.dominio.nome }}
  55. {% if u.ftpgroup.sub|llen %}
  56. {{ u.ftpgroup.sub }}{{ u.utente }}
  57. {% endif %}
  58. {% endspaceless %}
  59. </td>-->
  60. <td>{% if u.enabled %}*{% else %}-{% endif %}</td>
  61. <td>{% if u.ftpgroup.master %}M{% else %}-{% endif %}</td>
  62. <td>{{ u.securitylevel.id }}</td>
  63. <td>{{ u.quota }}Mb {% if u.warning_ftp_quota %} /{{ u.warning_ftp_quota }}Mb{% else %}{% endif %}
  64. <td>{% if 'FTPEDIT' in securitylist %}<button class="btn btn-primary" type="submit" name='Edit' value="{{ u.id }}"{% if not u.enabled %} disabled {% endif %}>Edit</button>{% endif %}
  65. <button class='btn btn-primary' type='button' data-toggle='modal' data-target='#ConfirmEnableDisable{{ u.id }}' name='enabledisablebutton' value='{{ u.id }}'>{% if u.enabled %}Disabilita{% else %}Abilita{% endif %}</button>
  66. {% if 'FTPBACK' in securitylist %}<button type 'submit' class='btn btn-secondary' name='BackupFTPHTTP' value='{{ u.id }}'>Backup FTP e HTTP</button>{% endif %}</td>
  67. </tr>
  68. <!-- Modal -->
  69. <div class="modal fade" id="ConfirmEnableDisable{{ u.id }}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
  70. <div class="modal-dialog" role="document">
  71. <div class="modal-content">
  72. <div class="modal-header">
  73. <h5 class="modal-title" id="exampleModalLongTitle">Conferma Disattivazione</h5>
  74. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  75. <span aria-hidden="true">&times;</span>
  76. </button>
  77. </div>
  78. <div class="modal-body">
  79. {% if u.enabled %}
  80. Sei sicuro di voler disattivare questo indirizzo Ftp?
  81. {% else %}
  82. Vuoi riattivare questo indirizzo Ftp?
  83. {% endif %}
  84. </div>
  85. <div class="modal-footer">
  86. <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
  87. <button type="submit" class="btn btn-primary" name="enabledisablebutton" value="{{ u.id }}">Conferma</button>
  88. </div>
  89. </div>
  90. </div>
  91. {% endfor %}
  92. </form>
  93. </tbody>
  94. {% endblock %}