@@ 486-498 (lines=13) @@ | ||
483 | * @param bool $userSide |
|
484 | * @return string |
|
485 | */ |
|
486 | public function getEditItemLink($smartObj, $onlyUrl = false, $withimage = true, $userSide = false) |
|
487 | { |
|
488 | $admin_side = $userSide ? '' : 'admin/'; |
|
489 | $ret = $this->handler->_moduleUrl . $admin_side . $this->handler->_page . '?op=mod&' . $this->handler->keyName . '=' . $smartObj->getVar($this->handler->keyName); |
|
490 | if ($onlyUrl) { |
|
491 | return $ret; |
|
492 | } elseif ($withimage) { |
|
493 | return "<a href='" . |
|
494 | $ret . |
|
495 | "'><img src='" . |
|
496 | SMARTOBJECT_IMAGES_ACTIONS_URL . |
|
497 | "edit.png' style='vertical-align: middle;' alt='" . |
|
498 | _CO_SOBJECT_MODIFY . |
|
499 | "' title='" . |
|
500 | _CO_SOBJECT_MODIFY . |
|
501 | "'/></a>"; |
|
@@ 514-526 (lines=13) @@ | ||
511 | * @param bool $userSide |
|
512 | * @return string |
|
513 | */ |
|
514 | public function getDeleteItemLink($smartObj, $onlyUrl = false, $withimage = true, $userSide = false) |
|
515 | { |
|
516 | $admin_side = $userSide ? '' : 'admin/'; |
|
517 | $ret = $this->handler->_moduleUrl . $admin_side . $this->handler->_page . '?op=del&' . $this->handler->keyName . '=' . $smartObj->getVar($this->handler->keyName); |
|
518 | if ($onlyUrl) { |
|
519 | return $ret; |
|
520 | } elseif ($withimage) { |
|
521 | return "<a href='" . |
|
522 | $ret . |
|
523 | "'><img src='" . |
|
524 | SMARTOBJECT_IMAGES_ACTIONS_URL . |
|
525 | "editdelete.png' style='vertical-align: middle;' alt='" . |
|
526 | _CO_SOBJECT_DELETE . |
|
527 | "' title='" . |
|
528 | _CO_SOBJECT_DELETE . |
|
529 | "'/></a>"; |