_game_table.html 1.6 KB

12345678910111213141516171819202122232425262728
  1. <table class="table table-bordered table">
  2. <thead>
  3. <tr>
  4. <th scope="col">#</th>
  5. <th scope="col"><a href="?order_by=name">Name</a></th>
  6. <th scope="col">System</th>
  7. <th scope="col"><a href="?order_by={% if not '-rating' in request.get_full_path %}-{% endif %}rating">Rating</a></th>
  8. <th scope="col"><a href="?order_by={% if not '-developer' in request.get_full_path %}-{% endif %}developer">Developer</a></th>
  9. <th scope="col"><a href="?order_by={% if not '-publisher' in request.get_full_path %}-{% endif %}publisher">Publisher</a></th>
  10. <th scope="col"><a href="?order_by={% if not '-genre' in request.get_full_path %}-{% endif %}genre">Genre</a></th>
  11. <th scope="col"><a href="?order_by={% if not '-release_date' in request.get_full_path %}-{% endif %}release_date">Release</a></th>
  12. </tr>
  13. </thead>
  14. <tbody>
  15. {% for game in object_list %}
  16. <tr>
  17. <th scope="row"><a href="{{game.get_absolute_url}}">{{game.id}}</a></th>
  18. <td>{{game.name}}</td>
  19. <td><a href="{{game.game_system.get_absolute_url}}">{{game.game_system}}</td>
  20. <td>{{game.rating_by_100}}/100</td>
  21. <td><a href="{{game.developer.get_absolute_url}}">{{game.developer}}</a></td>
  22. <td><a href="{{game.publisher.get_absolute_url}}">{{game.publisher}}</a></td>
  23. <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>
  24. <td>{{game.release_date|date:"Y-m-d"}}</td>
  25. </tr>
  26. {% endfor %}
  27. </tbody>
  28. </table>