include_once(JPATH_BASE."/components/com_vxc/models/voxelservice.php");
JHTML::_('behavior.tooltip');
$canManufacture = $this->canManufacture;
$hideManufacturingDetails = $this->hideManufacturingDetails;
$canMillFromOrders = SiteOptionsHelper::canMillFromOrders() && $canManufacture;
$canDownloadPackage = (LegacyHelper::getPHPGlobalVar('canDownloadPackage')==1);
$displayBatchInOrders = (LegacyHelper::getPHPGlobalVar('displayBatchInOrders')==1);
$userId = LegacyHelper::getUserId();
$isAdmin = ($userId && LegacyHelper::isAdminUser($userId));
$canManageFranchiseOrders = $this->canManageFranchiseOrders;
$isGroupManager = $this->isGroupManager;
$canSeeUser = ($this->lists['searchkind']=='all' ||
$this->lists['searchkind']=='byfranchise' ||
$this->lists['searchkind']=='mygroups' ||
$this->lists['searchkind']=='bygroup' ||
$this->lists['searchkind']=='myfranchise');
/*
$canSeeUser =($this->isFranchiseManager || $isAdmin || $isGroupManager ||$canManageFranchiseOrders) &&
($this->lists['searchkind']=='all' ||
$this->lists['searchkind']=='byfranchise' ||
$this->lists['searchkind']=='mygroups' ||
$this->lists['searchkind']=='bygroup' ||
$this->lists['searchkind']=='myfranchise');
*/
$isAdminOrFranchise = ($this->isFranchiseManager || $isAdmin || $canManageFranchiseOrders);
$groupSelected = !!$this->lists['searchgroup'];
$hasGroups = (is_array($this->lists['groups']) && count($this->lists['groups'])>0);
$canSeeGroups = ($isGroupManager || $this->isFranchiseManager|| $isAdmin || $this->canViewGroupOrders) && $hasGroups ;
$canDuplicateForGroup = ($isGroupManager || $isAdmin || $this->isFranchiseManager) && $hasGroups && $groupSelected;
function PrintModalLinkOrder(&$view, &$row) {
$url = 'index.php?option=com_vxc&view=maorder&orderId='.$row->id.'&controller=myaccount&tmpl=component';
return "";
}
function makePluginLink($plugin, $atId, $caption, $order) {
if (LegacyHelper::getNewMode() && $order->uuid)
$orderId = $order->uuid;
else
$orderId = $order->id;
if ($plugin)
$linkplugin = "$caption";
else
$linkplugin = "$caption";
return $linkplugin;
}
function DisplayThumb(&$thumb) {
$mvcMiddlewareURL = LegacyHelper::getMiddlewareServiceURL();
if (!$mvcMiddlewareURL) {
$existsL = @file_exists(LegacyHelper::getFilesRoot() . $thumb['image_left']);
$existsR = @file_exists(LegacyHelper::getFilesRoot() . $thumb['image_right']);
}
else {
if ($thumb['value']=='both') {
$existsL = true;
$existsR = true;
} else if ($thumb['value']=='left') {
$existsL = true;
$existsR = false;
} else if ($thumb['value']=='right') {
$existsL = false;
$existsR = true;
} else {
$existsL = false;
$existsR = false;
}
}
$icon = '';
$title='';
switch($thumb['type'])
{
case 'FootPrint':
$title = JText::_('Footprints');
$icon = 'components/com_vxc/assets/images/fp24x16.gif';
break;
case 'APD':
$title = JText::_('APD');
$icon = 'components/com_vxc/assets/images/apd24x16.gif';
break;
case 'VideoAnalysisData':
$title = JText::_('Video Analysis');
$icon = 'components/com_vxc/assets/images/apd24x16.gif';
break;
case 'FoamBox':
$title = JText::_('Foambox Scan');
$icon = 'components/com_vxc/assets/images/foambox24x16.gif';
break;
case 'DynamicHeightmap':
$title = JText::_('Dynamic Heightmap');
$icon = 'components/com_vxc/assets/images/foambox24x16.gif';
break;
case 'Textured3DData':
$title = JText::_('3D Data Scan');
$icon = 'components/com_vxc/assets/images/foambox24x16.gif';
break;
case 'BB1Scan':
$title = JText::_('BB1 Scan');
$icon = 'components/com_vxc/assets/images/bb124x16.gif';
break;
case 'InsoleCADProject':
$title = JText::_('Insole');
$icon = 'components/com_vxc/assets/images/insole.png';
break;
case 'InsoleCADCoverProject':
$title = JText::_('Covering');
$icon = 'components/com_vxc/assets/images/insolecover.png';
break;
}
$imageStyle= "border:1px solid black";
$html ="";
if ($thumb) {
$thumbLeftURL = $thumb['image_left'];
$thumbRightURL = $thumb['image_right'];
$mvcMiddlewareURL = LegacyHelper::getMiddlewareServiceURL();
if ($mvcMiddlewareURL) {
$storageService = LegacyHelper::getStorageService();
$thumbLeftURL = $mvcMiddlewareURL ."/getFile?path=".urlencode($thumbLeftURL)."&rnd=".rand();
if ($storageService)
$thumbLeftURL .= "&storageService=".urlencode($storageService);
$thumbRightURL = $mvcMiddlewareURL ."/getFile?path=".urlencode($thumbRightURL)."&rnd=".rand();
if ($storageService)
$thumbRightURL .= "&storageService=".urlencode($storageService);
}
else {
$thumbLeftURL .= "?". rand();
$thumbRightURL .= "?". rand();
}
}
if ($existsL || $existsR) {
if ($existsL && $existsR)
$html.= "
";
else if ($existsL)
$html.="
";
else
$html.="
";
}
else
$html.="Id: ".$thumb['id'];
$html.="";
return JHTML::_('tooltip',$html,$title,null,"
");
}
?>
| =$this->menu?> |