core/modules/block/block-admin-display-form.tpl.php converted to core/themes/stark/templates/system/block-admin-display-form.twig

CommentFileSizeAuthor
#3 1779048-1.patch2.67 KBMadFish
#1 1779048-block-admin.patch2.85 KBMadFish
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MadFish’s picture

FileSize
2.85 KB
podarok’s picture

Status: Needs review » Needs work
+++ b/core/modules/block/block.module
@@ -80,11 +80,6 @@ function block_theme() {
-    // 'block_admin_display_form' => array(
-      // 'template' => 'block-admin-display-form',
-      // 'file' => 'block.admin.inc',
-      // 'render element' => 'form',
-    // ),
+++ /dev/null
@@ -1,54 +0,0 @@
-{#
-  @file
-  Default theme implementation to configure blocks.
-  *
-  Available variables:
-  - $block_regions: An array of regions. Keyed by name with the title as value.
-  - $block_listing: An array of blocks keyed by region and then delta.
-  - $form_submit: Form submit button.
-  *
-  Each $block_listing[$region] contains an array of blocks for that region.
-  *
-  Each $data in $block_listing[$region] contains:
-  - $data->region_title: Region title for the listed block.
-  - $data->block_title: Block title.
-  - $data->region_select: Drop-down menu for assigning a region.
-  - $data->weight_select: Drop-down menu for setting weights.
-  - $data->configure_link: Block configuration link.
-  - $data->delete_link: For deleting user added blocks.
-  *
-  @see template_preprocess_block_admin_display_form()
-  @see theme_block_admin_display()
-  *
-  @ingroup themeable
-#}
-<table id="blocks" class="sticky-enabled">
-  <thead>
-    <tr>
-      <th>{{ 'Block'|t }}</th>
-      <th>{{ 'Region'|t }}</th>
-      <th>{{ 'Weight'|t }}</th>
-      <th colspan="2">{{ 'Operations'|t }}</th>
-    </tr>
-  </thead>
-  <tbody>
-    {% 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] ? '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 class="draggable {{ cycle(["even", "odd"], loop.index) }}{{ data.row_class ? data.row_class : '' }}">
-        <td class="block">{{ data.block_title }}</td>
-        <td>{{ data.region_select }}</td>
-        <td>{{ data.weight_select }}</td>
-        <td>{{ data.configure_link }}</td>
-        <td>{{ data.delete_link }}</td>
-      </tr>
-      {% endfor %}
-    {% endfor %}
-  </tbody>
-</table>
-{{ render(form_submit) }}

use hash_old hash_new in git diff
wrong patch

MadFish’s picture

FileSize
2.67 KB
podarok’s picture

Status: Needs work » Reviewed & tested by the community

looks good

podarok’s picture

Status: Reviewed & tested by the community » Fixed

commited #3

podarok’s picture

Component: Code » Twig templates

commited into 8.x branch

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Fabianx’s picture

Status: Closed (fixed) » Needs work

Reopened due to not having been merged completely to front-end branch.

Needs re-roll.

However:

Is the

-      'render element' => 'form',

really necessary to remove?

tlattimore’s picture

Status: Needs work » Closed (fixed)

Clsoing. The template block-admin-display-form.twig is committed to front-end and being called. I agree with fabian in #8, we don't need to remove that line.