2
0

Ftp.List.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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'>Ril.</th>
  40. <th scope='col'>Attivit<C3><A0></th>
  41. </tr>
  42. </thead>
  43. <tbody>
  44. <form name="ftplist" method="POST">
  45. {% csrf_token %}
  46. {% for u in ftplist %}
  47. <tr>
  48. <th scope='row'>{{ u.id }}</th>
  49. <td> {{ u.utente }}@{{ u.dominio.nome }} </td>
  50. <td> {{ u.ftpgroup.nomegruppo }} </td>
  51. <!--<td>
  52. {% spaceless %}
  53. {{ u.ftpgroup.home }}
  54. {% if u.ftpgroup.l3 %}{{ u.utente }}.{% endif %}
  55. {{ u.dominio.nome }}
  56. {% if u.ftpgroup.sub|llen %}
  57. {{ u.ftpgroup.sub }}{{ u.utente }}
  58. {% endif %}
  59. {% endspaceless %}
  60. </td>-->
  61. <td>{% if u.enabled %}*{% else %}-{% endif %}</td>
  62. <td>{% if u.ftpgroup.master %}M{% else %}-{% endif %}</td>
  63. <td>{{ u.securitylevel.id }}</td>
  64. <td>{{ u.ftp_quota }}Mb {% if u.warning_ftp_quota %} /{{ u.warning_ftp_quota }}Mb{% else %}{% endif %}
  65. <td>{{ u.date_ftp_quota }}</td>
  66. <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 %}
  67. <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>
  68. {% if 'FTPBACK' in securitylist %}<button type 'submit' class='btn btn-secondary' name='BackupFTPHTTP' value='{{ u.id }}'>Backup FTP e HTTP</button>{% endif %}</td>
  69. </tr>
  70. <!-- Modal -->
  71. <div class="modal fade" id="ConfirmEnableDisable{{ u.id }}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
  72. <div class="modal-dialog" role="document">
  73. <div class="modal-content">
  74. <div class="modal-header">
  75. <h5 class="modal-title" id="exampleModalLongTitle">Conferma Disattivazione</h5>
  76. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  77. <span aria-hidden="true">&times;</span>
  78. </button>
  79. </div>
  80. <div class="modal-body">
  81. {% if u.enabled %}
  82. Sei sicuro di voler disattivare questo indirizzo Ftp?
  83. {% else %}
  84. Vuoi riattivare questo indirizzo Ftp?
  85. {% endif %}
  86. </div>
  87. <div class="modal-footer">
  88. <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
  89. <button type="submit" class="btn btn-primary" name="enabledisablebutton" value="{{ u.id }}">Conferma</button>
  90. </div>
  91. </div>
  92. </div>
  93. {% endfor %}
  94. </form>
  95. </tbody>
  96. {% endblock %}