<commit_before>{% import '_macro.twig' as macro %}

<div class="sidebar-collapse">
    <ul class="nav" id="side-menu">
        {% if app.session.get('user') is not null %}

            {# one omnisearch here, for "extra small", the other in the header-navbar #}
            <li class="sidebar-search">
                <form class="navbar-form visible-xs" role="search">
                    <div class="form-group has-feedback">
                        <label class="control-label" for="inputSuccess4">Omnisearch</label>
                        <input type="text" class="form-control omnisearch" placeholder="Omnisearch…" >
                        <span class="form-control-feedback"><i class="fa fa-search"></i></span>
                    </div>
                </form>
            </li>

            {# Link to Dashboard  #}
            <li class="{% if page_active in ['Standard', 'Dashboard'] %}active {% endif %}"><a href="{{ path('dashboard') }}">
                <span class="fa-stack">
                    <i class="fa fa-square fa-stack-2x"></i>
                    <i class="fa fa-dashboard fa-stack-1x fa-inverse" style="color: #333;"></i>
                </span>
                {{ __('Dashboard') }}</a>
            </li>

            <hr class="sidebar">

            <span class='heading'>{{ __('Content') }}</span>

            {# Menu with Contenttypes where show_in_menu is set true #}
            {% for slug, contenttype in app.config.get('contenttypes') %}
                {% if isallowed('contenttype:' ~ slug) and contenttype.show_in_menu %}
                    {% set title = { icon: contenttype.icon|default('files-o'), label: contenttype.name } %}
                    {% set sub = [
                    { icon: contenttype.icon|default('files-o'), label: __('View %contenttypes%', {'%contenttypes%': contenttype.name}), link: path('overview', { 'contenttypeslug': slug }) },
                    { icon: 'plus', label: __('New %contenttype%',{'%contenttype%': contenttype.singular_name}), link: path('editcontent', { 'contenttypeslug': slug, 'id': '' }), isallowed: 'contenttype:' ~ slug ~ ':create' },
                    '-',
                    ] %}
                    {% setcontent records = slug limit 4 %}
                    {% for record in records %}
                        {% set sub = sub|merge([{ icon: contenttype.icon_singular|default('file-text-o'), label: record.excerpt(80, true), link: path('editcontent', { 'contenttypeslug': slug, 'id': record.id }) }]) %}
                    {% endfor %}

                    {{ macro.sidebarblock(title, sub, '', true) }}

                {% endif %}
            {% endfor %}

            {# Menu with Contenttypes where show_in_menu is set false #}
            {% set title = { icon: contenttype.icon|default('th-list'), label: __('Other contenttypes') } %}
            {% set sub = [] %}
            {% for slug, contenttype in app.config.get('contenttypes') %}


                {% if isallowed('contenttype:' ~ slug) and not contenttype.show_in_menu %}

                    {% set sub = sub|merge([
                    { icon: contenttype.icon|default('th-list'), label: __('View %contenttypes%', {'%contenttypes%': contenttype.name}), link: path('overview', { 'contenttypeslug': slug }) },
                    { icon: 'plus', label: __('New %contenttype%',{'%contenttype%': contenttype.singular_name}), link: path('editcontent', { 'contenttypeslug': slug, 'id': '' }), isallowed: 'contenttype:' ~ slug ~ ':create' },
                    '-',
                    ]) %}

                {% endif %}

            {% endfor %}
            {{ macro.sidebarblock(title, sub) }}

            {# Menu with all settings #}
            {% if isallowed('settings') %}

            <hr class="sidebar">

            <span class='heading'>{{ __('Settings') }}</span>

            {% set title = { icon: 'cogs', label: __('Configuration') } %}
            {% set sub = [
                { icon: 'group', label: __('Users'), link: path('users'), isallowed: 'fileedit' },
                { icon: 'cog', label: __('Main configuration'), link: path('fileedit', { 'namespace':'app', 'file': 'config/config.yml'}), isallowed: 'files:config' },
                { icon: 'hdd-o', label: __('Contenttypes'), link: path('fileedit', { 'namespace':'app', 'file': 'config/contenttypes.yml'}), isallowed: 'files:config' },
                { icon: 'tags', label: __('Taxonomy'), link: path('fileedit', { 'namespace':'app', 'file': 'config/taxonomy.yml'}), isallowed: 'files:config' },
                { icon: 'sliders', label: __('Permissions'), link: path('fileedit', { 'namespace':'app', 'file': 'config/permissions.yml'}), isallowed: 'files:config' },
                '-',
                { icon: 'list', label: __('Menu setup'), link: path('fileedit', { 'namespace':'app', 'file': 'config/menu.yml'}), isallowed: 'files:config' },
                { icon: 'random', label: __('Routing setup'), link: path('fileedit', { 'namespace':'app', 'file': 'config/routing.yml'}), isallowed: 'files:config' },
                '-',
                { icon: 'briefcase', label: __('Configure Extensions'), link: path('extensions'), isallowed: 'extensions' },
                { icon: 'database', label: __('Check database'), link: path('dbcheck'), isallowed: 'dbupdate' },
                { icon: 'magic', label: __('Clear the cache'), link: path('clearcache'), isallowed: 'clearcache' },
                { icon: 'file', label: __('Activity log'), link: path('activitylog'), isallowed: 'activitylog' }

            ] %}

            {{ macro.sidebarblock(title, sub) }}

            {% if app.extensions.hasMenuoptions %}
                {% set title = { icon: 'briefcase', label: __('Extensions') } %}
                {% set sub = [] %}
                {% for extension in app.extensions.getMenuoptions %}
                    {% set sub = sub|merge([{ icon: extension.icon|default('icon-expand'), label: extension.label, link: extension.path }]) %}
                {% endfor %}
                {{ macro.sidebarblock(title, sub) }}
            {% endif %}
            
            {# Extensions #}
            <li class="{% if active in ['', 'extend'] %}active {% endif %}">
                <a href="{{ paths.root }}"><i class="icon-cog"></i> {{ __('Extend') }}</a>
            </li>

            <li class="divider-vertical"></li>
            <li><commit_msg>work on path<commit_after>{% import '_macro.twig' as macro %}

<div class="sidebar-collapse">
    <ul class="nav" id="side-menu">
        {% if app.session.get('user') is not null %}

            {# one omnisearch here, for "extra small", the other in the header-navbar #}
            <li class="sidebar-search">
                <form class="navbar-form visible-xs" role="search">
                    <div class="form-group has-feedback">
                        <label class="control-label" for="inputSuccess4">Omnisearch</label>
                        <input type="text" class="form-control omnisearch" placeholder="Omnisearch…" >
                        <span class="form-control-feedback"><i class="fa fa-search"></i></span>
                    </div>
                </form>
            </li>

            {# Link to Dashboard  #}
            <li class="{% if page_active in ['Standard', 'Dashboard'] %}active {% endif %}"><a href="{{ path('dashboard') }}">
                <span class="fa-stack">
                    <i class="fa fa-square fa-stack-2x"></i>
                    <i class="fa fa-dashboard fa-stack-1x fa-inverse" style="color: #333;"></i>
                </span>
                {{ __('Dashboard') }}</a>
            </li>

            <hr class="sidebar">

            <span class='heading'>{{ __('Content') }}</span>

            {# Menu with Contenttypes where show_in_menu is set true #}
            {% for slug, contenttype in app.config.get('contenttypes') %}
                {% if isallowed('contenttype:' ~ slug) and contenttype.show_in_menu %}
                    {% set title = { icon: contenttype.icon|default('files-o'), label: contenttype.name } %}
                    {% set sub = [
                    { icon: contenttype.icon|default('files-o'), label: __('View %contenttypes%', {'%contenttypes%': contenttype.name}), link: path('overview', { 'contenttypeslug': slug }) },
                    { icon: 'plus', label: __('New %contenttype%',{'%contenttype%': contenttype.singular_name}), link: path('editcontent', { 'contenttypeslug': slug, 'id': '' }), isallowed: 'contenttype:' ~ slug ~ ':create' },
                    '-',
                    ] %}
                    {% setcontent records = slug limit 4 %}
                    {% for record in records %}
                        {% set sub = sub|merge([{ icon: contenttype.icon_singular|default('file-text-o'), label: record.excerpt(80, true), link: path('editcontent', { 'contenttypeslug': slug, 'id': record.id }) }]) %}
                    {% endfor %}

                    {{ macro.sidebarblock(title, sub, '', true) }}

                {% endif %}
            {% endfor %}

            {# Menu with Contenttypes where show_in_menu is set false #}
            {% set title = { icon: contenttype.icon|default('th-list'), label: __('Other contenttypes') } %}
            {% set sub = [] %}
            {% for slug, contenttype in app.config.get('contenttypes') %}


                {% if isallowed('contenttype:' ~ slug) and not contenttype.show_in_menu %}

                    {% set sub = sub|merge([
                    { icon: contenttype.icon|default('th-list'), label: __('View %contenttypes%', {'%contenttypes%': contenttype.name}), link: path('overview', { 'contenttypeslug': slug }) },
                    { icon: 'plus', label: __('New %contenttype%',{'%contenttype%': contenttype.singular_name}), link: path('editcontent', { 'contenttypeslug': slug, 'id': '' }), isallowed: 'contenttype:' ~ slug ~ ':create' },
                    '-',
                    ]) %}

                {% endif %}

            {% endfor %}
            {{ macro.sidebarblock(title, sub) }}

            {# Menu with all settings #}
            {% if isallowed('settings') %}

            <hr class="sidebar">

            <span class='heading'>{{ __('Settings') }}</span>

            {% set title = { icon: 'cogs', label: __('Configuration') } %}
            {% set sub = [
                { icon: 'group', label: __('Users'), link: path('users'), isallowed: 'fileedit' },
                { icon: 'cog', label: __('Main configuration'), link: path('fileedit', { 'namespace':'app', 'file': 'config/config.yml'}), isallowed: 'files:config' },
                { icon: 'hdd-o', label: __('Contenttypes'), link: path('fileedit', { 'namespace':'app', 'file': 'config/contenttypes.yml'}), isallowed: 'files:config' },
                { icon: 'tags', label: __('Taxonomy'), link: path('fileedit', { 'namespace':'app', 'file': 'config/taxonomy.yml'}), isallowed: 'files:config' },
                { icon: 'sliders', label: __('Permissions'), link: path('fileedit', { 'namespace':'app', 'file': 'config/permissions.yml'}), isallowed: 'files:config' },
                '-',
                { icon: 'list', label: __('Menu setup'), link: path('fileedit', { 'namespace':'app', 'file': 'config/menu.yml'}), isallowed: 'files:config' },
                { icon: 'random', label: __('Routing setup'), link: path('fileedit', { 'namespace':'app', 'file': 'config/routing.yml'}), isallowed: 'files:config' },
                '-',
                { icon: 'briefcase', label: __('Configure Extensions'), link: path('extensions'), isallowed: 'extensions' },
                { icon: 'database', label: __('Check database'), link: path('dbcheck'), isallowed: 'dbupdate' },
                { icon: 'magic', label: __('Clear the cache'), link: path('clearcache'), isallowed: 'clearcache' },
                { icon: 'file', label: __('Activity log'), link: path('activitylog'), isallowed: 'activitylog' }

            ] %}

            {{ macro.sidebarblock(title, sub) }}

            {% if app.extensions.hasMenuoptions %}
                {% set title = { icon: 'briefcase', label: __('Extensions') } %}
                {% set sub = [] %}
                {% for extension in app.extensions.getMenuoptions %}
                    {% set sub = sub|merge([{ icon: extension.icon|default('icon-expand'), label: extension.label, link: extension.path }]) %}
                {% endfor %}
                {{ macro.sidebarblock(title, sub) }}
            {% endif %}
            
            {# Extensions #}
            <li class="{% if active in ['', 'extend'] %}active {% endif %}">
                <a href="{{ paths.bolt }}extend"><i class="icon-cog"></i> {{ __('Extend') }}</a>
            </li>

            <li class="divider-vertical"></li>
            <li>
{'fraction_non_alphanumeric': 0.18556379243074522, 'fraction_numerical': 0.0014046039797112758, 'mean_word_length': 2.1114348142753094, 'pattern_counts': {'":': 0, '<': 83, '<?xml version=': 0, '>': 83, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4497304', 'n_tokens_mistral': 3784, 'n_tokens_neox': 3438, 'n_words': 827}