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

6
templates/comissoes/comissao_form.html

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

42
templates/comissoes/comissao_list.html

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

6
templates/index.html

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

6
templates/sessao/sessaoplenaria_form.html

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

44
templates/sessao/sessaoplenaria_list.html

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

Loading…
Cancel
Save