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.
89 lines
2.9 KiB
89 lines
2.9 KiB
{% extends "crud/detail.html" %}
|
|
{% load i18n crispy_forms_tags %}
|
|
{% block actions %}{% endblock %}
|
|
{% block sections_nav %}{% endblock %}
|
|
{% block detail_content %}
|
|
|
|
{% if not filter_url %}
|
|
{% crispy filter.form %}
|
|
{% endif %}
|
|
|
|
{% if filter_url %}
|
|
{% if object_list.count > 0 %}
|
|
{% if object_list.count == 1 %}
|
|
<h3 style="text-align: right;">{% trans 'Pesquisa concluída com sucesso! Foi encontrada 1 matéria.'%}</h3>
|
|
{% else %}
|
|
<h3 style="text-align: right;">{% blocktrans with object_list.count as total_materias %}Foram encontradas {{total_materias}} matérias.{% endblocktrans %}</h3>
|
|
{% endif %}
|
|
{% else %}
|
|
<tr><td><h3 style="text-align: right;">Nenhuma matéria encontrada.</h3></td></tr>
|
|
{% endif %}
|
|
<form method="POST">
|
|
{% csrf_token %}
|
|
<fieldset>
|
|
<legend>Documento Acessório</legend>
|
|
<div class="row">
|
|
<div class="col-md-4">
|
|
<label>Tipo*</label>
|
|
<select name="tipo" class="form-control" required="True">
|
|
{% for t in tipos_docs %} <option>{{t}}</option> {% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<label>Nome*</label>
|
|
<input type="text" name="nome" class="form-control" required="True">
|
|
</div>
|
|
|
|
<div class="col-md-4">
|
|
<label>Data*</label>
|
|
<input type="text" name="data" class="form-control dateinput" required="True">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<label>Autor*</label>
|
|
<input type="text" name="autor" class="form-control" required="True">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<label>Ementa</label>
|
|
<textarea name="ementa" class="textarea form-control" cols="40" rows="10"></textarea>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<label>Texto Integral*</label>
|
|
<input type="file" name="arquivo" required="True">
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
|
|
<br /><br /><br />
|
|
|
|
<fieldset>
|
|
<legend>Matérias para inclusão do Documento Acessório</legend>
|
|
<table class="table table-striped table-hover">
|
|
<thead>
|
|
<tr><th>Matéria</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for materia in object_list %}
|
|
<tr>
|
|
<td>
|
|
<input type="checkbox" name="materia_id" value="{{materia.id}}" {% if check %} checked {% endif %}/>
|
|
{{materia.tipo.sigla}} {{materia.numero}}/{{materia.ano}} - {{materia.tipo.descricao}}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</fieldset>
|
|
<input type="submit" value="Salvar" class="btn btn-primary"S>
|
|
</form>
|
|
{% endif %}
|
|
{% endblock detail_content %}
|
|
|