From 4127fded2af685a7858ac6a3e989e2034834cdfb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 27 Aug 2020 03:14:55 +0200 Subject: [PATCH 1/2] WIP --- .../lib/recruitment_recruitmentcandidature.lib.php | 5 +++++ htdocs/recruitment/recruitmentcandidature_card.php | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/recruitment/lib/recruitment_recruitmentcandidature.lib.php b/htdocs/recruitment/lib/recruitment_recruitmentcandidature.lib.php index 44eb0bafe7c..63cd5ce0d7b 100644 --- a/htdocs/recruitment/lib/recruitment_recruitmentcandidature.lib.php +++ b/htdocs/recruitment/lib/recruitment_recruitmentcandidature.lib.php @@ -41,6 +41,11 @@ function recruitmentCandidaturePrepareHead($object) $head[$h][2] = 'card'; $h++; + $head[$h][0] = dol_buildpath("/recruitment/recruitmentrating_card.php", 1).'?id='.$object->id; + $head[$h][1] = $langs->trans("Rating"); + $head[$h][2] = 'rating'; + $h++; + if (isset($object->fields['note_public']) || isset($object->fields['note_private'])) { $nbNote = 0; diff --git a/htdocs/recruitment/recruitmentcandidature_card.php b/htdocs/recruitment/recruitmentcandidature_card.php index 49587f76b09..2cde35c85e6 100644 --- a/htdocs/recruitment/recruitmentcandidature_card.php +++ b/htdocs/recruitment/recruitmentcandidature_card.php @@ -1,6 +1,5 @@ - * Copyright (C) ---Put here your own copyright and developer email--- +/* Copyright (C) 2020 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by From 180a49601b56f9410228845c9da716a3ca573f28 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 27 Aug 2020 11:01:41 +0200 Subject: [PATCH 2/2] Use CSS to define size of logo on public pages. --- htdocs/core/lib/ticket.lib.php | 6 +----- htdocs/opensurvey/fonctions.php | 4 ---- htdocs/public/members/new.php | 5 ----- htdocs/public/onlinesign/newonlinesign.php | 4 ---- htdocs/public/payment/newpayment.php | 4 ---- htdocs/public/payment/paymentko.php | 4 ---- htdocs/public/payment/paymentok.php | 4 ---- htdocs/public/recruitment/view.php | 4 ---- htdocs/theme/eldy/global.inc.php | 4 ++++ htdocs/theme/md/style.css.php | 3 +++ 10 files changed, 8 insertions(+), 34 deletions(-) diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index 8c6f154c840..d47bfb2cab2 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -211,9 +211,9 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $ top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers print ''; + print '
'; // Define urllogo - $width = 0; if (!empty($conf->global->TICKET_SHOW_COMPANY_LOGO) || !empty($conf->global->TICKET_PUBLIC_INTERFACE_TOPIC)) { // Print logo if (!empty($conf->global->TICKET_SHOW_COMPANY_LOGO)) @@ -222,17 +222,14 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $ if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$mysoc->logo_small); - $width = 150; } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$mysoc->logo); - $width = 150; } elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) { $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg'; } } } - print '
'; // Output html code for logo if ($urllogo || !empty($conf->global->TICKET_PUBLIC_INTERFACE_TOPIC)) { @@ -241,7 +238,6 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $ if ($urllogo) { print ''; print ''; print ''; } diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 635fc3ceb5c..7be560cca28 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -90,7 +90,6 @@ function llxHeaderSurvey($title, $head = "", $disablejs = 0, $disablehead = 0, $ print "\n"; // Show logo (search order: logo defined by PAYMENT_LOGO_suffix, then PAYMENT_LOGO, then small company logo, large company logo, theme logo, common logo) - $width = 0; // Define logo and logosmall $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; @@ -102,12 +101,10 @@ function llxHeaderSurvey($title, $head = "", $disablejs = 0, $disablehead = 0, $ { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); - $width = 150; } elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); - $width = 150; } // Output html code for logo @@ -116,7 +113,6 @@ function llxHeaderSurvey($title, $head = "", $disablejs = 0, $disablehead = 0, $ print '
'; print '
'; print ''; print '
'; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 7eb45f008e6..501fccc6ed3 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -100,21 +100,17 @@ function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $ print ''; // Define urllogo - $width = 0; $urllogo = DOL_URL_ROOT.'/theme/common/login_logo.png'; if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_small); - $width = 150; } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo); - $width = 150; } elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) { $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg'; - $width = 150; } print '
'; @@ -124,7 +120,6 @@ function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $ print '
'; print '
'; print ''; print '
'; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index d29d441c611..8c248734175 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -156,7 +156,6 @@ print ''."\n"; print ''."\n"; // Show logo (search order: logo defined by ONLINE_SIGN_LOGO_suffix, then ONLINE_SIGN_LOGO_, then small company logo, large company logo, theme logo, common logo) -$width = 0; // Define logo and logosmall $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; @@ -171,12 +170,10 @@ if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumb { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); - $width = 150; } elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); - $width = 150; } // Output html code for logo if ($urllogo) @@ -184,7 +181,6 @@ if ($urllogo) print '
'; print '
'; print ''; print '
'; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index b2931d4cc26..f7f632459d4 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -747,7 +747,6 @@ print "\n"; // Show logo (search order: logo defined by PAYMENT_LOGO_suffix, then PAYMENT_LOGO, then small company logo, large company logo, theme logo, common logo) -$width = 0; // Define logo and logosmall $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; @@ -762,12 +761,10 @@ if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumb { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); - $width = 150; } elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); - $width = 150; } // Output html code for logo @@ -776,7 +773,6 @@ if ($urllogo) print '
'; print '
'; print ''; print '
'; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { diff --git a/htdocs/public/payment/paymentko.php b/htdocs/public/payment/paymentko.php index 4b87cf45b03..8f69fe02c9b 100644 --- a/htdocs/public/payment/paymentko.php +++ b/htdocs/public/payment/paymentko.php @@ -207,7 +207,6 @@ print ''."\n"; print '
'."\n"; // Show logo (search order: logo defined by PAYMENT_LOGO_suffix, then PAYMENT_LOGO, then small company logo, large company logo, theme logo, common logo) -$width = 0; // Define logo and logosmall $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; @@ -222,12 +221,10 @@ if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumb { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); - $width = 150; } elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); - $width = 150; } // Output html code for logo @@ -236,7 +233,6 @@ if ($urllogo) print '
'; print '
'; print ''; print '
'; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index b316e7c68a8..5132cb65092 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -147,7 +147,6 @@ print '
'."\n"; // Show logo (search order: logo defined by PAYMENT_LOGO_suffix, then PAYMENT_LOGO, then small company logo, large company logo, theme logo, common logo) -$width = 0; // Define logo and logosmall $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; @@ -162,12 +161,10 @@ if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumb { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); - $width = 150; } elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); - $width = 150; } // Output html code for logo @@ -176,7 +173,6 @@ if ($urllogo) print '
'; print '
'; print ''; print '
'; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { diff --git a/htdocs/public/recruitment/view.php b/htdocs/public/recruitment/view.php index 2b07d303aa9..04af0f5ad0f 100644 --- a/htdocs/public/recruitment/view.php +++ b/htdocs/public/recruitment/view.php @@ -182,7 +182,6 @@ print ''."\n"; print '
'."\n"; // Show logo (search order: logo defined by ONLINE_SIGN_LOGO_suffix, then ONLINE_SIGN_LOGO_, then small company logo, large company logo, theme logo, common logo) -$width = 0; // Define logo and logosmall $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; @@ -197,12 +196,10 @@ if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumb { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); - $width = 150; } elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); - $width = 150; } // Output html code for logo if ($urllogo) @@ -210,7 +207,6 @@ if ($urllogo) print '
'; print '
'; print ''; print '
'; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 972221079c9..01e2194e992 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -319,6 +319,10 @@ input.buttonpaymentstripe { background-repeat: no-repeat; background-position: 8px 11px; } +.logopublicpayment #dolpaymentlogo { + max-height: 100px; +} + a.buttonticket { padding-left: 5px; padding-right: 5px; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index fb9f0239d10..48f0c70375e 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -452,6 +452,9 @@ input.buttonpaymentstripe { background-repeat: no-repeat; background-position: 8px 7px; } +.logopublicpayment #dolpaymentlogo { + max-height: 100px; +} a.buttonticket { padding-left: 5px; padding-right: 5px;