Comment: | Ajout fonctionnalité : personnalisation des couleurs de l'interface |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | dev |
Files: | files | file ages | folders |
SHA1: |
6da22f423b4dea6c0c4e91787dcdcc6f |
User & Date: | bohwaz on 2017-05-24 07:21:02 |
Other Links: | branch diff | manifest | tags |
2017-05-24
| ||
07:38 | Personnalisation des couleurs: nettoyage et commentaires du code JS check-in: ba76f8a90c user: bohwaz tags: dev | |
07:21 | Ajout fonctionnalité : personnalisation des couleurs de l'interface check-in: 6da22f423b user: bohwaz tags: dev | |
02:22 | Fichiers : ajout possibilité de stockage à partir d'une chaîne encodée en base64 check-in: ad5540c863 user: bohwaz tags: dev | |
Modified src/include/lib/Garradin/Config.php from [1f5a25e628] to [db09fc48dc].
︙ | ︙ | |||
34 35 36 37 38 39 40 | $int = 0; $float = 0.0; $array = []; $bool = false; $object = new \stdClass; $this->fields_types = [ | | | | | | | | | | | | | | | | | | | | | | | | | | | | > > > > | 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 | $int = 0; $float = 0.0; $array = []; $bool = false; $object = new \stdClass; $this->fields_types = [ 'nom_asso' => $string, 'adresse_asso' => $string, 'email_asso' => $string, 'site_asso' => $string, 'monnaie' => $string, 'pays' => $string, 'champs_membres' => $object, 'email_envoi_automatique' => $string, 'categorie_membres' => $int, 'categorie_dons' => $int, 'categorie_cotisations' => $int, 'accueil_wiki' => $string, 'accueil_connexion' => $string, 'frequence_sauvegardes' => $int, 'nombre_sauvegardes' => $int, 'champ_identifiant' => $string, 'champ_identite' => $string, 'version' => $string, 'couleur1' => $string, 'couleur2' => $string, 'image_fond' => $string, ]; $db = DB::getInstance(); $this->config = $db->getAssoc('SELECT cle, valeur FROM config ORDER BY cle;'); foreach ($this->config as $key=>&$value) |
︙ | ︙ | |||
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | if (empty($this->modified)) return true; $values = []; $db = DB::getInstance(); $db->begin(); foreach ($this->modified as $key=>$modified) { $value = $this->config[$key]; if (is_array($value)) { $value = implode(',', $value); } elseif (is_object($value)) { $value = (string) $value; } | > > > > > > > > > > > > > > > > | | | 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 155 156 157 | if (empty($this->modified)) return true; $values = []; $db = DB::getInstance(); $db->begin(); if (isset($this->modified['image_fond'])) { if ($current = $db->firstColumn('SELECT valeur FROM config WHERE cle = \'image_fond\';')) { $f = new Fichiers($current); $f->remove(); } if (strlen($this->config['image_fond']) > 0) { $f = Fichiers::storeFromBase64('Image_fond_admin.png', $this->config['image_fond']); $this->config['image_fond'] = $f->id; unset($f); } } foreach ($this->modified as $key=>$modified) { $value = $this->config[$key]; if (is_array($value)) { $value = implode(',', $value); } elseif (is_object($value)) { $value = (string) $value; } $db->query('INSERT OR REPLACE INTO config (cle, valeur) VALUES (?, ?);', [$key, $value]); } if (!empty($this->modified['champ_identifiant'])) { // Mettre les champs identifiant vides à NULL pour pouvoir créer un index unique $db->exec('UPDATE membres SET '.$this->get('champ_identifiant').' = NULL WHERE '.$this->get('champ_identifiant').' = "";'); |
︙ | ︙ |
Modified src/include/lib/Garradin/Template.php from [ed95de2191] to [71b7137767].
︙ | ︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 | $this->assign('self_url', Utils::getSelfUrl()); $this->assign('self_url_no_qs', Utils::getSelfUrl(true)); $this->assign('is_logged', false); $this->register_function('form_errors', [$this, 'formErrors']); $this->register_function('show_error', [$this, 'showError']); } protected function formErrors($params) { $errors = $this->getTemplateVars('form_errors'); if (!$errors || count($errors) == 0) | > | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | $this->assign('self_url', Utils::getSelfUrl()); $this->assign('self_url_no_qs', Utils::getSelfUrl(true)); $this->assign('is_logged', false); $this->register_function('form_errors', [$this, 'formErrors']); $this->register_function('show_error', [$this, 'showError']); $this->register_function('custom_colors', [$this, 'customColors']); } protected function formErrors($params) { $errors = $this->getTemplateVars('form_errors'); if (!$errors || count($errors) == 0) |
︙ | ︙ | |||
87 88 89 90 91 92 93 94 95 96 97 98 99 100 | if (!$params['if']) { return ''; } return '<p class="error">' . $this->escape($params['message']) . '</p>'; } } $tpl = Template::getInstance(); function tpl_csrf_field($params) { return Form::tokenHTML($params['key']); | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | if (!$params['if']) { return ''; } return '<p class="error">' . $this->escape($params['message']) . '</p>'; } protected function customColors() { $config = Config::getInstance(); if (!$config->get('couleur1') || !$config->get('couleur2') || !$config->get('image_fond')) { return ''; } $couleur1 = implode(', ', sscanf($config->get('couleur1'), '#%02x%02x%02x')); $couleur2 = implode(', ', sscanf($config->get('couleur2'), '#%02x%02x%02x')); $f = new Fichiers($config->get('image_fond')); $image_fond = $f->getURL(); $out = ' <style type="text/css"> :root { --gMainColor: %s; --gSecondColor: %s; } .header .menu, html { background-image: url("%s"); } </style>'; return sprintf($out, $couleur1, $couleur2, $image_fond); } } $tpl = Template::getInstance(); function tpl_csrf_field($params) { return Form::tokenHTML($params['key']); |
︙ | ︙ |
Modified src/templates/admin/_foot.tpl from [02e626a0f4] to [9a86bb1b00].
|
| | | 1 2 3 4 5 6 7 8 | </main> <script type="text/javascript" defer="defer"> var keep_session_url = "{$www_url}admin/login.php?keepSessionAlive&"; {literal} (function () { function refreshSession() { |
︙ | ︙ |
Modified src/templates/admin/_head.tpl from [f1204d56a3] to [878c526e08].
|
| | | > > > > > > | | > | 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 | <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> <meta charset="utf-8" /> <title>{$title}</title> <link rel="icon" type="image/png" href="{$admin_url}static/icon.png" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, target-densitydpi=device-dpi" /> <link rel="stylesheet" type="text/css" href="{$admin_url}static/admin.css" media="all" /> <link rel="stylesheet" type="text/css" href="{$admin_url}static/print.css" media="print" /> <link rel="stylesheet" type="text/css" href="{$admin_url}static/handheld.css" media="handheld,screen and (max-width:981px)" /> {if isset($js) || isset($custom_js)} <script type="text/javascript" src="{$admin_url}static/scripts/global.js"></script> {/if} {if isset($custom_js)} {foreach from=$custom_js item="js"} <script type="text/javascript" src="{$admin_url}static/scripts/{$js}"></script> {/foreach} {/if} {if isset($custom_css)} {foreach from=$custom_css item="css"} <link rel="stylesheet" type="text/css" href="{$admin_url}static/{$css}" media="all" /> {/foreach} {/if} {if isset($plugin_css)} {foreach from=$plugin_css item="css"} <link rel="stylesheet" type="text/css" href="{plugin_url file=$css}" /> {/foreach} {/if} {if isset($plugin_js)} {foreach from=$plugin_js item="js"} <script type="text/javascript" src="{plugin_url file=$js}"></script> {/foreach} {/if} {custom_colors config=$config} </head> <body{if !empty($body_id)} id="{$body_id}"{/if} data-url="{$admin_url}"> {if empty($is_popup)} <header class="header"> <nav class="menu"> <ul> {if !$is_logged} <li><a href="{$www_url}">← Retour au site</a></li> <li><a href="{$admin_url}">Connexion</a> <ul> <li><a href="{$admin_url}password.php">Mot de passe perdu</a> </ul> </li> |
︙ | ︙ | |||
101 102 103 104 105 106 107 108 109 | </ul> </li> {if !defined('Garradin\LOCAL_LOGIN')} <li class="logout"><a href="{$admin_url}logout.php"><b class="icn">⤝</b> Déconnexion</a></li> {/if} {/if} </ul> <h1>{$title}</h1> | > | < > | 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | </ul> </li> {if !defined('Garradin\LOCAL_LOGIN')} <li class="logout"><a href="{$admin_url}logout.php"><b class="icn">⤝</b> Déconnexion</a></li> {/if} {/if} </ul> </nav> <h1>{$title}</h1> </header> {/if} <main> |
Modified src/templates/admin/config/index.tpl from [c6633c21cb] to [7b31e5fe67].
1 2 | {include file="admin/_head.tpl" title="Configuration" current="config"} | > | | < < < < | < < > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | {include file="admin/_head.tpl" title="Configuration" current="config"} {include file="admin/config/_menu.tpl" current="index"} {if $ok} <p class="confirm"> La configuration a bien été enregistrée. </p> {/if} {form_errors} <form method="post" action="{$self_url}"> <fieldset> <legend>Garradin</legend> <dl> <dt>Version installée</dt> |
︙ | ︙ | |||
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | <option value="{$c}" {form_field selected=$c name="champ_identifiant" data=$config}>{$champ.title}</option> {/foreach} </select> </dd> </dl> </fieldset> <p class="submit"> {csrf_field key="config"} <input type="submit" name="save" value="Enregistrer →" /> </p> </form> {include file="admin/_foot.tpl"} | > > > > > > > > > > > | 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 | <option value="{$c}" {form_field selected=$c name="champ_identifiant" data=$config}>{$champ.title}</option> {/foreach} </select> </dd> </dl> </fieldset> <fieldset id="couleurs"> <legend>Personnalisation de l'interface</legend> <dl> <dt><label for="f_couleur1">Couleur principale</label></dt> <dd><input type="color" pattern="#[a-f0-9]{ldelim}6{rdelim}" title="Couleur au format hexadécimal" placeholder="{$couleurs_defaut[0]}" name="couleur1" value="{form_field name=couleur1 default=$couleur1}" id="f_couleur1" /></dd> <dt><label for="f_couleur2">Couleur secondaire</label></dt> <dd><input type="color" pattern="#[a-f0-9]{ldelim}6{rdelim}" title="Couleur au format hexadécimal" placeholder="{$couleurs_defaut[1]}" name="couleur2" value="{form_field name=couleur2 default=$couleur2}" id="f_couleur2" /></dd> </dl> <input type="hidden" name="image_fond" id="f_image_fond" value="{form_field name=image_fond}" /> </fieldset> <p class="submit"> {csrf_field key="config"} <input type="submit" name="save" value="Enregistrer →" /> </p> </form> {include file="admin/_foot.tpl"} |
Modified src/www/admin/_inc.php from [a79bfe08b9] to [389bbe04f9].
︙ | ︙ | |||
8 9 10 11 12 13 14 15 16 17 18 | // Redirection automatique en HTTPS si nécessaire if (PREFER_HTTPS !== true && PREFER_HTTPS >= 2 && empty($_SERVER['HTTPS']) && empty($_POST)) { utils::redirect(str_replace('http://', 'https://', utils::getSelfURL())); exit; } // Query-Validate: valider les éléments passés en GET function qv(Array $rules) { | > > > > > | | 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | // Redirection automatique en HTTPS si nécessaire if (PREFER_HTTPS !== true && PREFER_HTTPS >= 2 && empty($_SERVER['HTTPS']) && empty($_POST)) { utils::redirect(str_replace('http://', 'https://', utils::getSelfURL())); exit; } function f($key) { return \KD2\Form::get($key); } // Query-Validate: valider les éléments passés en GET function qv(Array $rules) { if (\KD2\Form::validate($rules, $errors, $_GET)) { return true; } foreach ($errors as &$error) { $error = sprintf('%s: %s', $error['name'], $error['rule']); |
︙ | ︙ | |||
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | $tpl->assign('admin_url', WWW_URL . 'admin/'); $form = new Form; $tpl->assign_by_ref('form_errors', $form->getErrors()); $session = Session::get(); if (!defined('Garradin\LOGIN_PROCESS')) { if (!$session) { if (Session::isOTPRequired()) { Utils::redirect('/admin/login_otp.php'); } else { Utils::redirect('/admin/login.php'); } } | > > < | 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 | $tpl->assign('admin_url', WWW_URL . 'admin/'); $form = new Form; $tpl->assign_by_ref('form_errors', $form->getErrors()); $session = Session::get(); $tpl->assign('config', Config::getInstance()->getConfig()); if (!defined('Garradin\LOGIN_PROCESS')) { if (!$session) { if (Session::isOTPRequired()) { Utils::redirect('/admin/login_otp.php'); } else { Utils::redirect('/admin/login.php'); } } $tpl->assign('is_logged', true); $user = $session->getUser(); $tpl->assign('user', $user); $tpl->assign('current', ''); $tpl->assign('plugins_menu', Plugin::listMenu()); if ($session->canAccess('membres', Membres::DROIT_ACCES)) { $tpl->assign('nb_membres', (new Membres)->countAllButHidden()); } } |
Modified src/www/admin/config/index.php from [1aa6f266e6] to [6d841db6fd].
1 2 3 4 5 | <?php namespace Garradin; require_once __DIR__ . '/_inc.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 | <?php namespace Garradin; require_once __DIR__ . '/_inc.php'; $couleur1 = '#9c4f15'; $couleur2 = '#d98628'; if (f('save')) { if (!Utils::CSRF_check('config')) { $error = 'Une erreur est survenue, merci de renvoyer le formulaire.'; } else { try { $config->set('nom_asso', f('nom_asso')); $config->set('email_asso', f('email_asso')); $config->set('adresse_asso', f('adresse_asso')); $config->set('site_asso', f('site_asso')); $config->set('email_envoi_automatique', f('email_envoi_automatique')); $config->set('accueil_wiki', f('accueil_wiki')); $config->set('accueil_connexion', f('accueil_connexion')); $config->set('categorie_membres', f('categorie_membres')); $config->set('champ_identite', f('champ_identite')); $config->set('champ_identifiant', f('champ_identifiant')); $config->set('pays', f('pays')); $config->set('monnaie', f('monnaie')); // N'enregistrer les couleurs que si ce ne sont pas les couleurs par défaut if (f('couleur1') != $couleur1 || f('couleur2') != $couleur2) { $config->set('couleur1', f('couleur1')); $config->set('couleur2', f('couleur2')); $config->set('image_fond', f('image_fond')); } else { $config->set('couleur1', null); $config->set('couleur2', null); $config->set('image_fond', null); } $config->save(); Utils::redirect('/admin/config/?ok'); } catch (UserException $e) { $error = $e->getMessage(); } } } $tpl->assign('ok', qg('ok') !== null); $server_time = time(); $ntp_time = \KD2\Security_OTP::getTimeFromNTP(NTP_SERVER); $diff = $server_time - $ntp_time; $tpl->assign('garradin_version', garradin_version() . ' [' . (garradin_manifest() ?: 'release') . ']'); $tpl->assign('php_version', phpversion()); |
︙ | ︙ | |||
63 64 65 66 67 68 69 70 | $tpl->assign('pays', Utils::getCountryList()); $cats = new Membres\Categories; $tpl->assign('membres_cats', $cats->listSimple()); $tpl->assign('champs', $config->get('champs_membres')->getList(true)); $tpl->display('admin/config/index.tpl'); | > > > > > | 73 74 75 76 77 78 79 80 81 82 83 84 85 | $tpl->assign('pays', Utils::getCountryList()); $cats = new Membres\Categories; $tpl->assign('membres_cats', $cats->listSimple()); $tpl->assign('champs', $config->get('champs_membres')->getList(true)); $tpl->assign('couleur1', $config->get('couleur1') ?: $couleur1); $tpl->assign('couleur2', $config->get('couleur2') ?: $couleur2); $tpl->assign('couleurs_defaut', [$couleur1, $couleur2]); $tpl->assign('custom_js', ['color_helper.js']); $tpl->display('admin/config/index.tpl'); |
Modified src/www/admin/login.php from [a38c475ec7] to [16d6682a67].
︙ | ︙ | |||
8 9 10 11 12 13 14 | // L'utilisateur est déjà connecté if ($session) { Utils::redirect('/admin/'); } // Relance session_start et renvoie une image de 1px transparente | | < | | | < | 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 | // L'utilisateur est déjà connecté if ($session) { Utils::redirect('/admin/'); } // Relance session_start et renvoie une image de 1px transparente if (qg('keepSessionAlive') !== null) { Session::refresh(); header('Cache-Control: no-cache, must-revalidate'); header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Content-Type: image/gif'); echo base64_decode("R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="); exit; } $fail = false; // Soumission du formulaire if (f('login')) { $form->check('login', [ '_id' => 'required|string', 'passe' => 'required|string', 'permanent' => 'boolean', ]); if (!$form->hasErrors() && ($fail = Membres\Session::login(f('_id'), f('passe'), (bool) f('permanent')))) { Utils::redirect('/admin/'); } } $champs = $config->get('champs_membres'); $champ = $champs->get($config->get('champ_identifiant')); $tpl->assign('ssl_enabled', empty($_SERVER['HTTPS']) ? false : true); $tpl->assign('prefer_ssl', (bool)PREFER_HTTPS); $tpl->assign('own_https_url', str_replace('http://', 'https://', utils::getSelfURL())); $tpl->assign('champ', $champ); $tpl->assign('fail', $fail); $tpl->display('admin/login.tpl'); |
Modified src/www/admin/static/admin.css from [a3aac92b19] to [2b3fa68bc0].
|
| < < | 1 2 3 4 5 6 7 | @charset "UTF-8"; @font-face { font-family: 'gicon'; src: url('font/garradin.eot?36341436'); src: url('font/garradin.eot?36341436#iefix') format('embedded-opentype'), url('font/garradin.woff?36341436') format('woff'), |
︙ | ︙ | |||
42 43 44 45 46 47 48 | h6 { font-size: 0.8em; } /* marron : #9c4f15 rgb(156, 79, 21) orange : #d98628 rgb(217, 134, 40) */ | > > > > > > > > | > > > > > > < < | > > | | > > | > > > > > > | > > > > > | > | | | | 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 155 156 157 158 159 160 161 162 163 | h6 { font-size: 0.8em; } /* marron : #9c4f15 rgb(156, 79, 21) orange : #d98628 rgb(217, 134, 40) */ :root { --gBgColor: 255, 255, 255; --gMainColor: 156, 79, 21; --gSecondColor: 217, 134, 40; } html { width: 100%; height: 100%; background: #fff url("gdin_bg.png") no-repeat 0px 0px fixed; background-color: rgb(var(--gBgColor)); /* Pas possible d'utiliser une variable CSS pour l'image de fond, c'est bugué dans Chrome cf. https://bugs.chromium.org/p/chromium/issues/detail?id=618165 */ } body { font-size: 100%; color: #000; font-family: "Trebuchet MS", Arial, Helvetica, Sans-serif; padding-bottom: 1em; } body#popup { background: rgb(var(--gBgColor)); } body#transparent { background: transparent; } .header { color: #fff; color: rgb(var(--gBgColor)); } .header h1 { color: #9c4f15; color: rgb(var(--gMainColor)); margin-left: 180px; margin-bottom: 0.4em; } .header .menu { position: fixed; width: 170px; bottom: 0; top: 0; padding-top: 100px; background: #9c4f15 url("gdin_bg.png") no-repeat 0px 0px; background-color: rgb(var(--gMainColor)); } .header .menu a { color: #fff; color: rgb(var(--gBgColor)); font-weight: bold; padding: 0.4em 0.4em 0.4em 1em; display: block; text-decoration: none; transition: background .3s; } .header .menu a:hover { text-decoration: underline; background: rgb(217, 134, 40); background: rgba(217, 134, 40, 0.5); background: rgba(var(--gSecondColor), 0.5); } .header .menu li li a { font-size: 0.8em; padding-left: 2em; } .header .menu li.current > a { background: #fff; background: rgb(var(--gBgColor)); color: rgb(156, 79, 21); color: rgb(var(--gMainColor)); } .header .menu a b { float: right; text-decoration: none; margin-top: -.2em; font-size: 20pt; color: rgb(70, 70, 70); color: rgba(255, 255, 255, .5); } .header .menu li.current > a b { color: rgb(217, 134, 40); color: rgba(217, 134, 40, 0.5); color: rgba(var(--gSecondColor), 0.5); } main { margin: 0px 1em 1em 180px; position: relative; } main img { max-width: 100%; } body#popup main { margin: 1em 1em 1em 2.5em; } body#transparent main { margin: 0; padding: .2em; } span.error, b.error { color: #900; } |
︙ | ︙ | |||
250 251 252 253 254 255 256 257 258 259 260 261 262 263 | } input[type=submit], input[type=button], input[type=checkbox] { padding: 0.3em; cursor: pointer; transition: opacity .5s ease; } .loader { width: 100%; min-height: 32px; display: block; position: relative; } | > > > > > | 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | } input[type=submit], input[type=button], input[type=checkbox] { padding: 0.3em; cursor: pointer; transition: opacity .5s ease; } input.resetButton { padding: .1em; margin-left: 1em; } .loader { width: 100%; min-height: 32px; display: block; position: relative; } |
︙ | ︙ | |||
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 | float: right; } ul.actions { list-style-type: none; margin: 1em 0; border-bottom: .1em solid #9c4f15; padding: 0 1em; } ul.actions li { display: inline-block; margin: 0 0.2em; } ul.actions li a { display: inline-block; background: rgb(217, 134, 40); background: rgba(217, 134, 40, .5); border-radius: .5em .5em 0 0; padding: .1em .5em; color: #000; text-decoration: none; } ul.actions li.current a { background: #9c4f15; color: #fff; } ul.actions li a:hover { color: #fff; text-decoration: underline; } h3.warning { margin: 1em; color: red; } | > > > > > | 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 | float: right; } ul.actions { list-style-type: none; margin: 1em 0; border-bottom: .1em solid #9c4f15; border-bottom: .1em solid rgb(var(--gMainColor)); padding: 0 1em; } ul.actions li { display: inline-block; margin: 0 0.2em; } ul.actions li a { display: inline-block; background: rgb(217, 134, 40); background: rgba(217, 134, 40, .5); background: rgba(var(--gSecondColor), .5); border-radius: .5em .5em 0 0; padding: .1em .5em; color: #000; text-decoration: none; } ul.actions li.current a { background: #9c4f15; background: rgb(var(--gMainColor)); color: #fff; color: rgb(var(--gBgColor)); } ul.actions li a:hover { color: #fff; color: rgb(var(--gBgColor)); text-decoration: underline; } h3.warning { margin: 1em; color: red; } |
︙ | ︙ | |||
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 | text-align: left; font-weight: bold; } table.list thead { background: rgb(217, 134, 40); background: rgba(217, 134, 40, 0.5); } table.list tfoot tr { background: rgb(247, 164, 70); background: rgba(217, 134, 40, 0.1); color: rgb(156, 79, 21); } table.list th, table.list td { padding: 0.2em 0.5em; } table.list tr { border: 1px solid rgb(217, 134, 40); border: 1px solid rgba(217, 134, 40, 0.5); transition: background .5s } table.list tr:nth-child(even) { background: rgb(255, 174, 80); background: rgba(217, 134, 40, 0.2); } table.list.multi tr:nth-child(even) { background: inherit; } table.list.multi tr:nth-child(4n+1), table.list.multi tr:nth-child(4n+2) { background: rgb(255, 174, 80); background: rgba(217, 134, 40, 0.2); } table.list tr.checked { color: #633; background: #ffc; } | > > > > > > | 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 | text-align: left; font-weight: bold; } table.list thead { background: rgb(217, 134, 40); background: rgba(217, 134, 40, 0.5); background: rgba(var(--gSecondColor), 0.5); } table.list tfoot tr { background: rgb(247, 164, 70); background: rgba(217, 134, 40, 0.1); background: rgba(var(--gSecondColor), 0.2); color: rgb(156, 79, 21); color: rgb(var(--gMainColor)); } table.list th, table.list td { padding: 0.2em 0.5em; } table.list tr { border: 1px solid rgb(217, 134, 40); border: 1px solid rgba(217, 134, 40, 0.5); border: 1px solid rgba(var(--gSecondColor), 0.5); transition: background .5s } table.list tr:nth-child(even) { background: rgb(255, 174, 80); background: rgba(217, 134, 40, 0.2); background: rgba(var(--gSecondColor), 0.2); } table.list.multi tr:nth-child(even) { background: inherit; } table.list.multi tr:nth-child(4n+1), table.list.multi tr:nth-child(4n+2) { background: rgb(255, 174, 80); background: rgba(217, 134, 40, 0.2); background: rgba(var(--gSecondColor), 0.2); } table.list tr.checked { color: #633; background: #ffc; } |
︙ | ︙ | |||
496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 | table.list .check { width: 1%; } table.search th { background: rgb(217, 134, 40); background: rgba(217, 134, 40, 0.5); } .userOrder .cur { background: rgb(217, 134, 40); color: #fff; } .userOrder td, .userOrder th { position: relative; } .userOrder .icn { float: left; clear: left; color: #9c4f15; text-decoration: none; font-size: 12pt; line-height: 6pt; width: 12pt; height: 8pt; vertical-align: middle; font-weight: normal; text-shadow: 0px 0px 1px #fff; } thead .icn:hover { color: darkred; text-shadow: none; } | > > > > > | 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 | table.list .check { width: 1%; } table.search th { background: rgb(217, 134, 40); background: rgba(217, 134, 40, 0.5); background: rgba(var(--gSecondColor), 0.5); } .userOrder .cur { background: rgb(217, 134, 40); background: rgba(var(--gSecondColor), 1.0); color: #fff; color: rgb(var(--gBgColor)); } .userOrder td, .userOrder th { position: relative; } .userOrder .icn { float: left; clear: left; color: #9c4f15; color: rgb(var(--gMainColor)); text-decoration: none; font-size: 12pt; line-height: 6pt; width: 12pt; height: 8pt; vertical-align: middle; font-weight: normal; text-shadow: 0px 0px 1px #fff; text-shadow: 0px 0px 1px rgb(var(--gBgColor)); } thead .icn:hover { color: darkred; text-shadow: none; } |
︙ | ︙ | |||
556 557 558 559 560 561 562 563 564 565 566 567 568 569 | #rapport tr { vertical-align: top; } #rapport table table { border: 1px solid rgb(217, 134, 40); border-color: rgba(217, 134, 40, 0.5); } #rapport table table tr th { width: 80%; } #rapport td, #rapport th { | > | 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 | #rapport tr { vertical-align: top; } #rapport table table { border: 1px solid rgb(217, 134, 40); border-color: rgba(217, 134, 40, 0.5); border-color: rgba(var(--gSecondColor), 0.5); } #rapport table table tr th { width: 80%; } #rapport td, #rapport th { |
︙ | ︙ | |||
583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 | text-align: right; } #rapport .parent { font-weight: bold; background: rgb(247, 164, 70); background: rgba(217, 134, 40, 0.2); } #rapport table table tfoot tr { background: rgb(247, 164, 70); background: rgba(217, 134, 40, 0.1); color: rgb(156, 79, 21); } #rapport .exercice { text-align: center; margin-bottom: .8em; padding-bottom: .5em; border-bottom: 1pt solid #999; | > > > | 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 | text-align: right; } #rapport .parent { font-weight: bold; background: rgb(247, 164, 70); background: rgba(217, 134, 40, 0.2); background: rgba(var(--gSecondColor), 0.2); } #rapport table table tfoot tr { background: rgb(247, 164, 70); background: rgba(217, 134, 40, 0.1); background: rgba(var(--gSecondColor), 0.1); color: rgb(156, 79, 21); color: rgb(var(--gMainColor)); } #rapport .exercice { text-align: center; margin-bottom: .8em; padding-bottom: .5em; border-bottom: 1pt solid #999; |
︙ | ︙ | |||
623 624 625 626 627 628 629 630 631 632 633 634 635 636 | text-align: center; font-size: 1.2em; line-height: .8em; vertical-align: middle; padding: .2em; font-family: "gicon", sans-serif; color: #9c4f15; text-shadow: 1px 1px 1px #999; transition: all .2s; border: none; cursor: pointer; } .icn[title]:after { | > | 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 | text-align: center; font-size: 1.2em; line-height: .8em; vertical-align: middle; padding: .2em; font-family: "gicon", sans-serif; color: #9c4f15; color: rgb(var(--gMainColor)); text-shadow: 1px 1px 1px #999; transition: all .2s; border: none; cursor: pointer; } .icn[title]:after { |
︙ | ︙ | |||
670 671 672 673 674 675 676 677 678 679 680 681 682 683 | text-decoration: none; border-radius: .5em; display: inline-block; text-align: center; padding: 0 .2em; background: rgb(247, 164, 70); background: rgba(217, 134, 40, 0.5); } .actions .icn:hover, .num a:hover, .icn.action:hover { color: darkred; background: #ff9; } | > | 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 | text-decoration: none; border-radius: .5em; display: inline-block; text-align: center; padding: 0 .2em; background: rgb(247, 164, 70); background: rgba(217, 134, 40, 0.5); background: rgba(var(--gMainColor), 0.5); } .actions .icn:hover, .num a:hover, .icn.action:hover { color: darkred; background: #ff9; } |
︙ | ︙ | |||
775 776 777 778 779 780 781 | float: right; } .memberList { clear: both; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 828 829 830 831 832 833 834 835 836 837 838 839 840 841 | float: right; } .memberList { clear: both; } .pagination { clear: both; list-style-type: none; padding: 0.4em 0; text-align: center; } |
︙ | ︙ | |||
1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 | .catList dd.desc { color: #666; margin: .2em 0 .2em 2em; } .catList dd.compte { color: #9c4f15; margin: .2em 0 .2em 2em; } .catList dd.actions { margin: .2em 0 1em 2em; } | > | 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 | .catList dd.desc { color: #666; margin: .2em 0 .2em 2em; } .catList dd.compte { color: #9c4f15; color: rgb(var(--gMainColor)); margin: .2em 0 .2em 2em; } .catList dd.actions { margin: .2em 0 1em 2em; } |
︙ | ︙ | |||
1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 | dl.describe ul { margin-left: 1em; } dl.cotisation { background: rgb(255, 174, 80); background: rgba(217, 134, 40, 0.2); padding: .5em; border-radius: .5em; margin: 1em; } dl.cotisation dt { font-weight: bold; | > | 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 | dl.describe ul { margin-left: 1em; } dl.cotisation { background: rgb(255, 174, 80); background: rgba(217, 134, 40, 0.2); background: rgba(var(--gSecondColor), 0.2); padding: .5em; border-radius: .5em; margin: 1em; } dl.cotisation dt { font-weight: bold; |
︙ | ︙ | |||
1219 1220 1221 1222 1223 1224 1225 | overflow: auto; } .hidden { display: none; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 | overflow: auto; } .hidden { display: none; } img.qrcode { float: right; padding: .5em; border: .5em solid #000; background: #fff; } |
Deleted src/www/admin/static/bg00.png version [065b3f5f78].
cannot compute difference between binary files
Deleted src/www/admin/static/bg01.png version [34bbaf6295].
cannot compute difference between binary files
Added src/www/admin/static/gdin_bg.png version [99cd57a4b4].
cannot compute difference between binary files
Added src/www/admin/static/scripts/color_helper.js version [301f28f6e3].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | (function () { if (!document.documentElement.style.setProperty) return; var logo_limit_x = 170; function colorToRGB(color) { // Conversion vers décimal RGB return color.replace(/^#/, '').match(/.{1,2}/g).map(function (el) { // On limite la luminosité comme ça, c'est pas parfait mais ça marche return Math.min(parseInt(el, 16), 210); }); } function changeColor(element, color) { var new_color = colorToRGB(color).join(', '); document.documentElement.style.setProperty('--' + element, new_color); applyLogoColors(); } function applyLogoColors() { var color = colorToRGB(document.getElementById('f_couleur2').value); var img = new Image; img.src = g.static_url + 'gdin_bg.png'; img.onload = function() { var canvas = document.createElement('canvas'); var ctx = canvas.getContext('2d'); canvas.width = img.width; canvas.height = img.height; ctx.drawImage(img, 0, 0, img.width, img.height, 0, 0, img.width, img.height); var imgData = ctx.getImageData(0, 0, img.width, img.height); var data = imgData.data; for (var i = 0, n = data.length; i < n; i += 4) { var x = (i / 4) % canvas.width; var grayscale = data[i] * .3 + data[i+1] * .59 + data[i+2] * .11; var factor = (grayscale / 255); data[i] = color[0]; // red data[i+1] = color[1]; // green data[i+2] = color[2]; // blue //data[i+3] = Math.max(0, data[i+3] - (x >= 170 ? 100 : 50)); } ctx.putImageData(imgData, 0, 0); var i = canvas.toDataURL('image/png'); document.querySelector('html').style.backgroundImage = 'url("' + i + '")'; document.querySelector('.menu').style.backgroundImage = 'url("' + i + '")'; document.getElementById('f_image_fond').value = i.substr(i.indexOf(',')+1); delete canvas2; delete canvas; delete ctx; }; } garradin.onload(function () { var couleurs = {'couleur1': 'gMainColor', 'couleur2': 'gSecondColor'}; for (var couleur in couleurs) { if (!couleurs.hasOwnProperty(couleur)) continue; var input = document.getElementById('f_' + couleur); input.oninput = function () { changeColor(couleurs[this.name], this.value); }; var reset_btn = document.createElement('input'); reset_btn.className = 'resetButton'; reset_btn.type = 'button'; reset_btn.value = 'RàZ'; reset_btn.onclick = function() { var input = this.previousSibling; input.value = input.getAttribute('placeholder'); changeColor(couleurs[input.name], input.value); return false; }; input.parentNode.insertBefore(reset_btn, input.nextSibling); } }); })(); |
Modified src/www/admin/static/wiki.css from [5907c3bd49] to [cdde98abac].
︙ | ︙ | |||
24 25 26 27 28 29 30 | } aside.fichier a { display: inline-block; margin-right: 1em; padding: .5em; padding-left: 1.8em; | | > | | 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 | } aside.fichier a { display: inline-block; margin-right: 1em; padding: .5em; padding-left: 1.8em; border: 1px solid #999; background: #eee; border-radius: .5em; background-repeat: no-repeat; background-position: .5em center; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAQCAYAAADAvYV+AAAAd0lEQVQoz2NgQAVNQDwDCTcw4AF3gPg/Er4xSBWnAXEHFL9HU/wWSS4FpFgZiJ+jKULHT4BYAWa6LhC/w6HwNRBrojvHEoi/oCn8BMQmuDzoBsQ/oQq/A7E9AwEQDMQ/gNiHgUggx0AN8IVI/AGkeA+ReCdJTgAAgMhKhf6mzTIAAAAASUVORK5CYII="); transition: background-color .2s, color .2s; } aside.fichier a:hover { background-color: #ccc; color: darkred; } .wikiContent figure.image { text-align: center; } |
︙ | ︙ | |||
70 71 72 73 74 75 76 | clear: right; } .wikiContent figure.image.gauche figcaption, .wikiContent figure.image.droite figcaption { font-size: .8em; } | < | 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | clear: right; } .wikiContent figure.image.gauche figcaption, .wikiContent figure.image.droite figcaption { font-size: .8em; } .imageBrowser { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999; |
︙ | ︙ | |||
105 106 107 108 109 110 111 | background: #fff; padding: 2%; max-height: 90%; max-width: 90%; border-radius: .5em; cursor: pointer; } | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 | background: #fff; padding: 2%; max-height: 90%; max-width: 90%; border-radius: .5em; cursor: pointer; } fieldset.wikiText { border: none; padding: 0; } fieldset.wikiMain, fieldset.wikiRights, fieldset.wikiEncrypt { float: right; width: 35%; margin-left: 3%; clear: right; } fieldset.wikiMain input[type=text] { min-width: 0; } #encryptPasswordDisplay { cursor: help; background: #ddd; } fieldset.wikiEncrypt .help { font-size: .9em; } fieldset.wikiMain #f_titre { width: 90%; font-size: 14pt; } fieldset.wikiMain #f_uri { width: 90%; } fieldset.wikiRights dl { font-size: 10pt; } fieldset.wikiRevision { clear: both; } fieldset.wikiRevision #f_modification { width: 90%; } .wikiFiles { text-align: center; } .wikiFooter, .wikiFiles { font-size: 0.8em; color: #666; border-top: 0.1em solid #ccc; clear: both; } .wikiMain samp { background: #eee; padding: 0.2em 0.3em; } .wikiChildren { margin: 1em 0 1em 1em; border: .1em solid #999; border-radius: .5em; padding: 1em; background: rgba(255, 255, 255, 0.5); float: right; clear: right; width: 25%; } .wikiChildren ul { color: #ccc; list-style-type: square; margin-left: 1em; } .wikiTree ul { margin-left: 1em; list-style-type: none; } .wikiTree ul ul { margin-left: 2em; } .wikiTree a { color: #666; } .wikiTree h3:before { content: "▸"; display: inline; margin-right: .5em; } .wikiTree li { margin: 0.2em 0; } .wikiTree h3 { font-size: 1em; font-weight: normal; } .wikiTree .current > h3 a { font-weight: bold; color: #000; } .wikiTree .choice { text-align: center; margin-bottom: 1em; } .breadCrumbs { margin-bottom: .8em; font-size: .9em; color: #999; } .breadCrumbs ul, .breadCrumbs li { list-style-type: none; display: inline; } .breadCrumbs li:before { content: "> "; } .breadCrumbs li a { color: #333; } .wikiSearch { } .wikiSearch fieldset { padding: .3em; } .wikiSearch input[type=text] { padding: .3em; } .wikiResults h3 { font-weight: normal; margin-bottom: .3em; } .wikiResults p { margin-bottom: .8em; font-size: .9em; } .wikiRevisions .length ins { text-decoration: none; color: green; } .wikiRevisions .length del { text-decoration: none; color: red; } .wikiRevisions .length i { font-style: normal; color: gray; } div.wikiRevision { width: 48%; margin: 1em 1%; text-align: center; float: left; } div.wikiRevision h3 { font-size: 1em; } div.wikiRevision h4 { font-weight: normal; font-size: .9em; } .diff .ins { background: #cfc; width: 45%; } .diff .del { background: #fcc; width: 45%; } .diff .line { width: 2%; padding: 0.2em; text-align: right; font-family: Mono; font-size: 90%; color: #666; } .diff .leftChange, .diff .rightChange { text-align: center; vertical-align: middle; } .diff ins { background: #9f9; } .diff del { background: #f99; } .diff hr { background: none; border: none; border-top: 5px dotted #fff; color: #fff; margin: .2em .4em; } .diff .separator { background: #ccc; } .diff { border-collapse: collapse; width: 100%; font-size: 0.9em; } .diff tr { border: 1px solid #ccc; vertical-align: top; } .diff .leftChange b, .diff .rightChange b { text-shadow: 1px 1px 1px #ccc; color: #666; } form#f_upload fieldset { position: relative; } form .fileUpload .uploadHelper_progress { position: absolute; bottom: 1em; left: 1em; right: 1em; text-align: center; padding: 1em; background: #ddd; box-shadow: 0px 0px 5px #999; border-radius: .5em; } form .fileUpload progress { width: 50%; } form#insertImage { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 10000; background: rgb(0, 0, 0); background: rgba(0, 0, 0, 0.75); } form#insertImage fieldset { box-shadow: 5px 5px 10px #000; margin: 1em; padding: 1em; background: #ddd; border-radius: .5em; text-align: center; } form#insertImage dt { margin: .2em 0; } form#insertImage .align input { font-size: 1.2em; line-height: 32px; background: #fff; background-position: 5px center; background-repeat: no-repeat; padding: 5px; padding-left: 42px; border: 1px solid #999; border-radius: 5px; margin: .5em; } form#insertImage .align input[name=""] { background-image: url("pics/img_flow.png"); } form#insertImage .align input[name="gauche"] { background-image: url("pics/img_left.png"); } form#insertImage .align input[name="droite"] { background-image: url("pics/img_right.png"); } form#insertImage .align input[name="centre"] { background-image: url("pics/img_center.png"); } form#insertImage .cancel input { font-size: 0.8em; background: transparent; padding: 5px; border: 1px solid #ccc; border-radius: 5px; margin: .5em; color: #666; cursor: pointer; } form#insertImage .align input:hover, form#insertImage .cancel input:hover { cursor: pointer; background-color: #eee; color: darkred; } |
Modified src/www/admin/wiki/_inc.php from [87acafcdb8] to [a2028cc023].
1 2 3 4 5 6 7 8 9 10 | <?php namespace Garradin; require_once __DIR__ . '/../_inc.php'; $session->requireAccess('wiki', Membres::DROIT_ACCES); $wiki = new Wiki; $wiki->setRestrictionCategorie($user->id_categorie, $user->droits->wiki); | > > | 1 2 3 4 5 6 7 8 9 10 11 12 | <?php namespace Garradin; require_once __DIR__ . '/../_inc.php'; $session->requireAccess('wiki', Membres::DROIT_ACCES); $wiki = new Wiki; $wiki->setRestrictionCategorie($user->id_categorie, $user->droits->wiki); $tpl->assign('custom_css', ['wiki.css']); |
Modified src/www/file.php from [20b291aa1b] to [ec478a03fa].
︙ | ︙ | |||
29 30 31 32 33 34 35 36 | } catch (\InvalidArgumentException $e) { throw new UserException('Ce fichier n\'existe pas.'); } $session = Membres\Session::get(); | > | | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | } catch (\InvalidArgumentException $e) { throw new UserException('Ce fichier n\'existe pas.'); } $session = Membres\Session::get(); $user = $session ? $session->getUser() : false; if (!$file->checkAccess($user)) { header('HTTP/1.1 403 Forbidden', true, 403); throw new UserException('Vous n\'avez pas accès à ce fichier.'); } if ($size) { $file->serveThumbnail($size); } else { $file->serve(); } |