aboutsummaryrefslogtreecommitdiffstats
path: root/include/widgets.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-09-08 20:48:35 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-09-08 20:48:35 -0700
commitd702133ded36f23a79f7aed22c7d20ad263cff7b (patch)
tree4ebc0d2508c27f6a67c811826d6bf65b94155375 /include/widgets.php
parent2aaee311f30913d0add3f9200af4f54520defc51 (diff)
downloadvolse-hubzilla-d702133ded36f23a79f7aed22c7d20ad263cff7b.tar.gz
volse-hubzilla-d702133ded36f23a79f7aed22c7d20ad263cff7b.tar.bz2
volse-hubzilla-d702133ded36f23a79f7aed22c7d20ad263cff7b.zip
move mod_admin to Comanche finally
Diffstat (limited to 'include/widgets.php')
-rw-r--r--include/widgets.php59
1 files changed, 59 insertions, 0 deletions
diff --git a/include/widgets.php b/include/widgets.php
index 42d9db19a..8c5e92140 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -1074,4 +1074,63 @@ function widget_helpindex($arr) {
$o .= '</ul></div>';
return $o;
+}
+
+
+
+function widget_admin($arr) {
+
+ /*
+ * Side bar links
+ */
+
+ if(! is_site_admin()) {
+ return login(false);
+ }
+
+
+ $a = get_app();
+ $o = '';
+
+ // array( url, name, extra css classes )
+
+ $aside = array(
+ 'site' => array(z_root() . '/admin/site/', t('Site'), 'site'),
+ 'users' => array(z_root() . '/admin/users/', t('Accounts'), 'users'),
+ 'channels' => array(z_root() . '/admin/channels/', t('Channels'), 'channels'),
+ 'plugins' => array(z_root() . '/admin/plugins/', t('Plugins'), 'plugins'),
+ 'themes' => array(z_root() . '/admin/themes/', t('Themes'), 'themes'),
+ 'queue' => array(z_root() . '/admin/queue', t('Inspect queue'), 'queue'),
+ 'profs' => array(z_root() . '/admin/profs', t('Profile Config'), 'profs'),
+ 'dbsync' => array(z_root() . '/admin/dbsync/', t('DB updates'), 'dbsync')
+
+ );
+
+ /* get plugins admin page */
+
+ $r = q("SELECT * FROM addon WHERE plugin_admin = 1");
+
+ $aside['plugins_admin'] = array();
+ if($r) {
+ foreach ($r as $h){
+ $plugin = $h['name'];
+ $aside['plugins_admin'][] = array(z_root() . '/admin/plugins/' . $plugin, $plugin, 'plugin');
+ // temp plugins with admin
+ $a->plugins_admin[] = $plugin;
+ }
+ }
+
+ $aside['logs'] = array(z_root() . '/admin/logs/', t('Logs'), 'logs');
+
+ $o .= replace_macros(get_markup_template('admin_aside.tpl'), array(
+ '$admin' => $aside,
+ '$admtxt' => t('Admin'),
+ '$plugadmtxt' => t('Plugin Features'),
+ '$logtxt' => t('Logs'),
+ '$h_pending' => t('User registrations waiting for confirmation'),
+ '$admurl'=> z_root() . '/admin/'
+ ));
+
+ return $o;
+
} \ No newline at end of file