2015-10-18 19:45:58 -03:00
|
|
|
<?php
|
2015-05-05 01:00:01 +00:00
|
|
|
|
2015-10-18 19:45:58 -03:00
|
|
|
HTML::title(array('title'=>$L->g('Manage pages'), 'icon'=>'folder'));
|
2015-05-05 01:00:01 +00:00
|
|
|
|
2015-10-18 19:45:58 -03:00
|
|
|
echo '
|
|
|
|
<table class="uk-table uk-table-striped">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>'.$L->g('Title').'</th>
|
|
|
|
<th class="uk-text-center">'.$L->g('Position').'</th>
|
|
|
|
<th>'.$L->g('Friendly URL').'</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
';
|
2015-05-05 01:00:01 +00:00
|
|
|
|
2016-05-28 00:18:13 -03:00
|
|
|
unset($pagesParents[NO_PARENT_CHAR]);
|
|
|
|
|
2015-10-18 19:45:58 -03:00
|
|
|
foreach($pagesParents as $parentKey=>$pageList)
|
|
|
|
{
|
2016-05-28 00:18:13 -03:00
|
|
|
// Parent page
|
|
|
|
$Page = $pages[$parentKey];
|
2016-05-09 21:27:05 -03:00
|
|
|
|
2016-05-28 00:18:13 -03:00
|
|
|
$friendlyURL = Text::isEmpty($Url->filters('page')) ? '/'.$Page->key() : '/'.$Url->filters('page').'/'.$Page->key();
|
2016-05-09 21:27:05 -03:00
|
|
|
|
2016-05-28 00:18:13 -03:00
|
|
|
echo '<tr>';
|
|
|
|
echo '<td>';
|
|
|
|
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'edit-page/'.$Page->key().'">'.($Page->published()?'':'<span class="label-draft">'.$Language->g('Draft').'</span> ').($Page->title()?$Page->title():'<span class="label-empty-title">'.$Language->g('Empty title').'</span> ').'</a>';
|
|
|
|
echo '</td>';
|
|
|
|
echo '<td class="uk-text-center">'.$Page->position().'</td>';
|
|
|
|
echo '<td><a target="_blank" href="'.$Page->permalink().'">'.$friendlyURL.'</a></td>';
|
|
|
|
echo '</tr>';
|
2016-05-09 21:27:05 -03:00
|
|
|
|
2016-05-28 00:18:13 -03:00
|
|
|
// Children
|
|
|
|
foreach($pageList as $Page)
|
|
|
|
{
|
2016-05-09 21:27:05 -03:00
|
|
|
$friendlyURL = Text::isEmpty($Url->filters('page')) ? '/'.$Page->key() : '/'.$Url->filters('page').'/'.$Page->key();
|
|
|
|
|
2016-05-28 00:18:13 -03:00
|
|
|
echo '<tr class="children">';
|
|
|
|
echo '<td class="children">';
|
|
|
|
echo '<a href="'.HTML_PATH_ADMIN_ROOT.'edit-page/'.$Page->key().'">'.($Page->published()?'':'<span class="label-draft">'.$Language->g('Draft').'</span> ').($Page->title()?$Page->title():'<span class="label-empty-title">'.$Language->g('Empty title').'</span> ').'</a>';
|
|
|
|
echo '</td>';
|
|
|
|
echo '<td class="uk-text-center">'.$Page->position().'</td>';
|
2016-05-09 21:27:05 -03:00
|
|
|
echo '<td><a target="_blank" href="'.$Page->permalink().'">'.$friendlyURL.'</a></td>';
|
2015-10-18 19:45:58 -03:00
|
|
|
echo '</tr>';
|
2015-05-05 01:00:01 +00:00
|
|
|
}
|
2015-10-18 19:45:58 -03:00
|
|
|
}
|
2015-05-05 01:00:01 +00:00
|
|
|
|
2015-10-18 19:45:58 -03:00
|
|
|
echo '
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2015-11-28 11:47:03 -03:00
|
|
|
';
|