use Ubirimi\Documentador\Repository\Entity\EntityType; use Ubirimi\LinkHelper; use Ubirimi\SystemProduct; use Ubirimi\Util; use Ubirimi\Documentador\Repository\Entity\Entity; require_once __DIR__ . '/../_header.php'; ?> <body> <?php require_once __DIR__ . '/../_menu.php'; ?> <?php if ($page) { $breadCrumb = '<a href="/documentador/spaces" class="linkNoUnderline">Spaces</a> > ' . $page['space_name'] . ' > ' . '<a class="linkNoUnderline" href="/documentador/pages/' . $spaceId . '">Pages</a> > '; if ($parentPage) { $breadCrumb .= LinkHelper::getDocumentadorPageLink($parentPage['id'], $parentPage['name'], 'linkNoUnderline') . ' > '; } $breadCrumb .= $page['name']; Util::renderBreadCrumb($breadCrumb); } ?> <div class="doc-left-side"> <div> <?php $html = ''; echo UbirimiContainer::get()['repository']->get(Entity::class)->renderTreeNavigation($treeStructure, 0, 0, true); ?> </div> </div>
echo $activity['name']; ?> </a> created on <?php echo Util::getFormattedDate($activity['date'], $clientSettings['timezone']); ?> <?php } elseif ($activity['action'] == 'edited') { ?> <?php echo LinkHelper::getDocumentadorPageLink($activity['id'], $activity['name']) . ' updated on ' . Util::getFormattedDate($activity['date'], $clientSettings['timezone']); ?> <?php } elseif ($activity['action'] == 'comment') { ?> <?php echo LinkHelper::getDocumentadorPageLink($activity['id'], $activity['name']) . ' commented on ' . Util::getFormattedDate($activity['date'], $clientSettings['timezone']); ?> <?php } ?> </td> </tr> <?php } ?> </table> <?php } else { ?> <div class="infoBox">There is no activity for this user.</div> <?php
<td><?php echo $space['name']; ?> </td> </tr> <tr> <td>Code:</td> <td><?php echo $space['code']; ?> </td> </tr> <tr> <td>Homepage:</td> <td><?php echo LinkHelper::getDocumentadorPageLink($space['home_entity_id'], $space['home_page_name']); ?> </td> </tr> <tr> <td>Created By:</td> <td><?php echo LinkHelper::getUserProfileLink($space['user_id'], SystemProduct::SYS_PRODUCT_DOCUMENTADOR, $space['first_name'], $space['last_name']); ?> </td> </tr> </table> </div> <div class="ubirimiModalDialog" id="modalDeleteSpace"></div> <input id="space_id" type="hidden" value="<?php echo $spaceId;
echo $page['name']; ?> </td> </tr> <?php $childPages->data_seek(0); ?> <?php while ($childPages && ($childPage = $childPages->fetch_array(MYSQLI_ASSOC))) { ?> <tr> <td align="center"> <img src="/documentador/img/tree_child.png" style="margin-top: -24px"/> </td> <td><?php echo LinkHelper::getDocumentadorPageLink($childPage['id'], $childPage['name']); ?> </td> </tr> <?php } ?> <?php } else { ?> <tr> <td>There are no child pages</td> </tr> <?php } ?>
public function renderTreeNavigation($treeStructure, $parentPosition, $index, $visible) { $html = ''; foreach ($treeStructure as $parent => $childData) { if ($parent == $parentPosition) { foreach ($childData as $indexPosition => $data) { if (!$visible) { $style = 'style="display: none; overflow: visible;"'; } else { $style = 'style="display: block; overflow: visible;"'; } $html .= '<div ' . $style . ' id="tree_' . $parentPosition . '_' . $data['id'] . '">'; $smallIndent = ''; $bigIndent = ''; for ($i = 0; $i < $index * 2; $i++) { $smallIndent .= ' '; } for ($i = 0; $i < $index * 3; $i++) { $bigIndent .= ' '; } $html .= ''; if (array_key_exists($data['id'], $treeStructure)) { $html .= $smallIndent . '<a style="margin-top: -8px;" href="#" id="tree_show_content_' . $data['id'] . '_x">'; $html .= '<img style="vertical-align: middle;" src="/documentador/img/arrow_down.png" /></a> ' . LinkHelper::getDocumentadorPageLink($data['id'], $data['title']); } else { $html .= $bigIndent . '• ' . LinkHelper::getDocumentadorPageLink($data['id'], $data['title']); } $index++; $html .= UbirimiContainer::get()['repository']->get(Entity::class)->renderTreeNavigation($treeStructure, $data['id'], $index, $data['expanded']); $html .= '</div>'; $index--; } } } return $html; }