mirror of
https://github.com/Mowie/Mowie
synced 2024-06-04 09:59:38 +00:00
Removed checking for existance of SimplePages-App in Navapp (now handeled by config)
This commit is contained in:
parent
d36b14f9c4
commit
0233dd26c3
|
@ -8,7 +8,7 @@ $db->setCol('simplePages_pages');
|
|||
$db->get();
|
||||
foreach ($db->data as $page)
|
||||
{
|
||||
$pages .= '<option value="'.$page['id'].'">'.$page['title'].'</option>';
|
||||
$pages .= '<option value="' . $page['id'] . '">' . $page['title'] . '</option>';
|
||||
}
|
||||
|
||||
//Get all parents and build a dropdown list
|
||||
|
@ -19,17 +19,16 @@ $parentdata = $db->data;
|
|||
foreach ($parentdata as $parent)
|
||||
{
|
||||
//If we don't have a parent from the Nav itself, take the page's title
|
||||
if($parent['title'] === '')
|
||||
if ($parent['title'] === '')
|
||||
{
|
||||
$db->setCol('simplePages_pages');
|
||||
$db->data['id'] = $parent['page'];
|
||||
$db->get();
|
||||
if(isset($db->data[0]))
|
||||
if (isset($db->data[0]))
|
||||
{
|
||||
$parents .= '<option value="' . $parent['id'] . '">' . $db->data[0]['title'] . '</option>';
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
$parents .= '<option value="' . $parent['id'] . '">' . $parent['title'] . '</option>';
|
||||
}
|
||||
|
@ -66,7 +65,7 @@ function buildNav($nav, $lvl = 0)
|
|||
if ($title == '') $title = $db->data[0]['title'];
|
||||
|
||||
echo $title . '</div><div class="col"><a href="../SimplePages/backend/edit.php?id=' . $site['page'] . '"><i class="fa fa-pencil" aria-hidden="true"></i> ' . $db->data[0]['title'] . '</a></div>
|
||||
<div class="col"><select id="parentChange_'.$site['id'].'" data-nav-id="'.$site['id'].'" onchange="update(\''.$site['id'].'\')">' . str_replace('value="'.$site['parent'].'"', 'value="'.$site['parent'].'" selected', $GLOBALS['parents']) . '</select></div>
|
||||
<div class="col"><select id="parentChange_' . $site['id'] . '" data-nav-id="' . $site['id'] . '" onchange="update(\'' . $site['id'] . '\')">' . str_replace('value="' . $site['parent'] . '"', 'value="' . $site['parent'] . '" selected', $GLOBALS['parents']) . '</select></div>
|
||||
<div class="col"><a onclick="del(' . $site['id'] . ');" class="del" title="' . $GLOBALS['lang']->get('nav_delete') . '"><i class="fa fa-trash-o" aria-hidden="true"></i></a></div>';
|
||||
|
||||
echo "</div>\n";
|
||||
|
@ -89,14 +88,14 @@ function buildNav($nav, $lvl = 0)
|
|||
* * mglkt zum "neuzuweisen" der Parents -> Dropdown
|
||||
*/
|
||||
|
||||
if ($apps->appExists('SimplePages'))
|
||||
if (hasPerm('edit_nav'))
|
||||
{
|
||||
if (hasPerm('edit_nav'))
|
||||
{
|
||||
?>
|
||||
<div class="main">
|
||||
<p><i class="fa fa-info-circle"></i> <?php echo $lang->get('nav_drag') ?></p>
|
||||
<p><a onclick="createItem();" class="button"><i class="fa fa-plus" aria-hidden="true"></i> <?php echo $lang->get('nav_create');?></a></p>
|
||||
<p><a onclick="createItem();" class="button"><i class="fa fa-plus"
|
||||
aria-hidden="true"></i> <?php echo $lang->get('nav_create'); ?>
|
||||
</a></p>
|
||||
<div id="sortable" class="pseudo-table">
|
||||
<div class="row top" id="top">
|
||||
<div class="col"><?php echo $lang->get('nav_pageTitle') ?></div>
|
||||
|
@ -147,12 +146,8 @@ if ($apps->appExists('SimplePages'))
|
|||
};
|
||||
</script>
|
||||
<?php
|
||||
} else
|
||||
{
|
||||
echo msg('info', 'missing_permission');
|
||||
}
|
||||
} else
|
||||
{
|
||||
echo msg('info', $lang->get('nav_needs_SimplePages'));
|
||||
echo msg('info', 'missing_permission');
|
||||
}
|
||||
require_once '../../inc/footer.php';
|
Loading…
Reference in New Issue
Block a user