Skip to content
Snippets Groups Projects
Commit c1b4dc38 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

New: Can add parameter &optioncss=print on url to have a page ready to print (menu removed)

parent 944345b6
No related branches found
No related tags found
No related merge requests found
......@@ -173,7 +173,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false)
$file=$dirtheme."/".$subdir."/thumb.png";
if (! file_exists($file)) $file=$dirtheme."/common/nophoto.jpg";
print '<table><tr><td>';
print '<a href="'.$_SERVER["PHP_SELF"].($edit?'?action=edit&theme=':'?theme=').$subdir.($fuser?'&id='.$fuser->id:'').'" style="font-weight: normal;" alt="'.$langs->trans("Preview").'">';
print '<a href="'.$_SERVER["PHP_SELF"].($edit?'?action=edit&theme=':'?theme=').$subdir.(! empty($_GET["optioncss"])?'&optioncss='.$_GET["optioncss"]:'').($fuser?'&id='.$fuser->id:'').'" style="font-weight: normal;" alt="'.$langs->trans("Preview").'">';
if ($subdir == $conf->global->MAIN_THEME) $title=$langs->trans("ThemeCurrentlyActive");
else $title=$langs->trans("ShowPreview");
print '<img src="'.$file.'" border="0" width="80" height="60" alt="'.$title.'" title="'.$title.'">';
......
......@@ -44,7 +44,11 @@ $left=($langs->direction=='rtl'?'right':'left');
/* ============================================================================== */
body {
<?php if (! empty($_GET["optioncss"]) && $_GET["optioncss"] == 'print') { ?>
background-color: #FFFFFF;
<?php } else { ?>
background-color: #FFFFFF;
<?php } ?>
color: #101010;
font-size: 12px;
font-family: arial, sans-serif, verdana, helvetica;
......
......@@ -43,7 +43,11 @@ $left=($langs->direction=='rtl'?'right':'left');
/***** Style du fond *****/
body {
background: #e0ebeb;
<?php if (! empty($_GET["optioncss"]) && $_GET["optioncss"] == 'print') { ?>
background-color: #FFFFFF;
<?php } else { ?>
background-color: #e0ebeb;
<?php } ?>
margin: 0px;
font: 12px helvetica, verdana, arial, sans-serif;
}
......
......@@ -46,8 +46,11 @@ $left=($langs->direction=='rtl'?'right':'left');
/* ============================================================================== */
body {
background-color: #F4F4F4;
<?php if (! empty($_GET["optioncss"]) && $_GET["optioncss"] == 'print') { ?>
background-color: #FFFFFF;
<?php } else { ?>
background: #f9f9f9 url(<?php echo DOL_URL_ROOT.'/theme/eldy/img/headbg.jpg' ?>) 0 0 no-repeat;
<?php } ?>
color: #101010;
font-size: 12px;
font-family: arial,tahoma,verdana,helvetica;
......
......@@ -44,8 +44,11 @@ $left=($langs->direction=='rtl'?'right':'left');
/* ============================================================================== */
body {
background-color: #F8F8F8;
background-image: url(<?php echo DOL_URL_ROOT.'/theme/freelug/img/background.png' ?>);
<?php if (! empty($_GET["optioncss"]) && $_GET["optioncss"] == 'print') { ?>
background-color: #FFFFFF;
<?php } else { ?>
background: #F8F8F8 url(<?php echo DOL_URL_ROOT.'/theme/freelug/img/background.png' ?>);
<?php } ?>
text-decoration: none ;
color: #101010;
font-size: 12px;
......
......@@ -43,7 +43,11 @@ $left=($langs->direction=='rtl'?'right':'left');
/***** Style du fond *****/
body {
background: #AAA5A0;
<?php if (! empty($_GET["optioncss"]) && $_GET["optioncss"] == 'print') { ?>
background-color: #FFFFFF;
<?php } else { ?>
background-color: #AAA5A0;
<?php } ?>
font-size: 12px;
font-family: helvetica, verdana, arial, sans-serif;
margin-top: 0;
......
......@@ -44,7 +44,11 @@ $left=($langs->direction=='rtl'?'right':'left');
/* ============================================================================== */
body {
background: #ebebe0;
<?php if (! empty($_GET["optioncss"]) && $_GET["optioncss"] == 'print') { ?>
background-color: #FFFFFF;
<?php } else { ?>
background-color: #ebebe0;
<?php } ?>
font-size: 12px;
font-family: helvetica, verdana, arial, sans-serif;
margin-top: 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment