fix settings page for non-admin users

This commit is contained in:
Robin Appelman 2011-06-14 16:03:57 +02:00
parent 141ffbb1f5
commit 7d3ae7ae9b
2 changed files with 12 additions and 10 deletions

View File

@ -206,9 +206,9 @@ class OC_TEMPLATE{
$page->assign('searchbox', $search->fetchPage());
// Add menu data
if( OC_GROUP::inGroup( $_SESSION["user_id"], "admin" )){
$page->assign( "settingsnavigation", OC_APP::getSettingsNavigation());
$page->assign( "adminnavigation", OC_APP::getAdminNavigation());
}
$page->assign( "adminnavigation", OC_APP::getAdminNavigation());
$page->assign( "settingsnavigation", OC_APP::getSettingsNavigation());
}
else
{

View File

@ -33,14 +33,16 @@
<?php endforeach; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php foreach($_['adminnavigation'] as $entry):?>
<li><a style="background-image:url(<?php echo $entry['icon']; ?>)" href="<?php echo $entry['href']; ?>" title="" <?php if( $entry["active"] ): ?> class="active"<?php endif; ?>><?php echo $entry['name'] ?></a></li>
<?php if( sizeof( $entry["subnavigation"] )): ?>
<?php foreach($entry["subnavigation"] as $subentry):?>
<li><a style="background-color:#FF8800;" href="<?php echo $subentry['href']; ?>" title=""><?php echo $subentry['name'] ?></a></li>
<?php endforeach; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php if(isset($_['adminnavigation'])):?>
<?php foreach($_['adminnavigation'] as $entry):?>
<li><a style="background-image:url(<?php echo $entry['icon']; ?>)" href="<?php echo $entry['href']; ?>" title="" <?php if( $entry["active"] ): ?> class="active"<?php endif; ?>><?php echo $entry['name'] ?></a></li>
<?php if( sizeof( $entry["subnavigation"] )): ?>
<?php foreach($entry["subnavigation"] as $subentry):?>
<li><a style="background-color:#FF8800;" href="<?php echo $subentry['href']; ?>" title=""><?php echo $subentry['name'] ?></a></li>
<?php endforeach; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
</ul>
</div>