Skip to content

Commit

Permalink
Show system calendars in shared section for non-admins.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Apr 22, 2015
1 parent 0e5a86f commit b593763
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kronolith/js/kronolith.js
Expand Up @@ -1080,7 +1080,9 @@ KronolithCore = {
{
switch (type) {
case 'system':
return $('kronolithSystemCalendars');
return $('kronolithSystemCalendars')
? $('kronolithSystemCalendars')
: $('kronolithSharedCalendars');
case 'internal':
return personal
? $('kronolithMyCalendars')
Expand Down
1 change: 1 addition & 0 deletions kronolith/lib/View/Sidebar.php
Expand Up @@ -58,6 +58,7 @@ public function __construct($config = array())
/* Calendars. */
$sidebar->newShares = $registry->getAuth() &&
!$prefs->isLocked('default_share');
$sidebar->admin = $registry->isAdmin();
$sidebar->resourceAdmin = $registry->isAdmin() || $GLOBALS['injector']->getInstance('Horde_Core_Perms')->hasAppPermission('resource_management');
$sidebar->resources = $GLOBALS['conf']['resources']['enabled'];

Expand Down
2 changes: 2 additions & 0 deletions kronolith/templates/dynamic/sidebar.html.php
Expand Up @@ -51,6 +51,7 @@
</div>
<?php endif; ?>

<?php if ($this->admin): ?>
<div class="horde-sidebar-split"></div>
<div>
<h3>
Expand All @@ -62,6 +63,7 @@
<div id="kronolithSystemCalendars" class="horde-resources"></div>
</div>
</div>
<?php endif ?>

<div class="horde-sidebar-split"></div>
<div>
Expand Down

0 comments on commit b593763

Please sign in to comment.