Commit 377c9cf3 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Documentation/UsersManual/index.rst: debugShowBodyText

Support.php: Tooltips will be encoded with htmlentities.
QuickFormQuery.php: Show symbol `debugshowBodyText`
parent 77f63245
......@@ -887,8 +887,8 @@ Report
======
How to create a report
----------------------
General
-------
To display a report on any given TYPO3 page, create a content element of type 'QFQ Element' (plugin) on that page.
......@@ -956,7 +956,7 @@ Syntax
Only SELECT and SHOW queries will fire subqueries.
* Processing of the resulting rows and columns:
* Processing of the resulting rows and columns:
* In general, all columns of all rows will be printed out sequentially.
......@@ -968,10 +968,22 @@ Syntax
There are extensive ways to wrap columns and rows automatically. See :ref:`wrapping-rows-and-columns`
Debug the bodytext
------------------
The parsed bodytext could be displayed by specifying
::
debugShowBodyText = 1
A small symbol with a tooltip will be shown, where the content record will be displayed on the webpage.
Structure
---------
A report can be divided into several levels. This can make report definitions more readable because it allows for splitting of otherwise excessively long SQL queries. For example, if your SQL query on the root level selects a number of person records from your person table, you can use the SQL query on the second level to look up the city where each person lives.
A report can be divided into several levels. This can make report definitions more readable because it allows for
splitting of otherwise excessively long SQL queries. For example, if your SQL query on the root level selects a number
of person records from your person table, you can use the SQL query on the second level to look up the city where each person lives.
See the example below:
......@@ -1052,6 +1064,7 @@ Levels can be nested by using curly brackets::
sql = SELECT 'A query with braces on their own'
}
Columns of the upper level result can be accessed via variables, eg. {{10.person_id}} will be replaced by the value in the person_id column.
+-------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
......
......@@ -156,8 +156,13 @@ class QuickFormQuery {
* @return string
*/
public function process() {
$html = '';
$html = $this->doForm(FORM_LOAD);
if ($this->store->getVar('debugShowBodyText', STORE_TYPO3) === '1') {
$html .= Support::appendTooltip('', $this->t3data['bodytext']);
}
$html .= $this->doForm(FORM_LOAD);
$html .= $this->doReport();
$class = $this->store->getVar(SYSTEM_CSS_CLASS_QFQ_CONTAINER, STORE_SYSTEM);
......
......@@ -75,13 +75,16 @@ class Support {
*
* Based on: http://www.w3schools.com/howto/howto_css_tooltip.asp
*
* @param $inner
* @param $before
* @param $tooltipText
* @return string
*/
public static function appendTooltip($inner, $tooltipText) {
public static function appendTooltip($before, $tooltipText) {
return $inner . "<img src='" . GFX_INFO . "' title='$tooltipText'>";
// addslashes, htmlentities & htmlspecialchars
// str_replace('"', '&quot;', $tooltipText)
return $before . "<img src='" . GFX_INFO . "' title=\"" . htmlentities($tooltipText) . "\">";
}
/**
......
Supports Markdown
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