gest_user_api_get.html 4.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. {% load crispy_forms_tags %}
  2. <div class="modal-dialog modal-lg" role="document">
  3. <div class="modal-content">
  4. {% if item.GES_OK == True and item.GES_Date_Sup and item.GES_SUP == True%}
  5. <div class="modal-header border-danger bg-danger">
  6. {% elif item.GES_OK == True and item.GES_Date_Sup%}
  7. <div class="modal-header border-warning bg-warning">
  8. {% elif item.GES_OK == True %}
  9. <div class="modal-header border-success bg-success">
  10. {% else%}
  11. <div class="modal-header">
  12. {% endif %}
  13. <h5 class="modal-title">Détail d'un utilisateur</h5>
  14. <button type="button" class="btn btn-sm btn-dark close" data-dismiss="modal" aria-label="Close">
  15. <span aria-hidden="true">&times;</span>
  16. </button>
  17. </div>
  18. <div class="modal-body">
  19. <table class="table table-sm">
  20. <tr><td>Nom : </td><td><input type="text" readonly="readonly" value="{{item.GES_Nom}}"/></td></tr>
  21. <tr><td>Prénom : </td><td><input type="text" readonly="readonly" value="{{item.GES_Prenom}}"/></td></tr>
  22. <tr><td>Site : </td><td> {{item.GES_Site}} </td></tr>
  23. <tr><td>Service : </td><td> {{item.GES_Service}} </td></tr>
  24. <tr><td>Fonction : </td><td> {{item.GES_Fonction}} </td></tr>
  25. {% if item.GES_Date %}<tr><td>Date d'arrivée : </td><td> {% if item.GES_Date %}{{item.GES_Date}}{% else %}&nbsp;{% endif %} </td></tr>{% endif %}
  26. {% if item.GES_Date_Sup %}<tr><td>Date de départ : </td><td> {% if item.GES_Date_Sup %}{{item.GES_Date_Sup}}{% else %}&nbsp;{% endif %} </td></tr>{% endif %}
  27. </table>
  28. <h4>Liste des applications sélectionnées avec le profil</h4>
  29. <table class="table table-sm">
  30. <tr>
  31. <th scope="col">Nom de l'application</th>
  32. <th scope="col">Login</th>
  33. <th scope="col">Mot de passe</th>
  34. <th scope="col">Crée ?</th>
  35. <th scope="col">Outils</th>
  36. </tr>
  37. {% for apps in item.apps %}
  38. {% spaceless %}
  39. {% if apps.GES_APPLink_Create == True %}
  40. <tr class="table-success">
  41. {% else %}
  42. <tr>
  43. {% endif %}
  44. <td>{{apps.GES_APPLink_APP.GESAP_Nom}}</td>
  45. <td><input type="text" readonly="readonly" value="{{apps.GES_APPLink_Login}}"/></td>
  46. <td><input type="text" readonly="readonly" value="{{apps.GES_APPLink_MDP}}"/></td>
  47. <td onmouseover="this.style.cursor='pointer';" onclick="bt_switch_app_status({{apps.id}})">{% if apps.GES_APPLink_Create == True %} <span class="text-success"><i class="fas fa-clipboard-check" title="[ Crée ]"></i></span>{% else %}<i class="fas fa-clipboard-list" title="[ A Faire ]"></i> {% endif %}</td>
  48. <td onmouseover="this.style.cursor='pointer';">
  49. {% if apps.GES_APPLink_APP.GESAP_Procedure != "" %}<span style="color: blue;"><a class="text-reset" target="_blank" href="{{ apps.GES_APPLink_APP.GESAP_Procedure }}"><i class="fas fa-info-circle"></i></a></span>&nbsp;{% endif %}
  50. <span onclick="bt_edit_app_info({{apps.id}})"><i class="fas fa-tools"></i></span>&nbsp;
  51. <span {% if apps.GES_APPLink_Create == False %}style="color: red;"{% endif %}{% if apps.GES_APPLink_Create == False %} onclick="bt_app_remove({{apps.id}})"{% endif %}><i class="fas fa-minus-square" {% if apps.GES_APPLink_Create == True %}title="Attention - La création de l'application doit étre annulé"{% endif %}></i></span>
  52. </td>
  53. </tr>
  54. {% endspaceless %}
  55. {% empty %}
  56. <tr><td></td><td colspan='4'><i>Pas d'application d'associé</i></td></tr>
  57. {% endfor %}
  58. <tr><td>Ajout d'un application</td><td>{{item.apps_form.GES_APPLink_APP}}</td><td><button type="button" class="btn btn-success btn-sm" onclick="bt_app_add({{item.id}})"><i class="fas fa-plus-square"></i> Ajouté</button><td></tr>
  59. </table>
  60. <table class="table table-sm">
  61. {% for apps in item.apps %}
  62. {% if apps.GES_APPLink_APP.GESAP_Sup_Nom != "" %}
  63. <tr>
  64. <td><b> {{apps.GES_APPLink_APP.GESAP_Nom}} </b></td>
  65. <td><b> {{apps.GES_APPLink_APP.GESAP_Sup_Nom}} </b></td>
  66. <td>{% if apps.GES_APPLink_Sup != ""%} {{apps.GES_APPLink_Sup}} {% else %}{% endif %}</td>
  67. </tr>
  68. {% endif %}
  69. {% endfor %}
  70. </table>
  71. <p><i class="fas fa-share-alt"></i> http://srv-gparc.intra.stjacques/user/liste?get_id={{item.id}}</p>
  72. </div>
  73. <div class="modal-footer">
  74. {% if item.isok == 1 and item.GES_OK == False %}<button type="button" class="btn btn-success" onclick="bt_edit_complete({{item.id}})"><i class="fas fa-check"></i> Finaliser</button>{% endif %}
  75. {% if item.GES_OK == True and item.GES_Date_Sup and item.GES_SUP == False %}<button type="button" class="btn btn-danger" onclick="bt_edit_close({{item.id}})"><i class="fas fa-check"></i> Compte cloturé</button>{% endif %}
  76. <a class="btn btn-dark" target="_blank" href="{% url 'gest_user_api_user_get_for_send' item.id %}" role="button"><i class="fa fa-print"></i> Pour impression</a>
  77. <button type="button" class="btn btn-dark" onclick="bt_edit_info({{item.id}})"><i class="far fa-edit"></i> Mise à jour</button>
  78. </div>
  79. </div>
  80. </div>