_game_table.html 2.0 KB

1234567891011121314151617181920212223242526272829303132
  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. <th scope="col"><a href="?order_by={% if not '-featured_on' in request.get_full_path %}-{% endif %}featured_on">Featured</a></th>
  13. <th scope="col"><a href="?order_by={% if not '-created' in request.get_full_path %}-{% endif %}created">Created</a></th>
  14. </tr>
  15. </thead>
  16. <tbody>
  17. {% for game in object_list %}
  18. <tr>
  19. <th scope="row"><a href="{{game.get_absolute_url}}">{{game.id}}</a></th>
  20. <td>{{game.name}}</td>
  21. <td><a href="{{game.game_system.get_absolute_url}}">{{game.game_system}}</td>
  22. <td>{{game.rating_by_100}}/100</td>
  23. <td><a href="{{game.developer.get_absolute_url}}">{{game.developer}}</a></td>
  24. <td><a href="{{game.publisher.get_absolute_url}}">{{game.publisher}}</a></td>
  25. <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>
  26. <td>{{game.release_date|date:"Y-m-d"}}</td>
  27. <td>{{game.featured_on|date:"Y-m-d"}}</td>
  28. <td>{{game.created|date:"Y-m-d"}}</td>
  29. </tr>
  30. {% endfor %}
  31. </tbody>
  32. </table>