Simplify document_print template
This commit is contained in:
@@ -1,29 +1,7 @@
|
||||
{% load project_tags %}
|
||||
{% extends 'appearance/base.html' %}
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>{% project_name %}</title>
|
||||
|
||||
<style type="text/css">
|
||||
.break { page-break-after: always; }
|
||||
img { border: 1px solid black; }
|
||||
@page {
|
||||
size: {{ page_width }} {{ page_height }};
|
||||
margin-top: 1cm;
|
||||
margin-bottom: 1cm;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
{% for page in pages %}
|
||||
<div class="{% if forloop.counter > 1 and not forloop.last %}break{% endif %}">
|
||||
<img src="{% url 'documents:document_display_print' object.id %}?page={{ page.page_number }}" />
|
||||
</div>
|
||||
{% endfor %}
|
||||
</body>
|
||||
</html>
|
||||
{% block content_plain %}
|
||||
{% for page in pages %}
|
||||
<img src="{% url 'documents:document_display_print' object.id %}?page={{ page.page_number }}" />
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user