-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsidebar.php
154 lines (150 loc) · 5.66 KB
/
sidebar.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<aside class="main-sidebar sidebar-dark-primary elevation-4">
<div class="dropdown">
<a href="./" class="brand-link">
<?php if($_SESSION['login_type'] == 2): ?>
<h3 class="text-center p-0 m-0"><b>Administrador</b></h3>
<?php elseif($_SESSION['login_type'] == 1): ?>
<h3 class="text-center p-0 m-0"><b>Evaluador</b></h3>
<?php else: ?>
<h3 class="text-center p-0 m-0"><b>Empleado</b></h3>
<?php endif; ?>
</a>
</div>
<div class="sidebar pb-4 mb-4">
<nav class="mt-2">
<ul class="nav nav-pills nav-sidebar flex-column nav-flat" data-widget="treeview" role="menu" data-accordion="false">
<li class="nav-item dropdown">
<a href="./" class="nav-link nav-home">
<i class="nav-icon fas fa-tachometer-alt"></i>
<p>
Panel de Control
</p>
</a>
</li>
<li class="nav-item dropdown">
<a href="./index.php?page=task_list" class="nav-link nav-task_list">
<i class="nav-icon fas fa-tasks"></i>
<p>
Tareas
</p>
</a>
</li>
<?php if($_SESSION['login_type'] != 0): ?>
<li class="nav-item dropdown">
<a href="./index.php?page=evaluation" class="nav-link nav-evaluation">
<i class="nav-icon far fa-edit"></i>
<p>
Evaluación
</p>
</a>
</li>
<?php endif; ?>
<?php if($_SESSION['login_type'] == 2): ?>
<li class="nav-item dropdown">
<a href="./index.php?page=department" class="nav-link nav-department">
<i class="nav-icon fas fa-th-list"></i>
<p>
Departmentos
</p>
</a>
</li>
<li class="nav-item dropdown">
<a href="./index.php?page=designation" class="nav-link nav-designation">
<i class="nav-icon fas fa-list-alt"></i>
<p>
Cargos
</p>
</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link nav-edit_employee">
<i class="nav-icon fas fa-user-friends"></i>
<p>
Empleados
<i class="right fas fa-angle-left"></i>
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="./index.php?page=new_employee" class="nav-link nav-new_employee tree-item">
<i class="fas fa-angle-right nav-icon"></i>
<p>Agregar Nuevo Empleado</p>
</a>
</li>
<li class="nav-item">
<a href="./index.php?page=employee_list" class="nav-link nav-employee_list tree-item">
<i class="fas fa-angle-right nav-icon"></i>
<p>Lista de Empleados</p>
</a>
</li>
</ul>
</li>
<li class="nav-item">
<a href="#" class="nav-link nav-edit_evaluator">
<i class="nav-icon fas fa-user-secret"></i>
<p>
Evaluador
<i class="right fas fa-angle-left"></i>
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="./index.php?page=new_evaluator" class="nav-link nav-new_evaluator tree-item">
<i class="fas fa-angle-right nav-icon"></i>
<p>Agregar Nuevo Evaluador</p>
</a>
</li>
<li class="nav-item">
<a href="./index.php?page=evaluator_list" class="nav-link nav-evaluator_list tree-item">
<i class="fas fa-angle-right nav-icon"></i>
<p>Lista de Evaluadores</p>
</a>
</li>
</ul>
</li>
<li class="nav-item">
<a href="#" class="nav-link nav-edit_user">
<i class="nav-icon fas fa-users"></i>
<p>
Usuarios
<i class="right fas fa-angle-left"></i>
</p>
</a>
<ul class="nav nav-treeview">
<li class="nav-item">
<a href="./index.php?page=new_user" class="nav-link nav-new_user tree-item">
<i class="fas fa-angle-right nav-icon"></i>
<p>Agregar Nuevo Usuario</p>
</a>
</li>
<li class="nav-item">
<a href="./index.php?page=user_list" class="nav-link nav-user_list tree-item">
<i class="fas fa-angle-right nav-icon"></i>
<p>Lista de Usuarios</p>
</a>
</li>
</ul>
</li>
<?php endif; ?>
</ul>
</nav>
</div>
</aside>
<script>
$(document).ready(function(){
var page = '<?php echo isset($_GET['page']) ? $_GET['page'] : 'home' ?>';
var s = '<?php echo isset($_GET['s']) ? $_GET['s'] : '' ?>';
if(s!='')
page = page+'_'+s;
if($('.nav-link.nav-'+page).length > 0){
$('.nav-link.nav-'+page).addClass('active')
if($('.nav-link.nav-'+page).hasClass('tree-item') == true){
$('.nav-link.nav-'+page).closest('.nav-treeview').siblings('a').addClass('active')
$('.nav-link.nav-'+page).closest('.nav-treeview').parent().addClass('menu-open')
}
if($('.nav-link.nav-'+page).hasClass('nav-is-tree') == true){
$('.nav-link.nav-'+page).parent().addClass('menu-open')
}
}
})
</script>