menu.blade.php 9.15 KB
<div class="cabinet__side-item">
    <div class="cabinet__menu">
        <button type="button" class="cabinet__menu-toper js-toggle">
            <span class="cabinet__menu-toper-text"></span>
        <i class="cabinet__menu-toper-arrow">
            <svg>
                <use xlink:href="{{ asset('images/sprite.svg#arrow') }}"></use>
            </svg>
        </i>
        </button>
        <div class="cabinet__menu-body">
            <div class="cabinet__menu-items">
                <a href="{{ route('employer.employer_info') }}" class="cabinet__menu-item @if ($item==0) active @endif">
                    <i>
                        <svg>
                            <use xlink:href="{{ asset('images/sprite.svg#cabinet-1') }}"></use>
                        </svg>
                    </i>
                    <span>Личные данные</span>
                </a>
                <a href="{{ route('employer.cabinet') }}" class="cabinet__menu-item @if ($item==1) active @endif">
                    <i>
                        <svg>
                            <use xlink:href="{{ asset('images/sprite.svg#user_alt') }}"></use>
                        </svg>
                    </i>
                    <span>Профиль</span>
                </a>
                @if ((!Auth()->user()->is_worker) && (Auth()->user()->is_public))
                <a href="{{ route('employer.cabinet_vacancie') }}" class="cabinet__menu-item @if ($item==2) active @endif">
                    <i>
                        <svg>
                            <use xlink:href="{{ asset('images/sprite.svg#cabinet-2') }}"></use>
                        </svg>
                    </i>
                    <span>Разместить вакансию</span>
                </a>
                @else
                    <a href="{{ route('employer.cabinet_vacancie_danger') }}" class="cabinet__menu-item @if ($item==2) active @endif">
                        <i>
                            <svg>
                                <use xlink:href="{{ asset('images/sprite.svg#cabinet-2') }}"></use>
                            </svg>
                        </i>
                        <span>Разместить вакансию</span>
                    </a>
                @endif
                <a href="{{ route('employer.vacancy_list') }}" class="cabinet__menu-item @if ($item==3) active @endif">
                    <i>
                        <svg>
                            <use xlink:href="{{ asset('images/sprite.svg#cabinet-3') }}"></use>
                        </svg>
                    </i>
                    <span>Мои вакансии</span>
                </a>
                <a href="{{ route('employer.messages', ['type_message' => 'input']) }}" class="cabinet__menu-item @if ($item==5) active @endif">
                    <i>
                        <svg>
                            <use xlink:href="{{ asset('images/sprite.svg#cabinet-5') }}"></use>
                        </svg>
                    </i>
                    <span>Сообщения</span>
                </a>
                <a href="{{ route('employer.favorites') }}" class="cabinet__menu-item @if ($item==6) active @endif">
                    <i>
                        <svg>
                            <use xlink:href="{{ asset('images/sprite.svg#cabinet-6') }}"></use>
                        </svg>
                    </i>
                    <span>Избранные кандидаты</span>
                </a>
                <a href="{{ route('employer.autolift') }}" class="cabinet__menu-item @if ($item==15) active @endif">
                    <i>
                        <svg>
                            <use xlink:href="{{ asset('images/sprite.svg#refresh') }}"></use>
                        </svg>
                    </i>
                    <span>Автоподнятие вакансий</span>
                </a>
                @if ((!Auth()->user()->is_worker) && (Auth()->user()->is_lookin))
                <a href="{{ route('employer.bd') }}" class="cabinet__menu-item @if ($item==7) active @endif">
                    <i>
                        <svg>
                            <use xlink:href="{{ asset('images/sprite.svg#cabinet-7')}}"></use>
                        </svg>
                    </i>
                    <span>База данных</span>
                </a>
                <a href="{{ route('bd_resume') }}" target="_blank" class="cabinet__menu-item @if ($item==8) active @endif">
                    <i>
                        <svg>
                            <use xlink:href="{{ asset('images/sprite.svg#cabinet-8') }}"></use>
                        </svg>
                    </i>
                    <span>База резюме</span>
                </a>
                @endif
                <a href="{{ route('employer.send_all_messages') }}" class="cabinet__menu-item @if ($item==9) active @endif">
                    <i>
                        <svg>
                            <use xlink:href="{{ asset('images/sprite.svg#cabinet-9') }}"></use>
                        </svg>
                    </i>
                    <span>Рассылка сообщений</span>
                </a>
                <a href="{{ route('employer.autoresponder') }}" class="cabinet__menu-item @if ($item==16) active @endif">
                    <i>
                        <svg>
                            <use xlink:href="{{ asset('images/sprite.svg#answering') }}"></use>
                        </svg>
                    </i>
                    <span>Автоответчик</span>
                </a>
                <a href="{{ route('employer.faq') }}" class="cabinet__menu-item @if ($item==10) active @endif">
                    <i>
                        <svg>
                            <use xlink:href="{{ asset('images/sprite.svg#cabinet-10') }}"></use>
                        </svg>
                    </i>
                    <span>FAQ</span>
                </a>
                <a href="{{ route('employer.slider_flot') }}" class="cabinet__menu-item @if ($item==12) active @endif">
                    <i>
                        <svg>
                            <use xlink:href="{{ asset('images/sprite.svg#cabinet-11') }}"></use>
                        </svg>
                    </i>
                    <span>Мой флот</span>
                </a>

                <nav>
                    <ul class="drop-down closed">
                        <li>
                            <a style="background-color: white" class="nav-button cabinet__menu-item">
                                <i>
                                    <svg>
                                        <use xlink:href="{{ asset('images/sprite.svg#settings') }}"></use>
                                    </svg>
                                </i>
                                <span>Настройки</span>
                            </a>
                        </li>
                        <li>
                            <a href="{{ route('employer.subscribe') }}" class="cabinet__menu-item @if ($item==11) active @endif">
                                <i><svg>
                                    <use xlink:href="{{ asset('images/sprite.svg#cabinet-11') }}"></use>
                                </svg></i>
                                <span>Настройки уведомлений</span>
                            </a>
                        </li>
                        <li>
                            <a href="{{ route('employer.password_reset') }}" class="cabinet__menu-item green @if ($item==13) active @endif">
                                <i></i>
                                <span>Сменить пароль</span>
                            </a>
                        </li>
                        <li>
                            <a href="{{ route('employer.delete_people') }}" class="cabinet__menu-item red @if ($item==14) active @endif">
                                <i></i>
                                <span>Удалить профиль</span>
                            </a>
                        </li>
                    </ul>
                </nav>
            </div>
            <div class="cabinet__menu-bottom">
                <a href="{{ route('logout') }}" class="button cabinet__menu-leave">
                    <svg>
                        <use xlink:href="{{ asset('images/sprite.svg#leave') }}"></use>
                    </svg>
                    Выход
                </a>
                <span class="cabinet__menu-copy">
                    &copy; 2020 &ndash; Rekamore.su
                </span>
            </div>
        </div>
    </div>
</div>

<script>
    $(function(){
        var active_menu = $('.cabinet__menu-item.active');
        if (active_menu.length === 1){
            $('.cabinet__menu-toper-text').html(active_menu.html());
        }
    });

    $(function() {
        // Bind Click event to the drop down navigation button
        $(".nav-button").click(function() {
            /*  Toggle the CSS closed class which reduces the height of the UL thus
                hiding all LI apart from the first */
            $(this).parent().parent().toggleClass("closed");
        });

    });
</script>