Issue #1843770 by joelpittet, izus: Convert views/templates/views-view-unformatted.tpl.php to twig.
parent
6ac1d47a27
commit
6880348233
|
@ -0,0 +1,24 @@
|
|||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation to display a view of unformatted rows.
|
||||
*
|
||||
* Available variables:
|
||||
* - title: The title of this group of rows. May be empty.
|
||||
* - rows: A list of the view's row items.
|
||||
* - row_classes: A list of row class attributes keyed by the row's ID.
|
||||
*
|
||||
* @see template_preprocess()
|
||||
* @see template_preprocess_views_view_unformatted()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{% if title %}
|
||||
<h3>{{ title }}</h3>
|
||||
{% endif %}
|
||||
{% for id, row in rows %}
|
||||
<div{{ row_classes[id] }}>
|
||||
{{ row }}
|
||||
</div>
|
||||
{% endfor %}
|
|
@ -1,17 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Default simple view template to display a list of rows.
|
||||
*
|
||||
* @ingroup views_templates
|
||||
*/
|
||||
?>
|
||||
<?php if (!empty($title)): ?>
|
||||
<h3><?php print $title; ?></h3>
|
||||
<?php endif; ?>
|
||||
<?php foreach ($rows as $id => $row): ?>
|
||||
<div <?php print $row_classes[$id]; ?>>
|
||||
<?php print $row; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
|
@ -782,7 +782,14 @@ function template_preprocess_views_view_grid(&$vars) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Display the simple view of rows one after another
|
||||
* Prepares variables for views unformatted rows templates.
|
||||
*
|
||||
* Default template: views-view-unformatted.html.twig.
|
||||
*
|
||||
* @param array $vars
|
||||
* An associative array containing:
|
||||
* - view: The view object.
|
||||
* - rows: An array of row items. Each row is an array of content.
|
||||
*/
|
||||
function template_preprocess_views_view_unformatted(&$vars) {
|
||||
$view = $vars['view'];
|
||||
|
@ -1108,7 +1115,7 @@ function theme_views_mini_pager($vars) {
|
|||
* example, arguments which provide a summary view might change the style to
|
||||
* one of the special summary styles.
|
||||
*
|
||||
* The default style for all views is views-view-unformatted.tpl.php
|
||||
* The default style for all views is views-view-unformatted.html.twig.
|
||||
*
|
||||
* Many styles will then farm out the actual display of each row to a row
|
||||
* style; the default row style is views-view-fields.tpl.php.
|
||||
|
@ -1123,10 +1130,10 @@ function theme_views_mini_pager($vars) {
|
|||
* - views-view--foobar.tpl.php
|
||||
* - views-view.tpl.php
|
||||
*
|
||||
* - views-view-unformatted--foobar--page.tpl.php
|
||||
* - views-view-unformatted--page.tpl.php
|
||||
* - views-view-unformatted--foobar.tpl.php
|
||||
* - views-view-unformatted.tpl.php
|
||||
* - views-view-unformatted--foobar--page.html.twig
|
||||
* - views-view-unformatted--page.html.twig
|
||||
* - views-view-unformatted--foobar.html.twig
|
||||
* - views-view-unformatted.html.twig
|
||||
*
|
||||
* - views-view-fields--foobar--page.tpl.php
|
||||
* - views-view-fields--page.tpl.php
|
||||
|
|
Loading…
Reference in New Issue