Fix formatting in federation.tpl
This commit is contained in:
parent
b963e7cc38
commit
910fda2383
1 changed files with 58 additions and 52 deletions
|
@ -6,23 +6,22 @@
|
||||||
{{if not $autoactive}}
|
{{if not $autoactive}}
|
||||||
<p class="error-message">{{$hint}}</p>
|
<p class="error-message">{{$hint}}</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<p>{{$legendtext}}
|
<p>{{$legendtext}}</p>
|
||||||
<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>
|
|
||||||
</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}}
|
||||||
|
@ -62,51 +61,58 @@ var myDoughnutChart = new Chart(ctx, {
|
||||||
<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: [
|
|
||||||
{{foreach $c[1] as $v}}
|
|
||||||
'{{$v['version']}}',
|
|
||||||
{{/foreach}}
|
|
||||||
]
|
]
|
||||||
};
|
}],
|
||||||
var ctx = document.getElementById("{{$c[2]}}Chart").getContext("2d");
|
labels: [
|
||||||
var my{{$c[2]}}DoughnutChart = new Chart(ctx, {
|
{{foreach $c[1] as $v}}
|
||||||
type: 'doughnut',
|
'{{$v['version']}}',
|
||||||
data: {{$c[2]}}data,
|
{{/foreach}}
|
||||||
options: {
|
]
|
||||||
legend: {display: false},
|
};
|
||||||
animation: {animateRotate: false},
|
var ctx = document.getElementById("{{$c[2]}}Chart").getContext("2d");
|
||||||
responsive: false
|
var my{{$c[2]}}DoughnutChart = new Chart(ctx, {
|
||||||
}
|
type: 'doughnut',
|
||||||
});
|
data: {{$c[2]}}data,
|
||||||
</script>
|
options: {
|
||||||
<ul class="federation-stats">
|
legend: {display: false},
|
||||||
{{foreach $c[1] as $v}}
|
animation: {animateRotate: false},
|
||||||
<li>{{if ($c[0]['platform']==='Friendica' and $version===$v['version']) }}<span class="version-match">{{$v['version']}}</span>{{else}}{{$v['version']}}{{/if}} ({{$v['total']}})</li>
|
responsive: false
|
||||||
{{/foreach}}
|
}
|
||||||
</ul>
|
});
|
||||||
</td>
|
</script>
|
||||||
|
<ul class="federation-stats">
|
||||||
|
{{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>
|
||||||
|
{{/foreach}}
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Reference in a new issue