$form->setTagID($form->getTagName()); if (!is_null($contact->getMyKey())) { $form->addItem(new EaseHtmlInputHiddenTag($contact->getmyKeyColumn(), $contact->getMyKey())); } $form->addItem('<br>'); $form->addItem(new EaseTWSubmitButton(_('Uložit'), 'success')); break; } $service = new IEService(); $serviceUsages = $service->getColumnsFromMySQL(array($service->getMyKeyColumn(), $service->nameColumn), array('contacts' => '%' . $contact->getName() . '%'), $service->nameColumn, $service->getMyKeyColumn()); $oPage->addItem(new IEPageBottom()); $infopanel = new IEInfoBox($contact); $tools = new EaseTWBPanel(_('Nástroje'), 'warning'); if ($contact->getId()) { $tools->addItem($contact->deleteButton()); $tools->addItem(new EaseTWBPanel(_('Transfer'), 'warning', $contact->transferForm())); if (count($serviceUsages)) { $usedBy = new EaseTWBPanel(_('Používaný službami')); $listing = $usedBy->addItem(new EaseHtmlUlTag(null, array('class' => 'list-group'))); foreach ($serviceUsages as $usage) { $listing->addItem(new EaseHtmlLiTag(new EaseHtmlATag('service.php?service_id=' . $usage['service_id'], $usage[$service->nameColumn]), array('class' => 'list-group-item'))); } $infopanel->addItem($usedBy); } $host = new IEHost(); $hostUsages = $host->getColumnsFromMySQL(array($host->getMyKeyColumn(), $host->nameColumn), array('contacts' => '%' . $contact->getName() . '%'), $host->nameColumn, $host->getMyKeyColumn()); if (count($hostUsages)) { $usedBy = new EaseTWBPanel(_('Používaný hosty')); $listing = $usedBy->addItem(new EaseHtmlUlTag(null, array('class' => 'list-group'))); foreach ($hostUsages as $usage) { $listing->addItem(new EaseHtmlLiTag(new EaseHtmlATag('host.php?host_id=' . $usage['host_id'], $usage[$host->nameColumn]), array('class' => 'list-group-item')));