#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:
2011-03-06 17:14:25 +00:00
parent 56dd7b67c8
commit 136d1dd7c3
5 changed files with 102 additions and 13 deletions

View File

@@ -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 %}

View File

@@ -1,12 +1,22 @@
{% extends "base/main.html" %}
{% block title%}
Worblehat 0.1: {{ person.first_name }} {{ person.last_name }}
Worblehat: {{ person.first_name }} {{ person.last_name }}
{% endblock %}
{% block content %}
<span class="key">Name:</span> {{person.first_name}} {{person.last_name}}<br>
<h2>{{ person.first_name }} {{ person.last_name }}</h2>
{% for relation, books in contributed.iteritems %}
<span class="key">{{ relation }}:</span><br/>
<ul>
{% for book in books.1 %}
<li> <a href=/bok/{{book.book.isbn}}>{{ book.book.title }}</a>
<!--- <span class="key">Name:</span> {{person.first_name}} {{person.last_name}}<br>
{% for book in books %}
<span class="key">{{ book.relation.name }} of:</span> <a href=/bok/{{ book.book.isbn }}>{{ book.book.title }}</a> <br>
---!>
{% endfor %}
<br/>
</ul>
{% endfor %}
{% endblock %}