$def with (notes, user, num_found, page=1, results_per_page=25)
$if notes: $for i in notes: $ work_id = i.work_id $ work_cover_url = i.work_details['cover_url']
  • $if i.work_details['authors']: By: $', '.join(i.work_details['authors']) $else: $_('Unknown author')
      $for k in sorted(i['notes']):
    • $ edition = i['editions'][k]
      $_('My notes for an edition of ') $if edition.title: $edition.title
      $else: $_('Title Missing')
      $if edition.publishers and edition.publish_date: $edition.publish_date, $(', '.join(edition.publishers)) $elif edition.publish_date: $edition.publish_date $elif edition.publishers: $_('Publish date unknown'), $(', '.join(edition.publishers)) $else: $_('Publisher unknown')
      $edition.physical_format.replace('[', '').replace(']','') $if edition.languages: $_('in %(language)s', language=', '.join(l.name for l in edition.languages)) $if edition.edition_name: - $edition.edition_name
      $ textarea_id = str(k) + "-notes-textarea" $ id = str(k) + "edition-modal-link" $:macros.NotesModal(i.work, edition, _('View or update note'), id, 'notes-view-modal-link', reload_id=textarea_id)
  • $else: $_("No notes found.")
    $:macros.Pager(page, num_found, results_per_page)