]> git.mxchange.org Git - friendica.git/blob - view/templates/admin_federation.tpl
Merge pull request #2261 from tobiasd/20160118-admin
[friendica.git] / view / templates / admin_federation.tpl
1 <script src="{{$baseurl}}/library/Chart.js-1.0.2/Chart.min.js"></script>
2 <canvas id="FederationChart" class="federation-graph"></canvas>
3 <div id="adminpage">
4     <h1>{{$title}} - {{$page}}</h1>
5     <p>{{$intro}}</p>
6     {{if not $autoactive}}
7         <p class="error-message">{{$hint}}</p>
8     {{/if}}
9     <p>{{$legendtext}}
10     <ul>
11     {{foreach $counts as $c}}
12     {{if $c[0]['total'] > 0}}
13     <li>{{$c[0]['platform']}} ({{$c[0]['total']}})</li>
14     {{/if}}
15     {{/foreach}}
16     </ul>
17     </p>
18 </div>
19 <script>
20 var FedData = [
21 {{foreach $counts as $c}}
22     { value: {{$c[0]['total']}}, label: "{{$c[0]['platform']}}", color: "#90EE90", highlight: "#EE90A1", },
23 {{/foreach}}
24 ];
25 var ctx = document.getElementById("FederationChart").getContext("2d");
26 var myDoughnutChart = new Chart(ctx).Doughnut(FedData, 
27   {
28         animateRotate : false,
29   });
30 document.getElementById('FederationLegend').innerHTML = myDoughnutChart.generateLegend();
31 </script>
32
33 <table id="federation-stats">
34 {{foreach $counts as $c}}
35 {{if $c[0]['total'] > 0}}
36 <tr>
37         <th>{{$c[0]['platform']}}</th>
38         <th><strong>{{$c[0]['total']}}</strong></td>
39         <td>{{$c[0]['network']}}</td>
40 </tr>
41 <tr>
42 <td colspan="3" class="federation-data">
43 <canvas id="{{$c[2]}}Chart" class="federation-network-graph"></canvas>
44 <script>
45 var {{$c[2]}}data = [
46 {{foreach $c[1] as $v}}
47     { value: {{$v['total']}}, label: '{{$v['version']}}', color: "#90EE90", highlight: "#EE90A1",},
48 {{/foreach}}
49 ];
50 var ctx = document.getElementById("{{$c[2]}}Chart").getContext("2d");
51 var my{{$c[2]}}DoughnutChart = new Chart(ctx).Doughnut({{$c[2]}}data, {animateRotate : false,});
52 </script>
53 <ul class="federation-stats">
54 {{foreach $c[1] as $v}}
55 <li>{{if ($c[0]['platform']==='Friendica' and  $version===$v['version']) }}<span class="version-match">{{$v['version']}}</span>{{else}}{{$v['version']}}{{/if}} ({{$v['total']}})</li>
56 {{/foreach}}
57 </ul>
58 </td>
59 </tr>
60 {{/if}}
61 {{/foreach}}
62 </table>