]> git.mxchange.org Git - friendica.git/commitdiff
some beautification to the template code
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Mon, 18 Jan 2016 16:29:46 +0000 (17:29 +0100)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Tue, 19 Jan 2016 06:20:07 +0000 (07:20 +0100)
view/templates/admin_federation.tpl

index fb751575852c80deba83661f6f3af32ac2752a4a..fad87da5b5b2e32a21dc61ceb18d9494c13b06f5 100644 (file)
@@ -9,9 +9,9 @@
     <p>{{$legendtext}}
     <ul>
     {{foreach $counts as $c}}
-    {{if $c[0]['total'] > 0}}
-    <li>{{$c[0]['platform']}} ({{$c[0]['total']}})</li>
-    {{/if}}
+       {{if $c[0]['total'] > 0}}
+           <li>{{$c[0]['platform']}} ({{$c[0]['total']}})</li>
+       {{/if}}
     {{/foreach}}
     </ul>
     </p>
@@ -23,40 +23,36 @@ var FedData = [
 {{/foreach}}
 ];
 var ctx = document.getElementById("FederationChart").getContext("2d");
-var myDoughnutChart = new Chart(ctx).Doughnut(FedData, 
-  {
-       animateRotate : false,
-  });
-document.getElementById('FederationLegend').innerHTML = myDoughnutChart.generateLegend();
+var myDoughnutChart = new Chart(ctx).Doughnut(FedData, { animateRotate : false, });
 </script>
 
 <table id="federation-stats">
 {{foreach $counts as $c}}
-{{if $c[0]['total'] > 0}}
-<tr>
-       <th>{{$c[0]['platform']}}</th>
-       <th><strong>{{$c[0]['total']}}</strong></td>
-       <td>{{$c[0]['network']}}</td>
-</tr>
-<tr>
-<td colspan="3" class="federation-data">
-<canvas id="{{$c[2]}}Chart" class="federation-network-graph"></canvas>
-<script>
-var {{$c[2]}}data = [
-{{foreach $c[1] as $v}}
-    { value: {{$v['total']}}, label: '{{$v['version']}}', color: "#90EE90", highlight: "#EE90A1",},
-{{/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}}
-<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>
-{{/if}}
+    {{if $c[0]['total'] > 0}}
+    <tr>
+           <th>{{$c[0]['platform']}}</th>
+           <th><strong>{{$c[0]['total']}}</strong></td>
+           <td>{{$c[0]['network']}}</td>
+    </tr>
+    <tr>
+    <td colspan="3" class="federation-data">
+    <canvas id="{{$c[2]}}Chart" class="federation-network-graph"></canvas>
+    <script>
+    var {{$c[2]}}data = [
+    {{foreach $c[1] as $v}}
+       { value: {{$v['total']}}, label: '{{$v['version']}}', color: "#90EE90", highlight: "#EE90A1",},
+    {{/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}}
+       <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>
+    {{/if}}
 {{/foreach}}
 </table>