Browse Source

Adiciona link a campos URL no detail e listagem

pull/701/head
Eduardo Edson Batista Cordeiro Alves 8 years ago
parent
commit
817782a853
  1. 7
      sapl/templates/crud/detail_detail.html
  2. 6
      sapl/templates/crud/list.html

7
sapl/templates/crud/detail_detail.html

@ -37,8 +37,11 @@
<div id="div_id_{{ column.id }}" class="form-group"> <div id="div_id_{{ column.id }}" class="form-group">
<p class="control-label">{{ column.verbose_name }}</p> <p class="control-label">{{ column.verbose_name }}</p>
<div class="controls"> <div class="controls">
<div class="form-control-static">{{ column.text|safe }}</div> {% if column.text|url %}
</div> <div class="form-control-static"><a href="{{ column.text|safe }}"> {{ column.text|safe }} </a></div>
{% else %}
<div class="form-control-static">{{ column.text|safe }}</div>
{% endif %} </div>
</div> </div>
</div> </div>
{% endfor %} {% endfor %}

6
sapl/templates/crud/list.html

@ -60,7 +60,11 @@
{% if href %} {% if href %}
<a href="{{ href }}">{{ value|safe }}</a> <a href="{{ href }}">{{ value|safe }}</a>
{% elif valu != 'core.Cep.None' %} {% elif valu != 'core.Cep.None' %}
{{ value|safe }} {% if value|url %}
<a href="{{ value|safe }}"> {{ value|safe }} </a></div>
{% else %}
{{ value|safe }}
{% endif %}
{% endif %} {% endif %}
</td> </td>
{% endfor %} {% endfor %}

Loading…
Cancel
Save