<?php 
defined('_JEXEC') or die('Restricted access'); 
JHTML::_('behavior.tooltip');
JToolBarHelper::title(   JText::_( 'Create New Chart' ), 'charts.png' );
JToolBarHelper::back('Charts Manager',ARTIOFusionChartsHelperRoute::getHomeRoute());
JToolBarHelper::preferences(ARTIOFUSIONCHARTS_OPTION,600);

$document = &JFactory::getDocument();
/* @var $document JDocument */
$css = '.tool-tip { max-width: 500px !important; padding: 0 !important; }' . PHP_EOL;
$css .= '.tool-title { display: none !important; }';
$document->addStyleDeclaration($css);

?>

<table class="adminform">
	<tr>
		<td width="55%" valign="top">
			<div id="cpanel">
				<?php foreach ($this->categories as $category){?>
				<fieldset class="adminform">
					<legend><?php echo $category->name; ?></legend>
					<?php foreach ($category->charts as $chart){?>
						<div style="float:left;">
							<div class="icon">
								<span class="editlinktip hasTip"
								title="&nbsp::<img src=&quot;<?php echo $chart->preview; ?>&quot; name=&quot;imagelib&quot; />">
								<a href="<?php echo $chart->link; ?>">
									<img src="<?php echo $chart->icon; ?>" alt="<?php echo $chart->name; ?>"  />					
									<span><?php echo $chart->name; ?></span>
								</a>
								</span>
							</div>
						</div>
					<?php }?>
				</fieldset>
				<?php } ?>
			</div>
		</td>
	</tr>
</table>
