diff --git a/tpl/Schedule/schedule-reservations-grid.tpl b/tpl/Schedule/schedule-reservations-grid.tpl index 789493281..010c8525f 100644 --- a/tpl/Schedule/schedule-reservations-grid.tpl +++ b/tpl/Schedule/schedule-reservations-grid.tpl @@ -4,6 +4,9 @@ {/function} {assign var=TodaysDate value=Date::Now()} +{* Is this a view page and guests are allowed to book *} +{assign var=GuestViewBookable value=($LoadViewOnly && $AllowGuestBooking)} +
{foreach from=$BoundDates item=date} {assign var=ts value=$date->Timestamp()} {$periods.$ts = $DailyLayout->GetPeriods($date, true)} @@ -33,7 +36,7 @@ HasColor()}style="background-color:{$resource->GetColor()} !important" {/if}> - {if $resource->CanBook && $DailyLayout->IsDateReservable($date)} + {if ($resource->CanBook || $GuestViewBookable) && $DailyLayout->IsDateReservable($date)} {foreach from=$slots.$ts item=Slot} {assign var=slotRef value="{$Slot->BeginDate()->Format('YmdHis')}{$resourceId}"} - {displaySlot Slot=$Slot Href="$href" AccessAllowed=$resource->CanBook SlotRef=$slotRef ResourceId=$resourceId} + {displaySlot Slot=$Slot Href="$href" AccessAllowed=($resource->CanBook || $GuestViewBookable) SlotRef=$slotRef ResourceId=$resourceId} {/foreach} {/foreach}