aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorFrank Karlitschek <karlitschek@kde.org>2011-04-16 20:34:18 +0200
committerFrank Karlitschek <karlitschek@kde.org>2011-04-16 20:34:18 +0200
commit1372d8339d78c01b1514708f26520e244cc991e2 (patch)
treeea44cc204bc8103ca84fbb7d37e8dc87efaa8952 /admin
parentcf50c497b92f59f8252e1d8a7f3413c8d880df6d (diff)
downloadnextcloud-server-1372d8339d78c01b1514708f26520e244cc991e2.tar.gz
nextcloud-server-1372d8339d78c01b1514708f26520e244cc991e2.zip
add a date format function for more eyecandy
Diffstat (limited to 'admin')
-rw-r--r--admin/apps.php35
-rw-r--r--admin/templates/apps.php4
2 files changed, 28 insertions, 11 deletions
diff --git a/admin/apps.php b/admin/apps.php
index b03357a0fb0..b433fe0875b 100644
--- a/admin/apps.php
+++ b/admin/apps.php
@@ -28,25 +28,42 @@ if( !OC_USER::isLoggedIn() || !OC_GROUP::inGroup( $_SESSION['user_id'], 'admin'
exit();
}
-
// Load the files we need
//OC_UTIL::addStyle( "", "files" );
//OC_UTIL::addScript( "", "files" );
+if(isset($_GET['id'])) $id=$_GET['id']; else $id=0;
+if(isset($_GET['cat'])) $cat=$_GET['cat']; else $cat=0;
+
$categories=OC_OCSCLIENT::getCategories();
-//print_r($categories);
-$apps=OC_OCSCLIENT::getApplications($categories);
-//print_r($apps);
+if($id==0) {
+
+ if($cat==0){
+ $apps=OC_OCSCLIENT::getApplications($categories);
+ }else{
+ $apps=OC_OCSCLIENT::getApplications($cat);
+ }
+
+ // return template
+ $tmpl = new OC_TEMPLATE( "admin", "apps", "admin" );
-// return template
-$tmpl = new OC_TEMPLATE( "admin", "apps", "admin" );
+ $tmpl->assign( "categories", $categories );
+ $tmpl->assign( "apps", $apps );
+ $tmpl->printPage();
+ unset($tmpl);
-$tmpl->assign( "categories", $categories );
-$tmpl->assign( "apps", $apps );
-$tmpl->printPage();
+}else{
+ $app=OC_OCSCLIENT::getApplication($id);
+
+ $tmpl = new OC_TEMPLATE( "admin", "app", "admin" );
+ $tmpl->assign( "app", $app );
+ $tmpl->printPage();
+ unset($tmpl);
+
+}
?>
diff --git a/admin/templates/apps.php b/admin/templates/apps.php
index c3f4fdfcc19..2f584775815 100644
--- a/admin/templates/apps.php
+++ b/admin/templates/apps.php
@@ -18,9 +18,9 @@
<tbody>
<?php foreach($_["apps"] as $app): ?>
<tr>
- <td class="filename"><?php if($app["preview"] <> "") { echo('<a href=""><img border="0" src="'.$app["preview"].'" /></a>'); } ?> </a></td>
+ <td width="1"><?php if($app["preview"] <> "") { echo('<a href=""><img border="0" src="'.$app["preview"].'" /></a>'); } ?> </a></td>
<td class="filename"><a href="" title=""><?php echo $app["name"]; ?></a></td>
- <td class="date"><?php echo date($app["changed"]); ?></td>
+ <td class="date"><?php echo OC_UTIL::formatdate($app["changed"]); ?></td>
<td class="fileaction"><a href="" title=""><img src="images/drop-arrow.png" alt="+" /></a></td>
</tr>
<?php endforeach; ?>