]> git.mxchange.org Git - friendica.git/commitdiff
Fix formatting in federation.tpl
authorHypolite Petovan <mrpetovan@gmail.com>
Thu, 18 Jan 2018 16:24:56 +0000 (11:24 -0500)
committerHypolite Petovan <mrpetovan@gmail.com>
Thu, 18 Jan 2018 21:38:23 +0000 (16:38 -0500)
view/templates/admin/federation.tpl

index 70e3e9b06ca09641e3807679ec59621c51b35a40..c92af180c255377bf1987e488852d674f8c8f650 100644 (file)
@@ -6,23 +6,22 @@
     {{if not $autoactive}}
     <p class="error-message">{{$hint}}</p>
     {{/if}}
-    <p>{{$legendtext}}
+    <p>{{$legendtext}}</p>
     <ul>
-    {{foreach $counts as $c}}
-    {{if $c[0]['total'] > 0}}
+        {{foreach $counts as $c}}
+        {{if $c[0]['total'] > 0}}
         <li>{{$c[0]['platform']}} ({{$c[0]['total']}}/{{$c[0]['users']}})</li>
-    {{/if}}
-    {{/foreach}}
+            {{/if}}
+            {{/foreach}}
     </ul>
-    </p>
 </div>
 <script>
 var FedData = {
     datasets: [{
         data: [
-{{foreach $counts as $c}}
+    {{foreach $counts as $c}}
             {{$c[0]['total']}},
-{{/foreach}}
+    {{/foreach}}
         ],
         backgroundColor: [
 {{foreach $counts as $c}}
@@ -62,51 +61,58 @@ var myDoughnutChart = new Chart(ctx, {
         <td>{{$c[0]['network']}}</td>
     </tr>
     <tr>
-    <td colspan="3" class="federation-data">
-    <canvas id="{{$c[2]}}Chart" class="federation-network-graph" width="240" height="240"></canvas>
-    <script>
-    var {{$c[2]}}data = {
-        datasets: [{
-            data: [
-    {{foreach $c[1] as $v}}
-                {{$v['total']}},
-    {{/foreach}}
-            ],
-            backgroundColor: [
-    {{foreach $c[1] as $v}}
-                '{{$c[3]}}',
-    {{/foreach}}
-            ],
-            hoverBackgroundColor: [
-    {{foreach $c[1] as $v}}
-                '#EE90A1',
-    {{/foreach}}
-            ]
-        }],
-        labels: [
-    {{foreach $c[1] as $v}}
-            '{{$v['version']}}',
-    {{/foreach}}
+        <td colspan="3" class="federation-data">
+            <canvas id="{{$c[2]}}Chart" class="federation-network-graph" width="240" height="240"></canvas>
+            <script>
+var {{$c[2]}}data = {
+    datasets: [{
+        data: [
+        {{foreach $c[1] as $v}}
+            {{$v['total']}},
+        {{/foreach}}
+        ],
+        backgroundColor: [
+        {{foreach $c[1] as $v}}
+            '{{$c[3]}}',
+        {{/foreach}}
+        ],
+        hoverBackgroundColor: [
+        {{foreach $c[1] as $v}}
+            '#EE90A1',
+        {{/foreach}}
         ]
-    };
-    var ctx = document.getElementById("{{$c[2]}}Chart").getContext("2d");
-    var my{{$c[2]}}DoughnutChart = new Chart(ctx, {
-        type: 'doughnut',
-        data: {{$c[2]}}data,
-        options: {
-            legend: {display: false},
-            animation: {animateRotate: false},
-            responsive: 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>
+    }],
+    labels: [
+        {{foreach $c[1] as $v}}
+        '{{$v['version']}}',
+        {{/foreach}}
+    ]
+};
+var ctx = document.getElementById("{{$c[2]}}Chart").getContext("2d");
+var my{{$c[2]}}DoughnutChart = new Chart(ctx, {
+    type: 'doughnut',
+    data: {{$c[2]}}data,
+    options: {
+    legend: {display: false},
+        animation: {animateRotate: false},
+        responsive: 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>
\ No newline at end of file
+</table>