customfield.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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-md-6">
  7. <div class="card">
  8. <h5 class="card-header">
  9. Custom Field
  10. </h5>
  11. <div class="card-body">
  12. <table class="table table-hover attr-table">
  13. <tr>
  14. <th scope="row">Name</th>
  15. <td>{{ object.name }}</td>
  16. </tr>
  17. <tr>
  18. <th scope="row">Label</th>
  19. <td>{{ object.label|placeholder }}</td>
  20. </tr>
  21. <tr>
  22. <th scope="row">Group Name</th>
  23. <td>{{ object.group_name|placeholder }}</td>
  24. </tr>
  25. <tr>
  26. <th scope="row">Type</th>
  27. <td>
  28. {{ object.get_type_display }}
  29. {% if object.object_type %}({{ object.object_type.model|bettertitle }}){% endif %}
  30. </td>
  31. </tr>
  32. <tr>
  33. <th scope="row">Description</th>
  34. <td>{{ object.description|markdown|placeholder }}</td>
  35. </tr>
  36. <tr>
  37. <th scope="row">Required</th>
  38. <td>{% checkmark object.required %}</td>
  39. </tr>
  40. <tr>
  41. <th scope="row">Search Weight</th>
  42. <td>
  43. {% if object.search_weight %}
  44. {{ object.search_weight }}
  45. {% else %}
  46. <span class="text-muted">Disabled</span>
  47. {% endif %}
  48. </td>
  49. </tr>
  50. <tr>
  51. <th scope="row">Filter Logic</th>
  52. <td>{{ object.get_filter_logic_display }}</td>
  53. </tr>
  54. <tr>
  55. <th scope="row">Display Weight</th>
  56. <td>{{ object.weight }}</td>
  57. </tr>
  58. <tr>
  59. <th scope="row">UI Visibility</th>
  60. <td>{{ object.get_ui_visibility_display }}</td>
  61. </tr>
  62. <tr>
  63. <th scope="row">Cloneable</th>
  64. <td>{% checkmark object.is_cloneable %}</td>
  65. </tr>
  66. </table>
  67. </div>
  68. </div>
  69. <div class="card">
  70. <h5 class="card-header">
  71. Values
  72. </h5>
  73. <div class="card-body">
  74. <table class="table table-hover attr-table">
  75. <tr>
  76. <th scope="row">Default Value</th>
  77. <td>{{ object.default }}</td>
  78. </tr>
  79. <tr>
  80. <th scope="row">Choices</th>
  81. <td>
  82. {% if object.choices %}
  83. {{ object.choices|join:", " }}
  84. {% else %}
  85. {{ ''|placeholder }}
  86. {% endif %}
  87. </td>
  88. </tr>
  89. </table>
  90. </div>
  91. </div>
  92. {% plugin_left_page object %}
  93. </div>
  94. <div class="col col-md-6">
  95. <div class="card">
  96. <h5 class="card-header">
  97. Assigned Models
  98. </h5>
  99. <div class="card-body">
  100. <table class="table table-hover attr-table">
  101. {% for ct in object.content_types.all %}
  102. <tr>
  103. <td>{{ ct }}</td>
  104. </tr>
  105. {% endfor %}
  106. </table>
  107. </div>
  108. </div>
  109. <div class="card">
  110. <h5 class="card-header">
  111. Validation Rules
  112. </h5>
  113. <div class="card-body">
  114. <table class="table table-hover attr-table">
  115. <tr>
  116. <th scope="row">Minimum Value</th>
  117. <td>{{ object.validation_minimum|placeholder }}</td>
  118. </tr>
  119. <tr>
  120. <th scope="row">Maximum Value</th>
  121. <td>{{ object.validation_maximum|placeholder }}</td>
  122. </tr>
  123. <tr>
  124. <th scope="row">Regular Expression</th>
  125. <td>
  126. {% if object.validation_regex %}
  127. <code>{{ object.validation_regex }}</code>
  128. {% else %}
  129. {{ ''|placeholder }}
  130. {% endif %}
  131. </td>
  132. </tr>
  133. </table>
  134. </div>
  135. </div>
  136. {% plugin_right_page object %}
  137. </div>
  138. </div>
  139. <div class="row">
  140. <div class="col col-md-12">
  141. {% plugin_full_width_page object %}
  142. </div>
  143. </div>
  144. {% endblock %}