diff --git a/core/doc/admin/index.php b/core/doc/admin/index.php new file mode 100644 index 00000000000..7785f2ce2f1 --- /dev/null +++ b/core/doc/admin/index.php @@ -0,0 +1,2 @@ +Here goes the admin documentation. +In the meantime go to ownCloud.org/support diff --git a/core/doc/user/index.php b/core/doc/user/index.php new file mode 100644 index 00000000000..ede62f05aee --- /dev/null +++ b/core/doc/user/index.php @@ -0,0 +1,2 @@ +Here goes the user documentation +In the meantime go to ownCloud.org/support diff --git a/lib/util.php b/lib/util.php index fc50123b4fe..3e59847f538 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 diff --git a/settings/css/settings.css b/settings/css/settings.css index 560862fa12f..36457481911 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 69a5ec9c146..cd3d615425c 100644 --- a/settings/help.php +++ b/settings/help.php @@ -12,15 +12,25 @@ 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', 'doc/admin' ); + $style1=''; + $style2=' pressed'; +}else{ + $url=OC_Helper::linkToAbsolute( 'core', 'doc/user' ); + $style1=' pressed'; + $style2=''; +} + +$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->assign( "style1", $style1 ); +$tmpl->assign( "style2", $style2 ); $tmpl->printPage(); diff --git a/settings/templates/help.php b/settings/templates/help.php index 75201a86a9f..b697905f7ef 100644 --- a/settings/templates/help.php +++ b/settings/templates/help.php @@ -1,34 +1,35 @@ - -
- 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' ); ?> + + t( 'Commercial Support' ); ?> + +

+ + + +