Implement private option as hide until auth is added
This commit is contained in:
parent
a51a60c171
commit
f626c86f8a
|
@ -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 %}└{% else %}├{% 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>
|
||||
|
|
Loading…
Reference in New Issue