From 846153d3886a5506c403ef7e18d96fd01a6a3d01 Mon Sep 17 00:00:00 2001
From: Tobias Diekershoff
Date: Mon, 18 Jan 2016 17:29:46 +0100
Subject: [PATCH 1/2] some beautification to the template code
---
view/templates/admin_federation.tpl | 64 ++++++++++++++---------------
1 file changed, 30 insertions(+), 34 deletions(-)
diff --git a/view/templates/admin_federation.tpl b/view/templates/admin_federation.tpl
index fb7515758..fad87da5b 100644
--- a/view/templates/admin_federation.tpl
+++ b/view/templates/admin_federation.tpl
@@ -9,9 +9,9 @@
{{$legendtext}}
{{foreach $counts as $c}}
- {{if $c[0]['total'] > 0}}
- - {{$c[0]['platform']}} ({{$c[0]['total']}})
- {{/if}}
+ {{if $c[0]['total'] > 0}}
+ - {{$c[0]['platform']}} ({{$c[0]['total']}})
+ {{/if}}
{{/foreach}}
@@ -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, });
{{foreach $counts as $c}}
-{{if $c[0]['total'] > 0}}
-
- {{$c[0]['platform']}} |
- {{$c[0]['total']}}
- | {{$c[0]['network']}} |
-
-
-
-
-
-
-{{foreach $c[1] as $v}}
-- {{if ($c[0]['platform']==='Friendica' and $version===$v['version']) }}{{$v['version']}}{{else}}{{$v['version']}}{{/if}} ({{$v['total']}})
-{{/foreach}}
-
- |
-
-{{/if}}
+ {{if $c[0]['total'] > 0}}
+
+ {{$c[0]['platform']}} |
+ {{$c[0]['total']}}
+ | {{$c[0]['network']}} |
+
+
+
+
+
+
+ {{foreach $c[1] as $v}}
+ - {{if ($c[0]['platform']==='Friendica' and $version===$v['version']) }}{{$v['version']}}{{else}}{{$v['version']}}{{/if}} ({{$v['total']}})
+ {{/foreach}}
+
+ |
+
+ {{/if}}
{{/foreach}}
From f4a65cf6ca3d4ea69ac5e9d3a11c75f484b0dda1 Mon Sep 17 00:00:00 2001
From: Tobias Diekershoff
Date: Tue, 19 Jan 2016 09:15:32 +0100
Subject: [PATCH 2/2] some more doc strings
---
mod/admin.php | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/mod/admin.php b/mod/admin.php
index 70ef5f751..e9e632368 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -114,7 +114,16 @@ function admin_post(&$a){
/**
* @brief Generates content of the admin panel pages
*
- * This function generates the content for the admin panel.
+ * This function generates the content for the admin panel. It consists of the
+ * aside menu (same for the entire admin panel) and the code for the soecified
+ * subpage of the panel.
+ *
+ * The structure of the adress is: /admin/subpage/details though "details" is
+ * only necessary for some subpages, like themes or addons where it is the name
+ * of one theme resp. addon from which the details should be shown. Content for
+ * the subpages is generated in separate functions for each of the subpages.
+ *
+ * The returned string hold the generated HTML code of the page.
*
* @param App $a
* @return string