The new banner for tab is moved into a shared functions
This commit is contained in:
parent
d7dbc8adb1
commit
0222867a94
@ -840,6 +840,50 @@ function dol_get_fiche_end($notab=0)
|
||||
else return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Show tab footer of a card
|
||||
*
|
||||
* @param object $object Object to show
|
||||
* @param string $paramid Name of parameter to use to name the id into the URL link
|
||||
* @param string $morehtml More html content to output just before the nav bar
|
||||
* @param int $shownav Show Condition (navigation is shown if value is 1)
|
||||
* @param string $fieldid Nom du champ en base a utiliser pour select next et previous (we make the select max and min on this field)
|
||||
* @param string $fieldref Nom du champ objet ref (object->ref) a utiliser pour select next et previous
|
||||
* @param string $morehtmlref More html to show after ref
|
||||
* @param string $moreparam More param to add in nav link url.
|
||||
* @param int $nodbprefix Do not include DB prefix to forge table name
|
||||
* @param string $morehtmlleft More html code to show before ref
|
||||
* @param string $morehtmlright More html code to show before navigation arrows
|
||||
* @return void
|
||||
*/
|
||||
function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlright='')
|
||||
{
|
||||
global $conf, $form, $user;
|
||||
|
||||
//$showlogo=$object->logo;
|
||||
$showlogo=1;
|
||||
$showbarcode=empty($conf->barcode->enabled)?0:1;
|
||||
if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode=0;
|
||||
|
||||
print '<div class="arearef heightref valignmiddle" width="100%">';
|
||||
//$morehtmlleft='<div class="floatleft inline-block valignmiddle divphotoref">'.img_picto('', 'title_companies', '', '').'</div>';
|
||||
if ($showlogo) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showphoto('societe',$object,0,0,0,'photoref').'</div>';
|
||||
//if ($showlogo) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showphoto('societe',$object,0,0,0,'photoref').'</div>';
|
||||
if ($showbarcode) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showbarcode($object).'</div>';
|
||||
if (! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
|
||||
$morehtmlright.=ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased');
|
||||
} else {
|
||||
$morehtmlright.=$object->getLibStatut(2);
|
||||
}
|
||||
if (! empty($object->name_nalias)) $morehtmlref.='<div class="refidno">'.$object->name_alias.'</div>';
|
||||
$morehtmlref.='<div class="refidno">';
|
||||
$morehtmlref.=$object->getBannerAddress('refaddress',$object);
|
||||
$morehtmlref.='</div>';
|
||||
print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlright);
|
||||
print '</div>';
|
||||
print '<div class="underrefbanner clearboth"></div>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a string with the label tag dedicated to the HTML edit field.
|
||||
*
|
||||
|
||||
@ -1863,29 +1863,9 @@ else
|
||||
|
||||
dol_htmloutput_errors($error,$errors);
|
||||
|
||||
//$showlogo=$object->logo;
|
||||
$showlogo=1;
|
||||
$showbarcode=empty($conf->barcode->enabled)?0:1;
|
||||
if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode=0;
|
||||
|
||||
print '<div class="arearef heightref valignmiddle" width="100%">';
|
||||
//$morehtmlleft='<div class="floatleft inline-block valignmiddle divphotoref">'.img_picto('', 'title_companies', '', '').'</div>';
|
||||
if ($showlogo) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showphoto('societe',$object,0,0,0,'photoref').'</div>';
|
||||
//if ($showlogo) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showphoto('societe',$object,0,0,0,'photoref').'</div>';
|
||||
if ($showbarcode) $morehtmlleft.='<div class="floatleft inline-block valignmiddle divphotoref">'.$form->showbarcode($object).'</div>';
|
||||
if (! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
|
||||
$morehtmlright.=ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased');
|
||||
} else {
|
||||
$morehtmlright.=$object->getLibStatut(2);
|
||||
}
|
||||
$morehtml='';
|
||||
if (! empty($object->ame_nalias)) $morehtml.='<div class="refidno">'.$object->name_alias.'</div>';
|
||||
$morehtml.='<div class="refidno">';
|
||||
$morehtml.=$object->getBannerAddress('refaddress',$object);
|
||||
$morehtml.='</div>';
|
||||
print $form->showrefnav($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom', $morehtml, '', 0, $morehtmlleft, $morehtmlright);
|
||||
print '</div>';
|
||||
print '<div class="underrefbanner clearboth"></div>';
|
||||
|
||||
dol_banner_tab($object, 'socid', '', ($user->societe_id?0:1), 'rowid', 'nom');
|
||||
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
|
||||
@ -1528,10 +1528,10 @@ div.tabsElem {
|
||||
|
||||
div.tabBar {
|
||||
color: #<?php echo $colortextbacktab; ?>;
|
||||
padding-top: <?php echo ($dol_optimize_smallscreen?'4':'14'); ?>px;
|
||||
padding-left: <?php echo ($dol_optimize_smallscreen?'4':'14'); ?>px;
|
||||
padding-right: <?php echo ($dol_optimize_smallscreen?'4':'14'); ?>px;
|
||||
padding-bottom: <?php echo ($dol_optimize_smallscreen?'4':'12'); ?>px;
|
||||
padding-top: <?php echo ($dol_optimize_smallscreen?'4':'16'); ?>px;
|
||||
padding-left: <?php echo ($dol_optimize_smallscreen?'4':'18'); ?>px;
|
||||
padding-right: <?php echo ($dol_optimize_smallscreen?'4':'18'); ?>px;
|
||||
padding-bottom: <?php echo ($dol_optimize_smallscreen?'4':'14'); ?>px;
|
||||
margin: 0px 0px 14px 0px;
|
||||
-moz-border-radius:4px;
|
||||
-webkit-border-radius: 4px;
|
||||
@ -2064,10 +2064,9 @@ table.listwithfilterbefore {
|
||||
|
||||
/* Pagination */
|
||||
div.refidpadding {
|
||||
/* padding-top: <?php print empty($conf->dol_use_jmobile)?'8':'12'; ?>px; */
|
||||
padding-top: <?php print empty($conf->dol_use_jmobile)?'3':'14'; ?>px;
|
||||
}
|
||||
div.refid {
|
||||
/* padding-top: <?php print empty($conf->dol_use_jmobile)?'5':'12'; ?>px; */
|
||||
font-weight: bold;
|
||||
color: #766;
|
||||
font-size: 160%;
|
||||
|
||||
@ -677,8 +677,8 @@ div.statusref {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
img.photoref {
|
||||
height: 68px;
|
||||
width: 68px;
|
||||
height: 80px;
|
||||
width: 80px;
|
||||
border: 1px solid #CCC;
|
||||
-moz-box-shadow: 3px 3px 4px #DDD;
|
||||
-webkit-box-shadow: 3px 3px 4px #DDD;
|
||||
@ -1513,10 +1513,10 @@ div.tabsElem { margin-top: 8px; } /* To avoid overlap of tabs when not browser
|
||||
|
||||
div.tabBar {
|
||||
color: #<?php echo $colortextbacktab; ?>;
|
||||
padding-top: 9px;
|
||||
padding-left: <?php echo ($dol_optimize_smallscreen?'4':'8'); ?>px;
|
||||
padding-right: <?php echo ($dol_optimize_smallscreen?'4':'8'); ?>px;
|
||||
padding-bottom: 8px;
|
||||
padding-top: <?php echo ($dol_optimize_smallscreen?'4':'16'); ?>px;
|
||||
padding-left: <?php echo ($dol_optimize_smallscreen?'4':'16'); ?>px;
|
||||
padding-right: <?php echo ($dol_optimize_smallscreen?'4':'16'); ?>px;
|
||||
padding-bottom: <?php echo ($dol_optimize_smallscreen?'4':'14'); ?>px;
|
||||
margin: 0px 0px 14px 0px;
|
||||
-moz-border-radius:3px;
|
||||
-webkit-border-radius: 3px;
|
||||
@ -1934,10 +1934,9 @@ table.listwithfilterbefore {
|
||||
|
||||
/* Pagination */
|
||||
div.refidpadding {
|
||||
/* padding-top: <?php print empty($conf->dol_use_jmobile)?'8':'12'; ?>px; */
|
||||
padding-top: <?php print empty($conf->dol_use_jmobile)?'3':'14'; ?>px;
|
||||
}
|
||||
div.refid {
|
||||
/* padding-top: <?php print empty($conf->dol_use_jmobile)?'5':'12'; ?>px; */
|
||||
font-weight: bold;
|
||||
color: #766;
|
||||
font-size: 160%;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user