##local.define(pageDone)0 ##if sessioncfg.SSOLOGIN.Enable ##if valueMap.Authenticated ##else ##local.define(pageDone)1 ##if request.security(on) ##local.defineByRender(SSOReturnURL)##sessioncfg.ZONES.SecureHostRoot ##else ##local.defineByRender(SSOReturnURL)##sessioncfg.ZONES.NonHTTPSHostRoot ##endif ##local.defineByRender(tmp)APS_ZONES?fn=MakeReservation&no=##valueMap.SequenceNo ##local.defineByRender(SSOHREF)##local.urlencode(tmp) ##local.defineByRender(SSORETURN)##local.urlencode(SSOReturnURL) ##local.define(Title) ##local.define(PageBodyStyle) ##local.define(FrameContent) ##include(FrameBody) ##endif ##endif ##if local.isEqual(pageDone,0) ##local.define(Header)##include(Header) ##if valueMap.__ErrorResponse ##local.define(HandledError)1 ##endif ##helpcontext.addHelp(Toolbar) ##if error.Level ##if error.IsEqual(ID,"Invalid password") ##local.define(BadPasswordError)1 ##local.define(HandledError)1 ##endif ##if error.IsEqual(ID,"Patron not found") ##local.define(BadPatronError)1 ##local.define(HandledError)1 ##endif ##endif ##if valueMap.IsInvalidPin ##local.define(BadPasswordError)1 ##endif ##if valueMap.IsInvalidBrwr ##local.define(BadPatronError)1 ##endif ##if valueMap.IsEqual(VolumeCount,1) ##else ##local.define(HaveChoices)1 ##endif ##if valueMap.IsEqual(BranchCount,1) ##else ##local.define(HaveChoices)1 ##endif ##if valueMap.GotBranch ##if valueMap.GotVolume ##local.define(MadeChoices)1 ##if valueMap.IsEqual(IsReservable,0) ##local.define(BadChoices)1 ##endif ##endif ##endif ##if valueMap.Authenticated ##if valueMap.IsEqual(BranchCount,0) ##local.define(BadItem)1 ##endif ##if local.HaveChoices ##else ##if local.BadChoices ##local.define(BadItem)1 ##endif ##endif ##endif ##if sessioncfg.DB.Config.Circ.Reservation.ShowQueuePosition ##local.define(ShowQueue)1 ##endif ##local.define(Advice) ##if local.BadItem ##leg.ZONESOPAC.MakeReservation.NoReservableStock ##helpcontext.addHelp(PReservationNoStock) ##else ##if valueMap.Done ##if valueMap.IsEqual(Result.ResultKnown,1) /* this is the P7 case where we know the result of the reserver operation */ ##if valueMap.IsEqual(Result.Result,1) ##helpcontext.addHelp(PReservationCompleteResultSuccessful) ##leg.ZONESOPAC.MakeReservation.PortfolioCompleteResultSuccess ##else ##helpcontext.addHelp(PReservationCompleteResultFailed) ##leg.ZONESOPAC.MakeReservation.PortfolioCompleteResultFail ##valueMap.QualData(Result.ResultMessage) ##endif ##else ##if valueMap.Success ##leg.ZONESOPAC.MakeReservation.PortfolioComplete ##helpcontext.addHelp(PReservationComplete) ##else ##leg.ZONESOPAC.MakeReservation.Aborted ##helpcontext.addHelp(PReservationDidNotComplete) ##endif ##endif ##else ##if valueMap.Authenticated ##if valueMap.IsEqual(AccountTrapLevel,Error) ##leg.ZONESOPAC.MakeReservation.Title.Advice ##else ##if local.MadeChoices ##if local.BadChoices ##leg.ZONESOPAC.MakeReservation.NoReservableStock ##helpcontext.addHelp(PReservationNoStock) ##else ##leg.ZONESOPAC.MakeReservation.WantConfirmation ##leg.ZONESOPAC.MakeReservation.ClickConfirmToContinue ##endif ##if local.HaveChoices ##leg.ZONESOPAC.MakeReservation.ClickBackToChangeSelections ##endif ##else ##if valueMap.IsEqual(VolumeCount,1) ##else ##helpcontext.addHelp(PReservationVolumeChoice) ##if valueMap.IsEqual(BranchCount,1) ##leg.ZONESOPAC.MakeReservation.YouHaveVolumeChoices ##else ##leg.ZONESOPAC.MakeReservation.YouHaveVolumeAndDeliveryBranchChoices ##endif ##endif ##if valueMap.IsEqual(BranchCount,1) ##else ##if valueMap.IsEqual(VolumeCount,1) ##helpcontext.addHelp(PReservationDeliveryChoice) ##leg.ZONESOPAC.MakeReservation.YouHaveDeliveryBranchChoices ##endif ##endif ##endif ##helpcontext.addHelp(PMakeReservation) ##endif ##else ##leg.ZONESOPAC.MakeReservation.ReservationLogin ##helpcontext.addHelp(PReservationAuthenticate) ##endif ##endif ##endif ##local.define(TopButtons) ##local.define(BottomButtons) ##local.define(Title) ##if valueMap.Done ##leg.ZONESOPAC.MakeReservation.Title.Complete ##else ##leg.ZONESOPAC.MakeReservation.Title.Make ##if request.Security(On) ( ##leg.ZONESOPAC.Security.Secure ) ##endif ##endif ##local.Define(AfterAuthenticationContent) ##if local.BadItem ##else ##if local.MadeChoices ##if local.BadChoices ##else ##if local.ShowQueue
##leg.Expand(ZONESOPAC.MakeReservation.QueueMessage,Position,##valueMap.QueueLength)
##endif ##local.define(GoForwardFormButton)1 ##endif ##endif /*##valueMap.Dump()*/
##this.stylesetforform ##if valueMap.GotVolume ##if valueMap.IsEqual(VolumeCount,1) ##else ##if valueMap.IsEqual(VolumeCount,0) ##else
##leg.ZONESOPAC.MakeReservation.SelectedVolume : ##valueMap.Volume
##endif ##endif ##else ##local.define(VolumeChoice)0 ##if valueMap.IsEqual(VolumeCount,0) ##else ##local.define(VolumeChoice)1 ##endif ##if local.IsEqual(VolumeChoice,"1")
##leg.ZONESOPAC.MakeReservation.VolumeChoice
##valueMap.With(Volumes,"Volumes") ##Volumes.ForEachIn(Item,"")
##Item.text

##local.define(GoForwardFormButton)1
##endif /* ##else */ ##endif
##if valueMap.GotBranch ##if valueMap.IsEqual(BranchCount,1) ##leg.ZONESOPAC.MakeReservation.DeliveryBranch ##else ##leg.ZONESOPAC.MakeReservation.SelectedDeliveryBranch ##endif : ##if valueMap.BranchInfo.branch_code ##valueMap.QualData(BranchInfo.description) ##else ##valueMap.Branch ##endif ##else ##leg.ZONESOPAC.MakeReservation.DeliveryBranchChoice /* */
/*##valueMap.Dump()*/ ##valueMap.With(Branches,"Branches")
##Branches.ForEachIn(Item,"")
##if Item.IsDefined(branch_code) /* this is the new localised structure */ ##Item.QualData("description") ##if sessioncfg.DB.Config.Circ.Reservation.ShowCopyAndReservation ##local.define(IsBrackets)0 ##if Item.IsEmpty(no_copies) ##else ##local.define(IsBrackets)1 ##endif ##if Item.IsEmpty(rank) ##else ##local.define(IsBrackets)1 ##endif ##if Item.IsGreater(no_copies,0) ##if local.IsEqual(IsBrackets,1) ( ##endif ##if Item.IsEmpty(no_copies) ##else ##if Item.IsGreater(no_copies,1) ##Item.no_copies ##leg.ZONESOPAC.MakeReservation.MultiAvailDocument ##else ##Item.no_copies ##leg.ZONESOPAC.MakeReservation.SingleAvailDocument ##endif ##if Item.IsEmpty(rank) ##else - ##endif ##endif ##if Item.IsEmpty(rank) ##else ##leg.ZONESOPAC.MakeReservation.ReservRank: ##Item.rank ##endif ##if local.IsEqual(IsBrackets,1) ) ##endif ##endif ##endif ##else ##Item.text ##endif

##local.define(GoForwardFormButton)1 ##endif
##if local.MadeChoices ##endif
##if local.HaveChoices ##if local.MadeChoices
##this.stylesetforform
##local.define(GoBackFormButton)1 ##endif ##endif
/*##valueMap.Dump() */ ##if local.GoBackFormButton ##endif ##if local.GoForwardFormButton ##if local.BadChoices ##else ##endif ##endif
##endif
##local.define(AccountTrapInfo) ##local.define(FieldTemplate) ##local.Value ##if valueMap.IsEqual(AccountTrapLevel,Error) ##local.define(Name)  ##local.define(Value) ##sessioncfg.MapLegendThroughTable(AccountTrapError,"DB.Config.ZONESERVICES.ErrorMessageMap")

##valueMap.foreachIn(trap,AccountTraps) ##local.defineByRender(ErrorText)##sessioncfg.MapLegendThroughTable(##trap.trapID,"DB.Config.ZONESERVICES.ErrorMessageMap") ##if local.IsEqual(ErrorText,"") ##local.define(ErrorText)##trap.trapID ##endif ##if local.IsEqual(ErrorText,"Hide") ##else ##local.ErrorText
##endif


##local.FieldTemplate ##endif ##if valueMap.IsEqual(AccountTrapLevel,Warning) ##local.define(Name)  ##local.define(Value) ##sessioncfg.MapLegendThroughTable(AccountTrapWarning,"DB.Config.ZONESERVICES.ErrorMessageMap")

##valueMap.foreachIn(trap,AccountTraps) ##local.defineByRender(ErrorText)##sessioncfg.MapLegendThroughTable(##trap.trapID,"DB.Config.ZONESERVICES.ErrorMessageMap") ##if local.IsEqual(ErrorText,"") ##local.define(ErrorText)##trap.trapID ##endif ##if local.IsEqual(ErrorText,"Hide") ##else ##local.ErrorText
##endif
##local.FieldTemplate ##endif
##local.define(MainContent) ##if valueMap.Done ##if valueMap.IsEqual(Result.ResultKnown,1) /* this is the P7 case where we know the result of the reserver operation */ ##if valueMap.IsEqual(Result.Result,1) ##leg.ZONESOPAC.MakeReservation.PortfolioCompleteDetailResultSuccess ##else ##leg.ZONESOPAC.MakeReservation.PortfolioCompleteDetailResultFail ##valueMap.QualData(Result.ResultMessage) ##endif ##else ##if valueMap.Success ##leg.ZONESOPAC.MakeReservation.PortfolioCompleteDetail ##endif ##endif ##endif ##local.Define(RoundBoxContent) ##valueMap.With(SE,"SE") ##if valueMap.IsEqual("SerialCopyNumber","") ##local.define(PLISGeneralBibSummaryExtraInfo) ##else ##local.define(PLISGeneralBibSummaryExtraInfo)      ##valueMap.SerialCopyDetails.issue_desc ##endif ##if SE.MaterialType ##local.defineByRender(MATIcon)##sessioncfg.MapValueThroughImageTable(##SE.MaterialType,"DB.Config.BookServer.GraphicalMAT") ##local.defineByRender(MATText)##sessioncfg.MapLegendThroughTable(##SE.MaterialType,"DB.Config.BookServer.MaterialMap") ##endif ##if SE.Title ##if local.IsEqual(MATIcon,"") ##else ##endif ##endif
##leg.ZONESOPAC.Defaults.SummaryEntry.Title: ##SE.Title
/*##local.PLISGeneralBibSummaryTable*/
/* serial copy related information here if it's available */ /*##valueMap.Dump()*/
##local.RoundBoxContent ##if valueMap.Done ##else ##if valueMap.Authenticated ##if valueMap.IsEqual(AccountTrapLevel,Error) ##local.AccountTrapInfo ##else ##local.AfterAuthenticationContent ##endif ##else ##local.define(FormFields) ##if local.ShowQueue ##endif ##local.define(FormBorrowerDefault)##valueMap.BRWR ##local.LoginFormRowTemplate ##if local.BadPatronError ##local.define(Value) ##leg.ZONESOPAC.MakeReservation.InvalidBorrower ##local.AlertRowTemplate ##endif ##if local.BadPasswordError ##local.define(Value) ##leg.ZONESOPAC.MakeReservation.InvalidPIN ##local.AlertRowTemplate ##endif
##endif
##local.Define(Content)
##local.MainContent
##include(Body) ##endif