Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
315
Merge Requests
315
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
68803482
Commit
68803482
authored
May 24, 2013
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#1843770
by joelpittet, izus: Convert views/templates/views-view-unformatted.tpl.php to twig.
parent
6ac1d47a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
23 deletions
+37
-23
core/modules/views/templates/views-view-unformatted.html.twig
.../modules/views/templates/views-view-unformatted.html.twig
+24
-0
core/modules/views/templates/views-view-unformatted.tpl.php
core/modules/views/templates/views-view-unformatted.tpl.php
+0
-17
core/modules/views/views.theme.inc
core/modules/views/views.theme.inc
+13
-6
No files found.
core/modules/views/templates/views-view-unformatted.html.twig
0 → 100644
View file @
68803482
{#
/**
* @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
%}
core/modules/views/templates/views-view-unformatted.tpl.php
deleted
100644 → 0
View file @
6ac1d47a
<?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
;
?>
core/modules/views/views.theme.inc
View file @
68803482
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment