diff options
author | Frank Karlitschek <karlitschek@kde.org> | 2011-04-17 17:38:35 +0200 |
---|---|---|
committer | Frank Karlitschek <karlitschek@kde.org> | 2011-04-17 17:38:35 +0200 |
commit | 60b682561254797330110693705b2c36dd7928a4 (patch) | |
tree | 2cda5eabfff0902acee75a7d16993ad69cc6a5a5 | |
parent | 023c1b2f19ecb3fe1f7ccbda57e73dd476c249e2 (diff) | |
download | nextcloud-server-60b682561254797330110693705b2c36dd7928a4.tar.gz nextcloud-server-60b682561254797330110693705b2c36dd7928a4.zip |
show only ownCloud related knowledgebase entries. and make the page pretty
-rw-r--r-- | admin/templates/app.php | 2 | ||||
-rw-r--r-- | help/css/help.css | 6 | ||||
-rw-r--r-- | help/templates/index.php | 12 | ||||
-rw-r--r-- | lib/ocsclient.php | 3 |
4 files changed, 16 insertions, 7 deletions
diff --git a/admin/templates/app.php b/admin/templates/app.php index 4b5740c2bc4..9a788cf64c4 100644 --- a/admin/templates/app.php +++ b/admin/templates/app.php @@ -19,7 +19,7 @@ $app=$_['app']; <td class="description" valign="top"> <?php echo $app["description"]; ?> <br /> - <?php echo('<a class="description" href="'.$app["detailpage"].'">read more</a><br />'); ?> + <?php echo('<a class="description" target="_blank" href="'.$app["detailpage"].'">read more</a><br />'); ?> </td> <td width="1" valign="top" class="install"><a href="">INSTALL</a></td> </tr> diff --git a/help/css/help.css b/help/css/help.css index 02bcade3cc2..9e64c28afb4 100644 --- a/help/css/help.css +++ b/help/css/help.css @@ -49,16 +49,16 @@ table td.name a } -.install a { +.button a { padding:0.2em 0.5em; border:1px solid #ddd; -moz-border-radius:15px; -webkit-border-radius:15px; border-radius:15px; text-decoration: none; - font-size:1.5em; color:#666666; + font-size:1.3em; color:#666666; background-color:#F0F0F0; } -.install a:hover { +.button a:hover { background-color:#DDDDDD; } diff --git a/help/templates/index.php b/help/templates/index.php index 51b673678d3..776d7c00a9e 100644 --- a/help/templates/index.php +++ b/help/templates/index.php @@ -1,10 +1,18 @@ + +<h1>Questions and Answers</h1> + <table cellspacing="0"> <tbody> <?php foreach($_["kbe"] as $kb): ?> <tr> - <td width="1"><?php if($kb["preview1"] <> "") { echo('<a href="'.OC_HELPER::linkTo( "help", "index.php" ).'?id='.$kb['id'].'"><img class="preview" border="0" src="'.$kb["preview1"].'" /></a>'); } ?> </a></td> - <td class="name"><a href="<?php echo(OC_HELPER::linkTo( "help", "index.php" ).'?id='.$kb['id']); ?>" title=""><?php echo $kb["name"]; ?></a><br /><?php echo('<span class="type">'.$kb['description'].'</span>'); ?></td> + <td width="1"><?php if($kb["preview1"] <> "") { echo('<img class="preview" border="0" src="'.$kb["preview1"].'" />'); } ?> </a></td> + <td class="name"><?php echo $kb["name"]; ?><br /><?php echo('<span class="type">'.$kb['description'].'</span>'); ?><br /> + <?php if($kb['answer']<>'') echo('<br /><span class="type"><b>Answer:</b></span><br /><span class="type">'.$kb['answer'].'</span>');?> + </td> </tr> <?php endforeach; ?> </tbody> </table> +<span class="button"><a target="_blank" href="http://apps.owncloud.com/knowledgebase/editquestion.php?action=new">ASK A QUESTION</a></span> + + diff --git a/lib/ocsclient.php b/lib/ocsclient.php index 994a889aecf..a3c4659c6e4 100644 --- a/lib/ocsclient.php +++ b/lib/ocsclient.php @@ -126,7 +126,7 @@ class OC_OCSCLIENT{ * This function returns a list of all the knowledgebase entries from the OCS server */ public static function getKnownledgebaseEntries(){ - $url='http://api.apps.owncloud.com/v1/knowledgebase/data?page=0&pagesize=10'; + $url='http://api.apps.owncloud.com/v1/knowledgebase/data?type=150&page=0&pagesize=10'; $kbe=array(); $xml=file_get_contents($url); @@ -138,6 +138,7 @@ class OC_OCSCLIENT{ $kb['id']=$tmp[$i]->id; $kb['name']=$tmp[$i]->name; $kb['description']=$tmp[$i]->description; + $kb['answer']=$tmp[$i]->answer; $kb['preview1']=$tmp[$i]->smallpreviewpic1; $kbe[]=$kb; } |