Fakultas Ilmu Komputer UI

navbar_katalog_materi.html 2.8 KB
Newer Older
1
  
Mikhael's avatar
Mikhael committed
2
3
    <nav class="navbar navbar-expand-lg navbar-light sticky-top shadow katalog-navbar"> <!-- Sidebar Toggle (Topbar) -->
        <a class="sidebar-brand-text navbar-brand" href="/">Digipus</a>
Josh Sudung's avatar
Josh Sudung committed
4
5
6
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarContent" aria-controls="navbarContent" aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"></span>
        </button>
7
      
Josh Sudung's avatar
Josh Sudung committed
8
9
10
11
12
        <div class="collapse navbar-collapse" id="navbarContent">
          <ul class="navbar-nav ml-auto">
            <li class="nav-item">
              <a class="nav-link" href="/forum">Forum</a>
            </li>
13
14
15
            <li class="nav-item">
              <a class="nav-link" href="/news/all">Berita</a>
            </li>
16
17
18
            <li class="user-guide">
              <a class="nav-link" href="/userguide/">User Guide</a>
            </li>
Josh Sudung's avatar
Josh Sudung committed
19
20
            {% if not request.user.is_authenticated %}
              <li class="nav-item">
Mikhael's avatar
Mikhael committed
21
22
23
24
25
26
27
28
                <div class="dropdown">
                  <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                  Registrasi</a>
                  <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
                    <a class="dropdown-item" href="/registrasi/umum">Umum</a>
                    <a class="dropdown-item" href="/registrasi">Kontributor</a>
                  </div>
                </div>
Josh Sudung's avatar
Josh Sudung committed
29
30
              </li>
              <li class="nav-item">
Mikhael's avatar
Mikhael committed
31
32
33
34
35
36
37
38
                <div class="dropdown">
                  <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                  Login</a>
                  <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
                    <a class="dropdown-item" href="/login">Kontributor</a>
                    <a class="dropdown-item" href="/login_admin">Admin</a>
                  </div>
                </div>
Josh Sudung's avatar
Josh Sudung committed
39
              </li>
40
41
            {% else %}
              {% if request.user.is_contributor %}
Josh Sudung's avatar
Josh Sudung committed
42
                <li class="nav-item">
43
                  <a class="nav-link" href="/dashboard">Dasbor</a>
Josh Sudung's avatar
Josh Sudung committed
44
                </li>
45
46
47
48
              {% elif request.user.is_admin %}
                  <li class="nav-item">
                    <a class="nav-link" href="/administration">Administrasi</a>
                  </li>
Josh Sudung's avatar
Josh Sudung committed
49
              {% endif %}
50
51
52
              <li class="nav-item">
                <a class="nav-link" href="/profil">Profil</a>
              </li>
Josh Sudung's avatar
Josh Sudung committed
53
54
55
56
57
58
              <li class="nav-item">
                <a class="nav-link" href="/logout">Logout</a>
              </li>
            {% endif %}
          </ul>
        </div>
59
    </nav>