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.
 
 
 
 
 

62 lines
2.5 KiB

{% extends "crud/detail.html" %}
{% load i18n common_tags%}
{% block detail_content %}
{% for fieldset in view.layout_display %}
<h2 class="legend">{{ fieldset.legend }}</h2>
{% for row in fieldset.rows %}
<div class="row-fluid">
{% for column in row %}
<div class="col-sm-{{ column.span }}">
<div id="div_id_{{ column.id }}" class="form-group">
<p class="control-label">{{ column.verbose_name }}</p>
<div class="controls">
{% comment %}TODO Transformar os links em URLs diretamente no CRUD{% endcomment %}
{% if column.text|url %}
<div class="form-control-static"><a href="{{ column.text|safe }}"> {{ column.text|safe }} </a></div>
{% elif column.verbose_name == 'Matéria' %}
{% if object.materia.id %}
<div class="form-control-static"><a href="{% url 'sapl.materia:materialegislativa_detail' object.materia.id %}"> {{ column.text|safe }} </a></div>
{% else %}
<div class="form-control-static">{{ column.text|safe }}</div>
{% endif %}
{% else %}
<div class="form-control-static">{{ column.text|safe }}</div>
{% endif %}
</div>
</div>
</div>
{% endfor %}
</div>
{% endfor %}
{% endfor %}
<hr />
<div class="row-fluid">
<div class="col-sm-12">
<p class="control-label">Relacionamentos</p>
{% if principais|length > 0 %}
{% for p in principais %}
<div class="form-control-static">
<b>{{ p.tipo_vinculo.descricao_ativa }}</b>&nbsp;
<a href="{% url 'sapl.norma:normajuridica_detail' p.norma_relacionada.pk %}">
{{ p.norma_relacionada }}
</a>
</div>
{% endfor %}
{% endif %}
{% if relacionadas|length > 0 %}
{% for r in relacionadas %}
<div class="form-control-static">
<b>{{ r.tipo_vinculo.descricao_passiva }}</b>&nbsp;
<a href="{% url 'sapl.norma:normajuridica_detail' r.norma_principal.pk %}">
{{ r.norma_principal }}
</a>
</div>
{% endfor %}
{% endif %}
</div>
</div>
{% endblock detail_content %}