2016-01-04 02:19:32 -05:00
|
|
|
<script src="{{$baseurl}}/library/Chart.js-1.0.2/Chart.min.js"></script>
|
2015-11-17 05:34:47 -05:00
|
|
|
<canvas id="FederationChart" style="width: 400px; height: 400px; float: right; margin: 20px;"></canvas>
|
|
|
|
<div id="adminpage">
|
|
|
|
<h1>{{$title}} - {{$page}}</h1>
|
|
|
|
<p>{{$intro}}</p>
|
|
|
|
{{if not $autoactive}}
|
|
|
|
<p class="error-message">{{$hint}}</p>
|
|
|
|
{{/if}}
|
|
|
|
<p>{{$legendtext}}
|
|
|
|
<ul>
|
|
|
|
{{foreach $counts as $c}}
|
2016-01-16 07:57:40 -05:00
|
|
|
{{if $c[0]['total'] > 0}}
|
|
|
|
<li>{{$c[0]['platform']}} ({{$c[0]['total']}})</li>
|
2016-01-04 03:54:12 -05:00
|
|
|
{{/if}}
|
2015-11-17 05:34:47 -05:00
|
|
|
{{/foreach}}
|
|
|
|
</ul>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
|
|
var FedData = [
|
|
|
|
{{foreach $counts as $c}}
|
2016-01-16 07:57:40 -05:00
|
|
|
{ value: {{$c[0]['total']}}, label: "{{$c[0]['platform']}}", color: "#90EE90", highlight: "#EE90A1", },
|
2015-11-17 05:34:47 -05:00
|
|
|
{{/foreach}}
|
|
|
|
];
|
|
|
|
var ctx = document.getElementById("FederationChart").getContext("2d");
|
|
|
|
var myDoughnutChart = new Chart(ctx).Doughnut(FedData,
|
|
|
|
{
|
|
|
|
animateRotate : false,
|
|
|
|
});
|
|
|
|
document.getElementById('FederationLegend').innerHTML = myDoughnutChart.generateLegend();
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<table style="width: 100%">
|
|
|
|
{{foreach $counts as $c}}
|
2016-01-16 07:57:40 -05:00
|
|
|
{{if $c[0]['total'] > 0}}
|
2015-11-17 05:34:47 -05:00
|
|
|
<tr>
|
|
|
|
<th>{{$c[0]['platform']}}</th>
|
2016-01-16 07:57:40 -05:00
|
|
|
<th><strong>{{$c[0]['total']}}</strong></td>
|
2015-11-17 05:34:47 -05:00
|
|
|
<td>{{$c[0]['network']}}</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="3" style="border-bottom: 1px solid #000;">
|
|
|
|
<canvas id="{{$c[2]}}Chart" style="width: 240px; height: 240px; float: left;
|
|
|
|
margin: 20px;"></canvas>
|
|
|
|
<script>
|
|
|
|
var {{$c[2]}}data = [
|
|
|
|
{{foreach $c[1] as $v}}
|
2016-01-16 07:57:40 -05:00
|
|
|
{ value: {{$v['total']}}, label: '{{$v['version']}}', color: "#90EE90", highlight: "#EE90A1",},
|
2015-11-17 05:34:47 -05:00
|
|
|
{{/foreach}}
|
|
|
|
];
|
|
|
|
var ctx = document.getElementById("{{$c[2]}}Chart").getContext("2d");
|
|
|
|
var my{{$c[2]}}DoughnutChart = new Chart(ctx).Doughnut({{$c[2]}}data,
|
|
|
|
{animateRotate : false,});
|
|
|
|
</script>
|
|
|
|
<ul class="federation-stats">
|
|
|
|
{{foreach $c[1] as $v}}
|
2016-01-16 07:57:40 -05:00
|
|
|
<li>{{if ($c[0]['platform']==='Friendica' and $version===$v['version']) }}<span class="version-match">{{$v['version']}}</span>{{else}}{{$v['version']}}{{/if}} ({{$v['total']}})</li>
|
2015-11-17 05:34:47 -05:00
|
|
|
{{/foreach}}
|
|
|
|
</ul>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2016-01-04 03:54:12 -05:00
|
|
|
{{/if}}
|
2015-11-17 05:34:47 -05:00
|
|
|
{{/foreach}}
|
|
|
|
</table>
|