summaryrefslogtreecommitdiffstats
path: root/apps/files/appinfo
diff options
context:
space:
mode:
authorWilliam Bargent <personal@williambargent.co.uk>2016-07-25 15:25:02 +0100
committerGitHub <noreply@github.com>2016-07-25 15:25:02 +0100
commit352e24e703aae74c9486810e8c3550ae581c93cb (patch)
tree144f60ca01ed26ef1ea52cb66637b1220bfbe003 /apps/files/appinfo
parente51afa1684a0d555082e3115a75dc357a14a9cca (diff)
parentf18338d93284f475d7f78dc2762ff0fdc8137dea (diff)
downloadnextcloud-server-352e24e703aae74c9486810e8c3550ae581c93cb.tar.gz
nextcloud-server-352e24e703aae74c9486810e8c3550ae581c93cb.zip
Merge pull request #292 from nextcloud/recent-files
Add "Recent" file listing
Diffstat (limited to 'apps/files/appinfo')
-rw-r--r--apps/files/appinfo/app.php14
-rw-r--r--apps/files/appinfo/routes.php5
2 files changed, 17 insertions, 2 deletions
diff --git a/apps/files/appinfo/app.php b/apps/files/appinfo/app.php
index cc86e9bf270..850c335c27d 100644
--- a/apps/files/appinfo/app.php
+++ b/apps/files/appinfo/app.php
@@ -28,6 +28,7 @@
*/
\OCP\App::registerAdmin('files', 'admin');
+$l = \OC::$server->getL10N('files');
\OC::$server->getNavigationManager()->add(function () {
$urlGenerator = \OC::$server->getURLGenerator();
@@ -49,8 +50,7 @@ $templateManager->registerTemplate('application/vnd.oasis.opendocument.presentat
$templateManager->registerTemplate('application/vnd.oasis.opendocument.text', 'core/templates/filetemplates/template.odt');
$templateManager->registerTemplate('application/vnd.oasis.opendocument.spreadsheet', 'core/templates/filetemplates/template.ods');
-\OCA\Files\App::getNavigationManager()->add(function () {
- $l = \OC::$server->getL10N('files');
+\OCA\Files\App::getNavigationManager()->add(function () use ($l) {
return [
'id' => 'files',
'appname' => 'files',
@@ -60,6 +60,16 @@ $templateManager->registerTemplate('application/vnd.oasis.opendocument.spreadshe
];
});
+\OCA\Files\App::getNavigationManager()->add(function () use ($l) {
+ return [
+ 'id' => 'recent',
+ 'appname' => 'files',
+ 'script' => 'recentlist.php',
+ 'order' => 2,
+ 'name' => $l->t('Recent'),
+ ];
+});
+
\OC::$server->getActivityManager()->registerExtension(function() {
return new \OCA\Files\Activity(
\OC::$server->query('L10NFactory'),
diff --git a/apps/files/appinfo/routes.php b/apps/files/appinfo/routes.php
index 34bb1011773..7b5ac63a160 100644
--- a/apps/files/appinfo/routes.php
+++ b/apps/files/appinfo/routes.php
@@ -51,6 +51,11 @@ $application->registerRoutes(
'requirements' => array('tagName' => '.+'),
),
array(
+ 'name' => 'API#getRecentFiles',
+ 'url' => '/api/v1/recent/',
+ 'verb' => 'GET'
+ ),
+ array(
'name' => 'API#updateFileSorting',
'url' => '/api/v1/sorting',
'verb' => 'POST'