From: vincent@cubedesigners.com Date: Thu, 11 Jun 2020 09:45:23 +0000 (+0000) Subject: done #3696 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=7f4b97cb0884d59b92a3fd3954a5dbd568a95ed8;p=cubeextranet.git done #3696 @0.25 --- diff --git a/images/ws/logo.png b/images/ws/logo.png index 3582045fe..9a2ecbc22 100644 Binary files a/images/ws/logo.png and b/images/ws/logo.png differ diff --git a/images/ws/logo.svg b/images/ws/logo.svg new file mode 100644 index 000000000..8aadcc948 --- /dev/null +++ b/images/ws/logo.svg @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/inc/commons/class.common.page.php b/inc/commons/class.common.page.php index dee603750..2187177ba 100644 --- a/inc/commons/class.common.page.php +++ b/inc/commons/class.common.page.php @@ -1,209 +1,224 @@ '; - $res .= ''; - // Titre de la page - $res .= '' . TITLE . ''; - $res .= ''; - $res .= ''; - // Haut de la page - $res .= ''; - return $res; - } - - public static function search($args) { - global $core; - - if (!isset($args[0])) { - return; - } - if (!commonDroits::recherche($args[0])) { - return; - } - - cubePage::emptyfield(); - $settings = $core->user->getSettings($args[0]); - $action = 'search' . ucfirst($args[0]); - - $default = isset($_POST['q']) ? $_POST['q'] : ''; - // Formulaire de recherche - $res = '
'; - $res .= ''; - $res .= '
'; - return $res; - } - - public static function nav($args) { - // Barre d'onglets - global $core; - // Liste des onglets - if (!$core->user) { - // Si pas d'utilisateur authentifié - $onglets = array(__('Identification') => 'login'); - } else { - // Navigation personalisée de l'utilisateur en fonction de ses droits - if (MODE == 'extranet') { - $onglets = extranetDroits::navigation(); - } elseif (MODE == 'ws') { - $onglets = wsDroits::navigation(); - } - } - - $supp = array('stats' => 'publications'); - - $res = ''; - return $res; - } - - public static function barre($filtres = null, $action = null, $dashboard = null, $shortcuts = null, $big = false) { - if (is_null($shortcuts) && is_null($filtres)) { - return '
'; - } - - $class = ''; - if ($big) { - $class = ' class="big"'; - } - - $res = '
'; - $res .= '
'; - - if (!is_null($shortcuts)) { - $res .= self::shortcuts($shortcuts); - } - - if (!is_null($filtres) && is_array($filtres)) { - $res .= '
'; - $hasRealFilters = false; - foreach ($filtres as $filtre) { - $res .= $filtre->display(); - if ($filtre instanceof commonFiltre) { - $hasRealFilters = true; - } - } - if ($hasRealFilters) { - $res .= '
' . __('Effacer les filtres') . ''; - if (commonDroits::dashboard(false)) { - $res .= '
' . __('Ajouter à mon tableau de bord') . ''; - } - $res .= '
'; - } - $res .= '
'; - } - $res .= '
'; - $res .= '
'; - return $res; - } - - public static function shortcuts($shortcuts) { - global $core; - - $res = ''; - foreach ($shortcuts as $s) { - $res .= '
' . $s . '
'; - } - return $res; - } - - public static function tMain($id = null, $big = false) { - $id = is_null($id) ? '' : ' id="' . $id . '"'; - $big = $big ? ' class="big"' : ''; - return '
'; - } - - public static function bh($class = '') { - $class = trim('b ' . $class); - return '
'; - } - - public static function bf($max = false) { - return '
'; - } - - public static function pager($current, $nb, $par_page, $url) { - $style = 'pgleft'; - if ($par_page == 0 || $nb <= $par_page) { - return; - } - $par_groupe = 10; - $pager = new cubePager($current, $nb, $par_page, $par_groupe); - $pager->html_link_sep = ' '; - $pager->html_prev = '«'; - $pager->html_next = '»'; - - $pager->base_url = '#" rel="' . $url . '" class="ajax'; - - $links = $pager->getLinks(); - if (trim($links) == '') { - return ''; - } - - $res = '
'; - $res .= $links; - $res .= '
'; - - return $res; - } - - public static function bMain() { - return '
'; - } - - public static function footer() { - $res = ''; - $res .= cubePage::googleAnalytics(GA); - $res.='
'; - $res.='
'; - $res.= cubeMedia::image(IMG . '/loader.gif', 32, 32, __('Chargement')); - $res.='

' . __('Chargement en cours. Veuillez patienter ...') . '

'; - $res.='
'; - $res.='
'; - $res .= ''; - $res .= ''; - return $res; - } +class commonPage +{ + + public static function logo() + { + + if (THEME) { + return cubeMedia::image(IMG . '/white/' . THEME . '/logo.png'); + } + + return cubeMedia::image(IMG . '/logo.png'); + } + + public static function header($args) + { + global $js; + global $core; + // Entête HTML + $res = ''; + $res .= ''; + // Titre de la page + $res .= '' . TITLE . ''; + $res .= ''; + $res .= ''; + // Haut de la page + $res .= ''; + return $res; + } + + public static function search($args) + { + global $core; + + if (!isset($args[0])) { + return; + } + if (!commonDroits::recherche($args[0])) { + return; + } + + cubePage::emptyfield(); + $settings = $core->user->getSettings($args[0]); + $action = 'search' . ucfirst($args[0]); + + $default = isset($_POST['q']) ? $_POST['q'] : ''; + // Formulaire de recherche + $res = '
'; + $res .= ''; + $res .= '
'; + return $res; + } + + public static function nav($args) + { + // Barre d'onglets + global $core; + // Liste des onglets + if (!$core->user) { + // Si pas d'utilisateur authentifié + $onglets = array(__('Identification') => 'login'); + } else { + // Navigation personalisée de l'utilisateur en fonction de ses droits + if (MODE == 'extranet') { + $onglets = extranetDroits::navigation(); + } elseif (MODE == 'ws') { + $onglets = wsDroits::navigation(); + } + } + + $supp = array('stats' => 'publications'); + + $res = ''; + return $res; + } + + public static function barre($filtres = null, $action = null, $dashboard = null, $shortcuts = null, $big = false) + { + if (is_null($shortcuts) && is_null($filtres)) { + return '
'; + } + + $class = ''; + if ($big) { + $class = ' class="big"'; + } + + $res = '
'; + $res .= '
'; + + if (!is_null($shortcuts)) { + $res .= self::shortcuts($shortcuts); + } + + if (!is_null($filtres) && is_array($filtres)) { + $res .= '
'; + $hasRealFilters = false; + foreach ($filtres as $filtre) { + $res .= $filtre->display(); + if ($filtre instanceof commonFiltre) { + $hasRealFilters = true; + } + } + if ($hasRealFilters) { + $res .= '
' . __('Effacer les filtres') . ''; + if (commonDroits::dashboard(false)) { + $res .= '
' . __('Ajouter à mon tableau de bord') . ''; + } + $res .= '
'; + } + $res .= '
'; + } + $res .= '
'; + $res .= '
'; + return $res; + } + + public static function shortcuts($shortcuts) + { + global $core; + + $res = ''; + foreach ($shortcuts as $s) { + $res .= '
' . $s . '
'; + } + return $res; + } + + public static function tMain($id = null, $big = false) + { + $id = is_null($id) ? '' : ' id="' . $id . '"'; + $big = $big ? ' class="big"' : ''; + return '
'; + } + + public static function bh($class = '') + { + $class = trim('b ' . $class); + return '
'; + } + + public static function bf($max = false) + { + return '
'; + } + + public static function pager($current, $nb, $par_page, $url) + { + $style = 'pgleft'; + if ($par_page == 0 || $nb <= $par_page) { + return; + } + $par_groupe = 10; + $pager = new cubePager($current, $nb, $par_page, $par_groupe); + $pager->html_link_sep = ' '; + $pager->html_prev = '«'; + $pager->html_next = '»'; + + $pager->base_url = '#" rel="' . $url . '" class="ajax'; + + $links = $pager->getLinks(); + if (trim($links) == '') { + return ''; + } + + $res = '
'; + $res .= $links; + $res .= '
'; + + return $res; + } + + public static function bMain() + { + return '
'; + } + + public static function footer() + { + $res = ''; + $res .= cubePage::googleAnalytics(GA); + $res .= '
'; + $res .= '
'; + $res .= cubeMedia::image(IMG . '/loader.gif', 32, 32, __('Chargement')); + $res .= '

' . __('Chargement en cours. Veuillez patienter ...') . '

'; + $res .= '
'; + $res .= '
'; + $res .= ''; + $res .= ''; + return $res; + } } + ?> \ No newline at end of file