$def with (doc, data={}, status=None) $putctx('cssfile', 'form') $putctx('robots', 'noindex,nofollow') $if doc.type.key == "/type/author": $ intro = _("There are two ways to put an author's image on Open Library") $ action = doc.url('/add-photo') $ guideline = _("Image Guidelines") $else: $ intro = _("There are two ways to put a cover image on Open Library") $ action = doc.url('/add-cover') $ guideline = _("Cover Guidelines")
$if status: $if status.code == 1: $_("Please provide a valid image.") $elif status.code == 2: $_("Please provide an image URL.") $elif status.code == 3: $_("Please provide a valid image.")
$intro
$if doc.type.key == "/type/work": $if doc.get_edition_covers():
$_("Cancel")
$guideline