From 0908da95298bdd7dd96dcb45ac490f8e7aa73a8e Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 15 Mar 2017 21:26:28 -0700 Subject: widgets cont. --- Zotlabs/Widget/Admin.php | 68 ++++++++++++++++++++++++++++++++++++ Zotlabs/Widget/Chatroom_list.php | 24 +++++++++++++ Zotlabs/Widget/Chatroom_members.php | 15 ++++++++ Zotlabs/Widget/Menu_preview.php | 16 +++++++++ Zotlabs/Widget/Tasklist.php | 30 ++++++++++++++++ Zotlabs/Widget/Vcard.php | 12 +++++++ Zotlabs/Widget/Wiki_list.php | 23 ++++++++++++ Zotlabs/Widget/Wiki_page_history.php | 27 ++++++++++++++ Zotlabs/Widget/Wiki_pages.php | 59 +++++++++++++++++++++++++++++++ 9 files changed, 274 insertions(+) create mode 100644 Zotlabs/Widget/Admin.php create mode 100644 Zotlabs/Widget/Chatroom_list.php create mode 100644 Zotlabs/Widget/Chatroom_members.php create mode 100644 Zotlabs/Widget/Menu_preview.php create mode 100644 Zotlabs/Widget/Tasklist.php create mode 100644 Zotlabs/Widget/Vcard.php create mode 100644 Zotlabs/Widget/Wiki_list.php create mode 100644 Zotlabs/Widget/Wiki_page_history.php create mode 100644 Zotlabs/Widget/Wiki_pages.php (limited to 'Zotlabs') diff --git a/Zotlabs/Widget/Admin.php b/Zotlabs/Widget/Admin.php new file mode 100644 index 000000000..a761eebe3 --- /dev/null +++ b/Zotlabs/Widget/Admin.php @@ -0,0 +1,68 @@ + array(z_root() . '/admin/site/', t('Site'), 'site'), + 'accounts' => array(z_root() . '/admin/accounts/', t('Accounts'), 'accounts', 'pending-update', t('Member registrations waiting for confirmation')), + 'channels' => array(z_root() . '/admin/channels/', t('Channels'), 'channels'), + 'security' => array(z_root() . '/admin/security/', t('Security'), 'security'), + 'features' => array(z_root() . '/admin/features/', t('Features'), 'features'), + '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 Fields'), 'profs'), + 'dbsync' => array(z_root() . '/admin/dbsync/', t('DB updates'), 'dbsync') + ]; + + /* get plugins admin page */ + + $r = q("SELECT * FROM addon WHERE plugin_admin = 1"); + + $plugins = array(); + if($r) { + foreach ($r as $h){ + $plugin = $h['aname']; + $plugins[] = array(z_root() . '/admin/plugins/' . $plugin, $plugin, 'plugin'); + // temp plugins with admin + \App::$plugins_admin[] = $plugin; + } + } + + $logs = array(z_root() . '/admin/logs/', t('Logs'), 'logs'); + + $arr = array('links' => $aside,'plugins' => $plugins,'logs' => $logs); + call_hooks('admin_aside',$arr); + + $o .= replace_macros(get_markup_template('admin_aside.tpl'), array( + '$admin' => $aside, + '$admtxt' => t('Admin'), + '$plugadmtxt' => t('Plugin Features'), + '$plugins' => $plugins, + '$logtxt' => t('Logs'), + '$logs' => $logs, + '$h_pending' => t('Member registrations waiting for confirmation'), + '$admurl'=> z_root() . '/admin/' + )); + + return $o; + + } +} + diff --git a/Zotlabs/Widget/Chatroom_list.php b/Zotlabs/Widget/Chatroom_list.php new file mode 100644 index 000000000..e2aad0e05 --- /dev/null +++ b/Zotlabs/Widget/Chatroom_list.php @@ -0,0 +1,24 @@ + t('Chatrooms'), + '$baseurl' => z_root(), + '$nickname' => \App::$profile['channel_address'], + '$items' => $r, + '$overview' => t('Overview') + )); + } + } +} diff --git a/Zotlabs/Widget/Chatroom_members.php b/Zotlabs/Widget/Chatroom_members.php new file mode 100644 index 000000000..8ed77fb3c --- /dev/null +++ b/Zotlabs/Widget/Chatroom_members.php @@ -0,0 +1,15 @@ + t('Chat Members') + )); + } + +} diff --git a/Zotlabs/Widget/Menu_preview.php b/Zotlabs/Widget/Menu_preview.php new file mode 100644 index 000000000..51218f6cf --- /dev/null +++ b/Zotlabs/Widget/Menu_preview.php @@ -0,0 +1,16 @@ +var tasksShowAll = 0; $(document).ready(function() { tasksFetch(); $("#tasklist-new-form").submit(function(event) { event.preventDefault(); $.post( "tasks/new", $("#tasklist-new-form").serialize(), function(data) { tasksFetch(); $("#tasklist-new-summary").val(""); } ); return false; } )});'; + $o .= ''; + + $o .= '
' . '

' . t('Tasks') . '

'; + $o .= '
'; + $o .= '
'; + return $o; + + } +} + diff --git a/Zotlabs/Widget/Vcard.php b/Zotlabs/Widget/Vcard.php new file mode 100644 index 000000000..cab05dfdd --- /dev/null +++ b/Zotlabs/Widget/Vcard.php @@ -0,0 +1,12 @@ + t('Wiki List'), + '$channel' => $channel['channel_address'], + '$wikis' => $wikis['wikis'] + )); + } + return ''; + } + +} diff --git a/Zotlabs/Widget/Wiki_page_history.php b/Zotlabs/Widget/Wiki_page_history.php new file mode 100644 index 000000000..dcec9a037 --- /dev/null +++ b/Zotlabs/Widget/Wiki_page_history.php @@ -0,0 +1,27 @@ + \App::$profile_uid, + 'observer_hash' => get_observer_hash(), + 'resource_id' => $resource_id, + 'pageUrlName' => $pageUrlName + ]); + + return replace_macros(get_markup_template('nwiki_page_history.tpl'), array( + '$pageHistory' => $pageHistory['history'], + '$permsWrite' => $arr['permsWrite'], + '$name_lbl' => t('Name'), + '$msg_label' => t('Message','wiki_history') + )); + + } +} diff --git a/Zotlabs/Widget/Wiki_pages.php b/Zotlabs/Widget/Wiki_pages.php new file mode 100644 index 000000000..bad451475 --- /dev/null +++ b/Zotlabs/Widget/Wiki_pages.php @@ -0,0 +1,59 @@ + $hide, + '$resource_id' => $arr['resource_id'], + '$not_refresh' => $not_refresh, + '$header' => t('Wiki Pages'), + '$channel' => $channelname, + '$wikiname' => $wikiname, + '$pages' => $pages, + '$canadd' => $can_create, + '$candel' => $can_delete, + '$addnew' => t('Add new page'), + '$pageName' => array('pageName', t('Page name')), + )); + } +} + + -- cgit v1.2.3