From f85106b6b5d2e37ebf4cb850a076c4bb67f2a735 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Wed, 12 Dec 2012 22:41:12 +0100 Subject: [PATCH] first version of the new documentation system integration. --- core/docu/admin/index.php | 1 + core/docu/user/index.php | 3 ++ settings/help.php | 22 +++++++------ settings/templates/help.php | 62 +++++++++++++++++-------------------- 4 files changed, 46 insertions(+), 42 deletions(-) create mode 100644 core/docu/admin/index.php create mode 100644 core/docu/user/index.php diff --git a/core/docu/admin/index.php b/core/docu/admin/index.php new file mode 100644 index 00000000000..3f754998084 --- /dev/null +++ b/core/docu/admin/index.php @@ -0,0 +1 @@ +here goes the admin documentation diff --git a/core/docu/user/index.php b/core/docu/user/index.php new file mode 100644 index 00000000000..dc167c01bd9 --- /dev/null +++ b/core/docu/user/index.php @@ -0,0 +1,3 @@ +here goes the user documentation + + diff --git a/settings/help.php b/settings/help.php index 69a5ec9c146..6f99596b2ba 100644 --- a/settings/help.php +++ b/settings/help.php @@ -12,15 +12,19 @@ OC_App::loadApps(); OC_Util::addStyle( "settings", "settings" ); OC_App::setActiveNavigationEntry( "help" ); -$pagesize=7; -if(isset($_GET['page'])) $page=$_GET['page']; else $page=0; -$kbe=OC_OCSClient::getKnownledgebaseEntries($page, $pagesize); -$totalitems=$kbe['totalitems']; -unset($kbe['totalitems']); -$pagecount=ceil($totalitems/$pagesize); + +if(isset($_GET['mode']) and $_GET['mode']=='admin') { + $url=OC_Helper::linkToAbsolute( 'core', 'docu/admin' ); +}else{ + $url=OC_Helper::linkToAbsolute( 'core', 'docu/user' ); +} + +$url1=OC_Helper::linkToRoute( "settings_help" ).'?mode=user'; +$url2=OC_Helper::linkToRoute( "settings_help" ).'?mode=admin'; $tmpl = new OC_Template( "settings", "help", "user" ); -$tmpl->assign( "kbe", $kbe ); -$tmpl->assign( "pagecount", $pagecount ); -$tmpl->assign( "page", $page ); +$tmpl->assign( "admin", OC_Group::inGroup(OC_User::getUser(), 'admin') ); +$tmpl->assign( "url", $url ); +$tmpl->assign( "url1", $url1 ); +$tmpl->assign( "url2", $url2 ); $tmpl->printPage(); diff --git a/settings/templates/help.php b/settings/templates/help.php index 75201a86a9f..5ed99420cf4 100644 --- a/settings/templates/help.php +++ b/settings/templates/help.php @@ -1,34 +1,30 @@ - -
- t( 'Documentation' ); ?> - t( 'Managing Big Files' ); ?> - t( 'Ask a question' ); ?> - printPage(); - } - ?> -
- -
-

t('Problems connecting to help database.');?>

-

t('Go there manually.');?>

-
- - -
- "") echo(''); ?> - '') echo('

'.$kb["name"].'

');?> -

- '') echo('

'.$l->t('Answer').':

'.$kb['answer'].'

');?> -
- + t( 'User Documentation' ); ?> + t( 'Administrator Documentation' ); ?> + t( 'Online Documentation' ); ?> + t( 'Forum' ); ?> + t( 'Bugtracker' ); ?> + +

+ + + + -- 2.39.5