From f85106b6b5d2e37ebf4cb850a076c4bb67f2a735 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Wed, 12 Dec 2012 22:41:12 +0100 Subject: [PATCH 1/8] 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 0000000000..3f75499808 --- /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 0000000000..dc167c01bd --- /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 69a5ec9c14..6f99596b2b 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 75201a86a9..5ed99420cf 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' ); ?> + +

+ + + + From 89bbabd77bac2d21739b232e6315f2f09b9c9b56 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Thu, 13 Dec 2012 09:26:25 +0100 Subject: [PATCH 2/8] a bit more polish. We are getting there. --- settings/css/settings.css | 3 +++ settings/help.php | 6 ++++++ settings/templates/help.php | 5 +++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/settings/css/settings.css b/settings/css/settings.css index 560862fa12..3645748191 100644 --- a/settings/css/settings.css +++ b/settings/css/settings.css @@ -68,3 +68,6 @@ span.securitywarning {color:#C33; font-weight:bold; } span.connectionwarning {color:#933; font-weight:bold; } input[type=radio] { width:1em; } table.shareAPI td { padding-bottom: 0.8em; } + +/* HELP */ +.pressed {background-color:#DDD;} diff --git a/settings/help.php b/settings/help.php index 6f99596b2b..cdf0c549e4 100644 --- a/settings/help.php +++ b/settings/help.php @@ -15,8 +15,12 @@ OC_App::setActiveNavigationEntry( "help" ); if(isset($_GET['mode']) and $_GET['mode']=='admin') { $url=OC_Helper::linkToAbsolute( 'core', 'docu/admin' ); + $style1=''; + $style2=' pressed'; }else{ $url=OC_Helper::linkToAbsolute( 'core', 'docu/user' ); + $style1=' pressed'; + $style2=''; } $url1=OC_Helper::linkToRoute( "settings_help" ).'?mode=user'; @@ -27,4 +31,6 @@ $tmpl->assign( "admin", OC_Group::inGroup(OC_User::getUser(), 'admin') ); $tmpl->assign( "url", $url ); $tmpl->assign( "url1", $url1 ); $tmpl->assign( "url2", $url2 ); +$tmpl->assign( "style1", $style1 ); +$tmpl->assign( "style2", $style2 ); $tmpl->printPage(); diff --git a/settings/templates/help.php b/settings/templates/help.php index 5ed99420cf..06f53746c2 100644 --- a/settings/templates/help.php +++ b/settings/templates/help.php @@ -1,9 +1,10 @@

From 2330d6bcc7a178d15b74eb8352f86e778afd717d Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Thu, 13 Dec 2012 11:08:12 +0100 Subject: [PATCH 3/8] =?UTF-8?q?show=20the=20link=20to=20the=20issue=20trac?= =?UTF-8?q?ker=20only=20for=20Admins=20as=20discussed=20with=20Bj=C3=B6rn?= =?UTF-8?q?=20and=20Jan.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- settings/templates/help.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings/templates/help.php b/settings/templates/help.php index 06f53746c2..473219024b 100644 --- a/settings/templates/help.php +++ b/settings/templates/help.php @@ -3,7 +3,7 @@ t( 'Administrator Documentation' ); ?> t( 'Online Documentation' ); ?> t( 'Forum' ); ?> - t( 'Bugtracker' ); ?> + t( 'Bugtracker' ); ?> t( 'Commercial Support' ); ?>

From 79b8d67627d7a9437414d482982fe686ab17ab40 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Thu, 13 Dec 2012 19:26:05 +0100 Subject: [PATCH 4/8] remove PgeNavi. It's no longer used --- lib/util.php | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/lib/util.php b/lib/util.php index 34c4d4f9b1..3a6ee87b3a 100755 --- a/lib/util.php +++ b/lib/util.php @@ -166,7 +166,7 @@ class OC_Util { * @param int timestamp $timestamp * @param bool dateOnly option to ommit time from the result */ - public static function formatDate( $timestamp, $dateOnly=false) { + public static function formatDate( $timestamp, $dateOnly=false) { if(isset($_SESSION['timezone'])) {//adjust to clients timezone if we know it $systemTimeZone = intval(date('O')); $systemTimeZone=(round($systemTimeZone/100, 0)*60)+($systemTimeZone%100); @@ -176,37 +176,8 @@ class OC_Util { } $l=OC_L10N::get('lib'); return $l->l($dateOnly ? 'date' : 'datetime', $timestamp); - } - - /** - * Shows a pagenavi widget where you can jump to different pages. - * - * @param int $pagecount - * @param int $page - * @param string $url - * @return OC_Template - */ - public static function getPageNavi($pagecount, $page, $url) { - - $pagelinkcount=8; - if ($pagecount>1) { - $pagestart=$page-$pagelinkcount; - if($pagestart<0) $pagestart=0; - $pagestop=$page+$pagelinkcount; - if($pagestop>$pagecount) $pagestop=$pagecount; - - $tmpl = new OC_Template( '', 'part.pagenavi', '' ); - $tmpl->assign('page', $page); - $tmpl->assign('pagecount', $pagecount); - $tmpl->assign('pagestart', $pagestart); - $tmpl->assign('pagestop', $pagestop); - $tmpl->assign('url', $url); - return $tmpl; - } } - - /** * check if the current server configuration is suitable for ownCloud * @return array arrays with error messages and hints From 4b80e500a5580aca2ca200ea72e1249365dcda49 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Fri, 14 Dec 2012 14:38:22 +0100 Subject: [PATCH 5/8] add pointer to the existing documentation. This will be replaced by the rel documentation during packaging --- core/docu/admin/index.php | 3 ++- core/docu/user/index.php | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/docu/admin/index.php b/core/docu/admin/index.php index 3f75499808..7785f2ce2f 100644 --- a/core/docu/admin/index.php +++ b/core/docu/admin/index.php @@ -1 +1,2 @@ -here goes the admin documentation +Here goes the admin documentation. +In the meantime go to ownCloud.org/support diff --git a/core/docu/user/index.php b/core/docu/user/index.php index dc167c01bd..ede62f05ae 100644 --- a/core/docu/user/index.php +++ b/core/docu/user/index.php @@ -1,3 +1,2 @@ -here goes the user documentation - - +Here goes the user documentation +In the meantime go to ownCloud.org/support From 5689c78ee6a27cf51c8234bec0217801d389d24c Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Fri, 14 Dec 2012 14:39:05 +0100 Subject: [PATCH 6/8] rename to doc --- core/{docu => doc}/admin/index.php | 0 core/{docu => doc}/user/index.php | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename core/{docu => doc}/admin/index.php (100%) rename core/{docu => doc}/user/index.php (100%) diff --git a/core/docu/admin/index.php b/core/doc/admin/index.php similarity index 100% rename from core/docu/admin/index.php rename to core/doc/admin/index.php diff --git a/core/docu/user/index.php b/core/doc/user/index.php similarity index 100% rename from core/docu/user/index.php rename to core/doc/user/index.php From cde74fe2482ff9ecdf997b78250557bba3286588 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Fri, 14 Dec 2012 14:41:09 +0100 Subject: [PATCH 7/8] make it more readable --- settings/templates/help.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/settings/templates/help.php b/settings/templates/help.php index 473219024b..b697905f7e 100644 --- a/settings/templates/help.php +++ b/settings/templates/help.php @@ -1,9 +1,13 @@

From e7c288a7197d4bc7f95d88872337d3cde6776a85 Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Fri, 14 Dec 2012 15:25:52 +0100 Subject: [PATCH 8/8] fixing links docu/ ->doc/ --- settings/help.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/settings/help.php b/settings/help.php index cdf0c549e4..cd3d615425 100644 --- a/settings/help.php +++ b/settings/help.php @@ -14,11 +14,11 @@ OC_App::setActiveNavigationEntry( "help" ); if(isset($_GET['mode']) and $_GET['mode']=='admin') { - $url=OC_Helper::linkToAbsolute( 'core', 'docu/admin' ); + $url=OC_Helper::linkToAbsolute( 'core', 'doc/admin' ); $style1=''; $style2=' pressed'; }else{ - $url=OC_Helper::linkToAbsolute( 'core', 'docu/user' ); + $url=OC_Helper::linkToAbsolute( 'core', 'doc/user' ); $style1=' pressed'; $style2=''; }