regluit/api/templates/isbn.html

59 lines
1.9 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>isbn</title>
</head>
<body>
<p>You entered isbn: {{isbn}}</p>
<!--- editions --->
{% if editions %}
<ul>
{% for edition in editions %}
<li>{{edition.id}} | {{edition.title}}
<a href="http://openlibrary.org/isbn/{{edition.isbn_10}}"><img src="http://covers.openlibrary.org/b/isbn/{{edition.isbn_10}}-M.jpg"/ width="120" height="182" ></a>
<!-- editioncovers for given edition -->
{% if edition.covers.all %}
<ul id="id">
{% for editioncover in edition.covers.all %}
<li>cover OL id: {{editioncover.openlibrary_id}}</li>
{% endfor %}
</ul>
{% else %}
<p class="classname">No editioncover for this edition</p>
{% endif %}
<!-- related work -->
{% if edition.work %}
<p class="classname">Related work: {{edition.work.id}} | {{edition.work.title}} | first author: {{edition.work.authors.all.0.name}} <br />
All authors: {{edition.work.authors.all}} </p>
{% endif %}
<!-- related campaigns -->
{% if edition.work.campaigns.all %}
<ul id="id">
{% for campaign in edition.work.campaigns.all %}
<li>Campaign: id:{{campaign.id}} | name:{{campaign.name}} | desc:{{campaign.description}} <br />
target:{{campaign.target}} created:{{campaign.created}} deadline:{{campaign.deadline}}</li>
{% endfor %}
</ul>
{% else %}
<p class="classname">No associated campaigns</p>
{% endif %}
</li>
{% endfor %}
</ul>
{% else %}
<p>No editions are available.</p>
{% endif %}
</body>
</html>