tag.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. {% extends 'generic/object.html' %}
  2. {% load helpers %}
  3. {% load plugins %}
  4. {% block content %}
  5. <div class="row">
  6. <div class="col col-md-6">
  7. <div class="card">
  8. <h5 class="card-header">
  9. Tag
  10. </h5>
  11. <div class="card-body">
  12. <table class="table table-hover panel-body attr-table">
  13. <tr>
  14. <th scope="row">Name</th>
  15. <td>
  16. {{ object.name }}
  17. </td>
  18. </tr>
  19. <tr>
  20. <th scope="row">Description</th>
  21. <td>
  22. {{ object.description|placeholder }}
  23. </td>
  24. </tr>
  25. <tr>
  26. <th scope="row">Color</th>
  27. <td>
  28. <span class="color-label" style="background-color: #{{ object.color }}">&nbsp;</span>
  29. </td>
  30. </tr>
  31. <tr>
  32. <th scope="row">Tagged Items</th>
  33. <td>
  34. {{ taggeditem_table.rows|length }}
  35. </td>
  36. </tr>
  37. </table>
  38. </div>
  39. </div>
  40. </div>
  41. <div class="col col-md-6">
  42. <div class="card">
  43. <h5 class="card-header">
  44. Tagged Item Types
  45. </h5>
  46. <div class="card-body">
  47. <table class="table table-hover panel-body attr-table">
  48. {% for object_type in object_types %}
  49. <tr>
  50. <td>{{ object_type.content_type.name|bettertitle }}</td>
  51. <td>
  52. {% with viewname=object_type.content_type.model_class|validated_viewname:"list" %}
  53. {% if viewname %}
  54. <a href="{% url viewname %}?tag={{ object.slug }}">{{ object_type.item_count }}</a>
  55. {% else %}
  56. {{ object_type.item_count }}
  57. {% endif %}
  58. {% endwith %}
  59. </td>
  60. </tr>
  61. {% endfor %}
  62. </table>
  63. </div>
  64. </div>
  65. </div>
  66. <div class="row">
  67. <div class="col">
  68. {% include 'inc/panel_table.html' with table=taggeditem_table heading='Tagged Objects' %}
  69. {% include 'inc/paginator.html' with paginator=taggeditem_table.paginator page=items_table.page %}
  70. </div>
  71. </div>
  72. {% plugin_full_width_page object %}
  73. {% endblock %}