game_library_list.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334
  1. {% extends "base.html" %}
  2. {% block page_title %}Game Library{% endblock %}
  3. {% block title %}All games by rating{% endblock %}
  4. {% block content %}
  5. <table class="table table-bordered table">
  6. <thead>
  7. <tr>
  8. <th scope="col">#</th>
  9. <th scope="col"><a href="?order_by=name">Name</a></th>
  10. <th scope="col">System</th>
  11. <th scope="col"><a href="?order_by={% if not '-rating' in request.get_full_path %}-{% endif %}rating">Rating</a></th>
  12. <th scope="col"><a href="?order_by={% if not '-developer' in request.get_full_path %}-{% endif %}developer">Developer</a></th>
  13. <th scope="col"><a href="?order_by={% if not '-publisher' in request.get_full_path %}-{% endif %}publisher">Publisher</a></th>
  14. <th scope="col"><a href="?order_by={% if not '-genre' in request.get_full_path %}-{% endif %}genre">Genre</a></th>
  15. </tr>
  16. </thead>
  17. <tbody>
  18. {% for game in object_list %}
  19. <tr>
  20. <th scope="row"><a href="{{game.get_absolute_url}}">{{game.id}}</a></th>
  21. <td>{{game.name}}</td>
  22. <td><a href="{{game.game_system.get_absolute_url}}">{{game.game_system}}</td>
  23. <td>{{game.rating_by_100}}/100</td>
  24. <td><a href="{{game.developer.get_absolute_url}}">{{game.developer}}</a></td>
  25. <td><a href="{{game.publisher.get_absolute_url}}">{{game.publisher}}</a></td>
  26. <td style="font-size:smaller;">{% for genre in game.genre.all %}<a href="{{genre.get_absolute_url}}">{{genre}}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</td>
  27. </tr>
  28. {% endfor %}
  29. </tbody>
  30. </table>
  31. {% include "games/_pagination.html" %}
  32. {% endblock %}