summaryrefslogtreecommitdiffstats
path: root/core/modules/block/templates/block-admin-display-form.html.twig
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/block/templates/block-admin-display-form.html.twig')
-rw-r--r--core/modules/block/templates/block-admin-display-form.html.twig56
1 files changed, 56 insertions, 0 deletions
diff --git a/core/modules/block/templates/block-admin-display-form.html.twig b/core/modules/block/templates/block-admin-display-form.html.twig
new file mode 100644
index 0000000..545a06c
--- /dev/null
+++ b/core/modules/block/templates/block-admin-display-form.html.twig
@@ -0,0 +1,56 @@
+{#
+/**
+ * @file
+ * Default theme implementation to configure blocks.
+ *
+ * Available variables:
+ * - block_regions: A collection of regions. Keyed by name with the title as value.
+ * - block_listing: A collection of blocks keyed by region and then delta.
+ * - form: The form elements.
+ *
+ * Each block_listing[region] contains a collection of blocks for that region.
+ * - data: Each data in block_listing[region] contains.
+ * - region_title: Region title for the listed block.
+ * - block_title: Block title.
+ * - region_select: Drop-down menu for assigning a region.
+ * - weight_select: Drop-down menu for setting weights.
+ * - operations: Block operations.
+ *
+ * @see template_preprocess()
+ * @see template_preprocess_block_admin_display_form()
+ *
+ * @ingroup themeable
+ */
+#}
+<table id="blocks" class="sticky-enabled">
+ <thead>
+ <tr>
+ <th>{{ 'Block'|t }}</th>
+ <th>{{ 'Region'|t }}</th>
+ <th>{{ 'Weight'|t }}</th>
+ <th>{{ 'Operations'|t }}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% set row = 0 %}
+ {% for region, title in block_regions %}
+ <tr class="region-title region-title-{{ region }}">
+ <td colspan="5">{{ title }}</td>
+ </tr>
+ <tr class="region-message region-{{ region }}-message {{ block_listing[region] is empty ? 'region-empty' : 'region-populated' }}">
+ <td colspan="5"><em>{{ 'No blocks in this region'|t }}</em></td>
+ </tr>
+ {% for delta, data in block_listing[region] %}
+ <tr{{ data.attributes }}>
+ <td class="block">{{ data.block_title }}</td>
+ <td>{{ data.region_select }}</td>
+ <td>{{ data.weight_select }}</td>
+ <td>{{ data.operations }}</td>
+ </tr>
+ {% set row = row + 1 %}
+ {% endfor %}
+ {% endfor %}
+ </tbody>
+</table>
+
+{{ form }}