tableview.html 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. {% extends "base.html" %}
  2. {% block title %}
  3. Toppers Tasks | Account
  4. {% endblock %}
  5. {% block content %}
  6. {% for category, message in get_flashed_messages(with_categories=True) %}
  7. <div class="alert alert-{{ category }}" role="alert">
  8. {{ message }}
  9. </div>
  10. {% endfor %}
  11. <div class="row">
  12. <div class="task-card">
  13. <table class="table table-striped table-hover">
  14. <thead>
  15. <tr>
  16. <th>id</th>
  17. <th>Username</th>
  18. <th>Passhash</th>
  19. <th>Is Admin</th>
  20. </tr>
  21. </thead>
  22. <tbody>
  23. {% for user in users %}
  24. <tr>
  25. <td>{{ user.id }}</td>
  26. <td>{{ user.username }}</td>
  27. <td>...{{ user.passhash[-6:] if user.passhash else 'None'
  28. }}</td>
  29. <td>{{ user.is_admin }}</td>
  30. </tr>
  31. {% endfor %}
  32. </tbody>
  33. </table>
  34. </div>
  35. </div>
  36. <div class="row">
  37. <div class="task-card">
  38. <table class="table table-striped table-hover">
  39. <thead>
  40. <tr>
  41. <th>id</th>
  42. <th>tasktext</th>
  43. <th>created_datetime</th>
  44. <th>created_by</th>
  45. <th>due</th>
  46. <th>completed</th>
  47. <th>deleted</th>
  48. </tr>
  49. </thead>
  50. <tbody>
  51. {% for task in tasks %}
  52. <tr>
  53. <td>{{ task.id }}</td>
  54. <td>{{ task.tasktext[:20] }}</td>
  55. <td>{{ task.created_datetime }}</td>
  56. <td>{{ task.user.username }}</td>
  57. <td>{{ task.due }}</td>
  58. <td>{{ task.completed }}</td>
  59. <td>{{ task.deleted }}</td>
  60. </tr>
  61. {% endfor %}
  62. </tbody>
  63. </table>
  64. </div>
  65. </div>
  66. {% endblock %}