} // Status (to sell) if (!empty($arrayfields['p.tosell']['checked'])) { print '<td align="center" nowrap="nowrap">'; if (!empty($conf->use_javascript_ajax) && $user->rights->produit->creer && !empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($product_static, 'status', 'tosell', 'ProductStatusOnSell', 'ProductStatusNotOnSell'); } else { print $product_static->LibStatut($objp->tosell, 5, 0); } print '</td>'; } // Status (to buy) if (!empty($arrayfields['p.tobuy']['checked'])) { print '<td align="center" nowrap="nowrap">'; if (!empty($conf->use_javascript_ajax) && $user->rights->produit->creer && !empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($product_static, 'status_buy', 'tobuy', 'ProductStatusOnBuy', 'ProductStatusNotOnBuy'); } else { print $product_static->LibStatut($objp->tobuy, 5, 1); } print '</td>'; } // Action print '<td> </td>'; print "</tr>\n"; $i++; } print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, '', '', '', 'paginationatbottom'); $db->free($resql); print "</table>"; print '</form>'; }
print '</tr>'; } // Barcode if (!empty($conf->barcode->enabled)) { print '<tr><td>'; print $langs->trans('Gencod') . '</td><td colspan="' . (2 + ($showlogo || $showbarcode ? 0 : 1)) . '">' . $object->barcode; print '</td>'; print $htmllogobar; $htmllogobar = ''; print '</tr>'; } // Status print '<tr><td>' . $langs->trans("Status") . '</td>'; print '<td colspan="' . (2 + ($showlogo || $showbarcode ? 0 : 1)) . '">'; if (!empty($conf->use_javascript_ajax) && $user->rights->societe->creer && !empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased'); } else { print $object->getLibStatut(2); } print '</td>'; print $htmllogobar; $htmllogobar = ''; print '</tr>'; // Address print "<tr><td valign=\"top\">" . $langs->trans('Address') . '</td><td colspan="' . (2 + ($showlogo || $showbarcode ? 0 : 1)) . '">'; dol_print_address($object->address, 'gmap', 'thirdparty', $object->id); print "</td></tr>"; // Zip / Town print '<tr><td width="25%">' . $langs->trans('Zip') . ' / ' . $langs->trans("Town") . '</td><td colspan="' . (2 + ($showlogo || $showbarcode ? 0 : 1)) . '">'; print $object->zip . ($object->zip && $object->town ? " / " : "") . $object->town; print "</td>";
print '</td></tr>'; // Status (to buy) print '<tr><td>'.$langs->trans("Status").' ('.$langs->trans("Buy").')</td><td colspan="2">'; if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($object, 'status_buy', 'tobuy', 'ProductStatusOnBuy', 'ProductStatusNotOnBuy'); } else { print $object->getLibStatut(2,1); } print '</td></tr>'; */ // Batch number management (to batch) if (!empty($conf->productbatch->enabled)) { print '<tr><td>' . $langs->trans("ManageLotSerial") . '</td><td colspan="2">'; if (!empty($conf->use_javascript_ajax) && $user->rights->produit->creer && !empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($object, 'status_batch', 'tobatch', 'ProductStatusOnBatch', 'ProductStatusNotOnBatch'); } else { print $object->getLibStatut(0, 2); } print '</td></tr>'; } // Description print '<tr><td class="tdtop">' . $langs->trans("Description") . '</td><td colspan="2">' . (dol_textishtml($object->description) ? $object->description : dol_nl2br($object->description, 1, true)) . '</td></tr>'; // Public URL print '<tr><td>' . $langs->trans("PublicUrl") . '</td><td colspan="2">'; print dol_print_url($object->url); print '</td></tr>'; print '</table>'; print '</div>'; print '<div class="fichehalfright"><div class="ficheaddleft">'; print '<div class="underbanner clearboth"></div>';
/** * 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 next/previous 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, $langs; $maxvisiblephotos = 1; $showimage = 1; $showbarcode = empty($conf->barcode->enabled) ? 0 : ($object->barcode ? 1 : 0); if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) { $showbarcode = 0; } $modulepart = 'unknown'; if ($object->element == 'societe') { $modulepart = 'societe'; } if ($object->element == 'contact') { $modulepart = 'contact'; } if ($object->element == 'member') { $modulepart = 'memberphoto'; } if ($object->element == 'user') { $modulepart = 'userphoto'; } if ($object->element == 'product') { $modulepart = 'product'; } print '<div class="arearef heightref valignmiddle" width="100%">'; if ($object->element == 'product') { $width = 80; $cssclass = 'photoref'; $showimage = $object->is_photo_available($conf->product->multidir_output[$object->entity]); $maxvisiblephotos = isset($conf->global->PRODUCT_MAX_VISIBLE_PHOTO) ? $conf->global->PRODUCT_MAX_VISIBLE_PHOTO : 5; if ($conf->browser->phone) { $maxvisiblephotos = 1; } if ($showimage) { $morehtmlleft .= '<div class="floatleft inline-block valignmiddle divphotoref">' . $object->show_photos($conf->product->multidir_output[$object->entity], 'small', -$maxvisiblephotos, 0, 0, 0, $width, 0) . '</div>'; } else { $nophoto = '/public/theme/common/nophoto.png'; $morehtmlleft .= '<div class="floatleft inline-block valignmiddle divphotoref"><img class="photo' . $modulepart . ($cssclass ? ' ' . $cssclass : '') . '" alt="No photo" border="0"' . ($width ? ' width="' . $width . '"' : '') . ($height ? ' height="' . $height . '"' : '') . ' src="' . DOL_URL_ROOT . $nophoto . '"></div>'; } } else { if ($showimage) { $morehtmlleft .= '<div class="floatleft inline-block valignmiddle divphotoref">' . $form->showphoto($modulepart, $object, 0, 0, 0, 'photoref', 'small', 1, 0, $maxvisiblephotos) . '</div>'; } } if ($showbarcode) { $morehtmlleft .= '<div class="floatleft inline-block valignmiddle divphotoref">' . $form->showbarcode($object) . '</div>'; } if ($object->element == 'societe' && !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'); } elseif ($object->element == 'product') { //$morehtmlright.=$langs->trans("Status").' ('.$langs->trans("Sell").') '; if (!empty($conf->use_javascript_ajax) && $user->rights->produit->creer && !empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { $morehtmlright .= ajax_object_onoff($object, 'status', 'tosell', 'ProductStatusOnSell', 'ProductStatusNotOnSell'); } else { $morehtmlright .= $object->getLibStatut(2, 0); } $morehtmlright .= ' '; //$morehtmlright.=$langs->trans("Status").' ('.$langs->trans("Buy").') '; if (!empty($conf->use_javascript_ajax) && $user->rights->produit->creer && !empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { $morehtmlright .= ajax_object_onoff($object, 'status_buy', 'tobuy', 'ProductStatusOnBuy', 'ProductStatusNotOnBuy'); } else { $morehtmlright .= $object->getLibStatut(2, 1); } } else { $morehtmlright .= $object->getLibStatut(2); } if (!empty($object->name_alias)) { $morehtmlref .= '<div class="refidno">' . $object->name_alias . '</div>'; } // For thirdparty if (!empty($object->label)) { $morehtmlref .= '<div class="refidno">' . $object->label . '</div>'; } // For product if ($object->element != 'product') { $morehtmlref .= '<div class="refidno">'; $morehtmlref .= $object->getBannerAddress('refaddress', $object); $morehtmlref .= '</div>'; } if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && in_array($object->element, array('societe', 'contact', 'member', 'product'))) { $morehtmlref .= '<div style="clear: both;"></div><div class="refidno">'; $morehtmlref .= $langs->trans("TechnicalID") . ': ' . $object->id; $morehtmlref .= '</div>'; } print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlright); print '</div>'; print '<div class="underrefbanner clearboth"></div>'; }