|
|
@@ -0,0 +1,170 @@
|
|
|
+<script type='text/javascript'>
|
|
|
+ $(window).on('load', function() {
|
|
|
+ $('#TestModal').modal('show');
|
|
|
+ });
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+
|
|
|
+ {% if ElencoDocumenti %}
|
|
|
+ <form name="ElencoDocumenti" id="ElencoDocumenti" method="POST">
|
|
|
+ {% csrf_token %}
|
|
|
+ <input type='submit' class="btn btn-primary" name='ScaricaSelezionati' value="Scarica Selezionati"/>
|
|
|
+ <input type='submit' class="btn btn-primary" name="indietro" value="Indietro">
|
|
|
+ </form>
|
|
|
+ <div> </div>
|
|
|
+ <div><b>Elenco Documenti Disponibili:</b></div>
|
|
|
+ <div>Per Scaricare piu' di un documento, selezionarli nella colonna di sinistra e premere "Scarica Selezionati"</div>
|
|
|
+ <table class='table table-striped'>
|
|
|
+ <thead class='thead-dark'>
|
|
|
+ <tr>
|
|
|
+ <th scope='col'>Vedi</th>
|
|
|
+ <form name="order" method="POST">
|
|
|
+ {% csrf_token %}
|
|
|
+ {% if not aziendaview %}
|
|
|
+ <th scope='col' style='white-space: nowrap; width: 1%;'>Dipendente
|
|
|
+ <button name='uteDW' type="submit" class="btn btn-outline-primary btn-sm">↓</button>
|
|
|
+ <button name='uteUP' type="submit" class="btn btn-outline-primary btn-sm">↑</button></th>
|
|
|
+ <th scope='col' style='white-space: nowrap; width: 1%;'>Sede
|
|
|
+ <button name='seDW' type="submit" class="btn btn-outline-primary btn-sm">↓</button>
|
|
|
+ <button name="seUP" type="submit" class="btn btn-outline-primary btn-sm">↑</button></th>
|
|
|
+ {% endif %}
|
|
|
+ <th scope='col' style='white-space: nowrap;'>Documento
|
|
|
+ <button name='docDW' type="submit" class="btn btn-outline-primary btn-sm">↓</button>
|
|
|
+ <button name="docUP" type="submit" class="btn btn-outline-primary btn-sm">↑</button></th>
|
|
|
+ <th scope='col' style='white-space: nowrap; width: 3%;'>Caricamento
|
|
|
+ <button name='carDW' type="submit" class="btn btn-outline-primary btn-sm">↓</button>
|
|
|
+ <button name="carUP" type="submit" class="btn btn-outline-primary btn-sm">↑</button></th>
|
|
|
+ </form>
|
|
|
+ {% if 'DOCUMENTO.EDIT' in permesso %}
|
|
|
+ <th scope='col' style='white-space: nowrap; width:1%'>Pvt</th>
|
|
|
+ <th scope='col'>Elimina</th>
|
|
|
+ {% endif %}
|
|
|
+ <th scope='col'><input class="form-check-input" type="checkbox" id="selectAll" name="selectAll" value='0' onClick="toggle(this);"/></th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ {% for documento in ElencoDocumenti %}
|
|
|
+ {% if 'DOCUMENTO' in permesso %}
|
|
|
+ <tr>
|
|
|
+ <td> <button type='button' class='btn btn-primary btn-sm' onclick="window.open('{% url "documento:finalize" documento.id documento.utente.id %}')">Vedi</button></td>
|
|
|
+ {% if not aziendaview %}
|
|
|
+ <td>{{ documento.utente.nome }} </td>
|
|
|
+ <td>{{ documento.utente.sede.nome }}</td>
|
|
|
+ {% endif %}
|
|
|
+ <td>{{ documento.documento }}<br>{{ documento.descrizione }} </td>
|
|
|
+ <td>{{ documento.dataupload | date:'d/m/Y' }} </td>
|
|
|
+ {% if 'DOCUMENTO.EDIT' in permesso %}
|
|
|
+ <td>{% if documento.privato %}
|
|
|
+ <button type='button' class='btn btn-primary btn-sm' data-bs-toggle='modal' data-bs-target='#UnsetPrivateModal{{ documento.id }}' value='{{ documento.id }}'>Pvt</button>
|
|
|
+ {% else %}
|
|
|
+ <button type='button' class='btn btn-secondary btn-sm' data-bs-toggle='modal' data-bs-target='#SetPrivateModal{{ documento.id }}' value='{{ documento.id }}'>Pub</button>
|
|
|
+ {% endif %}</td>
|
|
|
+ <td><button type='button' class='btn btn-primary btn-sm' data-bs-toggle='modal' data-bs-target='#ConfirmDeleteModal{{ documento.id }}' value='{{ documento.id }}'>Elimina</button></td>
|
|
|
+ {% endif %}
|
|
|
+ <td><input class="form-check-input" type="checkbox" form="ElencoDocumenti" id="select-{{ documento.id }}" name="MultipleDocumentSelect" value='{{ documento.id }}'/></td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ <!-- Modal -->
|
|
|
+ <div class="modal fade" id="UnsetPrivateModal{{ documento.id }}" tabindex="-1" role="dialog" aria-labelledby="UnsetPrivateLabel{{ document.id }}" aria-hidden="true">
|
|
|
+ <div class="modal-dialog" role="document">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title" id="UnsetPrivateLabel">Rimuove flag Privato</h5>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ Il documento sarà disponibile al dipendente e agli amministratori
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <form name='ConfirmUnsetPRivateModal' method='POST'>
|
|
|
+ {% csrf_token %}
|
|
|
+ <button type="submit" name="UnsetPrivateDocument" value='{{ documento.id }}' class="btn btn-primary">Togli Privato</button>
|
|
|
+ <button type="button" class="btn btn-primary" data-bs-dismiss="modal">Chiudi/Annulla</button>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- end modal -->
|
|
|
+
|
|
|
+ {% endif %}
|
|
|
+
|
|
|
+ <!-- Modal -->
|
|
|
+ <div class="modal fade" id="SetPrivateModal{{ documento.id }}" tabindex="-1" role="dialog" aria-labelledby="SetPrivateLabel{{ document.id }}" aria-hidden="true">
|
|
|
+ <div class="modal-dialog" role="document">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title" id="SetPrivateLabel">Il documento viene reso privato</h5>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ Il documento è visibile solo al dipendente
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <form name='ConfirmSetPrivateModal' method='POST'>
|
|
|
+ {% csrf_token %}
|
|
|
+ <button type="submit" name="SetPrivateDocument" value='{{ documento.id }}' class="btn btn-primary">Rendi Privato</button>
|
|
|
+ <button type="button" class="btn btn-primary" data-bs-dismiss="modal">Chiudi/Annulla</button>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- end modal -->
|
|
|
+
|
|
|
+ <!-- Modal -->
|
|
|
+ <div class="modal fade" id="ConfirmDeleteModal{{ documento.id }}" tabindex="-1" role="dialog" aria-labelledby="ConfirmDeleteLabel{{ document.id }}" aria-hidden="true">
|
|
|
+ <div class="modal-dialog" role="document">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title" id="ConfirmDeleteLabel">Conferma Cancellazione</h5>
|
|
|
+ <button type="button" class="close" data-bs-dismiss="modal" aria-label="Chiudi">
|
|
|
+ <span aria-hidden="true">×</span>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ Confermi la cancellazione di {{ documento.documento }}?<br>
|
|
|
+ La cancellazione del documento è definitiva,immediata e non recuperabile.
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <form name='ConfirmDeleteModal' method='POST'>
|
|
|
+ {% csrf_token %}
|
|
|
+ <button type="submit" name="DeleteDocument" value='{{ documento.id }}' class="btn btn-primary">Rimuove Privato</button>
|
|
|
+ <button type="button" class="btn btn-primary" data-bs-dismiss="modal">Chiudi/Annulla</button>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- end modal -->
|
|
|
+
|
|
|
+
|
|
|
+ {% endfor %}
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ {% endif %}
|
|
|
+
|
|
|
+ <!-- Modal -->
|
|
|
+ <div class="modal fade" id="TestModal" tabindex="-1" role="dialog" aria-labelledby="TestModalLabel" aria-hidden="true">
|
|
|
+ <div class="modal-dialog" role="document">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h5 class="modal-title" id="ConfirmDeleteLabel">TestModal</h5>
|
|
|
+ <button type="button" class="close" data-bs-dismiss="modal" aria-label="Chiudi">
|
|
|
+ <span aria-hidden="true">×</span>
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ Confermi la cancellazione di {{ documento.documento }}?<br>
|
|
|
+ La cancellazione del documento è definitiva,immediata e non recuperabile.
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <form name='ConfirmDeleteModal' method='POST'>
|
|
|
+ {% csrf_token %}
|
|
|
+ <button type="submit" name="DeleteDocument" value='{{ documento.id }}' class="btn btn-primary">Rimuove Privato</button>
|
|
|
+ <button type="button" class="btn btn-primary" data-bs-dismiss="modal">Chiudi/Annulla</button>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- end modal -->
|