| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233 |
- {% extends 'base.html' %}
- {% block top %}
- <div class='form-outline mb-3 text-center btn-primary h3'>
- {{ HeaderTitle }}
- </div>
- <div class='form-outline mb-3 text-center btn-primary h3'>
- Azienda in elaborazione: {{ azienda.nome }}
- </div>
- <div class='form-outline mb-3 text-center btn-primary h3'>
- Amministratore: {{ admin.username }}
- </div>
- {% endblock %}
- {% block body %}
- <!-- Nav tabs -->
- <ul class="nav nav-tabs" id="myTab" role="tablist">
- <li class="nav-item" role="presentation">
- <button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#profile" type="button" role="tab" aria-controls="Profile" aria-selected="true">Profilo</button>
- </li>
- <li class="nav-item" role="presentation">
- <button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#documents" type="button" role="tab" aria-controls="Documents" aria-selected="false">Documenti</button>
- </li>
- <li class="nav-item" role="presentation">
- <button class="nav-link" id="messages-tab" data-bs-toggle="tab" data-bs-target="#messages" type="button" role="tab" aria-controls="Messages" aria-selected="false">Logging</button>
- </li>
- </ul>
- <!-- end nav tabs -->
- <!-- Tab panes -->
- <div class="tab-content">
- <div class="tab-pane active" id="profiles" role="tabpanel" aria-labelledby="profile-tab" tabindex="0">
- <div>
- {% if utente.errors %}
- {{ utente.errors }}
- {% for field in utente %}
- {% for error in field.errors %}
- <div class="alert alert-danger">
- <strong>{{ error|escape }}</strong>
- </div>
- {% endfor %}
- {% endfor %}
- {% for error in utente.non_field_errors %}
- <div class="alert alert-danger">
- <strong>{{ error|escape }}</strong>
- </div>
- {% endfor %}
- {% else %}
- Nessun Errore rilevato
- {% endif %}
- </div>
- <!-- editing parametri utente -->
- <form name='UserEdit' method='post'>
- {% csrf_token %}
- <div class='form-group'>
- <label for="codicefiscale">Codice Fiscale</label>
- <input type='text' class='form-control' name='codicefiscale' id='codicefiscale' value='{{ utente.codicefiscale.value }}'>
- <label for="nome">Nome Cognome</label>
- <input type='text' class='form-control form-control-lg' name='nome' id='nome' value='{{ utente.nome.value }}'>
- <label for="luogonascita">Luogo di nascita</label>
- <input type='text' class='form-control' name='luogonascita' id='luogonascita' value='{{ utente.luogonascita.value }}'>
- <label for="datanascita">Data di nascita</label>
- <input type='date' class='form-control' name='datanascita' id='datanascita' value='{{ utente.datanascita.value|date:'Y-m-d' }}'>
- <label for="mail" class="form-control-label">Email</label>
- <input type='mail' class='form-control' name='mail' id='mail' value='{{ utente.mail.value }}'
- <label for="pin" class='form-control-label'>Pin</label>
- <input type='text' class='form-control' name='pin' id='pin' value='{{ utente.pin.value }}'
- </div>
- <div class="form-check">
- <input type="checkbox" class="form-check-input" name='CancellaUtente' id='CancellaUtente'>
- <Label class="form-check-label" for='CancellaUtente'>Cancella Questo record!</label>
- </div>
- <div class='form-check'>
- <input type='submit' class="btn btn-secondary" value='Aggiorna'>
- <input type='submit' class="btn btn-primary" name="ritorna" value="Ritorna">
- </div>
- </form>
- <!-- fine del form di editing -->
- </div>
- <div class="tab-pane" id="profile" role="tabpanel" aria-labelledby="document-tab" tabindex="0">
- <!-- documenti -->
- <div><br><br></div>
- <div class='form-outline mb-3 text-center btn-primary h3'>
- Elenco Documenti Associati
- </div>
-
- <table class='table table-striped table-hover'>
- <thead class='thead-dark'>
- <tr>
- <th scope='col'>Documento</th>
- <th scope='col'>Storage</th>
- <th scope='col'>Descrizione</th>
- <th scope='col'>Inserimento</th>
- <th scope='col'>Elimina</th>
- </tr>
- </thead>
- <tbody>
- {% for documento in documentiUtente %}
- <tr>
- <td> {{ documento.documento }} </td>
- <td> {{ documento.storage}} </td>
- <td> {{ documento.descrizione }} </td>
- <td> {{ documento.dataupload | date:'d/m/Y' }} </td>
- <!-- <td> <input class='btn btn-primary' type='submit' name='Elimina' value='{{ documento.id }}'></td> -->
- <td> <button type='button' class='btn btn-primary active' onclick="window.open('{% url "documento:finalize" documento.id uid %}')">Vedi</button>
- <button type='button' class='btn btn-primary' data-bs-toggle='modal' data-bs-target='#ConfirmDeleteModal{{ documento.id }}' value='{{ documento.id }}'>Elimina!</button></td>
- <td>
- <!-- 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="Close">
- <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">
- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
- <form name='ConfirmDeleteModal' method='POST'>
- {% csrf_token %}
- <button type="submit" name="DeleteDocument" value='{{ documento.id }}' class="btn btn-primary">Conferma</button>
- </form>
- </div>
- </div>
- </div>
- <!-- end modal -->
- </td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- <form name='fileManager' method="POST" enctype='multipart/form-data'>
- {% csrf_token %}
- <td><label for='descrizione'>Descrizione: </label><input type='text' name='descrizione' id='descrizione' value=''>
- <td><input type='file' class="btn btn-primary" name='allegati' id='allegati' value='{{ uf.allegati }}' accept='application/pdf' multiple></td>
- <td><input class="btn btn-primary" type='submit' value='Inserisci'><td>
- </form>
- <div><br><br></div>
- {% if listaok %}
- <table class='table table-striped table-hover'>
- <thead class='thead-dark'>
- <tr>
- <th scope='col'>Documento caricato con successo</th>
- </tr>
- </thead>
- <tbody>
- {% for l in listaok %}
- <tr>
- <td> {{ l }} </td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- {% endif %}
- <div><br><br></div>
- {% if listanotok %}
- <table class='table table-striped table-hover'>
- <thead class='thead-dark'>
- <tr>
- <th scope='col'>Documento non caricato perche già presente</th>
- </tr>
- </thead>
- <tbody>
- {% for l in listanotok %}
- <tr>
- <td> {{ l }} </td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- {% endif %}
-
- </div>
- <div class="tab-pane" id="profile" role="tabpanel" aria-labelledby="profile-tab" tabindex="0">
- <div><br><br></div>
- <div class='form-outline mb-3 text-center btn-primary h3'>
- Elenco Azioni Registrate
- </div>
- <div>
- <table class='table table-striped table-hover'>
- <thead class='thead-dark'>
- <tr>
- <th scope='col'>Data</th>
- <th scope='col'>Causale</th>
- <th scope='col'>Utente</th>
- <th scope='col'>Amministratore</th>
- <th scope='col'>documento</th>
- </tr>
- </thead>
- <tbody>
- {% for attivita in listaAttivita %}
- <tr>
- <td> {{ attivita.data | date:'d/m/Y H:i' }} </td>
- <td> {{ attivita.causale.nome }} </td>
- <td> {{ attivita.utente.nome }} </td>
- <td> {{ attivita.amministratore.name }}</td>
- <td> {{ attivita.documento.documento }}</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- </div>
- {% endblock %}
- {% block bodybottom %}
- {% endblock %}
|