2 namespace TYPO3\CMS\Backend\Tree\View;
140 public function positionTree($id, $pageinfo, $perms_clause,
$R_URI)
145 $pageTree->init(
' AND ' . $perms_clause);
146 $pageTree->addField(
'pid');
151 $pageTree->getTree($pageinfo[
'pid'], $this->depth);
153 $saveLatestUid = array();
157 foreach ($pageTree->tree as $cc => $dat) {
159 $latestInvDepth = $dat[
'invertedDepth'];
160 $saveLatestUid[$latestInvDepth] = $dat;
161 if (isset($pageTree->tree[$cc - 1])) {
162 $prev_dat = $pageTree->tree[$cc - 1];
164 if ($prev_dat[
'row'][
'uid'] == $id) {
166 if (!$this->dontPrintPageInsertIcons && $this->
checkNewPageInPid($id) && !($prev_dat[
'invertedDepth'] > $pageTree->tree[$cc][
'invertedDepth'])) {
168 $lines[key($lines)] .=
'<ul><li><span class="text-nowrap"><a href="#" onclick="' . htmlspecialchars($this->
onClickEvent($id, $id, 1)) .
'"><i class="t3-icon fa fa-long-arrow-left" title="' . $this->
insertlabel() .
'"></i></a></span></li></ul>';
172 if ($prev_dat[
'invertedDepth'] > $pageTree->tree[$cc][
'invertedDepth']) {
173 $prevPid = $pageTree->tree[$cc][
'row'][
'pid'];
174 }
elseif ($prev_dat[
'invertedDepth'] < $pageTree->tree[$cc][
'invertedDepth']) {
177 if (!$this->dontPrintPageInsertIcons && $this->
checkNewPageInPid($prev_dat[
'row'][
'pid'])) {
178 $prevPid = -$prev_dat[
'row'][
'uid'];
180 $lines[key($lines)] .=
'<ul><li><span class="text-nowrap"><a href="#" onclick="' . htmlspecialchars($this->
onClickEvent($prevPid, $prev_dat[
'row'][
'pid'], 2)) .
'"><i class="t3-icon fa fa-long-arrow-left" title="' . $this->
insertlabel() .
'"></i></a></span></li></ul>';
183 $prevPid = -$prev_dat[
'row'][
'pid'];
186 $prevPid = -$prev_dat[
'row'][
'uid'];
190 $prevPid = $dat[
'row'][
'pid'];
193 if (!$this->dontPrintPageInsertIcons && $this->
checkNewPageInPid($dat[
'row'][
'pid'])) {
194 $lines[] =
'<span class="text-nowrap"><a href="#" onclick="' . htmlspecialchars($this->
onClickEvent($prevPid, $dat[
'row'][
'pid'], 3)) .
'"><i class="t3-icon fa fa-long-arrow-left" title="' . $this->
insertlabel() .
'"></i></a></span>';
198 $icon =
'<span ' . $toolTip .
'>' . $this->iconFactory->getIconForRecord(
'pages', $dat[
'row'],
Icon::SIZE_SMALL)->render() .
'</span>';
203 $prev_dat = end($pageTree->tree);
204 if ($prev_dat[
'row'][
'uid'] == $id) {
206 $lines[] =
'<span class="text-nowrap"><a href="#" onclick="' . htmlspecialchars($this->
onClickEvent($id, $id, 4)) .
'"><i class="t3-icon fa fa-long-arrow-left" title="' . $this->
insertlabel() .
'"></i></a></span>';
210 $dat = $saveLatestUid[$a];
211 $prevPid = -$dat[
'row'][
'uid'];
212 if (!$this->dontPrintPageInsertIcons && $this->
checkNewPageInPid($dat[
'row'][
'pid'])) {
213 $lines[] =
'<span class="text-nowrap"><a href="#" onclick="' . htmlspecialchars($this->
onClickEvent($prevPid, $dat[
'row'][
'pid'], 5)) .
'"><i class="t3-icon fa fa-long-arrow-left" title="' . $this->
insertlabel() .
'"></i></a></span>';
217 $code =
'<ul class="list-tree">';
219 foreach ($lines as $line) {
220 $code .=
'<li>' . $line .
'</li>';
237 if ($dat[
'row'][
'uid'] == $id) {
238 $t_code =
'<strong>' . $t_code .
'</strong>';
256 if ($TSconfigProp[
'overrideWithExtension']) {
262 $params =
'&edit[pages][' . $pid .
']=new&returnNewPageId=1';
297 if (!isset($this->checkNewPageCache[$pid])) {
301 return $this->checkNewPageCache[$pid];
313 if (!isset($this->getModConfigCache[$pid])) {
317 return $this->getModConfigCache[$pid][
'properties'];
341 foreach ($colPosArray as $kk => $vv) {
343 $lines[$vv] = array();
345 while ($row = $this->
getDatabase()->sql_fetch_assoc($res)) {
347 if (is_array($row)) {
367 $count = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange(count($colPosArray), 1);
369 if (isset($backendLayout[
'__config'][
'backend_layout.'])) {
370 $this->
getLanguageService()->includeLLFile(
'EXT:backend/Resources/Private/Language/locallang_layout.xlf');
371 $table =
'<div class="table-fit"><table class="table table-condensed table-bordered table-vertical-top">';
372 $colCount = (int)$backendLayout[
'__config'][
'backend_layout.'][
'colCount'];
373 $rowCount = (int)$backendLayout[
'__config'][
'backend_layout.'][
'rowCount'];
374 $table .=
'<colgroup>';
375 for ($i = 0; $i < $colCount; $i++) {
376 $table .=
'<col style="width:' . 100 / $colCount .
'%"></col>';
378 $table .=
'</colgroup>';
382 for ($row = 1; $row <= $rowCount; $row++) {
383 $rowConfig = $backendLayout[
'__config'][
'backend_layout.'][
'rows.'][$row .
'.'];
384 if (!isset($rowConfig)) {
388 for ($col = 1; $col <= $colCount; $col++) {
389 $columnConfig = $rowConfig[
'columns.'][$col .
'.'];
390 if (!isset($columnConfig)) {
394 $columnKey = (int)$columnConfig[
'colPos'];
396 foreach ($tcaItems as $item) {
397 if ($item[1] == $columnKey) {
403 . (isset($columnConfig[
'colspan']) ?
' colspan="' . $columnConfig[
'colspan'] .
'"' :
'')
404 . (isset($columnConfig[
'rowspan']) ?
' rowspan="' . $columnConfig[
'rowspan'] .
'"' :
'')
405 .
' class="col-nowrap col-min'
406 . (!isset($columnConfig[
'colPos']) ?
' warning' :
'')
407 . (isset($columnConfig[
'colPos']) && !$head ?
' danger' :
'') .
'">';
410 if (isset($columnConfig[
'colPos']) && $head) {
411 $table .=
'<strong>' . $this->
wrapColumnHeader($head,
'',
'') .
'</strong>';
412 }
elseif ($columnConfig[
'colPos']) {
419 if (isset($columnConfig[
'colPos']) && $head && !empty($lines[$columnKey])) {
420 $table .=
'<ul class="list-unstyled">';
421 foreach ($lines[$columnKey] as $line) {
422 $table .=
'<li>' . $line .
'</li>';
430 $table .=
'</tbody>';
431 $table .=
'</table></div>';
435 foreach ($colPosArray as $kk => $vv) {
436 $row .=
'<td class="col-nowrap col-min" width="' . round(100 / $count) .
'%">';
438 if (!empty($lines[$vv])) {
439 $row .=
'<ul class="list-unstyled">';
440 foreach ($lines[$vv] as $line) {
441 $row .=
'<li>' . $line .
'</li>';
450 Map of records in columns:
452 <div class="table-fit">
453 <table class="table table-condensed table-bordered table-vertical-top">
454 <tr>' . $row .
'</tr>
489 if (is_array($row) && !empty($row[
'uid'])) {
496 $cc = hexdec(substr(md5($uid .
'-' . $vv .
'-' . $kk), 0, 4));
497 return '<a href="#" onclick="' . htmlspecialchars($this->
onClickInsertRecord($row, $vv,
$moveUid, $pid, $this->cur_sys_language)) .
'">' .
'<i class="t3-icon fa fa-long-arrow-left" name="mImgEnd' . $cc .
'" title="' . $this->
getLanguageService()->getLL($this->l_insertNewRecordHere, 1) .
'"></i></a>';
513 $table =
'tt_content';
514 if (is_array($row)) {
515 $location = BackendUtility::getModuleUrl(
'tce_db') .
'&cmd[' . $table .
'][' .
$moveUid .
'][' . $this->moveOrCopy .
']=-' . $row[
'uid'] .
'&prErr=1&uPT=1&vC=' . $this->
getBackendUser()->veriCode();
517 $location = BackendUtility::getModuleUrl(
'tce_db') .
'&cmd[' . $table .
'][' .
$moveUid .
'][' . $this->moveOrCopy .
']=' . $pid .
'&data[' . $table .
'][' .
$moveUid .
'][colPos]=' . $vv .
'&prErr=1&vC=' . $this->
getBackendUser()->veriCode();
519 $location .=
'&redirect=' . rawurlencode($this->R_URI);