#9 og #10 løst. Alt ser ut til å fungere. Mer funksjonalitet kan legges til, men generelt ser ting greit ut.
This commit is contained in:
@@ -1,15 +1,56 @@
|
||||
{% extends "base/main.html" %}
|
||||
|
||||
{%block title%}
|
||||
Worblehat 0.1: {{ book.title }}
|
||||
Worblehat: {{ book.title }}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
{% if book.thumbnail %}
|
||||
<span class="img">
|
||||
<img src="/media/{{ book.thumbnail }}" alt="{{ book.title }}">
|
||||
</span>
|
||||
{% endif %}
|
||||
<span class="img">
|
||||
<h2>{{ book.title }}</h2>
|
||||
{% if book.subtitle %}
|
||||
<h3>{{ book.subtitle }}</h3>
|
||||
{% endif %}
|
||||
<!---
|
||||
<span class="key">Title:</span> {{ book.title }} <br>
|
||||
{% if book.subtitle %}
|
||||
<span class="key">Subtitle:</span> {{ book.subtitle }} <br>
|
||||
{% endif %}
|
||||
<span class="key">ISBN:</span> {{ book.isbn }} <br>
|
||||
<span class="key">Subtitle:</span> {{ book.subtitle }} <br>
|
||||
{% endif %}
|
||||
{% for person in people %}
|
||||
<span class="key">{{ person.relation }}:</span> <a href=/person/{{person.person.id}}>{{ person.person.first_name }} {{ person.person.last_name }}</a> <br>
|
||||
{% endfor %}
|
||||
---!>
|
||||
{% for relation, persons in contributors.iteritems %}
|
||||
<span class="key">{{ relation }}{% if persons.0 != 1 and relation != 'Medvirkende' %}e{% endif %}:</span>
|
||||
{% for person in persons.1 %}
|
||||
<a href=/person/{{person.person.id}}>{{ person.person.first_name }} {{ person.person.last_name }}</a>{% if not forloop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
<br>
|
||||
{% endfor %}
|
||||
{% if book.category %}
|
||||
<span class="key">Kategori:</span> {{ book.category }} <br>
|
||||
{% endif %}
|
||||
{% if book.shelves %}
|
||||
<span class="key">Hylle:</span> {{ book.shelves }} <br>
|
||||
{% endif %}
|
||||
{% if book.published_year %}
|
||||
<span class="key">År:</span> {{ book.published_year }} <br>
|
||||
{% endif %}
|
||||
{% if book.edition %}
|
||||
<span class="key">Utgave:</span> {{ book.edition }} <br>
|
||||
{% endif %}
|
||||
{% if book.num_pages %}
|
||||
<span class="key">Antall sider:</span> {{ book.num_pages }} <br>
|
||||
{% endif %}
|
||||
{% if book.series %}
|
||||
<span class="key">Serie:</span> {{ book.series }} <br>
|
||||
{% endif %}
|
||||
{% if book.description %}
|
||||
<span class="key">Beskrivelse:</span> {{ book.description }} <br>
|
||||
{% endif %}
|
||||
<span class="key">ISBN:</span> {{ book.isbn }} <br>
|
||||
</span>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user