seitime-frappe/frappe/templates/includes/sidebar.html
2014-07-09 18:48:29 +05:30

19 lines
816 B
HTML

<div class="sidebar-exists"></div>
{% if children -%}
{%- for child in children -%}
<div class="sidebar-item">
{% set is_parent = parents and child.name == parents[-1].name or (loop.first and child.name==pathname) %}
{% set has_children = (child.lft != None) and (child.rgt - child.lft != 1) and (not loop.first) %}
<i class="{% if has_children %} icon-chevron-right {% endif %} icon-fixed-width"
style="color: #ddd; {% if is_parent %} margin-left: -30px;
{% else %} margin-left: -18px;
{% endif %}"></i>
<a href="{{ child.name }}" class="no-decoration {% if child.name == pathname %}active{% endif %}">
{{ child.page_title or child.name.replace("_", " ").title() }}
{% if not child.public_read %}
(<i class="icon-fixed-width icon-lock"></i>)
{% endif %}
</a>
</div>
{%- endfor -%}
{%- endif %}