[TASK] Wrap very wide t3-tables in table-fit
[Packages/TYPO3.CMS.git] / typo3 / sysext / tstemplate / Classes / Controller / TypoScriptTemplateModuleController.php
1 <?php
2 namespace TYPO3\CMS\Tstemplate\Controller;
3
4 /**
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 use TYPO3\CMS\Core\Utility\GeneralUtility;
18 use TYPO3\CMS\Backend\Utility\BackendUtility;
19 use TYPO3\CMS\Backend\Utility\IconUtility;
20
21 /**
22 * Module: TypoScript Tools
23 *
24 * $TYPO3_CONF_VARS["MODS"]["web_ts"]["onlineResourceDir"] = Directory of default resources. Eg. "fileadmin/res/" or so.
25 *
26 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
27 */
28 class TypoScriptTemplateModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
29
30 /**
31 * @var string
32 */
33 public $perms_clause;
34
35 /**
36 * @var string
37 */
38 public $e;
39
40 /**
41 * @var string
42 */
43 public $sObj;
44
45 /**
46 * @var string
47 */
48 public $edit;
49
50 /**
51 * @var string
52 */
53 public $textExtensions = 'html,htm,txt,css,tmpl,inc,js';
54
55 /**
56 * @var string
57 */
58 public $modMenu_type = '';
59
60 /**
61 * @var string
62 */
63 public $modMenu_dontValidateList = '';
64
65 /**
66 * @var string
67 */
68 public $modMenu_setDefaultList = '';
69
70 /**
71 * @var array
72 */
73 public $pageinfo = array();
74
75 /**
76 * @var bool
77 */
78 public $access = FALSE;
79
80 /**
81 * Constructor
82 */
83 public function __construct() {
84 $GLOBALS['LANG']->includeLLFile('EXT:tstemplate/ts/locallang.xlf');
85 $GLOBALS['BE_USER']->modAccess($GLOBALS['MCONF'], TRUE);
86 }
87
88 /**
89 * Init
90 *
91 * @return void
92 */
93 public function init() {
94 parent::init();
95 $this->id = (int)GeneralUtility::_GP('id');
96 $this->e = GeneralUtility::_GP('e');
97 $this->sObj = GeneralUtility::_GP('sObj');
98 $this->edit = GeneralUtility::_GP('edit');
99 $this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
100 }
101
102 /**
103 * Clear cache
104 *
105 * @return void
106 */
107 public function clearCache() {
108 if (GeneralUtility::_GP('clear_all_cache')) {
109 $tce = GeneralUtility::makeInstance(\TYPO3\CMS\Core\DataHandling\DataHandler::class);
110 /** @var $tce \TYPO3\CMS\Core\DataHandling\DataHandler */
111 $tce->stripslashes_values = 0;
112 $tce->start(array(), array());
113 $tce->clear_cacheCmd('all');
114 }
115 }
116
117 /**
118 * Main
119 *
120 * @return void
121 */
122 public function main() {
123 // Template markers
124 $markers = array(
125 'CSH' => '',
126 'FUNC_MENU' => '',
127 'CONTENT' => ''
128 );
129
130 // Access check...
131 // The page will show only if there is a valid page and if this page may be viewed by the user
132 $this->pageinfo = BackendUtility::readPageAccess($this->id, $this->perms_clause);
133 $this->access = is_array($this->pageinfo);
134
135 /** @var \TYPO3\CMS\Backend\Template\DocumentTemplate doc */
136 $this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
137 $this->doc->backPath = $GLOBALS['BACK_PATH'];
138 $this->doc->setModuleTemplate('EXT:tstemplate/Resources/Private/Templates/tstemplate.html');
139 $this->doc->addStyleSheet('module', 'sysext/tstemplate/Resources/Public/Styles/styles.css');
140
141 if ($this->id && $this->access) {
142 $urlParameters = array(
143 'id' => $this->id,
144 'template' => 'all'
145 );
146 $aHref = BackendUtility::getModuleUrl('web_ts', $urlParameters);
147 $this->doc->form = '<form action="' . htmlspecialchars($aHref) . '" method="post" enctype="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'] . '" name="editForm">';
148
149 // JavaScript
150 $this->doc->JScode = '
151 <script language="javascript" type="text/javascript">
152 function uFormUrl(aname) {
153 document.forms[0].action = ' . GeneralUtility::quoteJSvalue(($aHref . '#'), TRUE) . '+aname;
154 }
155 function brPoint(lnumber,t) {
156 window.location.href = ' . GeneralUtility::quoteJSvalue(($aHref . '&SET[function]=TYPO3\\CMS\\Tstemplate\\Controller\\TypoScriptTemplateObjectBrowserModuleFunctionController&SET[ts_browser_type]='), TRUE) . '+(t?"setup":"const")+"&breakPointLN="+lnumber;
157 return false;
158 }
159 </script>
160 ';
161 $this->doc->postCode = '
162 <script language="javascript" type="text/javascript">
163 if (top.fsMod) top.fsMod.recentIds["web"] = ' . $this->id . ';
164 </script>
165 ';
166 $this->doc->inDocStylesArray[] = '
167 TABLE#typo3-objectBrowser { width: 100%; margin-bottom: 24px; }
168 TABLE#typo3-objectBrowser A { text-decoration: none; }
169 TABLE#typo3-objectBrowser .comment { color: maroon; font-weight: bold; }
170 .ts-typoscript { width: 100%; }
171 .tsob-menu-row2 {margin-top: 10px;}
172 .tsob-search-submit {margin-left: 3px; margin-right: 3px;}
173 .tst-analyzer-options { margin:5px 0; }
174 ';
175 // Setting up the context sensitive menu:
176 $this->doc->getContextMenuCode();
177 // Build the modulle content
178 $this->content = $this->doc->header($GLOBALS['LANG']->getLL('moduleTitle'));
179 $this->extObjContent();
180 // Setting up the buttons and markers for docheader
181 $docHeaderButtons = $this->getButtons();
182 $markers['FUNC_MENU'] = BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
183 $markers['CONTENT'] = $this->content;
184 } else {
185 // Template pages:
186 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('pages.uid, count(*) AS count, max(sys_template.root) AS root_max_val, min(sys_template.root) AS root_min_val', 'pages,sys_template', 'pages.uid=sys_template.pid' . BackendUtility::deleteClause('pages') . BackendUtility::versioningPlaceholderClause('pages') . BackendUtility::deleteClause('sys_template') . BackendUtility::versioningPlaceholderClause('sys_template'), 'pages.uid');
187 $templateArray = array();
188 $pArray = array();
189 while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
190 $this->setInPageArray($pArray, BackendUtility::BEgetRootLine($row['uid'], 'AND 1=1'), $row);
191 }
192 $GLOBALS['TYPO3_DB']->sql_free_result($res);
193
194 $table = '<div class="table-fit"><table class="t3-table" id="ts-overview">' .
195 '<thead>' .
196 '<tr>' .
197 '<th>' . $GLOBALS['LANG']->getLL('pageName') . '</th>' .
198 '<th>' . $GLOBALS['LANG']->getLL('templates') . '</th>' .
199 '<th>' . $GLOBALS['LANG']->getLL('isRoot') . '</th>' .
200 '<th>' . $GLOBALS['LANG']->getLL('isExt') . '</th>' .
201 '</tr>' .
202 '</thead>' .
203 '<tbody>' . implode('', $this->renderList($pArray)) . '</tbody>' .
204 '</table></div>';
205
206 $this->content = $this->doc->header($GLOBALS['LANG']->getLL('moduleTitle'));
207 $this->content .= $this->doc->section('', '<p class="lead">' . $GLOBALS['LANG']->getLL('overview') . '</p>' . $table);
208
209 // RENDER LIST of pages with templates, END
210 // Setting up the buttons and markers for docheader
211 $docHeaderButtons = $this->getButtons();
212 $markers['CONTENT'] = $this->content;
213 }
214
215 // Build the <body> for the module
216 $this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
217 // Renders the module page
218 $this->content = $this->doc->render('Template Tools', $this->content);
219 }
220
221 /**
222 * Print content
223 *
224 * @return void
225 */
226 public function printContent() {
227 echo $this->content;
228 }
229
230 /**
231 * Create the panel of buttons for submitting the form or otherwise perform operations.
232 *
233 * @return array All available buttons as an assoc. array
234 */
235 protected function getButtons() {
236 $buttons = array(
237 'back' => '',
238 'close' => '',
239 'new' => '',
240 'save' => '',
241 'save_close' => '',
242 'view' => '',
243 'shortcut' => ''
244 );
245
246 if ($this->id && $this->access) {
247 // View page
248 $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($this->pageinfo['uid'], $GLOBALS['BACK_PATH'], BackendUtility::BEgetRootLine($this->pageinfo['uid']))) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.showPage', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-view') . '</a>';
249 if ($this->extClassConf['name'] == 'TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateInformationModuleFunctionController') {
250 // NEW button
251 $urlParameters = array(
252 'id' => $this->id,
253 'template' => 'all',
254 'createExtension' => 'new'
255 );
256 $buttons['new'] = '<a href="' . htmlspecialchars(BackendUtility::getModuleUrl('web_ts', $urlParameters)) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:db_new.php.pagetitle', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-new') . '</a>';
257 if (!empty($this->e) && !GeneralUtility::_POST('saveclose')) {
258 // no NEW-button while edit
259 $buttons['new'] = '';
260 // SAVE button
261 $buttons['save'] = IconUtility::getSpriteIcon('actions-document-save', array(
262 'html' => '<input type="image" class="c-inputButton" name="submit" src="clear.gif" ' . 'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '" ' . 'value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '" ' . '/>'
263 ));
264 // SAVE AND CLOSE button
265 $buttons['save_close'] = IconUtility::getSpriteIcon('actions-document-save-close', array(
266 'html' => '<input type="image" class="c-inputButton" name="saveclose" src="clear.gif" ' . 'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc', TRUE) . '" ' . 'value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc', TRUE) . '" ' . '/>'
267 ));
268 // CLOSE button
269 $url = BackendUtility::getModuleUrl('web_ts', array('id' => $this->id));
270 $buttons['close'] = '<a href="' . htmlspecialchars($url) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-close') .'</a>';
271 }
272 } elseif ($this->extClassConf['name'] == 'TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateConstantEditorModuleFunctionController' && count($this->MOD_MENU['constant_editor_cat'])) {
273 // SAVE button
274 $buttons['save'] = IconUtility::getSpriteIcon('actions-document-save', array('html' => '<input type="image" class="c-inputButton" name="submit" src="clear.gif" ' . 'title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '" ' . 'value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '" ' . '/>'));
275 } elseif ($this->extClassConf['name'] == 'TYPO3\CMS\Tstemplate\Controller\TypoScriptTemplateObjectBrowserModuleFunctionController') {
276 if (!empty($this->sObj)) {
277 // BACK
278 $urlParameters = array(
279 'id' => $this->id
280 );
281 $aHref = BackendUtility::getModuleUrl('web_ts', $urlParameters);
282 $buttons['back'] = '<a href="' . htmlspecialchars($aHref) . '" class="typo3-goBack" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
283 }
284 }
285 // Shortcut
286 if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
287 $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
288 }
289 } else {
290 // Shortcut
291 if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
292 $buttons['shortcut'] = $this->doc->makeShortcutIcon('id', '', $this->MCONF['name']);
293 }
294 }
295 return $buttons;
296 }
297
298 // OTHER FUNCTIONS:
299 /**
300 * Wrap title for link in template
301 *
302 * @param string $title
303 * @param string $onlyKey
304 * @return string
305 */
306 public function linkWrapTemplateTitle($title, $onlyKey = '') {
307 $urlParameters = array(
308 'id' => $this->id
309 );
310 $aHref = BackendUtility::getModuleUrl('web_ts', $urlParameters);
311 if ($onlyKey) {
312 $title = '<a href="' . htmlspecialchars(($aHref . '&e[' . $onlyKey . ']=1&SET[function]=TYPO3\\CMS\\Tstemplate\\Controller\\TypoScriptTemplateInformationModuleFunctionController')) . '">' . htmlspecialchars($title) . '</a>';
313 } else {
314 $title = '<a href="' . htmlspecialchars(($aHref . '&e[constants]=1&e[config]=1&SET[function]=TYPO3\\CMS\\Tstemplate\\Controller\\TypoScriptTemplateInformationModuleFunctionController')) . '">' . htmlspecialchars($title) . '</a>';
315 }
316 return $title;
317 }
318
319 /**
320 * No template
321 *
322 * @param int $newStandardTemplate
323 * @return string
324 */
325 public function noTemplate($newStandardTemplate = 0) {
326 // Defined global here!
327 $tmpl = GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\ExtendedTemplateService::class);
328 /** @var $tmpl \TYPO3\CMS\Core\TypoScript\ExtendedTemplateService */
329 // Do not log time-performance information
330 $tmpl->tt_track = FALSE;
331 $tmpl->init();
332 $theOutput = '';
333 $flashMessage = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Messaging\FlashMessage::class, $GLOBALS['LANG']->getLL('noTemplateDescription') . '<br />' . $GLOBALS['LANG']->getLL('createTemplateToEditConfiguration'), $GLOBALS['LANG']->getLL('noTemplate'), \TYPO3\CMS\Core\Messaging\FlashMessage::INFO);
334 $theOutput .= $flashMessage->render();
335 // New standard?
336 if ($newStandardTemplate) {
337 // Hook to change output, implemented for statictemplates
338 if (isset(
339 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['TYPO3\\CMS\\Tstemplate\\Controller\\TypoScriptTemplateModuleController']['newStandardTemplateView']
340 )) {
341 $selector = '';
342 $staticsText = '';
343 $reference = array(
344 'selectorHtml' => &$selector,
345 'staticsText' => &$staticsText
346 );
347 GeneralUtility::callUserFunction(
348 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['TYPO3\\CMS\\Tstemplate\\Controller\\TypoScriptTemplateModuleController']['newStandardTemplateView'],
349 $reference,
350 $this
351 );
352 $selector = $reference['selectorHtml'];
353 $staticsText = $reference['staticsText'];
354 } else {
355 $selector = '<input type="hidden" name="createStandard" value="" />';
356 $staticsText = '';
357 }
358 // Extension?
359 $theOutput .= $this->doc->section($GLOBALS['LANG']->getLL('newWebsite') . $staticsText, $GLOBALS['LANG']->getLL('newWebsiteDescription') . '<br /><br />' . $selector . '<input type="Submit" name="newWebsite" value="' . $GLOBALS['LANG']->getLL('newWebsiteAction') . '" />', 0, 1);
360 }
361 // Extension?
362 $theOutput .= $this->doc->spacer(10);
363 $theOutput .= $this->doc->section($GLOBALS['LANG']->getLL('extTemplate'), $GLOBALS['LANG']->getLL('extTemplateDescription') . '<br /><br />' . '<input type="submit" name="createExtension" value="' . $GLOBALS['LANG']->getLL('extTemplateAction') . '" />', 0, 1);
364 // Go to first appearing...
365 $first = $tmpl->ext_prevPageWithTemplate($this->id, $this->perms_clause);
366 if ($first) {
367 $theOutput .= $this->doc->spacer(10);
368 $urlParameters = array(
369 'id' => $first['uid']
370 );
371 $aHref = BackendUtility::getModuleUrl('web_ts', $urlParameters);
372 $theOutput .= $this->doc->section($GLOBALS['LANG']->getLL('goToClosest'), sprintf($GLOBALS['LANG']->getLL('goToClosestDescription') . '<br /><br />%s<strong>' . $GLOBALS['LANG']->getLL('goToClosestAction') . '</strong>%s', htmlspecialchars($first['title']), $first['uid'], '<a href="' . htmlspecialchars($aHref) . '">', '</a>'), 0, 1);
373 }
374 return $theOutput;
375 }
376
377 public function templateMenu() {
378 // Defined global here!
379 $tmpl = GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\ExtendedTemplateService::class);
380 /** @var $tmpl \TYPO3\CMS\Core\TypoScript\ExtendedTemplateService */
381 // Do not log time-performance information
382 $tmpl->tt_track = FALSE;
383 $tmpl->init();
384 $all = $tmpl->ext_getAllTemplates($this->id, $this->perms_clause);
385 $menu = '';
386 if (count($all) > 1) {
387 $this->MOD_MENU['templatesOnPage'] = array();
388 foreach ($all as $d) {
389 $this->MOD_MENU['templatesOnPage'][$d['uid']] = $d['title'];
390 }
391 }
392 $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), $this->MCONF['name'], $this->modMenu_type, $this->modMenu_dontValidateList, $this->modMenu_setDefaultList);
393 $menu = BackendUtility::getFuncMenu($this->id, 'SET[templatesOnPage]', $this->MOD_SETTINGS['templatesOnPage'], $this->MOD_MENU['templatesOnPage']);
394 return $menu;
395 }
396
397 /**
398 * Create template
399 *
400 * @param int $id
401 * @param int $actTemplateId
402 * @return string
403 */
404 public function createTemplate($id, $actTemplateId = 0) {
405 if (GeneralUtility::_GP('createExtension') || GeneralUtility::_GP('createExtension_x')) {
406 $tce = GeneralUtility::makeInstance(\TYPO3\CMS\Core\DataHandling\DataHandler::class);
407 /** @var $tce \TYPO3\CMS\Core\DataHandling\DataHandler */
408 $tce->stripslashes_values = 0;
409 $recData = array();
410 $recData['sys_template']['NEW'] = array(
411 'pid' => $actTemplateId ? -1 * $actTemplateId : $id,
412 'title' => '+ext'
413 );
414 $tce->start($recData, array());
415 $tce->process_datamap();
416 return $tce->substNEWwithIDs['NEW'];
417 } elseif (GeneralUtility::_GP('newWebsite')) {
418 $tce = GeneralUtility::makeInstance(\TYPO3\CMS\Core\DataHandling\DataHandler::class);
419 /** @var $tce \TYPO3\CMS\Core\DataHandling\DataHandler */
420 $tce->stripslashes_values = 0;
421 $recData = array();
422 // Hook to handle row data, implemented for statictemplates
423 if (isset(
424 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['TYPO3\\CMS\\Tstemplate\\Controller\\TypoScriptTemplateModuleController']['newStandardTemplateHandler']
425 )) {
426 $reference = array(
427 'recData' => &$recData,
428 'id' => $id,
429 );
430 GeneralUtility::callUserFunction(
431 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['TYPO3\\CMS\\Tstemplate\\Controller\\TypoScriptTemplateModuleController']['newStandardTemplateHandler'],
432 $reference,
433 $this
434 );
435 $recData = $reference['recData'];
436 } else {
437 $recData['sys_template']['NEW'] = array(
438 'pid' => $id,
439 'title' => $GLOBALS['LANG']->getLL('titleNewSite'),
440 'sorting' => 0,
441 'root' => 1,
442 'clear' => 3,
443 'config' => '
444 # Default PAGE object:
445 page = PAGE
446 page.10 = TEXT
447 page.10.value = HELLO WORLD!
448 '
449 );
450 }
451 $tce->start($recData, array());
452 $tce->process_datamap();
453 $tce->clear_cacheCmd('all');
454 }
455 }
456
457 // RENDER LIST of pages with templates, BEGIN
458 /**
459 * Set page in array
460 *
461 * @param array $pArray
462 * @param array $rlArr
463 * @param array $row
464 * @return void
465 */
466 public function setInPageArray(&$pArray, $rlArr, $row) {
467 ksort($rlArr);
468 reset($rlArr);
469 if (!$rlArr[0]['uid']) {
470 array_shift($rlArr);
471 }
472 $cEl = current($rlArr);
473 $pArray[$cEl['uid']] = htmlspecialchars($cEl['title']);
474 array_shift($rlArr);
475 if (count($rlArr)) {
476 if (!isset($pArray[($cEl['uid'] . '.')])) {
477 $pArray[$cEl['uid'] . '.'] = array();
478 }
479 $this->setInPageArray($pArray[$cEl['uid'] . '.'], $rlArr, $row);
480 } else {
481 $pArray[$cEl['uid'] . '_'] = $row;
482 }
483 }
484
485 /**
486 * Render the list
487 *
488 * @param array $pArray
489 * @param array $lines
490 * @param int $c
491 * @return array
492 */
493 public function renderList($pArray, $lines = array(), $c = 0) {
494 if (is_array($pArray)) {
495 reset($pArray);
496 static $i;
497 foreach ($pArray as $k => $v) {
498 if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($k)) {
499 if (isset($pArray[$k . '_'])) {
500 $lines[] = '<tr class="' . ($i++ % 2 == 0 ? 'bgColor4' : 'bgColor6') . '">
501 <td nowrap><img src="clear.gif" width="1" height="1" hspace=' . $c * 10 . ' align="top">' . '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('id' => $k))) . '">' . IconUtility::getSpriteIconForRecord('pages', BackendUtility::getRecordWSOL('pages', $k), array('title' => ('ID: ' . $k))) . GeneralUtility::fixed_lgd_cs($pArray[$k], 30) . '</a></td>
502 <td>' . $pArray[($k . '_')]['count'] . '</td>
503 <td>' . ($pArray[$k . '_']['root_max_val'] > 0 ? IconUtility::getSpriteIcon('status-status-checked') : '&nbsp;') . '</td>
504 <td>' . ($pArray[$k . '_']['root_min_val'] == 0 ? IconUtility::getSpriteIcon('status-status-checked') : '&nbsp;') . '</td>
505 </tr>';
506 } else {
507 $lines[] = '<tr class="' . ($i++ % 2 == 0 ? 'bgColor4' : 'bgColor6') . '">
508 <td nowrap ><img src="clear.gif" width="1" height="1" hspace=' . $c * 10 . ' align=top>' . IconUtility::getSpriteIconForRecord('pages', BackendUtility::getRecordWSOL('pages', $k)) . GeneralUtility::fixed_lgd_cs($pArray[$k], 30) . '</td>
509 <td></td>
510 <td></td>
511 <td></td>
512 </tr>';
513 }
514 $lines = $this->renderList($pArray[$k . '.'], $lines, $c + 1);
515 }
516 }
517 }
518 return $lines;
519 }
520
521 }