diff options
author | zottel <github@zottel.net> | 2015-09-09 09:53:51 +0200 |
---|---|---|
committer | zottel <github@zottel.net> | 2015-09-09 09:53:51 +0200 |
commit | 2417396a93fd14eae56dc8d463b2af14208564d6 (patch) | |
tree | a698e3b4ce0721b5824d141868316ce81d6572a9 /include/widgets.php | |
parent | 52cd8652bb4b2454bc2bd49d8ec39a5549c4ab68 (diff) | |
parent | 0a051ff2cd13eb33ecffc3c4e34a1a56a3fcf29a (diff) | |
download | volse-hubzilla-2417396a93fd14eae56dc8d463b2af14208564d6.tar.gz volse-hubzilla-2417396a93fd14eae56dc8d463b2af14208564d6.tar.bz2 volse-hubzilla-2417396a93fd14eae56dc8d463b2af14208564d6.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/widgets.php')
-rw-r--r-- | include/widgets.php | 59 |
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 |