From: Michael J. Rubinsky Date: Thu, 10 Sep 2009 14:27:44 +0000 (-0400) Subject: Show only resource calendars on the event form when we are editing a X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=f270745159f84577ab4a82235a4a3b8cf171c730;p=horde.git Show only resource calendars on the event form when we are editing a resource's calendar. --- diff --git a/kronolith/templates/edit/edit.inc b/kronolith/templates/edit/edit.inc index 3a94947f0..b55d7f60a 100644 --- a/kronolith/templates/edit/edit.inc +++ b/kronolith/templates/edit/edit.inc @@ -70,13 +70,15 @@ getCreatorId(); if (!empty($GLOBALS['display_resource_calendars'])) { + // We are editing/viewing resource calendars foreach ($GLOBALS['display_resource_calendars'] as $cal) { - echo $cal; + $rd = Kronolith::getDriver('Resource'); + $rc = $rd->getResource($rd->getResourceIdByCalendar($cal)); printf('', - htmlspecialchars($cal), '', $cal) . "\n"; + htmlspecialchars($cal), '', $rc->name) . "\n"; } } else { - + // Normal view foreach ($calendars as $id => $cal) { $delegates = array(); if ($cal->hasPermission(Horde_Auth::getAuth(), PERMS_EDIT, $creator)) {