Browse Source

Refactor base template

pull/6/head
Marcio Mazza 10 years ago
parent
commit
709f129f16
  1. 36
      templates/base.html
  2. 6
      templates/comissoes/comissao_form.html
  3. 42
      templates/comissoes/comissao_list.html
  4. 6
      templates/index.html
  5. 6
      templates/sessao/sessaoplenaria_form.html
  6. 44
      templates/sessao/sessaoplenaria_list.html

36
templates/base.html

@ -4,22 +4,22 @@
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title>{% block head_title %}{% trans 'SAPL - Sistema de Apoio ao Processo Legislativo' %}{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% block header_content %}
<link rel="stylesheet" href="{% static 'foundation/css/foundation.min.css' %}">
<script type="text/javascript" src="{% static 'foundation/js/vendor/modernizr.js' %}"></script>
<script type="text/javascript" src="{% static 'foundation/js/vendor/jquery.js' %}"></script>
<script type="text/javascript" src="{% static 'foundation/js/vendor/fastclick.js' %}"></script>
<script type="text/javascript" src="{% static 'foundation/js/foundation.min.js' %}"></script>
{% endblock %}
<meta charset="utf-8">
<title>{% block head_title %}{% trans 'SAPL - Sistema de Apoio ao Processo Legislativo' %}{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% block header_content %}
<link rel="stylesheet" href="{% static 'foundation/css/foundation.min.css' %}">
<script type="text/javascript" src="{% static 'foundation/js/vendor/modernizr.js' %}"></script>
<script type="text/javascript" src="{% static 'foundation/js/vendor/jquery.js' %}"></script>
<script type="text/javascript" src="{% static 'foundation/js/vendor/fastclick.js' %}"></script>
<script type="text/javascript" src="{% static 'foundation/js/foundation.min.js' %}"></script>
{% endblock %}
</head>
<body>
<header>
... header ...
<hr/>
... header ...
<hr/>
</header>
<!-- Content -->
@ -35,23 +35,21 @@
</div>
{% endfor %}
{% block content %}{% endblock %}
{% block base_content %}{% endblock %}
</div>
{% endblock %}
<!-- END Content -->
<footer id="footer">
<hr/>
... footer...
<hr/>
... footer...
</footer>
{% block foot_more_js %}{% endblock %}
{% block foot_js %}{% endblock %}
{# Init Foundation #}
{% block foundation_js_init %}
<script>
$(document).foundation();
</script>
<script> $(document).foundation(); </script>
{% endblock foundation_js_init %}
</body>
</html>

6
templates/comissoes/comissao_form.html

@ -3,9 +3,7 @@
{% block title %}SAPL{% endblock %}
{% block content %}
<div id="content-main">
{% crispy form %}
</div>
{% block base_content %}
{% crispy form %}
{% endblock %}

42
templates/comissoes/comissao_list.html

@ -3,28 +3,26 @@
{% block title %}SAPL{% endblock %}
{% block content %}
<div id="content-main">
<p>Comissões</p>
<a href="/admin/comissoes/comissao/add/">Incluir Comissão</a>
{% block base_content %}
<p>Comissões</p>
<a href="/admin/comissoes/comissao/add/">Incluir Comissão</a>
<table class="table table-hover">
<thead>
<tr>
<th>{% trans 'Nome' %}</th>
<th>{% trans 'Sigla' %}</th>
<th>{% trans 'Tipo' %}</th>
</tr>
</thead>
<tbody>
{% for comissao in object_list %}
<td>{{ comissao.nome }}</td>
<td>{{ comissao.sigla }}</td>
<td>{{ comissao.tipo }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<table class="table table-hover">
<thead>
<tr>
<th>{% trans 'Nome' %}</th>
<th>{% trans 'Sigla' %}</th>
<th>{% trans 'Tipo' %}</th>
</tr>
</thead>
<tbody>
{% for comissao in object_list %}
<td>{{ comissao.nome }}</td>
<td>{{ comissao.sigla }}</td>
<td>{{ comissao.tipo }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}

6
templates/index.html

@ -1,9 +1,7 @@
{% extends "base.html" %}
{% load i18n bootstrap3 %}
{% block content %}
<div id="content-main">
<h1>Bem-vindo ao SAPL!</h1>
</div>
{% block base_content %}
<h1>Bem-vindo ao SAPL!</h1>
{% endblock %}

6
templates/sessao/sessaoplenaria_form.html

@ -3,8 +3,6 @@
{% block title %}SAPL{% endblock %}
{% block content %}
<div id="content-main">
{% crispy form %}
</div>
{% block base_content %}
{% crispy form %}
{% endblock %}

44
templates/sessao/sessaoplenaria_list.html

@ -3,28 +3,26 @@
{% block title %}SAPL{% endblock %}
{% block content %}
<div id="content-main">
<p>Sessão Legislativa</p>
<a href="{% url 'sessao_create' %}" class="btn btn-default">Incluir Sessão</a>
<hr/>
<table class="table table-hover">
<thead>
<tr>
<th>{% trans 'Sessão Legislativa' %}</th>
<th>{% trans 'Legislatura' %}</th>
<th>{% trans 'Tipo' %}</th>
</tr>
</thead>
<tbody>
{% for sessao in object_list %}
<td>{{ sessao.sessao_legislativa }}</td>
<td>{{ sessao.legislatura }}</td>
<td>{{ sessao.tipo }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% block base_content %}
<p>Sessão Plenária</p>
<a href="{% url 'sessao_create' %}" class="btn btn-default">Incluir Sessão</a>
<hr/>
<table class="table table-hover">
<thead>
<tr>
<th>{% trans 'Sessão Legislativa' %}</th>
<th>{% trans 'Legislatura' %}</th>
<th>{% trans 'Tipo' %}</th>
</tr>
</thead>
<tbody>
{% for sessao in object_list %}
<td>{{ sessao.sessao_legislativa }}</td>
<td>{{ sessao.legislatura }}</td>
<td>{{ sessao.tipo }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}

Loading…
Cancel
Save