mirror of https://github.com/interlegis/sapl.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
2.1 KiB
79 lines
2.1 KiB
{% extends "materia/materialegislativa_detail.html" %}
|
|
{% load i18n %}
|
|
{% load crispy_forms_tags %}
|
|
|
|
{% block detail_content %}
|
|
<fieldset>
|
|
<legend>Matéria Legislativa</legend>
|
|
<ul class="small-block-grid-3 medium-block-grid-3 large-block-grid-3">
|
|
<li>Tipo: <b>{{materialegislativa.tipo.sigla}}</b></li>
|
|
<li>Número: <b>{{materialegislativa.numero}}</b></li>
|
|
<li>Ano: <b>{{materialegislativa.ano}}</b></li>
|
|
</ul>
|
|
Ementa: <b>{{materialegislativa.ementa}}</b>
|
|
|
|
<fieldset>
|
|
<legend>Autorias</legend>
|
|
<table>
|
|
<tr>
|
|
<th>Nome Autor</th>
|
|
<th>Tipo Autor</th>
|
|
<th>Primeiro Autor</th>
|
|
</tr>
|
|
{% for a in autorias %}
|
|
<tr>
|
|
<td><a href="{% url 'autoria_edit' materialegislativa.id a.autor.id %}">{{a.autor}}</a></td>
|
|
<td>{{a.autor.tipo.descricao}}</td>
|
|
<td>{{a.primeiro_autor|yesno:"Sim,Não"}}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</fieldset>
|
|
|
|
<fieldset>
|
|
<legend>Adicionar Autoria</legend>
|
|
{% if error %} <h5 align="center"><font color="#FF0000">{{ error }}</font></h5> {% endif %}
|
|
|
|
<ul class="small-block-grid-3 medium-block-grid-3 large-block-grid-3">
|
|
<li>Tipo do Autor</li>
|
|
<li>Nome Autor</li>
|
|
<li>Primeiro Autor</li>
|
|
</ul>
|
|
<form method="POST">
|
|
{% csrf_token %}
|
|
|
|
<ul class="small-block-grid-3 medium-block-grid-3 large-block-grid-3">
|
|
<li>
|
|
<select name="tipo_autor" onChange="form.submit();">
|
|
{% for tipo in tipo_autores %}
|
|
<option value="{{tipo.id}}" {% if tipo.id == tipo_autor_id %} selected {% endif %}>
|
|
{{tipo.descricao}}
|
|
</option>
|
|
{% endfor %}
|
|
</select>
|
|
</li>
|
|
|
|
<li>
|
|
<select name="nome_autor">
|
|
{% for a in autores %}
|
|
{% if a.tipo_id == tipo_autor_id %}
|
|
<option value="{{a.id}}">
|
|
{{a}}
|
|
</option>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</select>
|
|
</li>
|
|
|
|
<li>
|
|
<select name="primeiro_autor">
|
|
<option value="1">Sim</option>
|
|
<option value="0" selected>Não</option>
|
|
</select>
|
|
</li>
|
|
</ul>
|
|
<input type="submit" name="salvar" value="Salvar" class="button primary">
|
|
</form>
|
|
</fieldset>
|
|
</fieldset>
|
|
{% endblock %}
|