Skip to content

Commit

Permalink
Adiciona ícones sobre os campos
Browse files Browse the repository at this point in the history
  • Loading branch information
berinhard authored and turicas committed Sep 14, 2021
1 parent fb96179 commit dadf8b0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
5 changes: 0 additions & 5 deletions api/templates/api/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
<li><a href="#{{ dataset.slug }}">{{ dataset.name }}</a></li>
{% endfor %}
</ul>

<span>Legendas</span>
<ul style="margin: 0">
<li><small><i class="fa fa-search"></i> Campos que permitem filtragem via query string na URL</small></li>
</ul>
</div>
</div>
</div>
Expand Down
19 changes: 16 additions & 3 deletions api/templates/api/snippets/dataset_docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,22 @@ <h6>Colunas</h6>

<ul class="table-fields">
{% for field in table.fields %}
{% if field.show %}
<li><code>{{ field.name }}</code> ({{ field.get_type_display }}): {{ field.title }} </li>
{% endif %}
<li><code>{{ field.name }}</code> ({{ field.get_type_display }})

{% if field.show %}
{% if field.show_on_frontend %}<i class="fa fa-eye" title="Esse campo é visível na interface Web, na API e no download completo"></i>{% endif %}
{% if not field.show_on_frontend %}<i class="fa fa-low-vision" title="Esse campo não é visível na interface Web, apenas na API e no download completo"></i>{% endif %}
{% else %}
{% if not field.show_on_frontend %}<i class="fa fa-eye-slash" title="Esse campo é usado internamente e fica visível apenas no download completo"></i>{% endif %}
{% endif %}

{% if field.frontend_filter %}<i class="fa fa-filter" title="Você pode fazer filtros por esse campo na interface Web e na API"></i>{% endif %}

{% if field.searchable %}<i class="fa fa-search" title="Você pode utilizar a busca de texto completo nesse campo"></i>{% endif %}

{% if field.has_choices %}<i class="fa fa-list-ul" title="Esse campo possui valores categóricos"></i>{% endif %}

: {{ field.title }} </li>
{% endfor %}
</ul>
{% endif %}
Expand Down

0 comments on commit dadf8b0

Please sign in to comment.