1<?php 2/* Copyright (C) 2010-2018 Regis Houssin <regis.houssin@inodbox.com> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 3 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <https://www.gnu.org/licenses/>. 16 */ 17 18// Protection to avoid direct call of template 19if (empty($conf) || !is_object($conf)) 20{ 21 print "Error, template page can't be called as URL"; 22 exit; 23} 24 25 26$object = $GLOBALS['object']; 27?> 28 29<!-- BEGIN PHP TEMPLATE VIEW.TPL --> 30<?php 31$head = product_prepare_head($object); 32$titre = $langs->trans("CardProduct".$object->type); 33 34print dol_get_fiche_head($head, 'card', $titre, -1, 'service'); 35 36$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1&type='.$object->type.'">'.$langs->trans("BackToList").'</a>'; 37$object->next_prev_filter = " fk_product_type = ".$object->type; 38 39$shownav = 1; 40if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; 41 42dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); 43?> 44 45<?php dol_htmloutput_errors($object->error, $object->errors); ?> 46 47<table class="border allwidth"> 48 49<tr> 50<td width="15%"><?php echo $langs->trans("Ref"); ?></td> 51<td colspan="2"><?php echo $object->ref; ?></td> 52</tr> 53 54<tr> 55<td><?php echo $langs->trans("Label") ?></td> 56<td><?php echo $object->label; ?></td> 57 58<?php if ($object->photos) { ?> 59<td valign="middle" align="center" width="30%" rowspan="<?php echo $object->nblines; ?>"> 60 <?php echo $object->photos; ?> 61</td> 62<?php } ?> 63 64</tr> 65 66<tr> 67<td class="tdtop"><?php echo $langs->trans("Description"); ?></td> 68<td colspan="2"><?php echo $object->description; ?></td> 69</tr> 70 71<tr><td><?php echo $langs->trans("Duration"); ?></td> 72<td><?php echo $object->duration_value; ?> 73<?php echo $object->duration_unit; ?> 74</td></tr> 75 76<tr> 77<td class="tdtop"><?php echo $langs->trans("Note"); ?></td> 78<td colspan="2"><?php echo $object->note; ?></td> 79</tr> 80 81</table> 82 83<!-- END PHP TEMPLATE --> 84