customfieldchoiceset.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. {% extends 'generic/object.html' %}
  2. {% load helpers %}
  3. {% load plugins %}
  4. {% block content %}
  5. <div class="row mb-3">
  6. <div class="col col-12 col-md-6">
  7. <div class="card">
  8. <h2 class="card-header">Custom Field Choice Set</h2>
  9. <table class="table table-hover attr-table">
  10. <tr>
  11. <th scope="row">Name</th>
  12. <td>{{ object.name }}</td>
  13. </tr>
  14. <tr>
  15. <th scope="row">Description</th>
  16. <td>{{ object.description|markdown|placeholder }}</td>
  17. </tr>
  18. <tr>
  19. <th scope="row">Base Choices</th>
  20. <td>{{ object.get_base_choices_display|placeholder }}</td>
  21. </tr>
  22. <tr>
  23. <th scope="row">Choices</th>
  24. <td>{{ object.choices|length }}</td>
  25. </tr>
  26. <tr>
  27. <th scope="row">Order Alphabetically</th>
  28. <td>{% checkmark object.order_alphabetically %}</td>
  29. </tr>
  30. <tr>
  31. <th scope="row">Used by</th>
  32. <td>
  33. <ul class="list-unstyled mb-0">
  34. {% for cf in object.choices_for.all %}
  35. <li>{{ cf|linkify }}</li>
  36. {% endfor %}
  37. </ul>
  38. </td>
  39. </tr>
  40. </table>
  41. </div>
  42. {% plugin_left_page object %}
  43. </div>
  44. <div class="col col-12 col-md-6">
  45. <div class="card">
  46. <h2 class="card-header">Choices ({{ object.choices|length }})</h2>
  47. <table class="table table-hover">
  48. <thead>
  49. <tr>
  50. <th>Value</th>
  51. <th>Label</th>
  52. </tr>
  53. </thead>
  54. {% for value, label in choices %}
  55. <tr>
  56. <td>{{ value }}</td>
  57. <td>{{ label }}</td>
  58. </tr>
  59. {% endfor %}
  60. </table>
  61. {% include 'inc/paginator.html' with page=choices %}
  62. </div>
  63. {% plugin_right_page object %}
  64. </div>
  65. </div>
  66. <div class="row">
  67. <div class="col col-md-12">
  68. {% plugin_full_width_page object %}
  69. </div>
  70. </div>
  71. {% endblock %}