From 78d22bc728ea25563f3ec002faa02dd903e3a50f Mon Sep 17 00:00:00 2001
From: catch <git config --global user.email catch@35733.no-reply.drupal.org>
Date: Wed, 11 Mar 2015 08:28:47 +0000
Subject: [PATCH] Issue #2448213 by alexpott: Remove admin templates from
 Classy

---
 .../block/templates/block-list.html.twig      |  6 +-
 .../templates/image-style-preview.html.twig   | 18 +++---
 .../templates/admin/block-list.html.twig      | 23 --------
 .../templates/admin/image-anchor.html.twig    | 14 -----
 .../admin/image-crop-summary.html.twig        | 32 -----------
 .../admin/image-resize-summary.html.twig      | 30 ----------
 .../admin/image-rotate-summary.html.twig      | 27 ---------
 .../admin/image-scale-summary.html.twig       | 37 ------------
 .../admin/image-style-preview.html.twig       | 57 -------------------
 .../image-widget.html.twig                    |  0
 10 files changed, 12 insertions(+), 232 deletions(-)
 delete mode 100644 core/themes/classy/templates/admin/block-list.html.twig
 delete mode 100644 core/themes/classy/templates/admin/image-anchor.html.twig
 delete mode 100644 core/themes/classy/templates/admin/image-crop-summary.html.twig
 delete mode 100644 core/themes/classy/templates/admin/image-resize-summary.html.twig
 delete mode 100644 core/themes/classy/templates/admin/image-rotate-summary.html.twig
 delete mode 100644 core/themes/classy/templates/admin/image-scale-summary.html.twig
 delete mode 100644 core/themes/classy/templates/admin/image-style-preview.html.twig
 rename core/themes/classy/templates/{admin => content-edit}/image-widget.html.twig (100%)

diff --git a/core/modules/block/templates/block-list.html.twig b/core/modules/block/templates/block-list.html.twig
index bd3c6f753813..854d3ce85fe1 100644
--- a/core/modules/block/templates/block-list.html.twig
+++ b/core/modules/block/templates/block-list.html.twig
@@ -13,11 +13,11 @@
  * @ingroup themeable
  */
 #}
-<div>
-  <div>
+<div class="layout-block-list clearfix">
+  <div class="layout-region block-list-primary">
     {{ form|without('place_blocks') }}
   </div>
-  <div>
+  <div class="layout-region block-list-secondary">
     {{ form.place_blocks }}
   </div>
 </div>
diff --git a/core/modules/image/templates/image-style-preview.html.twig b/core/modules/image/templates/image-style-preview.html.twig
index 637034056956..d6e715c45b31 100644
--- a/core/modules/image/templates/image-style-preview.html.twig
+++ b/core/modules/image/templates/image-style-preview.html.twig
@@ -30,28 +30,28 @@
  * @ingroup themeable
  */
 #}
-<div>
+<div class="image-style-preview preview clearfix">
   {# Preview of the original image. #}
-  <div>
+  <div class="preview-image-wrapper">
       {{ 'original'|t }} (<a href="{{ original.url }}">{{ 'view actual size'|t }}</a>)
-      <div style="width: {{ preview.original.width }}px; height: {{ preview.original.height }}px;">
+      <div class="preview-image original-image" style="width: {{ preview.original.width }}px; height: {{ preview.original.height }}px;">
         <a href="{{ original.url }}">
           {{ original.rendered }}
         </a>
-      <div style="height: {{ preview.original.height }}px"><span>{{ original.height }}px</span></div>
-      <div style="width: {{ preview.original.width }}px"><span>{{ original.width }}px</span></div>
+      <div class="height" style="height: {{ preview.original.height }}px"><span>{{ original.height }}px</span></div>
+      <div class="width" style="width: {{ preview.original.width }}px"><span>{{ original.width }}px</span></div>
     </div>
   </div>
 
   {# Derivative of the image style. #}
-  <div>
+  <div class="preview-image-wrapper">
     {{ style_name }} (<a href="{{ derivative.url }}?{{ cache_bypass }}">{{ 'view actual size'|t }}</a>)
-    <div style="width: {{ preview.derivative.width }}px; height: {{ preview.derivative.height }}px;">
+    <div class="preview-image modified-image" style="width: {{ preview.derivative.width }}px; height: {{ preview.derivative.height }}px;">
       <a href="{{ derivative.url }}?{{ cache_bypass }}">
         {{ derivative.rendered }}
       </a>
-      <div style="height: {{ preview.derivative.height }}px"><span>{{ derivative.height }}px</span></div>
-      <div style="width: {{ preview.derivative.width }}px"><span>{{ derivative.width }}px</span></div>
+      <div class="height" style="height: {{ preview.derivative.height }}px"><span>{{ derivative.height }}px</span></div>
+      <div class="width" style="width: {{ preview.derivative.width }}px"><span>{{ derivative.width }}px</span></div>
     </div>
   </div>
 </div>
diff --git a/core/themes/classy/templates/admin/block-list.html.twig b/core/themes/classy/templates/admin/block-list.html.twig
deleted file mode 100644
index 854d3ce85fe1..000000000000
--- a/core/themes/classy/templates/admin/block-list.html.twig
+++ /dev/null
@@ -1,23 +0,0 @@
-{#
-/**
- * @file
- * Two column template for the block add/edit form.
- *
- * This template will be used when a block edit form specifies 'block_edit_form'
- * as its #theme callback.  Otherwise, by default, block add/edit forms will be
- * themed by form.html.twig.
- *
- * Available variables:
- * - form: The block add/edit form.
- *
- * @ingroup themeable
- */
-#}
-<div class="layout-block-list clearfix">
-  <div class="layout-region block-list-primary">
-    {{ form|without('place_blocks') }}
-  </div>
-  <div class="layout-region block-list-secondary">
-    {{ form.place_blocks }}
-  </div>
-</div>
diff --git a/core/themes/classy/templates/admin/image-anchor.html.twig b/core/themes/classy/templates/admin/image-anchor.html.twig
deleted file mode 100644
index eb670a4f9e3b..000000000000
--- a/core/themes/classy/templates/admin/image-anchor.html.twig
+++ /dev/null
@@ -1,14 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation for a 3x3 grid of checkboxes for image anchors.
- *
- * Available variables:
- * - table: HTML for the table of image anchors.
- *
- * @see template_preprocess_image_anchor()
- *
- * @ingroup themeable
- */
-#}
-{{ table }}
diff --git a/core/themes/classy/templates/admin/image-crop-summary.html.twig b/core/themes/classy/templates/admin/image-crop-summary.html.twig
deleted file mode 100644
index fc991b65ef2a..000000000000
--- a/core/themes/classy/templates/admin/image-crop-summary.html.twig
+++ /dev/null
@@ -1,32 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation for a summary of an image crop effect.
- *
- * Available variables:
- * - data: The current configuration for this resize effect, including:
- *   - width: The width of the resized image.
- *   - height: The height of the resized image.
- *   - anchor: The part of the image that will be retained after cropping.
- *   - anchor_label: The translated label of the crop anchor.
- * - effect: The effect information, including:
- *   - id: The effect identifier.
- *   - label: The effect name.
- *   - description: The effect description.
- *
- * @ingroup themeable
- */
-#}
-{% if data.width and data.height -%}
-  {{ data.width|e }}×{{ data.height|e }}
-{%- else -%}
-  {% if data.width %}
-    {% trans %}
-      width {{ data.width|e }}
-    {% endtrans %}
-  {% elseif data.height %}
-    {% trans %}
-      height {{ data.height|e }}
-    {% endtrans %}
-  {% endif %}
-{%- endif %}
diff --git a/core/themes/classy/templates/admin/image-resize-summary.html.twig b/core/themes/classy/templates/admin/image-resize-summary.html.twig
deleted file mode 100644
index f4084ef518e6..000000000000
--- a/core/themes/classy/templates/admin/image-resize-summary.html.twig
+++ /dev/null
@@ -1,30 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation for a summary of an image resize effect.
- *
- * Available variables:
- * - data: The current configuration for this resize effect, including:
- *   - width: The width of the resized image.
- *   - height: The height of the resized image.
- * - effect: The effect information, including:
- *   - id: The effect identifier.
- *   - label: The effect name.
- *   - description: The effect description.
- *
- * @ingroup themeable
- */
-#}
-{% if data.width and data.height -%}
-  {{ data.width|e }}×{{ data.height|e }}
-{%- else -%}
-  {% if data.width %}
-    {% trans %}
-      width {{ data.width|e }}
-    {% endtrans %}
-  {% elseif data.height %}
-    {% trans %}
-      height {{ data.height|e }}
-    {% endtrans %}
-  {% endif %}
-{%- endif %}
diff --git a/core/themes/classy/templates/admin/image-rotate-summary.html.twig b/core/themes/classy/templates/admin/image-rotate-summary.html.twig
deleted file mode 100644
index 705a0eb03d3b..000000000000
--- a/core/themes/classy/templates/admin/image-rotate-summary.html.twig
+++ /dev/null
@@ -1,27 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation for a summary of an image rotate effect.
- *
- * Available variables:
- * - data: The current configuration for this resize effect, including:
- *   - degrees: Degrees to rotate the image, positive values will rotate the
- *     image clockwise, negative values counter-clockwise.
- *   - bgcolor: The hex background color of the new areas created as consequence
- *     of rotation.
- *   - random: If the rotation angle is randomized.
- * - effect: The effect information, including:
- *   - id: The effect identifier.
- *   - label: The effect name.
- *   - description: The effect description.
- *
- * @ingroup themeable
- */
-#}
-{% if data.random %}
-  {% trans %}
-    random between -{{ data.degrees|abs }}° and {{ data.degrees|abs }}°
-  {% endtrans %}
-{% else %}
-  {{ data.degrees }}°
-{% endif %}
diff --git a/core/themes/classy/templates/admin/image-scale-summary.html.twig b/core/themes/classy/templates/admin/image-scale-summary.html.twig
deleted file mode 100644
index 32d75cc336fa..000000000000
--- a/core/themes/classy/templates/admin/image-scale-summary.html.twig
+++ /dev/null
@@ -1,37 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation for a summary of an image scale effect.
- *
- * Available variables:
- * - data: The current configuration for this resize effect, including:
- *   - width: The width of the resized image.
- *   - height: The height of the resized image.
- *   - upscale: If images larger than their original size can scale.
- * - effect: The effect information, including:
- *   - id: The effect identifier.
- *   - label: The effect name.
- *   - description: The effect description.
- *
- * @ingroup themeable
- */
-#}
-{% if data.width and data.height -%}
-  {{ data.width|e }}×{{ data.height|e }}
-{%- else -%}
-  {% if data.width %}
-    {% trans %}
-      width {{ data.width|e }}
-    {% endtrans %}
-  {% elseif data.height %}
-    {% trans %}
-      height {{ data.height|e }}
-    {% endtrans %}
-  {% endif %}
-{%- endif %}
-
-{% if data.upscale %}
-  {% trans %}
-    (upscaling allowed)
-  {% endtrans %}
-{% endif %}
diff --git a/core/themes/classy/templates/admin/image-style-preview.html.twig b/core/themes/classy/templates/admin/image-style-preview.html.twig
deleted file mode 100644
index d6e715c45b31..000000000000
--- a/core/themes/classy/templates/admin/image-style-preview.html.twig
+++ /dev/null
@@ -1,57 +0,0 @@
-{#
-/**
- * @file
- * Default theme implementation to display a preview of an image style.
- *
- * Available variables:
- * - style_id: The ID of the image style.
- * - style_name: The name of the image style.
- * - cache_bypass: A timestamp token used to avoid browser caching of images.
- * - original: An associative array containing:
- *   - url: The URL of the original image.
- *   - width: The width in pixels of the original image.
- *   - height: The height in pixels of the original image.
- *   - rendered: The render array for the original image.
- * - derivative: An associative array containing:
- *   - url: The URL of the derivative image.
- *   - width: The width in pixels of the derivative image.
- *   - height: The height in pixels of the derivative image.
- *   - rendered:  The rendered derivative image.
- * - preview: An associative array containing:
- *   - original: An associative array containing:
- *     - width: The width in pixels of the original image in the preview.
- *     - height: The height in pixels of the original image in the preview.
- *   - derivative: An associative array containing:
- *     - width: The width in pixels of the derivative image in the preview.
- *     - height: The height in pixels of the derivative image in the preview.
- *
- * @see template_preprocess_image_style_preview()
- *
- * @ingroup themeable
- */
-#}
-<div class="image-style-preview preview clearfix">
-  {# Preview of the original image. #}
-  <div class="preview-image-wrapper">
-      {{ 'original'|t }} (<a href="{{ original.url }}">{{ 'view actual size'|t }}</a>)
-      <div class="preview-image original-image" style="width: {{ preview.original.width }}px; height: {{ preview.original.height }}px;">
-        <a href="{{ original.url }}">
-          {{ original.rendered }}
-        </a>
-      <div class="height" style="height: {{ preview.original.height }}px"><span>{{ original.height }}px</span></div>
-      <div class="width" style="width: {{ preview.original.width }}px"><span>{{ original.width }}px</span></div>
-    </div>
-  </div>
-
-  {# Derivative of the image style. #}
-  <div class="preview-image-wrapper">
-    {{ style_name }} (<a href="{{ derivative.url }}?{{ cache_bypass }}">{{ 'view actual size'|t }}</a>)
-    <div class="preview-image modified-image" style="width: {{ preview.derivative.width }}px; height: {{ preview.derivative.height }}px;">
-      <a href="{{ derivative.url }}?{{ cache_bypass }}">
-        {{ derivative.rendered }}
-      </a>
-      <div class="height" style="height: {{ preview.derivative.height }}px"><span>{{ derivative.height }}px</span></div>
-      <div class="width" style="width: {{ preview.derivative.width }}px"><span>{{ derivative.width }}px</span></div>
-    </div>
-  </div>
-</div>
diff --git a/core/themes/classy/templates/admin/image-widget.html.twig b/core/themes/classy/templates/content-edit/image-widget.html.twig
similarity index 100%
rename from core/themes/classy/templates/admin/image-widget.html.twig
rename to core/themes/classy/templates/content-edit/image-widget.html.twig
-- 
GitLab