bludit/bl-kernel/admin/views/manage-pages.php
2016-05-09 21:27:05 -03:00

47 lines
1.2 KiB
PHP

<?php
HTML::title(array('title'=>$L->g('Manage pages'), 'icon'=>'folder'));
echo '
<table class="uk-table uk-table-striped">
<thead>
<tr>
<th>'.$L->g('Title').'</th>
<th>'.$L->g('Parent').'</th>
<th class="uk-text-center">'.$L->g('Position').'</th>
<th>'.$L->g('Friendly URL').'</th>
</tr>
</thead>
<tbody>
';
foreach($pagesParents as $parentKey=>$pageList)
{
foreach($pageList as $Page)
{
if($parentKey!==NO_PARENT_CHAR) {
$parentTitle = $pages[$Page->parentKey()]->title();
}
else {
$parentTitle = '';
}
echo '<tr>';
echo '<td>'.($Page->parentKey()?'- ':'').'<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></td>';
echo '<td>'.$parentTitle.'</td>';
echo '<td class="uk-text-center">'.$Page->position().'</td>';
$friendlyURL = Text::isEmpty($Url->filters('page')) ? '/'.$Page->key() : '/'.$Url->filters('page').'/'.$Page->key();
echo '<td><a target="_blank" href="'.$Page->permalink().'">'.$friendlyURL.'</a></td>';
echo '</tr>';
}
}
echo '
</tbody>
</table>
';