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,10 +206,10 @@ 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( "settingsnavigation", OC_APP::getSettingsNavigation());
}
else
{
$page = new OC_TEMPLATE( "core", "layout.guest" );

View File

@ -33,6 +33,7 @@
<?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"] )): ?>
@ -41,6 +42,7 @@
<?php endforeach; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
</ul>
</div>