<?xml version="1.0" encoding="UTF-8"?>
<actions>


<meta>
  <description>Template für aleph 2005 (vor allem für die ULB Düsseldorf gedacht)</description>
  <variable name="server"><description>Serveraddresse, ohne Protokoll mit trailing slash</description></variable>
  <variable name="institute"><description>Institutsid des Katalogs</description></variable>
</meta>

<action id="connect">
<!--    <page url="http://{$server}F" templateFile="start"/>
    <page url="{$loginPage}"  templateFile="login"/>
    <page url="{$loginForm}"  templateFile="../aleph_base/loggedIn2005"> 
      <post name="func" value="login-session"/>
      <post name="login_source" value="LOGIN-BOR"/>
      <post name="bor_id" value="{$username}"/>
      <post name="bor_verification" value="{$password}"/>
      <post name="bor_library" value="DUE50"/>
    </page>-->
      
  <page url="https://{$server}/pds?func=load-login&calling_system=aleph&institute={$institute}&url=https://{$server}/F">
  <template><html>{
    if (//form) then
      login := form(., {"bor_id": $username, "bor_verification": $password})
     else (
      redirect :=  resolve-uri((//a/@href)[1]),
      login := ()
     )
  }</html></template>
  </page>
  
  <page url="{$login}"><template>
  <t:switch-prioritized>
    <html>
    <t:switch>
      <form><td class="msg">{videlibri:raise-login(.)}</td></form>
      <a>{redirect:=resolve-uri(@href)}</a>
    </t:switch>
    </html>
    <div id="div-feedback"><t:s>vl:raise-login(.)</t:s></div>
  </t:switch-prioritized>
  </template></page>
  
  <page url="{$redirect}"></page>
    
    
  <page url="http://{$server}F">
  <template><script>
  {redirect := extract(., "url *= *'([^']+)'", 1)}
  </script></template>
  </page>
  <page url="{$redirect}"><template><a>{redirect:=@href}</a></template></page>
  <page url="{$redirect}" templateFile="start"/>
  <page url="{$loginPage}"  templateFile="../aleph_base/loggedIn2005"/>
</action>

<action id="update-all">
  <page url="{$bookPage}" templateFile="update"/>
  <page url="{$holdPage}" templateFile="update-hold"/>
</action>

<action id="update-single">
  <page url="{$book.detailLink}" templateFile="../aleph_base/details"/>
</action>

<action id="renew-single">
  <page url="{$book.extendLink}"/>
  <page url="{$book.detailLink}" templateFile="../aleph_base/details"/>
</action>

<action id="cancel-single">
  <page url="{$book._cancelLink}"/>
</action>
<!--
cancel confirmation:
<table border="0" cellspacing="0" cellpadding="0" width="100%"> 
  <tr> 
    <td class="feedbackbar" valign="middle" align="center" nowrap> 
      <img src="https://katalog.ub.uni-duesseldorf.de/exlibris/aleph/u22_1/alephe/www_f_ger/icon/f-tip.gif" border="0" alt="System Tip"> Vormerkung wurde gelöscht.</td> 
  </tr> 
</table> -->

<!--this does not work, because it can only modify a single currentBook.
<action id="renew-list">
  <loop var="b" list="$renew-books">
    <s>book := $b</s>
    <call action="renew-single"/>
  </loop>
  <call action="update-all"/>
</action>
-->

</actions>
