Browse Source

Ajusta comissões ao layout do bootstrap

pull/237/head
Eduardo Edson Batista Cordeiro Alves 9 years ago
parent
commit
ef6f75e6d9
  1. 29
      templates/comissoes/comissao_list.html
  2. 4
      templates/comissoes/comissao_parlamentar.html
  3. 4
      templates/comissoes/comissao_parlamentar_edit.html
  4. 82
      templates/comissoes/composicao.html
  5. 4
      templates/comissoes/materias_em_tramitacao.html

29
templates/comissoes/comissao_list.html

@ -3,19 +3,22 @@
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block base_content %} {% block base_content %}
<div class="actions btn-group pull-right" role="group"> <div class="actions btn-group pull-right" role="group">
<a href="{% url 'comissao:cadastrar_comissao' %}" class="btn btn-default"> <a href="{% url 'comissao:cadastrar_comissao' %}" class="btn btn-default">
{% blocktrans with verbose_name=view.verbose_name %} Adicionar Comissão {% endblocktrans %} {% blocktrans with verbose_name=view.verbose_name %} Adicionar Comissão {% endblocktrans %}
</a> </a>
</div> </div>
<br /><br /><br />
{% block detail_content %} {% block detail_content %}
<table width="100%"> <table class="table table-striped table-bordered">
<tr> <thead class="thead-default">
<th>Nome</th> <tr>
<th>Sigla</th> <th>Nome</th>
<th>Tipo</th> <th>Sigla</th>
<th>Data de Criação</th> <th>Tipo</th>
</tr> <th>Data de Criação</th>
</tr>
</thead>
{% for comissao in page_obj %} {% for comissao in page_obj %}
<tr> <tr>
<td> <td>
@ -29,4 +32,4 @@
</table> </table>
{% include "paginacao.html" %} {% include "paginacao.html" %}
{% endblock %} {% endblock %}
{% endblock %} {% endblock %}

4
templates/comissoes/comissao_parlamentar.html

@ -1,7 +1,7 @@
{% extends "comissoes/comissao_detail.html" %} {% extends "crud/detail.html" %}
{% load i18n %} {% load i18n %}
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block actions %}{% endblock %} {% block actions %}{% endblock %}
{% block detail_content %} {% block detail_content %}
{% crispy form %} {% crispy form %}
{% endblock detail_content %} {% endblock detail_content %}

4
templates/comissoes/comissao_parlamentar_edit.html

@ -1,7 +1,7 @@
{% extends "comissoes/comissao_detail.html" %} {% extends "crud/detail.html" %}
{% load i18n %} {% load i18n %}
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block actions %}{% endblock %} {% block actions %}{% endblock %}
{% block detail_content %} {% block detail_content %}
{% crispy form %} {% crispy form %}
{% endblock detail_content %} {% endblock detail_content %}

82
templates/comissoes/composicao.html

@ -1,50 +1,52 @@
{% extends "comissoes/comissao_detail.html" %} {% extends "crud/detail.html" %}
{% load i18n %} {% load i18n %}
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block actions %} {% endblock %} {% block actions %} {% endblock %}
{% block detail_content %} {% block detail_content %}
{% if composicao_id != 0 %} {% if composicao_id != 0 %}
<table> <table class="table table-striped table-bordered">
<tr> <thead class="thead-default">
<th>Nome</th>
<th>Cargo</th>
<th>Titular</th>
<th>Designação</th>
<th>Desligamento</th>
<th>Motivo</th>
<th>Observação</th>
</tr>
<form method="POST">
{% csrf_token %}
<select id="periodo" name="periodo" onChange="form.submit();">
{% for c in composicoes %}
<option value="{{c.id}}" {% if composicao_id == c.id %} selected {% endif %}>
{{ c.periodo.data_inicio|date:"d/m/Y" }} - {{ c.periodo.data_fim|date:"d/m/Y" }}
</option>
{% endfor %}
</select>
</form>
{% for participacao in participacoes %}
{% if participacao.composicao_id == composicao_id %}
<tr> <tr>
<td><a href="{% url 'comissao:comissao_parlamentar_edit' pk composicao_id participacao.id %}">{{participacao.parlamentar.nome_parlamentar}}</a></td> <th>Nome</th>
<td>{{participacao.cargo}}</td> <th>Cargo</th>
<td>{{participacao.titular|yesno:"Sim,Não"}}</td> <th>Titular</th>
<td>{{participacao.data_designacao|date:"d/m/Y"}}</td> <th>Designação</th>
<td>{{participacao.data_desligamento|date:"d/m/Y"|default:"-"}}</td> <th>Desligamento</th>
<td>{{participacao.motivo_desligamento|default:"-"}}</td> <th>Motivo</th>
<td>{{participacao.observacao|default:"-"}}</td> <th>Observação</th>
</tr> </tr>
{% endif %} </thead>
{% endfor %}
<form method="POST">
{% csrf_token %}
<select id="periodo" name="periodo" class="form-control" onChange="form.submit();">
{% for c in composicoes %}
<option value="{{c.id}}" {% if composicao_id == c.id %} selected {% endif %}>
{{ c.periodo.data_inicio|date:"d/m/Y" }} - {{ c.periodo.data_fim|date:"d/m/Y" }}
</option>
{% endfor %}
</select>
</form>
<br />
{% for participacao in participacoes %}
{% if participacao.composicao_id == composicao_id %}
<tr>
<td><a href="{% url 'comissao:comissao_parlamentar_edit' pk composicao_id participacao.id %}">{{participacao.parlamentar.nome_parlamentar}}</a></td>
<td>{{participacao.cargo}}</td>
<td>{{participacao.titular|yesno:"Sim,Não"}}</td>
<td>{{participacao.data_designacao|date:"d/m/Y"}}</td>
<td>{{participacao.data_desligamento|date:"d/m/Y"|default:"-"}}</td>
<td>{{participacao.motivo_desligamento|default:"-"}}</td>
<td>{{participacao.observacao|default:"-"}}</td>
</tr>
{% endif %}
{% endfor %}
</table> </table>
<a href="{% url 'comissao:comissao_parlamentar' pk composicao_id %}" class="button primary">Incluir Parlamentar</a> <a href="{% url 'comissao:comissao_parlamentar' pk composicao_id %}" class="btn btn-primary">Incluir Parlamentar</a>
{% endif %} {% endif %}
{% endblock detail_content %} {% endblock detail_content %}

4
templates/comissoes/materias_em_tramitacao.html

@ -1,4 +1,4 @@
{% extends "comissoes/comissao_detail.html" %} {% extends "crud/detail.html" %}
{% load i18n %} {% load i18n %}
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block actions %} {% endblock %} {% block actions %} {% endblock %}
@ -21,4 +21,4 @@
</fieldset> </fieldset>
{% endblock detail_content %} {% endblock detail_content %}

Loading…
Cancel
Save