<ul class="main-navigation nav-collapse collapse">

    {% if settings.side_menu_dashboard %}
    <li class="main-menu">
        <a class="no-submenu" href="{{ '/'|link }}"><span class="awe-home"></span>{{ 'Dashboard'|trans }}</a>
    </li>
    {% endif %}
    
    {% if settings.side_menu_order %}
    <li class="main-menu">
        <a href="#" class="order-button"><span class="awe-shopping-cart"></span>{{ 'Order'|trans }}</a>
    </li>
    {% endif %}

    {% if settings.side_menu_support %}
    <li class="main-menu">
        <a href="{{ '/support'|link }}"><span class="awe-wrench"></span>{{ 'Support'|trans }}</a>
    </li>
    {% endif %}

    {% if settings.side_menu_services %}
    <li class="main-menu">
        <a href="{{ '/order/service'|link }}"><span class="awe-cogs"></span>{{ 'Services'|trans }}</a>
    </li>
    {% endif %}

    {% if settings.side_menu_invoices %}
    <li class="main-menu">
        <a href="{{ '/invoice'|link }}"><span class="awe-file-alt"></span>{{ 'Invoices'|trans }}</a>
    </li>
    {% endif %}

    {% if settings.side_menu_emails %}
    <li class="main-menu">
        <a  href="{{ '/email'|link }}"><span class="awe-envelope-alt"></span>{{ 'Emails'|trans }}</a>
    </li>
    {% endif %}

    {% if settings.side_menu_payments %}
    <li class="main-menu">
        <a href="{{ '/client/balance'|link }}"><span class="awe-credit-card"></span>{{ 'Payments history'|trans }}</a>
    </li>
    {% endif %}

    {% if guest.extension_is_on({"mod":"news"}) %}
    <li class="main-menu">
        <a href="{{ '/news'|link }}"><span class="awe-edit"></span>{{ 'Blog'|trans }}</a>
    </li>
    {% endif %}

    {% if guest.extension_is_on({"mod":"kb"}) %}
    <li class="main-menu">
        <a href="{{ '/kb'|link }}"><span class="awe-book"></span>{{ 'Knowledge Base'|trans }}</a>
    </li>
    {% endif %}

    {% if guest.extension_is_on({"mod":"forum"}) %}
    <li class="main-menu">
        <a href="{{ '/forum'|link }}"><span class="awe-comments"></span>{{ 'Forum'|trans }}</a>
    </li>
    {% endif %}
</ul>

<script type="text/javascript">
    $('.main-menu').each(function(index){
        var menu_link = $(this).children('a').attr('href');
        if ("{{ guest.system_current_url }}" =="{{ '/'|link }}"){
            $('.main-menu:first').addClass("current");
        }
        else if ('{{ guest.system_current_url }}'.indexOf(menu_link) >= 0 && menu_link != "{{ '/'|link }}"){
            $(this).addClass("current");
      }
    });

</script>