Implement private option as hide until auth is added

This commit is contained in:
Tim Van Baak 2021-02-12 17:11:52 -08:00
parent a51a60c171
commit f626c86f8a
1 changed files with 8 additions and 2 deletions

View File

@ -38,22 +38,26 @@ window.onload = function () {
<div id="{{ tab.name }}-page" class="tab-page{% if selected %} tab-page-selected{% endif %}">
<table id="{{ tab.name }}-page-table" class="page-table">
{% for tag in tab.tags %}
{%- if not tag.options.private -%}
<tr {% if tab.options.hide_names %}class="hide-tag-name"{% endif %}>
<td>{{ tag.name }}</td>
<td>{{ make_tag_value(tag) }}</td>
</tr>
{%- endif -%}
{% for subtag in tag.subtags %}
{%- if not tag.options.private and not subtag.options.private -%}
<tr {% if tab.options.hide_names %}class="hide-tag-name"{% endif %}>
<td>{% if loop.last %}&#9492;{% else %}&#9500;{% endif %} {{ subtag.name }}</td>
<td>{{ make_tag_value(subtag) }}</td>
</tr>
{%- endif -%}
{% endfor %}
{% endfor %}
</table>
</div>
{% endmacro %}
{# TODO: tag.interlink and tag.private support #}
{# TODO: tag.interlink #}
{% macro make_tag_value(tag) -%}
{%- if tag.options.hyperlink -%}
<a href="{{ tag.value }}">{{ tag.value }}</a>
@ -62,11 +66,13 @@ window.onload = function () {
{%- endif -%}
{%- endmacro %}
{# TODO: tab.priority and tab.private support #}
{# TODO: tab.priority support #}
{% block page_content %}
<div id="tabs">
{%- for tab in document -%}
{%- if not tab.options.private -%}
{{ make_content_tab(tab, loop.first) }}
{%- endif -%}
{%- endfor -%}
{%- if not index -%}
<div id="index" class="tab tab-right"><a href="/index/">index</a></div>