Revert tabs into space in federation.tpl

This commit is contained in:
Hypolite Petovan 2018-01-18 11:16:16 -05:00
parent 269b3ee2a4
commit b963e7cc38

View file

@ -4,52 +4,52 @@
<h1>{{$title}} - {{$page}}</h1> <h1>{{$title}} - {{$page}}</h1>
<p>{{$intro}}</p> <p>{{$intro}}</p>
{{if not $autoactive}} {{if not $autoactive}}
<p class="error-message">{{$hint}}</p> <p class="error-message">{{$hint}}</p>
{{/if}} {{/if}}
<p>{{$legendtext}} <p>{{$legendtext}}
<ul> <ul>
{{foreach $counts as $c}} {{foreach $counts as $c}}
{{if $c[0]['total'] > 0}} {{if $c[0]['total'] > 0}}
<li>{{$c[0]['platform']}} ({{$c[0]['total']}}/{{$c[0]['users']}})</li> <li>{{$c[0]['platform']}} ({{$c[0]['total']}}/{{$c[0]['users']}})</li>
{{/if}} {{/if}}
{{/foreach}} {{/foreach}}
</ul> </ul>
</p> </p>
</div> </div>
<script> <script>
var FedData = { var FedData = {
datasets: [{ datasets: [{
data: [ data: [
{{foreach $counts as $c}} {{foreach $counts as $c}}
{{$c[0]['total']}}, {{$c[0]['total']}},
{{/foreach}} {{/foreach}}
], ],
backgroundColor: [ backgroundColor: [
{{foreach $counts as $c}} {{foreach $counts as $c}}
'{{$c[3]}}', '{{$c[3]}}',
{{/foreach}} {{/foreach}}
], ],
hoverBackgroundColor: [ hoverBackgroundColor: [
{{foreach $counts as $c}} {{foreach $counts as $c}}
'#EE90A1', '#EE90A1',
{{/foreach}} {{/foreach}}
] ]
}], }],
labels: [ labels: [
{{foreach $counts as $c}} {{foreach $counts as $c}}
"{{$c[0]['platform']}}", "{{$c[0]['platform']}}",
{{/foreach}} {{/foreach}}
] ]
}; };
var ctx = document.getElementById("FederationChart").getContext("2d"); var ctx = document.getElementById("FederationChart").getContext("2d");
var myDoughnutChart = new Chart(ctx, { var myDoughnutChart = new Chart(ctx, {
type: 'doughnut', type: 'doughnut',
data: FedData, data: FedData,
options: { options: {
legend: {display: false}, legend: {display: false},
animation: {animateRotate: false}, animation: {animateRotate: false},
responsive: false responsive: false
} }
}); });
</script> </script>
@ -57,52 +57,52 @@ var myDoughnutChart = new Chart(ctx, {
{{foreach $counts as $c}} {{foreach $counts as $c}}
{{if $c[0]['total'] > 0}} {{if $c[0]['total'] > 0}}
<tr> <tr>
<th>{{$c[0]['platform']}}</th> <th>{{$c[0]['platform']}}</th>
<th><strong>{{$c[0]['total']}}</strong></td> <th><strong>{{$c[0]['total']}}</strong></td>
<td>{{$c[0]['network']}}</td> <td>{{$c[0]['network']}}</td>
</tr> </tr>
<tr> <tr>
<td colspan="3" class="federation-data"> <td colspan="3" class="federation-data">
<canvas id="{{$c[2]}}Chart" class="federation-network-graph" width="240" height="240"></canvas> <canvas id="{{$c[2]}}Chart" class="federation-network-graph" width="240" height="240"></canvas>
<script> <script>
var {{$c[2]}}data = { var {{$c[2]}}data = {
datasets: [{ datasets: [{
data: [ data: [
{{foreach $c[1] as $v}} {{foreach $c[1] as $v}}
{{$v['total']}}, {{$v['total']}},
{{/foreach}} {{/foreach}}
], ],
backgroundColor: [ backgroundColor: [
{{foreach $c[1] as $v}} {{foreach $c[1] as $v}}
'{{$c[3]}}', '{{$c[3]}}',
{{/foreach}} {{/foreach}}
], ],
hoverBackgroundColor: [ hoverBackgroundColor: [
{{foreach $c[1] as $v}} {{foreach $c[1] as $v}}
'#EE90A1', '#EE90A1',
{{/foreach}} {{/foreach}}
] ]
}], }],
labels: [ labels: [
{{foreach $c[1] as $v}} {{foreach $c[1] as $v}}
'{{$v['version']}}', '{{$v['version']}}',
{{/foreach}} {{/foreach}}
] ]
}; };
var ctx = document.getElementById("{{$c[2]}}Chart").getContext("2d"); var ctx = document.getElementById("{{$c[2]}}Chart").getContext("2d");
var my{{$c[2]}}DoughnutChart = new Chart(ctx, { var my{{$c[2]}}DoughnutChart = new Chart(ctx, {
type: 'doughnut', type: 'doughnut',
data: {{$c[2]}}data, data: {{$c[2]}}data,
options: { options: {
legend: {display: false}, legend: {display: false},
animation: {animateRotate: false}, animation: {animateRotate: false},
responsive: false responsive: false
} }
}); });
</script> </script>
<ul class="federation-stats"> <ul class="federation-stats">
{{foreach $c[1] as $v}} {{foreach $c[1] as $v}}
<li>{{if ($c[0]['platform']==='Friendica' and $version===$v['version']) }}<span class="version-match">{{$v['version']}}</span>{{else}}{{$v['version']}}{{/if}} ({{$v['total']}})</li> <li>{{if ($c[0]['platform']==='Friendica' and $version===$v['version']) }}<span class="version-match">{{$v['version']}}</span>{{else}}{{$v['version']}}{{/if}} ({{$v['total']}})</li>
{{/foreach}} {{/foreach}}
</ul> </ul>
</td> </td>