Sistema de Apoio ao Processo Legislativo
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.
 
 
 
 
 

59 lines
1.5 KiB

{% extends "crud/detail.html" %}
{% load i18n %}
{% load crispy_forms_tags %}
{% load common_tags %}
{% block actions %}{% endblock %}
{% block detail_content %}
{% if perms|get_add_perm:view %}
{% if expedientes|length == 0 %}
<div class="alert alert-danger alert-dismissible fade in" role="alert">
Não há nenhum expediente cadastrado. <br />
Cique <a href="{% url 'sapl.sessao:tipoexpediente_create'%}">aqui</a> para cadastrar um novo.
</div>
{% else %}
<form method="post">
{% csrf_token %}
{% for e in expedientes %}
<fieldset class="form-group">
<legend>{{e.tipo}}</legend>
<input type="hidden" name="tipo" id="tipo" value="{{e.tipo.id}}" class="form-control"/>
<textarea rows="5" cols="50" name="conteudo" id="conteudo" class="form-control">{{e.conteudo}}</textarea>
<br />
</fieldset>
{% endfor %}
<br />
<input type="submit" value="Salvar" class="btn btn-primary"/>
</form>
{% endif %}
{% else %}
{% for e in expedientes %}
<fieldset class="form-group">
<legend>{{e.tipo}}</legend>
<textarea rows="5" cols="50" name="conteudo" id="conteudo" class="form-control">{{e.conteudo}}</textarea>
<br />
</fieldset>
{% endfor %}
{% endif %}
{% endblock detail_content %}
<!-- Texto RICO -->
{% block extra_js %}
{% if perms|get_add_perm:view %}
<script language="JavaScript">
initTinymce(null);
</script>
<!-- Se nao tiver permissao, o texto rico fica readonly -->
{% else %}
<script language="JavaScript">
initTinymce(null, true);
</script>
{% endif %}
{% endblock %}