<?xml version="1.0" encoding="UTF-8"?>
<html>
<t:s>$bookTableBroken:=false()</t:s>
<t:switch-prioritized>
<body>
 <a t:condition="contains(@href, 'MEMSTAT')">{$new-update-page := @href}</a>?

 <fieldset><div class='MemStatMembCapt'>
    <template:read var="delete-current-books()"/>
    {hasShelfMark := false()}
 </div></fieldset>

 <form name="MEMISSIT" template:optional="true">
   <template:read source="true()" var="bookTableBroken"/>
   <fieldset id="issued_items">
     
     <table>
       <template:read source="true()" var="noExtendingPossible"/>
       <thead><tr><th  class="barcode"  ></th>
                  <th   ></th> <!-- class: titleVolRef -->
                  <th  class="author"   ></th>
                  <th  class="callNumber"  >{$hasShelfMark := true()}</th>?
                  <th  class="dueDate"   ></th>
                  <th  class="numRenewals"  ></th>
                  <th  class="renew"   template:optional="true">
                    <template:read source="false()" var="noExtendingPossible"/>
                  </th></tr></thead>
                  
       <template:loop> 
       <tr>
          {book := object()}
          <template:read source="false()" var="bookTableBroken"/>
          <template:read var="book.extendid" source="''"/>
          <th class="barcode" headers="th1_1"><template:read source="." var="book.id"/></th>
          <td headers="th1_2">
            <template:read source="text()" var="book.title"/>
            <span class='ItemNotesLeader' t:optional=true/>
            <br template:optional="true"/>
            <template:read source="text()" var="temporaryStatusDetails"/>
          </td>
          <td headers="th1_3"><template:read source="." var="book.author"/></td>
          <td t:test="$hasShelfMark"/>
          <td><template:read source="." var="book.duedate:d mmm yyyy"/></td>
          <td><template:read source="concat('bisher ',., ' mal verlängert')" var="book.status:curious"/></td>
          <td template:optional="true" t:condition="input">
            <input><template:read var="book.extendid" source="@name"/></input>
          </td>
          <template:if test="$book.extendid=''">
            <template:read var="book.status:problematic" source="$temporaryStatusDetails"/>
          </template:if>
          <template:if test="$noExtendingPossible">
            <template:read var="book.status:problematic" source="'Prinzipiell keine Verlängerung möglich'"/>
          </template:if>
       </tr>
       </template:loop>
     </table>

     <input type="hidden" name="mid">
       <template:read var="mid" source="@value"/>
     </input>
  </fieldset>
 </form>
 
 
   <fieldset id="reserved_items_flds" template:optional="true">
     {cancelForm := form(ancestor::form[1]), hasShelfMark:=false(), hasDelete := false()}
     <table>
       
       <thead><tr> 
          <th class="barcode"></th>
          <th></th>
          <th class="author"></th>
          <th class="callNumber">{$hasShelfMark := true()}</th>?
          <th class="reserveDate"></th>
          <th class="delete">{$hasDelete := true()}</th>?
      </tr></thead>
                  
       <template:loop>
       <tr>
          {book := {"statusId": "ordered", "cancelable": false()}}
          <td headers='th7_2'>{$book.id}</td>
          <td>{$book.title}</td>
          <td>{$book.author}</td>
          <td t:test="$hasShelfMark"/>
          <td>{$book.issueDate := parse-date(., "d mmm yyyy")}</td>
          <td t:test="$hasDelete"><input type="checkbox">{
            book.cancelId := uri-combine(., ()),
            book.cancelable := true()
          }</input></td>
       </tr>

       </template:loop>
     </table>

     <input type="hidden" name="mid">{$mid:=@value}</input>?
  </fieldset>
</body>


<form>
  <template:meta default-text-matching="regex"/>
  Systemmeldung|System Nachricht|Exception Message
  <p>Ihre Anforderung konnte|Your process</p>
  <blockquote>
    <ul><template:read var="raise()" source="deep-text()"/></ul>
  </blockquote>
</form>

<head><title>Log out redirect</title>{$session-lost := true}</head>

</t:switch-prioritized>

<template:if test="$bookTableBroken">
  <BOOKTABLEBROKEN>
  Probably site layout changed!
  </BOOKTABLEBROKEN>
</template:if>
</html>
