Remove subpages for static pages
This commit is contained in:
parent
f2c59ee70b
commit
e116635328
|
@ -167,11 +167,12 @@ class HTML {
|
|||
$id = 'js'.$args['name'];
|
||||
$type = isset($args['type']) ? $args['type'] : 'text';
|
||||
$class = empty($args['class']) ? '' : 'class="'.$args['class'].'"';
|
||||
$disabled = empty($args['disabled']) ? '' : 'disabled';
|
||||
|
||||
$html = '<div class="uk-form-row">';
|
||||
$html .= '<label for="'.$id.'" class="uk-form-label">'.$args['label'].'</label>';
|
||||
$html .= '<div class="uk-form-controls">';
|
||||
$html .= '<select id="'.$id.'" name="'.$args['name'].'" '.$class.'>';
|
||||
$html .= '<select id="'.$id.'" name="'.$args['name'].'" '.$class.' '.$disabled.'>';
|
||||
if(isset($args['addEmptySpace'])) {
|
||||
$html .= '<option value=""></option>';
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ function table($status, $icon='arrow-circle-o-down') {
|
|||
foreach ($list as $pageKey) {
|
||||
$page = buildPage($pageKey);
|
||||
if ($page) {
|
||||
if ($page->isParent() || $status!='published') {
|
||||
echo '<tr>
|
||||
<td>
|
||||
<a href="'.HTML_PATH_ADMIN_ROOT.'edit-content/'.$page->key().'"><i class="fa fa-'.$icon.'"></i> '
|
||||
|
@ -64,9 +65,9 @@ function table($status, $icon='arrow-circle-o-down') {
|
|||
echo '<td><a target="_blank" href="'.$page->permalink().'">'.$friendlyURL.'</a></td>';
|
||||
echo '</tr>';
|
||||
|
||||
if ($page->isParent()) {
|
||||
foreach ($page->children() as $childKey) {
|
||||
$child = buildPage($childKey);
|
||||
if ($child->published()) {
|
||||
echo '<tr>
|
||||
<td class="child-title">
|
||||
|
||||
|
@ -83,6 +84,7 @@ function table($status, $icon='arrow-circle-o-down') {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
foreach ($list as $pageKey) {
|
||||
$page = buildPage($pageKey);
|
||||
|
|
|
@ -177,7 +177,8 @@ echo '<div class="bl-publish-sidebar uk-width-2-10">';
|
|||
'class'=>'uk-width-1-1 uk-form-medium',
|
||||
'options'=>$options,
|
||||
'selected'=>$page->parentKey(),
|
||||
'tip'=>''
|
||||
'tip'=>'',
|
||||
'disabled'=>$page->status()=='static'
|
||||
));
|
||||
|
||||
echo '<hr>';
|
||||
|
|
Loading…
Reference in New Issue