user.list.html.bak 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. {% extends "base.html" %}
  2. {% block title %}
  3. List User
  4. {% endblock %}
  5. {% block content %}
  6. <div class="btn-toolbar">
  7. <div class="btn-group">
  8. {% url "adduserurl" as theadduserurl %}
  9. <a class="btn btn-default {%if request.path = theadduserurl%} active {%endif%}" href={{ theadduserurl }}><span class="glyphicon glyphicon-edit"></span>新建用户</a>
  10. {% url "listuserurl" as thelistuserurl %}
  11. <a class="btn btn-default {%if request.path = thelistuserurl%} active {%endif%}" href={{ thelistuserurl }}><span class="glyphicon glyphicon-list"></span>用户列表</a>
  12. {% url "addxlsuserurl" as theaddxlsuserurl %}
  13. <a class="btn btn-default {%if request.path = theaddxlsuserurl%} active {%endif%}" href={{ addxlsuserurl }}><span class="glyphicon glyphicon-list"></span>批量导入</a>
  14. </div>
  15. </div>
  16. <hr/>
  17. <table class="table table-hover table-striped table-bordered table-condensed">
  18. <tr>
  19. <th>账号</th>
  20. <th>姓名</th>
  21. <th>性别</th>
  22. <th>学号</th>
  23. <th>分组</th>
  24. <th>状态</th>
  25. <th>角色</th>
  26. <th>最后登录时间</th>
  27. <th>操作</th>
  28. </tr>
  29. {% for i in lPage %}
  30. <tr style="font-size: 13px;">
  31. <td>{{ i.username }}</td>
  32. <td>{{ i.nickname|default:"----" }}</td>
  33. <td>{{ i.sex|default:"----" }}</td>
  34. <td>{{ i.sid }}</td>
  35. <td>{{ i.classid }}</td>
  36. <td>
  37. {% if i.is_active %}
  38. <span class="label label-success">启用</span>
  39. {% else %}
  40. <span class="label label-default">禁用</span>
  41. {% endif %}
  42. </td>
  43. <td>{{ i.role|default:"----" }}</td>
  44. <td>{{ i.last_login|date:"Y-m-d H:i:s" }}</td>
  45. <td class="host_buttom">
  46. <a class="btn btn-warning btn-xs" href={% url "edituserurl" i.id %} onclick="return confirm('是否确认编辑?')">编辑</a>
  47. <a class="btn btn-danger btn-xs" href={% url "deleteuserurl" i.id %} onclick="return confirm('是否确认删除?')">删除</a>
  48. </td>
  49. </tr>
  50. {% endfor %}
  51. </table>
  52. {% include "common/paginator.html" %}
  53. {% endblock %}