<html xmlns:py="http://genshi.edgewall.org/" 
  xmlns:xi="http://www.w3.org/2001/XInclude"
  py:strip=""
  >

  <py:def function="page_title">Bibliographica - Collection  ${c.model.title}</py:def> 


  <py:def function="optional_head">
    <link type="text/css" href="/css/collection.css" rel="stylesheet" />	
    <script type="text/javascript" src="/js/collection.js"></script>

  </py:def>

  <div py:match="content">
    <h1>Collection: <span id="title" class="editable">${c.model.title}</span></h1>

      <dl id="collinfo">
        <dt py:if="'subject' in c.model.to_dict().keys()">Subject:</dt>
          <dd id="subject" class="editable">${c.model.subject}</dd>
        <dt py:if="'owner' in c.model.to_dict().keys()">Owner:</dt>
        <dd py:for="person in c.owners"><a href="${person.identifier}"> ${person.accountName}</a> 
        <py:if test="person.avatar"><img src="${person.avatar}" width="60" height="60" /></py:if>
        <hr /></dd>
      </dl> 

      <h2>Works:</h2>
      <ul py:if="c.booklist != None" class="booklist">
        <li py:for="book in c.booklist" class="book">
        <a href='${book.identifier}'>${book.title}</a> by 
          <span py:for="contributor in book.creators"><a href='${contributor.local_path}'>${contributor.name}</a>
            <div class="description" py:if="'description' in book.to_dict().keys()">
              ${book.description}
             </div>
          </span>
        </li>
      </ul>
  </div>

  <xi:include href="base.html" />
</html>


