Copybara bot | be50d49 | 2023-11-30 00:16:42 +0100 | [diff] [blame] | 1 | <?php |
Adrià Vilanova Martínez | 5af8651 | 2023-12-02 20:44:16 +0100 | [diff] [blame] | 2 | /* |
| 3 | * hores |
| 4 | * Copyright (c) 2023 Adrià Vilanova Martínez |
| 5 | * |
| 6 | * This program is free software: you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU Affero General Public License as |
| 8 | * published by the Free Software Foundation, either version 3 of the |
| 9 | * License, or (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU Affero General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU Affero General Public |
| 17 | * License along with this program. |
| 18 | * If not, see http://www.gnu.org/licenses/. |
| 19 | */ |
| 20 | |
Copybara bot | be50d49 | 2023-11-30 00:16:42 +0100 | [diff] [blame] | 21 | require_once("core.php"); |
| 22 | security::checkType(security::HYPERADMIN); |
| 23 | |
| 24 | $mdHeaderRowBefore = visual::backBtn("settings.php"); |
| 25 | ?> |
| 26 | <!DOCTYPE html> |
| 27 | <html> |
| 28 | <head> |
| 29 | <title><?php echo $conf["appName"]; ?></title> |
| 30 | <?php visual::includeHead(); ?> |
| 31 | <link rel="stylesheet" href="css/dashboard.css"> |
| 32 | </head> |
| 33 | <?php visual::printBodyTag(); ?> |
| 34 | <div class="mdl-layout mdl-js-layout mdl-layout--fixed-header mdl-layout--fixed-drawer"> |
| 35 | <?php visual::includeNav(); ?> |
| 36 | <main class="mdl-layout__content"> |
| 37 | <div class="page-content"> |
| 38 | <div class="main mdl-shadow--4dp"> |
| 39 | <h2>Recursos de ayuda</h2> |
| 40 | <div class="overflow-wrapper overflow-wrapper--for-table"> |
| 41 | <table class="mdl-data-table mdl-js-data-table mdl-shadow--2dp"> |
| 42 | <thead> |
| 43 | <tr> |
| 44 | <th class="mdl-data-table__cell--non-numeric">Sitio</th> |
| 45 | <th class="mdl-data-table__cell--non-numeric">URL</th> |
| 46 | <th class="mdl-data-table__cell--non-numeric"></th> |
| 47 | </tr> |
| 48 | </thead> |
| 49 | <tbody> |
| 50 | <?php |
| 51 | foreach (help::$places as $p) { |
| 52 | $h = help::get($p); |
| 53 | $isset = ($h !== false); |
| 54 | ?> |
| 55 | <tr<?=(!$isset ? " class='mdl-color-text--grey-600'" : "")?>> |
| 56 | <td class="mdl-data-table__cell--non-numeric"><?=security::htmlsafe(help::$placesName[$p])?></td> |
| 57 | <td class="mdl-data-table__cell--non-numeric"><?=($h === false ? "-" : $h)?></td> |
| 58 | <td class='mdl-data-table__cell--non-numeric'><a href='dynamic/sethelpresource.php?place=<?=security::htmlsafe($p)?>' data-dyndialog-href='dynamic/sethelpresource.php?place=<?=security::htmlsafe($p)?>' title='Configurar enlace de ayuda'><i class='material-icons icon'>build</i></a></td> |
| 59 | </tr> |
| 60 | <?php |
| 61 | } |
| 62 | ?> |
| 63 | </tbody> |
| 64 | </table> |
| 65 | </div> |
| 66 | </div> |
| 67 | </div> |
| 68 | </main> |
| 69 | </div> |
| 70 | |
| 71 | <?php |
| 72 | visual::smartSnackbar([ |
| 73 | ["success", "Se ha configurado el enlace correctamente."], |
| 74 | ["invalidurl", "La URL proporcionada está malformada. Por favor, introduce una URL correcta."], |
| 75 | ["empty", "Faltan datos por introducir en el formulario."], |
| 76 | ["unexpected", "Ha ocurrido un error inesperado. Inténtelo de nuevo en unos segundos."] |
| 77 | ]); |
| 78 | ?> |
| 79 | </body> |
| 80 | </html> |