<li>
{{#if children.length}}
    <span data-toggle="collapse"
          aria-expanded="false"
          aria-controls="view{{#if _id}}{{_id}}{{else}}{{viewId}}{{/if}}"
          data-target="#view{{#if _id}}{{_id}}{{else}}{{viewId}}{{/if}}">
        <i class="fa fa-angle-right"></i>
    </span>

    {{#if _id}}
    <a class="text-primary" href="{{routeTo 'umaResourcesMyLabels' _id}}">{{title}}</a>
    {{else}}
    <a class="text-primary" href="{{routeTo 'umaResourcesMyLabels' title}}">{{title}}</a>
    {{/if}}

    <ol class="collapse list-unstyled sidenav-submenu" id="view{{#if _id}}{{_id}}{{else}}{{viewId}}{{/if}}">
    {{#each children}}
        {{> templates/user/uma/views/resource/_NestedList }}
    {{/each}}
    </ol>

{{else}}
    <a class="no-arrow text-primary" href="{{routeTo 'umaResourcesMyLabels' _id}}">{{title}}</a></li>
{{/if}}
</li>
