voteDetail.html 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. {% extends "base_generic.html" %}
  2. {% load tags %}
  3. {% block content %}
  4. <div class="container-fluid">
  5. {% if user.is_superuser %}
  6. <h3 style="margin-top: 10px">Votesoverwiev </h3>
  7. <table class="table table-sm table-hover">
  8. <caption>* FP = Future trends & Prototypes; AA = Animated Architecture; MA = Money Architecture; SMA = Spatial Media Art; PAUI = Participatory Architecture & Urban Interaction</caption>
  9. <thead class="">
  10. <tr>
  11. <th scope="col"></th>
  12. <th scope="col"> Product</th>
  13. <th scope="col"> Category</th>
  14. <th scope="col"> Average</th>
  15. {% for user in user %}
  16. <th scope="col"> {{user.username}}</th>
  17. {% endfor %}
  18. </tr>
  19. {% for Product in Product_list %}
  20. <tr class="{% get_sucsess Product %}" >
  21. <td scope="col"><img src="{{Product.media_set.first.image_small.url}}" width="50" height="50" alt="image"> </td>
  22. <td scope="col"> <a href="{% url 'product-detail' Product.pk %}"> {{Product.name|upper }} </a></td>
  23. <td scope="col">
  24. {% for category in Product.category.all %}
  25. {{category.short_name}}{% if not forloop.last %} | {% endif %}
  26. {% endfor %}
  27. </td>
  28. <td scope="col"> {% get_avg Product %}</td>
  29. {% for user in user %}
  30. <td scope="col"><abbr title="{% get_vote_txt Product user%}"> {% get_vote_simple Product user %} </abbr></td>
  31. {% endfor %}
  32. </tr>
  33. {% endfor %}
  34. </table>
  35. </div>
  36. {% else %}
  37. <p>You are not authorized to view this page. </p>
  38. {% endif %}
  39. {% endblock %}