Esempio n. 1
0
         print '</td></tr>';
         // Type
         if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) {
             print '<tr><td>' . $langs->trans("Type") . '</td><td colspan="3">' . $act->type . '</td></tr>';
         }
         // Title
         print '<tr><td>' . $langs->trans("Title") . '</td><td colspan="3">' . $act->label . '</td></tr>';
         print '</table>';
         dol_fiche_end();
     }
 }
 /*
  * Specific to thirdparty module
  */
 if ($element_id && $element == 'societe') {
     $socstatic = fetchObjectByElement($element_id, $element);
     if (is_object($socstatic)) {
         $savobject = $object;
         $object = $socstatic;
         require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
         $head = societe_prepare_head($socstatic);
         dol_fiche_head($head, 'resources', $langs->trans("ThirdParty"), 0, 'company');
         dol_banner_tab($socstatic, 'socid', '', $user->societe_id ? 0 : 1, 'rowid', 'nom');
         print '<div class="fichecenter">';
         print '<div class="underbanner clearboth"></div>';
         print '<table class="border" width="100%">';
         // Alias name (commercial, trademark or alias name)
         print '<tr><td class="titelfield">' . $langs->trans('AliasNames') . '</td><td colspan="3">';
         print $socstatic->name_alias;
         print "</td></tr>";
         print '</table>';
Esempio n. 2
0
 function fetchElementResources($element, $element_id)
 {
     $resources = $this->getElementResources($element, $element_id);
     $i = 0;
     foreach ($resources as $nb => $resource) {
         $this->lines[$i] = fetchObjectByElement($resource['resource_id'], $resource['resource_type']);
         $i++;
     }
     return $i;
 }
     print '</form>';
     //print '</div>';
 } else {
     print '<div class="tagtable centpercent noborder allwidth">';
     print '<form class="tagtr liste_titre">';
     print '<div class="tagtd">' . $langs->trans('Type') . '</div>';
     print '<div class="tagtd">' . $langs->trans('Resource') . '</div>';
     print '<div class="tagtd" align="center">' . $langs->trans('Busy') . '</div>';
     print '<div class="tagtd" align="center">' . $langs->trans('Mandatory') . '</div>';
     print '<div class="tagtd"></div>';
     print '</form>';
     //print '</div>';
 }
 foreach ($linked_resources as $linked_resource) {
     $var = !$var;
     $object_resource = fetchObjectByElement($linked_resource['resource_id'], $linked_resource['resource_type']);
     if ($mode == 'edit' && $linked_resource['rowid'] == GETPOST('lineid')) {
         print '<form class="tagtr ' . ($var == true ? 'pair' : 'impair') . '" action="' . $_SERVER["PHP_SELF"] . '?element=' . $element . '&element_id=' . $element_id . '" method="POST">';
         print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '" />';
         print '<input type="hidden" name="id" value="' . $object->id . '" />';
         print '<input type="hidden" name="action" value="update_linked_resource" />';
         print '<input type="hidden" name="resource_type" value="' . $resource_type . '" />';
         print '<input type="hidden" name="lineid" value="' . $linked_resource['rowid'] . '" />';
         print '<div class="tagtd">' . $object_resource->type_label . '</div>';
         print '<div class="tagtd">' . $object_resource->getNomUrl(1) . '</div>';
         print '<div class="tagtd" align="center">' . $form->selectyesno('busy', $linked_resource['busy'] ? 1 : 0, 1) . '</div>';
         print '<div class="tagtd">' . $form->selectyesno('mandatory', $linked_resource['mandatory'] ? 1 : 0, 1) . '</div>';
         print '<div class="tagtd"><input type="submit" class="button" value="' . $langs->trans("Update") . '"></div>';
         print '</form>';
     } else {
         $style = '';