tag.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. {% extends '_base.html' %}
  2. {% load helpers %}
  3. {% block header %}
  4. <div class="row">
  5. <div class="col-sm-8 col-md-9">
  6. <ol class="breadcrumb">
  7. <li><a href="{% url 'extras:tag_list' %}">Tags</a></li>
  8. <li>{{ tag }}</li>
  9. </ol>
  10. </div>
  11. <div class="col-sm-4 col-md-3">
  12. <form action="{% url 'extras:tag_list' %}" method="get">
  13. <div class="input-group">
  14. <input type="text" name="q" class="form-control" />
  15. <span class="input-group-btn">
  16. <button type="submit" class="btn btn-primary">
  17. <span class="fa fa-search" aria-hidden="true"></span>
  18. </button>
  19. </span>
  20. </div>
  21. </form>
  22. </div>
  23. </div>
  24. <div class="pull-right">
  25. {% if perms.taggit.change_tag %}
  26. <a href="{% url 'extras:tag_edit' slug=tag.slug %}" class="btn btn-warning">
  27. <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
  28. Edit this tag
  29. </a>
  30. {% endif %}
  31. {% if perms.taggit.delete_tag %}
  32. <a href="{% url 'extras:tag_delete' slug=tag.slug %}" class="btn btn-danger">
  33. <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
  34. Delete this tag
  35. </a>
  36. {% endif %}
  37. </div>
  38. <h1>{% block title %}Tag: {{ tag }}{% endblock %}</h1>
  39. {% include 'inc/created_updated.html' with obj=tag %}
  40. <ul class="nav nav-tabs">
  41. <li role="presentation"{% if not active_tab %} class="active"{% endif %}>
  42. <a href="{{ tag.get_absolute_url }}">Tag</a>
  43. </li>
  44. {% if perms.extras.view_objectchange %}
  45. <li role="presentation"{% if active_tab == 'changelog' %} class="active"{% endif %}>
  46. <a href="{% url 'extras:tag_changelog' slug=tag.slug %}">Changelog</a>
  47. </li>
  48. {% endif %}
  49. </ul>
  50. {% endblock %}
  51. {% block content %}
  52. <div class="row">
  53. <div class="col-md-6">
  54. <div class="panel panel-default">
  55. <div class="panel-heading">
  56. <strong>Tag</strong>
  57. </div>
  58. <table class="table table-hover panel-body attr-table">
  59. <tr>
  60. <td>Name</td>
  61. <td>
  62. {{ tag.name }}
  63. </td>
  64. </tr>
  65. <tr>
  66. <td>Slug</td>
  67. <td>
  68. {{ tag.slug }}
  69. </td>
  70. </tr>
  71. <tr>
  72. <td>Tagged Items</td>
  73. <td>
  74. {{ items_count }}
  75. </td>
  76. </tr>
  77. <tr>
  78. <td>Color</td>
  79. <td>
  80. <span class="label color-block" style="background-color: #{{ tag.color }}">&nbsp;</span>
  81. </td>
  82. </tr>
  83. </table>
  84. </div>
  85. <div class="panel panel-default">
  86. <div class="panel-heading">
  87. <strong>Comments</strong>
  88. </div>
  89. <div class="panel-body rendered-markdown">
  90. {% if tag.comments %}
  91. {{ tag.comments|gfm }}
  92. {% else %}
  93. <span class="text-muted">None</span>
  94. {% endif %}
  95. </div>
  96. </div>
  97. </div>
  98. <div class="col-md-6">
  99. {% include 'panel_table.html' with table=items_table heading='Tagged Objects' %}
  100. {% include 'inc/paginator.html' with paginator=items_table.paginator page=items_table.page %}
  101. </div>
  102. </div>
  103. {% endblock %}