NEW new demo entry page

This commit is contained in:
Laurent Destailleur 2017-02-03 14:48:16 +01:00
parent bc43a052f4
commit bd812a0bef
8 changed files with 133 additions and 74 deletions

View File

@ -70,12 +70,13 @@ PredefinedMailContentSendFichInter=__CONTACTCIVNAME__\n\nYou will find here the
PredefinedMailContentThirdparty=__CONTACTCIVNAME__\n\n__PERSONALIZED__\n\n__SIGNATURE__
DemoDesc=Dolibarr is a compact ERP/CRM supporting several functional modules. A demo showcasing all modules makes no sense as this scenario never occurs. So, several demo profiles are available.
ChooseYourDemoProfil=Choose the demo profile that best suits your needs...
ChooseYourDemoProfilMore=...or build your own profile<br>(manual module selection)
DemoFundation=Manage members of a foundation
DemoFundation2=Manage members and bank account of a foundation
DemoCompanyServiceOnly=Manage a freelance activity selling service only
DemoCompanyServiceOnly=Company or freelance selling service only
DemoCompanyShopWithCashDesk=Manage a shop with a cash desk
DemoCompanyProductAndStocks=Manage a small or medium company selling products
DemoCompanyAll=Manage a small or medium company with multiple activities (all main modules)
DemoCompanyProductAndStocks=Company selling products with a shop
DemoCompanyAll=Company with multiple activities (all main modules)
CreatedBy=Created by %s
ModifiedBy=Modified by %s
ValidatedBy=Validated by %s

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

View File

@ -54,6 +54,13 @@ $alwaysuncheckedmodules=array();
$alwayshiddencheckedmodules=array();
$alwayshiddenuncheckedmodules=array();
$url=DOL_URL_ROOT.'/index.php?';
$url.=($url?'&':'').($conf->dol_hide_topmenu?'dol_hide_topmenu='.$conf->dol_hide_topmenu:'');
$url.=($url?'&':'').($conf->dol_hide_leftmenu?'dol_hide_leftmenu='.$conf->dol_hide_leftmenu:'');
$url.=($url?'&':'').($conf->dol_optimize_smallscreen?'dol_optimize_smallscreen='.$conf->dol_optimize_smallscreen:'');
$url.=($url?'&':'').($conf->dol_no_mouse_hover?'dol_no_mouse_hover='.$conf->dol_no_mouse_hover:'');
$url.=($url?'&':'').($conf->dol_use_jmobile?'dol_use_jmobile='.$conf->dol_use_jmobile:'');
$tmpaction = 'view';
$parameters=array();
$object=new stdClass();
@ -64,22 +71,38 @@ if (empty($reshook))
$demoprofiles=array(
array('default'=>'1', 'key'=>'profdemoservonly','label'=>'DemoCompanyServiceOnly',
'disablemodules'=>'adherent,barcode,cashdesk,don,expedition,externalsite,incoterm,mailmanspip,margin,prelevement,product,productbatch,stock',
'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot8.png'),
//'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot8.png',
'icon'=>DOL_URL_ROOT.'/public/demo/demo-profile-service.jpg',
'url'=>$url
),
array('default'=>'-1','key'=>'profdemoshopwithdesk','label'=>'DemoCompanyShopWithCashDesk',
'disablemodules'=>'adherent,don,externalsite,ficheinter,incoterm,mailmanspip,prelevement,product,productbatch,stock',
'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot2.png'),
'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot2.png',
'url'=>$url
),
array('default'=>'0', 'key'=>'profdemoprodstock','label'=>'DemoCompanyProductAndStocks',
'disablemodules'=>'adherent,contrat,don,externalsite,ficheinter,mailmanspip,prelevement,service',
'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot2.png'),
array('default'=>'0', 'key'=>'profdemoall','label'=>'DemoCompanyAll',
'disablemodules'=>'adherent,don,externalsite,mailmanspip',
'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot9.png'),
//'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot2.png',
'icon'=>DOL_URL_ROOT.'/public/demo/demo-profile-product.jpg',
'url'=>$url
),
array('default'=>'-1', 'key'=>'profdemofun','label'=>'DemoFundation',
'disablemodules'=>'banque,barcode,cashdesk,commande,commercial,compta,comptabilite,contrat,expedition,externalsite,ficheinter,incoterm,mailmanspip,margin,prelevement,product,productbatch,projet,propal,propale,service,societe,stock,tax',
'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot6.png'),
'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot6.png',
'url'=>$url
),
array('default'=>'0', 'key'=>'profdemofun2','label'=>'DemoFundation2',
'disablemodules'=>'barcode,cashdesk,commande,commercial,compta,comptabilite,contrat,expedition,externalsite,ficheinter,incoterm,mailmanspip,margin,prelevement,product,productbatch,projet,propal,propale,service,societe,stock,tax',
'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot6.png')
//'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot6.png',
'icon'=>DOL_URL_ROOT.'/public/demo/demo-profile-foundation.jpg',
'url'=>$url
),
// All demo profile
array('default'=>'0', 'key'=>'profdemoall','label'=>'ChooseYourDemoProfilMore',
'disablemodules'=>'adherent,don,externalsite,mailmanspip',
//'icon'=>DOL_URL_ROOT.'/public/demo/dolibarr_screenshot9.png'
'icon'=>DOL_URL_ROOT.'/public/demo/demo-profile-all.jpg'
)
);
// Visible
@ -209,14 +232,8 @@ if (GETPOST("action") == 'gotodemo')
// Do redirect to login page
if ($disablestring)
{
$url='';
$url.=($url?'&':'').($conf->dol_hide_topmenu?'dol_hide_topmenu='.$conf->dol_hide_topmenu:'');
$url.=($url?'&':'').($conf->dol_hide_leftmenu?'dol_hide_leftmenu='.$conf->dol_hide_leftmenu:'');
$url.=($url?'&':'').($conf->dol_optimize_smallscreen?'dol_optimize_smallscreen='.$conf->dol_optimize_smallscreen:'');
$url.=($url?'&':'').($conf->dol_no_mouse_hover?'dol_no_mouse_hover='.$conf->dol_no_mouse_hover:'');
$url.=($url?'&':'').($conf->dol_use_jmobile?'dol_use_jmobile='.$conf->dol_use_jmobile:'');
if (GETPOST('urlfrom')) $url.=($url?'&':'').'urlfrom='.urlencode(GETPOST('urlfrom','alpha'));
$url=DOL_URL_ROOT.'/index.php?'.($url?$url.'&':'').'disablemodules='.$disablestring;
$url.=($url?'&':'').'disablemodules='.$disablestring;
header("Location: ".$url);
exit;
}
@ -231,18 +248,16 @@ $head='';
$head.='<meta name="keywords" content="demo,online,demonstration,example,test,erp,crm,demos,web">'."\n";
$head.='<meta name="description" content="Dolibarr ERP and CRM demo. You can test here several profiles for Dolibarr ERP and CRM demonstration.">'."\n";
$head.='<style type="text/css">'."\n";
$head.='.body { font: 12px arial,verdana,helvetica !important; }'."\n";
$head.='.CTable {
padding: 6px;
font: 12px arial,verdana,helvetica;
font-weight: normal;
color: #444444 !important;
margin: 8px 0px 8px 2px;
border: 1px solid #bbb;
/*border: 1px solid #bbb;
border-radius: 8px;
-moz-border-radius: 8px;
-moz-border-radius: 8px;*/
background: -webkit-linear-gradient(bottom, rgb(255,255,255) 85%, rgb(255,255,255) 100%);
@ -251,7 +266,13 @@ background: -webkit-linear-gradient(bottom, rgb(255,255,255) 85%, rgb(255,255,25
margin-top: 6px;
-webkit-column-count: 4; /* Chrome, Safari, Opera */
-moz-column-count: 4; /* Firefox */
column-count: 4;
column-count: 3;
text-align: left;
}
.demomaxoveflow {
max-width: 100px;
overflow: hidden;
text-overflow: ellipsis;
}
@media only screen and (max-width: 840px)
{
@ -259,6 +280,7 @@ background: -webkit-linear-gradient(bottom, rgb(255,255,255) 85%, rgb(255,255,25
-webkit-column-count: 3; /* Chrome, Safari, Opera */
-moz-column-count: 3; /* Firefox */
column-count: 3;
text-align: left;
}
}
@media only screen and (max-width: 640px)
@ -267,6 +289,7 @@ background: -webkit-linear-gradient(bottom, rgb(255,255,255) 85%, rgb(255,255,25
-webkit-column-count: 2; /* Chrome, Safari, Opera */
-moz-column-count: 2; /* Firefox */
column-count: 2;
text-align: left;
}
}
@media only screen and (max-width: 420px)
@ -275,6 +298,7 @@ background: -webkit-linear-gradient(bottom, rgb(255,255,255) 85%, rgb(255,255,25
-webkit-column-count: 1; /* Chrome, Safari, Opera */
-moz-column-count: 1; /* Firefox */
column-count: 1;
text-align: left;
}
}
</style>
@ -309,20 +333,23 @@ llxHeaderVierge($langs->trans("DolibarrDemo"), $head);
print "\n";
print '<table style="font-size:14px;" class="centpercent" summary="Main table for Dolibarr demos">';
print '<tr><td>';
print '<div class="center"><a alt="Official portal of your ERP CRM application" targe="_blank" href="https://www.dolibarr.org"><img class="demologo" src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.png" alt="Dolibarr logo"></a></div><br>';
print '<br>';
print '<div class="demoban demobackground">';
print '<div class="right" style="padding-right: 30px; padding-top: 30px;">';
print '<a alt="Official portal of your ERP CRM application" targe="_blank" href="https://www.dolibarr.org"><img class="demologo" src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.png" alt="Dolibarr logo"></a>';
print '</div>';
print '</div>';
print '<div class="demobantext" style="max-width: 1024px;">';
print '<div style="font-size: 20px; padding: 40px;">';
print '<div style="text-align: justify;">'.$langs->trans("DemoDesc").'</div><br>';
print '<br>';
print '<font color="#555577"><b>'.$langs->trans("ChooseYourDemoProfil").'</b></font>';
print '</div>';
print '</div>';
print '</td></tr>';
print '<tr><td>';
//print '<table width="100%" summary="List of Dolibarr demos" class="notopnoleft">'."\n";
print '<div class="clearboth"></div>';
print '<div class="demobanbox">';
$i=0;
foreach ($demoprofiles as $profilearray)
{
@ -339,11 +366,12 @@ foreach ($demoprofiles as $profilearray)
//print $urlfrom;
if (! empty($profilearray['url'])) $urlwithmod=$profilearray['url'];
//if ($i % $NBOFCOLS == 0) print '<tr>';
//print '<tr>';
//print '<td>'."\n";
print '<form method="POST" name="form'.$profilearray['key'].'" action="'.$_SERVER["PHP_SELF"].'">'."\n";
if (empty($profilearray['url']))
{
print '<div class="clearboth"></div>';
}
print '<form method="POST" class="valigntop inline-block" name="form'.$profilearray['key'].'" action="'.$_SERVER["PHP_SELF"].'#a1'.$profilearray['key'].'">'."\n";
print '<input type="hidden" name="action" value="gotodemo">'."\n";
print '<input type="hidden" name="urlfrom" value="'.dol_escape_htmltag($urlfrom).'">'."\n";
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'."\n";
@ -354,20 +382,35 @@ foreach ($demoprofiles as $profilearray)
print '<input type="hidden" name="dol_no_mouse_hover" value="'.$conf->dol_no_mouse_hover.'">'."\n";
print '<input type="hidden" name="dol_use_jmobile" value="'.$conf->dol_use_jmobile.'">'."\n";
print '<table summary="Dolibarr online demonstration for profile '.$profilearray['label'].'" style="font-size:14px;" class="centpercent CTable CTableRow'.($i%2==0?'1':'0').'">'."\n";
// Title
print '<tr>';
print '<td width="130" id="a1'.$profilearray['key'].'" class="'.(empty($profilearray['url'])?'modulelineshow cursorpointer':'nomodulelines').'"><a href="'.$urlwithmod.'" class="'.(empty($profilearray['url'])?'modulelineshow':'nomodulelines').'"><img class="demothumb" src="'.$profilearray['icon'].'" alt="Demo '.$profilearray['label'].'"></a></td>';
print '<td id="a2'.$profilearray['key'].'" class="'.(empty($profilearray['url'])?'modulelineshow cursorpointer':'nomodulelines').'"><a href="'.$urlwithmod.'" class="'.(empty($profilearray['url'])?'modulelineshow':'nomodulelines').'">'.$langs->trans($profilearray['label']).'</a></td>';
print '</tr>'."\n";
print '<div summary="Dolibarr online demonstration for profile '.$profilearray['label'].'" class="center inline-block CTable CTableRow'.($i%2==0?'1':'0').'" style="width: 400px">'."\n";
print '<div id="a1'.$profilearray['key'].'" class="'.(empty($profilearray['url'])?'modulelineshow cursorpointer':'nomodulelines').'">';
print '<a href="'.$urlwithmod.'" class="'.(empty($profilearray['url'])?'modulelineshow':'nomodulelines').'">';
print '<div style="padding: 10px;">';
print '<img class="demothumb" src="'.$profilearray['icon'].'" alt="Demo '.$profilearray['label'].'">';
print '<div class="clearboth"></div>';
print '<div style=""><div class="demothumbtext">';
print $langs->trans($profilearray['label']);
print '</div></div>';
print '</div>';
print '</a>';
// Modules
if (empty($profilearray['url']))
{
print '<tr id="tr1'.$profilearray['key'].'" class="moduleline">';
print '<td colspan="2">';
print '<div id="tr1'.$profilearray['key'].'" class="moduleline hidden" style="font-size:14px; line-height: 110%;">';
print $langs->trans("ThisIsListOfModules").'<br>';
print '<div class="csscolumns">';
//print '<table width="100%">';
$listofdisabledmodules=explode(',',$profilearray['disablemodules']);
$j=0;
$nbcolsmod=empty($conf->dol_optimize_smallscreen)?4:3;
@ -393,44 +436,36 @@ foreach ($demoprofiles as $profilearray)
{
$modulo=($j % $nbcolsmod);
//if ($modulo == 0) print '<tr>';
//print '<td>';
print '<!-- id='.$val->numero.' -->';
print '<div class="nowrap">';
print '<input type="checkbox" class="checkbox" name="'.$modulekeyname.'" value="1"';
if (in_array($modulekeyname,$alwaysuncheckedmodules)) print ' disabled';
if (! in_array($modulekeyname,$alwaysuncheckedmodules) && (! in_array($modulekeyname,$listofdisabledmodules) || in_array($modulekeyname,$alwayscheckedmodules))) print ' checked';
print '> '.$val->getName().'<br>';
//print '</td>';
print '> <div class="inline-block demomaxoveflow">'.$val->getName().'</div><br>';
print '</div>';
//if ($modulo == ($nbcolsmod - 1)) print '</tr>';
$j++;
}
}
//print '</table>';
print '</div></td>';
print '</tr>'."\n";
print '<tr id="tr2'.$profilearray['key'].'" class="moduleline"><td colspan="2" align="center"><input type="submit" value=" &nbsp; &nbsp; '.$langs->trans("Start").' &nbsp; &nbsp; " class="button"></td></tr>';
print '</div>';
print '<div class="center">';
print '<input type="submit" value=" &nbsp; &nbsp; '.$langs->trans("Start").' &nbsp; &nbsp; " class="button">';
print '</div>';
print '</div>';
}
print '</table>';
print '</div></div>';
print '</form>'."\n";
//print '</td>';
//if ($i % $NBOFCOLS == ($NBOFCOLS-1)) print '</tr>'."\n";
//print '</tr>'."\n";
$i++;
}
}
//print '</table>';
print '</td>';
print '</tr>';
print '</div>';
// Description
print '<tr><td>';
print '</td></tr>';
print '</table>';
// TODO Replace this with a hook
// Google Adsense (need Google module)
@ -477,7 +512,7 @@ function llxHeaderVierge($title, $head = "")
top_htmlhead($head,$title);
print '<body class="demobody demobackground"><div style="padding: 20px;" class="demobackgrounddiv">'."\n";
print '<body class="demobody"><div class="demobackgrounddiv">'."\n";
}
/**

View File

@ -4549,20 +4549,36 @@ border-top-right-radius: 6px;
/* For demo pages */
.demobody {
line-height: 130%;
font-size: 150%;
text-align: center;
}
.demobantext {
max-width: 1024px;
text-align: center;
display: inline-block;
}
.demobanbox {
font-size: 90%;
}
img.demothumb {
box-shadow: 2px 2px 8px #BBB;
/* box-shadow: 2px 2px 8px #BBB; */
margin-right: 20px;
margin-left: 10px;
width: 110px;
}
.demobackground {
/*
background-image: url(/dolibarr_5.0/htdocs/theme/image-demo.jpg);
background-image: url(<?php echo DOL_URL_ROOT.'/public/demo/dolibarr_demo_ban.jpg' ?>);
background-size: cover;
object-fit: contain;
*/
height: 140px;
background-position-y: bottom;
}
div#tr1profdemoall {
margin-left: -40px;
margin-right: -40px;
}
/* ============================================================================== */
@ -4601,12 +4617,19 @@ img.demothumb {
width: <?php print dol_size(350,'width'); ?>px;
}
.demobody {
line-height: 150% !important;
font-size: 100% !important;
}
img.demothumb {
box-shadow: 1px 1px 4px #BBB;
margin-right: 6px;
margin-left: 4px;
width: 80px;
}
.demobanbox {
font-size: 100%;
}
div.tabBar {
padding-left: 0px;