summaryrefslogtreecommitdiffstats
path: root/help
diff options
context:
space:
mode:
authorFrank Karlitschek <karlitschek@kde.org>2011-04-17 19:46:09 +0200
committerFrank Karlitschek <karlitschek@kde.org>2011-04-17 19:46:09 +0200
commit91b5d8575a403877106e4cd048d90e0c117dae66 (patch)
tree14d925684eecb0ce4b30c270fe171e643cb638f4 /help
parent47223ae2d98cf74101fd42a49d388ba48d01f80e (diff)
downloadnextcloud-server-91b5d8575a403877106e4cd048d90e0c117dae66.tar.gz
nextcloud-server-91b5d8575a403877106e4cd048d90e0c117dae66.zip
add pager function to the base lib and remove the default table width
Diffstat (limited to 'help')
-rw-r--r--help/index.php7
-rw-r--r--help/templates/index.php6
2 files changed, 12 insertions, 1 deletions
diff --git a/help/index.php b/help/index.php
index 426abe39560..f77972f58a7 100644
--- a/help/index.php
+++ b/help/index.php
@@ -7,6 +7,11 @@ if( !OC_USER::isLoggedIn()){
exit();
}
+//hardcode for testing
+$pagecount=8;
+$page=2;
+
+
// Load the files we need
OC_UTIL::addStyle( "help", "help" );
@@ -17,6 +22,8 @@ $kbe=OC_OCSCLIENT::getKnownledgebaseEntries();
$tmpl = new OC_TEMPLATE( "help", "index", "admin" );
$tmpl->assign( "kbe", $kbe );
+$tmpl->assign( "pagecount", $pagecount );
+$tmpl->assign( "page", $page );
$tmpl->printPage();
?>
diff --git a/help/templates/index.php b/help/templates/index.php
index b8444c556e9..262ab3d8cab 100644
--- a/help/templates/index.php
+++ b/help/templates/index.php
@@ -1,7 +1,7 @@
<h1>Questions and Answers</h1>
-<table cellspacing="0">
+<table cellspacing="0" width="100%">
<tbody>
<?php foreach($_["kbe"] as $kb): ?>
<tr>
@@ -13,6 +13,10 @@
<?php endforeach; ?>
</tbody>
</table>
+<?php
+ $url=OC_HELPER::linkTo( "help", "index.php" ).'?page=';
+ OC_UTIL::showPageNavi($_['pagecount'],$_['page'],$url);
+?>
<a target="_blank" class="prettybutton" href="http://apps.owncloud.com/knowledgebase/editquestion.php?action=new">ASK A QUESTION</a>