Update top and left nav to check for roles being granted instead of jobs
This commit is contained in:
parent
2726a00502
commit
59ea833841
@ -16,16 +16,28 @@
|
||||
<hr class="horizontal dark mt-0 mb-2">
|
||||
<div class="collapse navbar-collapse w-auto " id="sidenav-collapse-main">
|
||||
<ul class="navbar-nav">
|
||||
{% if app.user.job.name == 'ADMIN' %}
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<li class='nav-item'>
|
||||
<a class="{{ admin_dashboard }}" href="/index.php/admin-dashboard">
|
||||
<i class="material-symbols-rounded opacity-5">dashboard</i>
|
||||
<span class="nav-link-text ms-1">Admin Dashboard</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class='nav-item'>
|
||||
<a class='{{ case_list }}' href='/index.php/list-cases'>
|
||||
<i class='material-symbols-rounded opacity-5'>cases</i>
|
||||
<span class='nav-link-text ms-1'>Case List</span>
|
||||
</a>
|
||||
</li>
|
||||
<li clas='nav-item'>
|
||||
<a class='{{ referral_sources }}' href='/index.php/list-referral-sources'>
|
||||
<i class='material-symbols-rounded opacity-5'>groups</i>
|
||||
<span class='nav-link-text ms-1'>Referral Sources</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if app.user.job.name == 'CASE_MANAGER' %}
|
||||
{% if is_granted('ROLE_CASE_MANAGER') %}
|
||||
<li class='nav-item'>
|
||||
<a class='{{ staff_dashboard }}' href='/index.php/staff-dashboard'>
|
||||
<i class='material-symbols-rounded opacity-5'>dashboard</i>
|
||||
@ -40,32 +52,6 @@
|
||||
<span class="nav-link-text ms-1">Dashboard</span>
|
||||
</a>
|
||||
</li>
|
||||
{#
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" href="../pages/tables.html">
|
||||
<i class="material-symbols-rounded opacity-5">table_view</i>
|
||||
<span class="nav-link-text ms-1">Tables</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" href="../pages/billing.html">
|
||||
<i class="material-symbols-rounded opacity-5">receipt_long</i>
|
||||
<span class="nav-link-text ms-1">Billing</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" href="../pages/virtual-reality.html">
|
||||
<i class="material-symbols-rounded opacity-5">view_in_ar</i>
|
||||
<span class="nav-link-text ms-1">Virtual Reality</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-dark" href="../pages/notifications.html">
|
||||
<i class="material-symbols-rounded opacity-5">notifications</i>
|
||||
<span class="nav-link-text ms-1">Notifications</span>
|
||||
</a>
|
||||
</li>
|
||||
#}
|
||||
<li class="nav-item mt-3">
|
||||
<h6 class="ps-4 ms-2 text-uppercase text-xs text-dark font-weight-bolder opacity-5">Account pages</h6>
|
||||
</li>
|
||||
@ -75,19 +61,13 @@
|
||||
<span class="nav-link-text ms-1">Profile</span>
|
||||
</a>
|
||||
</li>
|
||||
{% if app.user.job.value == 'ADMIN' %}
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<li class="nav-item">
|
||||
<a class="{{ user_list }}" href="/index.php/list-users">
|
||||
<i class="material-symbols-rounded opacity-5">assignment</i>
|
||||
<span class="nav-link-text ms-1">User List</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class='nav-item'>
|
||||
<a class='text-dark nav-link' href='/index.php/add-user'>
|
||||
<i class='material-symbols-rounded opacity-5'>person</i>
|
||||
<span class='nav-link-text ms-1'>Add User</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class='nav-item'>
|
||||
<a class='text-dark nav-link' href='/index.php/logout'>
|
||||
|
@ -9,26 +9,8 @@
|
||||
<input type="text" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<ul
|
||||
class="navbar-nav d-flex align-items-center justify-content-end">
|
||||
{#
|
||||
<li class="nav-item d-flex align-items-center">
|
||||
<a class="btn btn-outline-primary btn-sm mb-0 me-3" target="_blank" href="https://www.creative-tim.com/builder?ref=navbar-material-dashboard">Online Builder</a>
|
||||
</li>
|
||||
<li class="mt-1">
|
||||
<a class="github-button" href="https://github.com/creativetimofficial/material-dashboard" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star creativetimofficial/material-dashboard on GitHub">Star</a>
|
||||
</li>
|
||||
<li class="nav-item d-xl-none ps-3 d-flex align-items-center">
|
||||
<a href="javascript:;" class="nav-link text-body p-0" id="iconNavbarSidenav">
|
||||
<div class="sidenav-toggler-inner">
|
||||
<i class="sidenav-toggler-line"></i>
|
||||
<i class="sidenav-toggler-line"></i>
|
||||
<i class="sidenav-toggler-line"></i>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
#}
|
||||
{% if app.user.job.name == 'ADMIN' %}
|
||||
<ul class="navbar-nav d-flex align-items-center justify-content-end">
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<li class="nav-item px-3 d-flex align-items-center" title="Site Settings">
|
||||
<a href="javascript:;" class="nav-link text-body p-0">
|
||||
<i class="material-symbols-rounded fixed-plugin-button-nav">settings</i>
|
||||
@ -62,76 +44,6 @@
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{#
|
||||
<li class="mb-2">
|
||||
<a class="dropdown-item border-radius-md" href="javascript:;">
|
||||
<div class="d-flex py-1">
|
||||
<div class="my-auto">
|
||||
<img src="../assets/img/team-2.jpg" class="avatar avatar-sm me-3 ">
|
||||
</div>
|
||||
<div class="d-flex flex-column justify-content-center">
|
||||
<h6 class="text-sm font-weight-normal mb-1">
|
||||
<span class="font-weight-bold">New message</span>
|
||||
from Laur
|
||||
</h6>
|
||||
<p class="text-xs text-secondary mb-0">
|
||||
<i class="fa fa-clock me-1"></i>
|
||||
13 minutes ago
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="mb-2">
|
||||
<a class="dropdown-item border-radius-md" href="javascript:;">
|
||||
<div class="d-flex py-1">
|
||||
<div class="my-auto">
|
||||
<img src="../assets/img/small-logos/logo-spotify.svg" class="avatar avatar-sm bg-gradient-dark me-3 ">
|
||||
</div>
|
||||
<div class="d-flex flex-column justify-content-center">
|
||||
<h6 class="text-sm font-weight-normal mb-1">
|
||||
<span class="font-weight-bold">New album</span>
|
||||
by Travis Scott
|
||||
</h6>
|
||||
<p class="text-xs text-secondary mb-0">
|
||||
<i class="fa fa-clock me-1"></i>
|
||||
1 day
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item border-radius-md" href="javascript:;">
|
||||
<div class="d-flex py-1">
|
||||
<div class="avatar avatar-sm bg-gradient-secondary me-3 my-auto">
|
||||
<svg width="12px" height="12px" viewbox="0 0 43 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>credit-card</title>
|
||||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g transform="translate(-2169.000000, -745.000000)" fill="#FFFFFF" fill-rule="nonzero">
|
||||
<g transform="translate(1716.000000, 291.000000)">
|
||||
<g transform="translate(453.000000, 454.000000)">
|
||||
<path class="color-background" d="M43,10.7482083 L43,3.58333333 C43,1.60354167 41.3964583,0 39.4166667,0 L3.58333333,0 C1.60354167,0 0,1.60354167 0,3.58333333 L0,10.7482083 L43,10.7482083 Z" opacity="0.593633743"></path>
|
||||
<path class="color-background" d="M0,16.125 L0,32.25 C0,34.2297917 1.60354167,35.8333333 3.58333333,35.8333333 L39.4166667,35.8333333 C41.3964583,35.8333333 43,34.2297917 43,32.25 L43,16.125 L0,16.125 Z M19.7083333,26.875 L7.16666667,26.875 L7.16666667,23.2916667 L19.7083333,23.2916667 L19.7083333,26.875 Z M35.8333333,26.875 L28.6666667,26.875 L28.6666667,23.2916667 L35.8333333,23.2916667 L35.8333333,26.875 Z"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="d-flex flex-column justify-content-center">
|
||||
<h6 class="text-sm font-weight-normal mb-1">
|
||||
Payment successfully completed
|
||||
</h6>
|
||||
<p class="text-xs text-secondary mb-0">
|
||||
<i class="fa fa-clock me-1"></i>
|
||||
2 days
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
#}
|
||||
</ul>
|
||||
</li>
|
||||
<li class="nav-item d-flex align-items-center" title="Profile">
|
||||
|
Loading…
Reference in New Issue
Block a user