Commit 610e90e3 authored by alexpott's avatar alexpott
Browse files

Issue #2409391 by Cogax, gulab.bisht: Fix the whitespace of inline_template...

Issue #2409391 by Cogax, gulab.bisht: Fix the whitespace of inline_template declarations in Views UI
parent e988258c
......@@ -677,8 +677,19 @@ public function renderPreview($display_id, $args = array()) {
}
}
$rows['query'][] = array(
array('data' => array('#type' => 'inline_template', '#template' => "<strong>{% trans 'Query' %}</strong>")),
array('data' => array('#type' => 'inline_template', '#template' => '<pre>{{ query }}</pre>', '#context' => array('query' => strtr($query_string, $quoted)))),
array(
'data' => array(
'#type' => 'inline_template',
'#template' => "<strong>{% trans 'Query' %}</strong>",
),
),
array(
'data' => array(
'#type' => 'inline_template',
'#template' => '<pre>{{ query }}</pre>',
'#context' => array('query' => strtr($query_string, $quoted)),
),
),
);
if (!empty($this->additionalQueries)) {
$queries = '<strong>' . t('These queries were run during view rendering:') . '</strong>';
......@@ -691,14 +702,24 @@ public function renderPreview($display_id, $args = array()) {
}
$rows['query'][] = array(
array('data' => array('#type' => 'inline_template', '#template' => "<strong>{% trans 'Other queries' %}</strong>")),
array(
'data' => array(
'#type' => 'inline_template',
'#template' => "<strong>{% trans 'Other queries' %}</strong>",
),
),
SafeMarkup::set('<pre>' . $queries . '</pre>'),
);
}
}
if ($show_info) {
$rows['query'][] = array(
array('data' => array('#type' => 'inline_template', '#template' => "<strong>{% trans 'Title' %}</strong>")),
array(
'data' => array(
'#type' => 'inline_template',
'#template' => "<strong>{% trans 'Title' %}</strong>",
),
),
Xss::filterAdmin($this->executable->getTitle()),
);
if (isset($path)) {
......@@ -712,17 +733,32 @@ public function renderPreview($display_id, $args = array()) {
if ($show_stats) {
$rows['statistics'][] = array(
array('data' => array('#type' => 'inline_template', '#template' => "<strong>{% trans 'Query build time' %}</strong>")),
array(
'data' => array(
'#type' => 'inline_template',
'#template' => "<strong>{% trans 'Query build time' %}</strong>",
),
),
t('@time ms', array('@time' => intval($this->executable->build_time * 100000) / 100)),
);
$rows['statistics'][] = array(
array('data' => array('#type' => 'inline_template', '#template' => "<strong>{% trans 'Query execute time' %}</strong>")),
array(
'data' => array(
'#type' => 'inline_template',
'#template' => "<strong>{% trans 'Query execute time' %}</strong>",
),
),
t('@time ms', array('@time' => intval($this->executable->execute_time * 100000) / 100)),
);
$rows['statistics'][] = array(
array('data' => array('#type' => 'inline_template', '#template' => "<strong>{% trans 'View render time' %}</strong>")),
array(
'data' => array(
'#type' => 'inline_template',
'#template' => "<strong>{% trans 'View render time' %}</strong>",
),
),
t('@time ms', array('@time' => intval($this->executable->render_time * 100000) / 100)),
);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment