Copybara bot | be50d49 | 2023-11-30 00:16:42 +0100 | [diff] [blame] | 1 | <?php |
| 2 | require_once(__DIR__."/../core.php"); |
| 3 | security::checkType(security::ADMIN, security::METHOD_NOTFOUND); |
| 4 | |
| 5 | $pending = incidents::numPending(); |
| 6 | ?> |
| 7 | <header class="mdl-layout__header mdl-layout__header--scroll<?=(visual::isMDColor() ? security::htmlsafe(" mdl-color--".$conf["backgroundColor"]) : "")?>"<?=(!visual::isMDColor() ? " style=\"background-color: ".security::htmlsafe($conf["backgroundColor"]).";\"" : "")?>> |
| 8 | <div class="mdl-layout__header-row"> |
| 9 | <!-- Title --> |
| 10 | <?php if (isset($mdHeaderRowBefore)) { echo $mdHeaderRowBefore; } ?> |
| 11 | <span class="mdl-layout-title">Panel de control</span> |
| 12 | <?php if (isset($mdHeaderRowMore)) { echo $mdHeaderRowMore; } ?> |
| 13 | </div> |
| 14 | <?php if (isset($mdHeaderMore)) { echo $mdHeaderMore; } ?> |
| 15 | </header> |
| 16 | <div class="mdl-layout__drawer"> |
| 17 | <span class="mdl-layout-title"><?=(!empty($conf["logo"] ?? "") ? "<img class=\"logo\" src=\"".security::htmlsafe($conf["logo"])."\">" : "")?> <?=security::htmlsafe($conf["appName"])?></span> |
| 18 | <span class="subtitle mdl-color-text--grey-700"><?=security::htmlsafe(people::userData("name"))?></span> |
| 19 | <nav class="mdl-navigation"> |
| 20 | <a class="mdl-navigation__link mdl-js-button mdl-js-ripple-effect" href="home.php"><i class="material-icons">dashboard</i> <span>Panel de Control</span></a> |
| 21 | <a class="mdl-navigation__link mdl-js-button mdl-js-ripple-effect" href="users.php"><i class="material-icons">group</i> <span>Personas</span></a> |
| 22 | <a class="mdl-navigation__link mdl-js-button mdl-js-ripple-effect" href="workers.php"><i class="material-icons">work</i> <span>Trabajadores</span></a> |
| 23 | <a class="mdl-navigation__link mdl-js-button mdl-js-ripple-effect" href="incidents.php?goTo=today"><i class="material-icons mdl-badge<?=($pending > 0 ? ' mdl-badge--overlap' : '')?>" <?=($pending > 0 ? 'data-badge="'.$pending.'"' : '')?>>assignment_late</i> <span>Incidencias</span></a> |
| 24 | <a class="mdl-navigation__link mdl-js-button mdl-js-ripple-effect" href="registry.php"><i class="material-icons">list</i> <span>Registro</span></a> |
| 25 | <a class="mdl-navigation__link mdl-js-button mdl-js-ripple-effect" href="export.php"><i class="material-icons">cloud_download</i> <span>Exportar registro</span></a> |
| 26 | <a class="mdl-navigation__link mdl-js-button mdl-js-ripple-effect" href="settings.php"><i class="material-icons">settings</i> <span>Configuración</span></a> |
| 27 | <?php |
| 28 | if ($conf["enableWorkerUI"]) { |
| 29 | ?> |
| 30 | <a class="mdl-navigation__link mdl-js-button mdl-js-ripple-effect" href="workerhome.php"><i class="material-icons">open_in_browser</i> <span>Vista de trabajador</span></a> |
| 31 | <?php |
| 32 | } elseif (secondFactor::isAvailable()) { |
| 33 | ?> |
| 34 | <a class="mdl-navigation__link mdl-js-button mdl-js-ripple-effect" href="security.php"><i class="material-icons">security</i> <span>Seguridad</span></a> |
| 35 | <?php |
| 36 | } else { |
| 37 | ?> |
| 38 | <a class="mdl-navigation__link mdl-js-button mdl-js-ripple-effect" href="changepassword.php"><i class="material-icons">account_circle</i> <span>Cambiar contraseña</span></a> |
| 39 | <?php |
| 40 | } |
| 41 | ?> |
| 42 | <a class="mdl-navigation__link mdl-js-button mdl-js-ripple-effect" class="mdl-navigation__link" href="logout.php"><i class="material-icons">power_settings_new</i> <span>Cerrar sesión</span></a> |
| 43 | </nav> |
| 44 | </div> |