extends layout

block navbar
    ul#slide-out.sidenav
        if session.user.permissions === 1
            li
                .user-view.student
                    p
                        span.white-text.name=session.user.firstName + " " + session.user.lastName
                    p
                        if session.user.Groups[session.user.Groups.length-1]
                            if session.user.Groups[session.user.Groups.length-1].number.startsWith("G")
                                span.white-text.name=session.user.Groups[session.user.Groups.length-1].number + session.user.Groups[session.user.Groups.length-1].Semester.name
                            else
                                span.white-text.name=session.user.Groups[session.user.Groups.length-1].Semester.name + " " + session.user.Groups[session.user.Groups.length-1].number
                    p
                        span.white-text.email=session.user.email

            li
                a(href="/" class="waves-effect") Home
            li
                a(href="/edt" class="waves-effect") Planning
            li(class="active")
                a(href="/marks" class="waves-effect") Marks
            li
                a(href="https://mail.univ-lyon1.fr/owa/" class="waves-effect") Mail
            li
                a(href="https://clarolineconnect.univ-lyon1.fr/" class="waves-effect") Claroline
            li
                a(href="/viescol" class="waves-effect") School and student life

        if session.user.permissions === 2
            li
                .user-view.teacher
                    p(href='#name')
                        span.white-text.name=session.user.firstName + " " + session.user.lastName
                    p(href='#email')
                        span.white-text.email=session.user.email
            li
                a(href="/" class="waves-effect") Home
            li
                a(href="/edt" class="waves-effect") Planning
            li(class="active")
                a(href="/marks" class="waves-effect") Marks
            li
                a(href="https://mail.univ-lyon1.fr/owa/" class="waves-effect") Mail
            li
                a(href="https://clarolineconnect.univ-lyon1.fr/" class="waves-effect") Claroline
            li
                a(href="/viescol" class="waves-effect") School and student life

        if session.user.permissions === 3
            li
                .user-view.admin
                    p(href='#name')
                        span.white-text.name=session.user.firstName + " " + session.user.lastName
                    p(href='#email')
                        span.white-text.email=session.user.email
            li
                a(href="/" class="waves-effect") Home
            li(class="active")
                a(href="/marks" class="waves-effect") Marks
            li
                a(href="/viescol" class="waves-effect") School and student life
            li
                a(href="/viescol" class="waves-effect") Profil Edition

    a.sidenav-trigger(href='#' data-target='slide-out')#hamburger
        i.material-icons.medium menu