Добавлен базовый шаблон. Сделано наследование шаблона

This commit is contained in:
2015-05-16 15:37:53 +05:00
parent 030522e519
commit e0f6275268
7 changed files with 44 additions and 49 deletions

View File

@@ -1,3 +1,7 @@
{% extends "asuzr/base.html" %}
{% block title %}Таблица посещаемости{% endblock %}
{% block page %}
<table WIDTH="100%"> <table WIDTH="100%">
<TR VALIGN=top> <TR VALIGN=top>
<TD WIDTH="40%">{% include 'asuzr/attendance.html' %}</TD> <TD WIDTH="40%">{% include 'asuzr/attendance.html' %}</TD>
@@ -6,3 +10,4 @@
</TR> </TR>
</table> </table>
{% include 'asuzr/plan_balance.html' %} {% include 'asuzr/plan_balance.html' %}
{% endblock %}

View File

@@ -1,11 +1,3 @@
<html>
<head>
<title>Таблица посещаемости</title>
<meta content="">
<style></style>
</head>
<body>
<H1>Таблица посещаемости</H1>
<TABLE BORDER WIDTH="100%"> <TABLE BORDER WIDTH="100%">
{% if attend_list %} {% if attend_list %}
<ul> <ul>
@@ -39,5 +31,3 @@
<p>Список изделий пуст</p> <p>Список изделий пуст</p>
{% endif %} {% endif %}
</TABLE> </TABLE>
</body>
</html>

23
templates/asuzr/base.html Normal file
View File

@@ -0,0 +1,23 @@
<html>
<head>
<title>Автоматическая система учета заказов студии мебели Рекорд</title>
</head>
<body>
{% block menu %}
<ul id="menu">
<li><a href={% url 'asuzr-main' 1 5 2015 %}>Таблица посещаемости</a></li>
<li><a href={% url 'asuzr.views.orders' 0 %}>Таблица выхода заказов</a></li>
<li><a href={% url 'asuzr.views.orders' 1 %}>Архивная таблица</a></li>
</ul>
{% endblock %}
<H1>{% block title %}Заголовок страницы{% endblock %}</H1>
{% block page %}
Тело страницы
{% endblock %}
{% block footer %}
<hr>
{% endblock %}
</body>
</html>

View File

@@ -1,12 +1,9 @@
<html> {% extends "asuzr/base.html" %}
<head>
<title></title> {% block title %}{% if archive %} Архивная таблица заказов {% else %} Таблица выхода заказов {% endif %}{% endblock %}
<meta content="">
<style></style> {% block page %}
</head> <TABLE BORDER WIDTH="100%">
<body>
<H1>{% if archive %} Архивная таблица заказов {% else %} Таблица выхода заказов {% endif %}</H1>
<TABLE BORDER WIDTH="100%">
{% if order_list %} {% if order_list %}
<ul> <ul>
<TR> <TR>
@@ -49,5 +46,5 @@
<p>Список заказов пуст</p> <p>Список заказов пуст</p>
{% endif %} {% endif %}
</table> </table>
</body>
</html> {% endblock %}

View File

@@ -1,10 +1,3 @@
<html>
<head>
<title>Заказы</title>
<meta content="">
<style></style>
</head>
<body>
<H1>Заказы на {{ d_date }} </H1> <H1>Заказы на {{ d_date }} </H1>
<TABLE BORDER WIDTH="100%"> <TABLE BORDER WIDTH="100%">
{% if order_list %} {% if order_list %}
@@ -37,5 +30,3 @@
<p> Список заказов пуст</p> <p> Список заказов пуст</p>
{% endif %} {% endif %}
</TABLE> </TABLE>
</body>
</html>

View File

@@ -1,10 +1,3 @@
<html>
<head>
<title></title>
<meta content="">
<style></style>
</head>
<body>
<H4>Справочно:</H4> <H4>Справочно:</H4>
<TABLE BORDER WIDTH="20%"> <TABLE BORDER WIDTH="20%">
<ul> <ul>
@@ -17,5 +10,3 @@
<TD>{{ balance }}</TD> <TD>{{ balance }}</TD>
</TR> </TR>
</ul> </ul>
</body>
</html>

View File

@@ -1,10 +1,8 @@
<html> {% extends "asuzr/base.html" %}
<head>
<title>Типы изделий</title> {% block title %}Типы изделий{% endblock %}
<meta content="">
<style></style> {% block page %}
</head>
<body>
{% if product_list %} {% if product_list %}
<ul> <ul>
{% for prod in product_list %} {% for prod in product_list %}
@@ -14,5 +12,5 @@
{% else %} {% else %}
<p>Список изделий пуст</p> <p>Список изделий пуст</p>
{% endif %} {% endif %}
</body>
</html> {% endblock %}