Skip to content
Snippets Groups Projects
Commit 5c8f3c1f authored by Prasad's avatar Prasad
Browse files

Fixes #793: Show translated label for relation.

parent b2c528f0
No related branches found
No related tags found
1 merge request!311Language italian translation
......@@ -111,9 +111,9 @@
</md-tab>
<md-tab label="Related">
<div ng-if="relatedModules" style="height:75vh; overflow: scroll;">
<md-list-item ng-repeat="(module , value) in relatedModules" ng-click="showRelatedList(module)">
<p style="font-size: 13px;"><span style="font-size: 12px; color:#FF4068" class="vicon-{{module | lowercase | nospace}}"></span> &nbsp; {{module}}</p>
<p style="text-align:right; color:#0099FF">{{value}}</p>
<md-list-item ng-repeat="(label, info) in relatedModules" ng-click="showRelatedList(info.relatedModule)">
<p style="font-size: 13px;"><span style="font-size: 12px; color:#FF4068" class="vicon-{{info.relatedModule | lowercase | nospace}}"></span> &nbsp; {{label}}</p>
<p style="text-align:right; color:#0099FF">{{info.count}}</p>
<md-divider></md-divider>
</md-list-item>
</div>
......
......@@ -117,10 +117,7 @@ mobileapp.controller('VtigerDetailController', function ($scope, $api) {
$api('fetchRecord', {mode:'getRelatedRecordCount', module:$scope.module, record:$scope.record}, function(er, re) {
if(re){
$scope.relatedModules = {};
for(var key in re){
$scope.relatedModules[key] = re[key].count;
}
$scope.relatedModules = re;
}
});
};
......
......@@ -107,10 +107,11 @@ class Mobile_WS_FetchRecord extends Mobile_WS_Controller {
}
$relationId = $relation->getId();
$relationListView = Vtiger_RelationListView_Model::getInstance($parentRecordModel, $relatedModuleName, $relation->get('label'),$relationId);
$count = $relationListView->getRelatedEntriesCount();
$relatedRecordsCount[$relation->get('label')] = array('count'=>$count,'relatedModule'=>$relatedModuleName);
$count = $relationListView->getRelatedEntriesCount();
$relatedLabel = vtranslate($relation->get('label'), $relatedModuleName);
$relatedRecordsCount[$relatedLabel] = array('count'=>$count,'relatedModule'=>$relatedModuleName);
}
return $relatedRecordsCount;
}
}
\ No newline at end of file
}
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