diff --git a/modules/Inventory/models/RelationListView.php b/modules/Inventory/models/RelationListView.php index c73c2425bd8ad5a1f706f098455de19139d15387..a75afcc3e0f6928ed48fc33ebdb1e0f5d9a907c3 100644 --- a/modules/Inventory/models/RelationListView.php +++ b/modules/Inventory/models/RelationListView.php @@ -10,41 +10,6 @@ class Inventory_RelationListView_Model extends Vtiger_RelationListView_Model { - public function getAddRelationLinks() { - $relationModel = $this->getRelationModel(); - $addLinkModel = array(); - - if(!$relationModel->isAddActionSupported()) { - return $addLinkModel; - } - $relatedModel = $relationModel->getRelationModuleModel(); - - if ($relatedModel->isPermitted('CreateView')) { - if($relatedModel->get('label') == 'Calendar'){ - $addLinkList[] = array( - 'linktype' => 'LISTVIEWBASIC', - 'linklabel' => vtranslate('LBL_ADD_TASK'), - 'linkurl' => $this->getCreateTaskRecordUrl(), - 'linkicon' => '', - ); - }else{ - $addLinkList = array( - array( - 'linktype' => 'LISTVIEWBASIC', - 'linklabel' => vtranslate('LBL_ADD')." ".vtranslate('SINGLE_'.$relatedModel->getName(), $relatedModel->getName()), - 'linkurl' => $this->getCreateViewUrl(), - 'linkicon' => '', - ) - ); - } - - foreach($addLinkList as $addLink) { - $addLinkModel[] = Vtiger_Link_Model::getInstanceFromValues($addLink); - } - } - return $addLinkModel; - } - public function getCreateViewUrl(){ $createViewUrl = parent::getCreateViewUrl(); $currentUserModel = Users_Record_Model::getCurrentUserModel();