regluit/api/templates/isbn.html

59 lines
1.9 KiB
HTML
Raw Normal View History

<!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 %}
2012-03-09 16:58:48 +00:00
<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 %}
2012-03-09 16:58:48 +00:00
<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>