From f270745159f84577ab4a82235a4a3b8cf171c730 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Thu, 10 Sep 2009 10:27:44 -0400 Subject: [PATCH] Show only resource calendars on the event form when we are editing a resource's calendar. --- kronolith/templates/edit/edit.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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)) { -- 2.11.0