From 43934a326d906c3a6263aa455389d585e82f95e7 Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Fri, 24 May 2013 09:59:07 -0700 Subject: [PATCH] Issue #1898424 by joelpittet, duellj, Cottser, mr.baileys: layout.module - Convert PHPTemplate templates to Twig. --- .../layouts/static/one-col/one-col.html.twig | 21 +++++++++++++++ .../layouts/static/one-col/one-col.tpl.php | 18 ------------- .../layouts/static/twocol/two-col.html.twig | 27 +++++++++++++++++++ .../layouts/static/twocol/two-col.tpl.php | 24 ----------------- .../layouts/static/one-col/one-col.html.twig | 20 ++++++++++++++ .../layouts/static/one-col/one-col.tpl.php | 18 ------------- .../layouts/static/two-col/two-col.html.twig | 26 ++++++++++++++++++ .../layouts/static/two-col/two-col.tpl.php | 24 ----------------- 8 files changed, 94 insertions(+), 84 deletions(-) create mode 100644 core/modules/layout/layouts/static/one-col/one-col.html.twig delete mode 100644 core/modules/layout/layouts/static/one-col/one-col.tpl.php create mode 100644 core/modules/layout/layouts/static/twocol/two-col.html.twig delete mode 100644 core/modules/layout/layouts/static/twocol/two-col.tpl.php create mode 100644 core/modules/layout/tests/layouts/static/one-col/one-col.html.twig delete mode 100644 core/modules/layout/tests/layouts/static/one-col/one-col.tpl.php create mode 100644 core/modules/layout/tests/themes/layout_test_theme/layouts/static/two-col/two-col.html.twig delete mode 100644 core/modules/layout/tests/themes/layout_test_theme/layouts/static/two-col/two-col.tpl.php diff --git a/core/modules/layout/layouts/static/one-col/one-col.html.twig b/core/modules/layout/layouts/static/one-col/one-col.html.twig new file mode 100644 index 0000000000..8f30223b50 --- /dev/null +++ b/core/modules/layout/layouts/static/one-col/one-col.html.twig @@ -0,0 +1,21 @@ +{# +/** + * @file + * Template for a 1 column layout. + * + * This template provides a simple one column display layout. + * + * Avaiable variables: + * - attributes: Attributes to be placed on the wrapping element. + * - content: All content items, each content item is keyed to one region of the + * layout. 'content' contains the following section: + * - content: Content in the content column. + * + * @ingroup themeable + */ +#} +
+
+ {{ content.content }} +
+
diff --git a/core/modules/layout/layouts/static/one-col/one-col.tpl.php b/core/modules/layout/layouts/static/one-col/one-col.tpl.php deleted file mode 100644 index 61af832795..0000000000 --- a/core/modules/layout/layouts/static/one-col/one-col.tpl.php +++ /dev/null @@ -1,18 +0,0 @@ - -
> -
- -
-
diff --git a/core/modules/layout/layouts/static/twocol/two-col.html.twig b/core/modules/layout/layouts/static/twocol/two-col.html.twig new file mode 100644 index 0000000000..2bfade0a6a --- /dev/null +++ b/core/modules/layout/layouts/static/twocol/two-col.html.twig @@ -0,0 +1,27 @@ +{# +/** + * @file + * Template for a 2 column layout. + * + * This template provides a two column display layout, with each column equal in + * width. + * + * Available variables: + * - attributes: Attributes to be placed on the wrapping element. + * - content: All content items, each content item is keyed to one region of the + * layout. 'content' contains the following sections: + * - first: Content in the first column. + * - second: Content in the second column. + * + * @ingroup themeable + */ +#} +
+
+ {{ content.first }} +
+ +
+ {{ content.second }} +
+
diff --git a/core/modules/layout/layouts/static/twocol/two-col.tpl.php b/core/modules/layout/layouts/static/twocol/two-col.tpl.php deleted file mode 100644 index 810a052b2c..0000000000 --- a/core/modules/layout/layouts/static/twocol/two-col.tpl.php +++ /dev/null @@ -1,24 +0,0 @@ - -
> -
- -
- -
- -
-
diff --git a/core/modules/layout/tests/layouts/static/one-col/one-col.html.twig b/core/modules/layout/tests/layouts/static/one-col/one-col.html.twig new file mode 100644 index 0000000000..c4f263d3ff --- /dev/null +++ b/core/modules/layout/tests/layouts/static/one-col/one-col.html.twig @@ -0,0 +1,20 @@ +{# +/** + * @file + * Template for a one column layout. + * + * This template provides a very simple "one column" display layout. + * + * Avaiable variables: + * - content: All content items, each content item is keyed to one region of the + * layout. 'content' contains the following section: + * - middle: The only region in the layout. + * + * @ingroup themeable + */ +#} +
+
+
{{ content.middle }}
+
+
diff --git a/core/modules/layout/tests/layouts/static/one-col/one-col.tpl.php b/core/modules/layout/tests/layouts/static/one-col/one-col.tpl.php deleted file mode 100644 index e47f83ec47..0000000000 --- a/core/modules/layout/tests/layouts/static/one-col/one-col.tpl.php +++ /dev/null @@ -1,18 +0,0 @@ - -
-
-
-
-
diff --git a/core/modules/layout/tests/themes/layout_test_theme/layouts/static/two-col/two-col.html.twig b/core/modules/layout/tests/themes/layout_test_theme/layouts/static/two-col/two-col.html.twig new file mode 100644 index 0000000000..7c58a551b7 --- /dev/null +++ b/core/modules/layout/tests/themes/layout_test_theme/layouts/static/two-col/two-col.html.twig @@ -0,0 +1,26 @@ +{# +/** + * @file + * Template for a 2 column layout. + * + * This template provides a two column display layout, with each column equal in + * width. + * + * Available variables: + * - content: All content items, each content item is keyed to one region of the + * layout. 'content' contains the following sections: + * - left: Content in the left column. + * - right: Content in the right column. + * + * @ingroup themeable + */ +#} +
+
+
{{ content.left }}
+
+ +
+
{{ content.right }}
+
+
diff --git a/core/modules/layout/tests/themes/layout_test_theme/layouts/static/two-col/two-col.tpl.php b/core/modules/layout/tests/themes/layout_test_theme/layouts/static/two-col/two-col.tpl.php deleted file mode 100644 index 1d8dbe46b3..0000000000 --- a/core/modules/layout/tests/themes/layout_test_theme/layouts/static/two-col/two-col.tpl.php +++ /dev/null @@ -1,24 +0,0 @@ - -
-
-
-
- -
-
-
-
-- GitLab