Skip to content
Snippets Groups Projects
Commit 927713e0 authored by Prasad's avatar Prasad
Browse files

Fixes #807: Removed partial override of relation links for inventory module

parent 246bae2d
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment