| lombardofr | 10b52d1 | 2018-07-17 23:42:28 +0200 | [diff] [blame^] | 1 | {% extends "base.html" %} |
| 2 | {% load get %} |
| 3 | {% load date_tag %} |
| 4 | {% load staticfiles %} |
| 5 | |
| 6 | |
| 7 | {% block head_block %} |
| 8 | {{ block.super }} |
| 9 | <link rel="stylesheet" href="/static/bower_components/select2/dist/css/select2.min.css"> |
| 10 | {% endblock %} |
| 11 | {% block title_header_big %} |
| 12 | {{ block.super }} |
| 13 | {% endblock %} |
| 14 | {% block left_sidebar %} |
| 15 | {% include 'osm/osm_project_left_sidebar.html' %} |
| 16 | {% endblock %} |
| 17 | |
| 18 | |
| 19 | {% block breadcrumb_body %} |
| 20 | {{ block.super }} |
| 21 | <li><a href="#">Users</a></li> |
| 22 | {% endblock %} |
| 23 | |
| 24 | {% block content_body %} |
| 25 | {{ block.super }} |
| 26 | {% include 'modal/user_details.html' %} |
| 27 | {% include 'modal/user_create.html' %} |
| 28 | {% csrf_token %} |
| 29 | <div class="row"> |
| 30 | <div class="col-md-12"> |
| 31 | |
| 32 | <div class="box"> |
| 33 | <div class="box-header with-border"> |
| 34 | <h3 class="box-title">Users</h3> |
| 35 | <div class="box-tools"> |
| 36 | <button type="button" class="btn btn-default" data-container="body" |
| 37 | onclick="javascript:openModalCreateUser({'projects_list_url': '{% url "projects:projects_list" %}'})" |
| 38 | data-toggle="tooltip" data-placement="top" title="New User"> |
| 39 | |
| 40 | <i class="fa fa-plus"></i> Create User</button> |
| 41 | |
| 42 | </div> |
| 43 | </div> |
| 44 | <div class="box-body"> |
| 45 | <table id="users_table" class="table table-bordered table-striped"> |
| 46 | <thead> |
| 47 | <tr> |
| 48 | <th>Name</th> |
| 49 | <th>Projects</th> |
| 50 | <th>Identifier</th> |
| 51 | <th>Modified</th> |
| 52 | <th>Created</th> |
| 53 | <th>Actions</th> |
| 54 | |
| 55 | </tr> |
| 56 | </thead> |
| 57 | <tbody> |
| 58 | {% for s in users %} |
| 59 | <tr> |
| 60 | |
| 61 | <td>{{ s|get:"username" }}</td> |
| 62 | <td>{{ s|get:"projects" }}</td> |
| 63 | <td>{{ s|get:"_id" }}</td> |
| 64 | <td>{{ s|get_sub:"_admin,modified"|get_date}}</td> |
| 65 | <td>{{ s|get_sub:"_admin,created"|get_date}}</td> |
| 66 | |
| 67 | <td> |
| 68 | <div class="btn-group"> |
| 69 | |
| 70 | <button type="button" class="btn btn-default" |
| 71 | onclick="javascript:deleteUser('{% url "users:delete" user_id=s|get:"_id" %}')" data-toggle="tooltip" data-placement="top" data-container="body" title="Delete"><i |
| 72 | class="far fa-trash-alt" ></i></button> |
| 73 | </div> |
| 74 | </td> |
| 75 | |
| 76 | </tr> |
| 77 | {% endfor %} |
| 78 | </tbody> |
| 79 | </table> |
| 80 | </div> |
| 81 | </div> |
| 82 | </div> |
| 83 | |
| 84 | </div> |
| 85 | {% endblock %} |
| 86 | |
| 87 | {% block resource_block %} |
| 88 | {{ block.super }} |
| 89 | <!-- moment JS --> |
| 90 | <script src="/static/bower_components/select2/dist/js/select2.js"></script> |
| 91 | <script src="/static/src/userhandler/user_list.js"></script> |
| 92 | |
| 93 | |
| 94 | {% endblock %} |
| 95 | |
| 96 | {% block footer %} |
| 97 | {% include "footer.html" %} |
| 98 | {% endblock %} |