Move busui to seperate repository
[bus.git] / report_anchortext.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<div class="owa_reportSectionContent">
	<div id="trend-title" class="owa_reportSectionHeader"></div>
	<div id="trend-chart"></div><BR>
	<div id="trend-metrics" style="height:auto;width:auto;"></div>
	<div style="clear:both;"></div>
	<script>
		
		var trendurl = '<?php echo $this->makeApiLink(array('do' => 'getResultSet', 
																	'metrics' => $metrics, 
																	'dimensions' => 'date', 
																	'sort' => 'date',
																	'format' => 'json',
																	),true);?>';
																	  
		var trend = new OWA.resultSetExplorer('trend-chart');
		trend.options.sparkline.metric = 'visits';
		<?php if ($trendTitle):?>
		trend.asyncQueue.push(['renderTemplate', '<?php echo $trendTitle;?>', {d: trend}, 'replace', 'trend-title']);
		<?php endif;?>
		trend.asyncQueue.push(['makeAreaChart', [{x: 'date', y: '<?php echo $trendChartMetric; ?>'}], 'trend-chart']);
		trend.asyncQueue.push(['makeMetricBoxes' , 'trend-metrics']);
		trend.load(trendurl);
		
	</script>

</div>

<div class="owa_reportSectionContent">
	<div class="owa_reportSectionHeader">Top Inbound Link Text</div>
	<div id="dimension-grid"></div>
	
	<script>
		var dimurl = '<?php echo $this->makeApiLink(array('do' => 'getResultSet', 
																	'metrics' => $metrics, 
																	'dimensions' => $dimensions, 
																	'sort' => $sort,
																	'resultsPerPage' => $resultsPerPage,
																	'format' => 'json',
																	),true);?>';
																	  
		var dim = new OWA.resultSetExplorer('dimension-grid');
		
		<?php if (!empty($dimensionLink)):?>
		var link = '<?php echo $this->makeLink($dimensionLink['template'], true);?>';
		dim.addLinkToColumn('<?php echo $dimensionLink['linkColumn'];?>', link, ['<?php echo $dimensionLink['valueColumns'];?>']);
		<?php endif; ?>
		dim.asyncQueue.push(['refreshGrid']);
		dim.load(dimurl);
	</script>
	
</div>

<script type="text/x-jqote-template" id="metricInfobox">
 <![CDATA[
 
	<div class="owa_metricInfobox">
	<p class="owa_metricInfoboxLabel"><%= this.label %></p>
	<p class="owa_metricInfoboxLargeNumber"><%= this.value %></p>
	<p id='<%= this.dom_id %>-sparkline'></p>
	</div>

]]>
</script>