Fakultas Ilmu Komputer UI

navigation.html 2.73 KB
Newer Older
Samuel Dimas Partogi's avatar
Samuel Dimas Partogi committed
1
2
3
4
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">

    <!-- Sidebar Toggle (Topbar) -->
    <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
5
        <em class="fa fa-bars"></em>
Samuel Dimas Partogi's avatar
Samuel Dimas Partogi committed
6
7
8
9
10
11
12
    </button>

    <div class="sidebar-brand-text mx-3">Diskominfo Kota Depok</div>

    <!-- Topbar Navbar -->
    <ul class="navbar-nav ml-auto">

13
        {% if request.user.is_contributor %}
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
        <li class="nav-item dropdown">
            <a id="notifBtn" class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Notifikasi</a>
            <div class="dropdown-menu show" aria-labelledby="notifBtn">
                {% if kontributor_notif %}
                    {% for notif in kontributor_notif %}
                        <a class="dropdown-item" style="white-space: break-spaces;" href="{% url 'dashboard' %}">Materi "{{notif.materi.title}}" <br>{{ notif }}</a>
                        <div class="dropdown-divider"></div>
                    {% endfor %}
                {% else %}
                    <a class="dropdown-item disabled" href="#" style="white-space: break-spaces;">Anda tidak memiliki notifikasi baru</a>
                {% endif %}
              </div>
            </a>
        </li>
        
Samuel Dimas Partogi's avatar
Samuel Dimas Partogi committed
29
30
31
32
33
        <li class="nav-item">
            <a class="nav-link" href="/dashboard/">
                <span class="mr-2 d-none d-lg-inline text-gray-600 small">Dasbor</span>
            </a>
        </li>
34
        {% endif %}
Samuel Dimas Partogi's avatar
Samuel Dimas Partogi committed
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65

        <li class="nav-item">
            <a class="nav-link" href="/profil/">
                <span class="mr-2 d-none d-lg-inline text-gray-600 small">Profil</span>
            </a>
        </li>

        <li class="nav-item">
            <a class="nav-link" href="/logout/">
                <span class="mr-2 d-none d-lg-inline text-gray-600 small">Logout</span>
            </a>
        </li>

        <div class="topbar-divider d-none d-sm-block"></div>

        <!-- Nav Item - User Information -->
        <li class="nav-item dropdown no-arrow">
            <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button"
                data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <span class="mr-2 d-none d-lg-inline text-gray-600 small">{{ user.name }}</span>
                {% if not user.default_profile_picture %}
                <img class="img-profile rounded-circle" src="https://i.ibb.co/9wgPzyZ/default-image.png" alt="User profile picture">
                {% else %}
                <img class="img-profile rounded-circle" src="{{ user.profile_picture.url }}" alt="User profile picture">
                {% endif %}
            </a>
        </li>

    </ul>

</nav>