From aa8755bd4b2d5a949a35f1308eefa6d00140a1a7 Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Thu, 8 Dec 2016 17:43:46 +0100 Subject: Add navigation via info.xml (#26785) * Read navigation information from info.xml * Load files navigation elements from info.xml * Add comment about ignoring the exception Signed-off-by: Lukas Reschke --- apps/files/appinfo/app.php | 14 ++------------ apps/files/appinfo/info.xml | 6 ++++++ apps/files/img/app.svg | 6 ++++++ 3 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 apps/files/img/app.svg (limited to 'apps') diff --git a/apps/files/appinfo/app.php b/apps/files/appinfo/app.php index a194bb5e795..63acda3a706 100644 --- a/apps/files/appinfo/app.php +++ b/apps/files/appinfo/app.php @@ -26,20 +26,10 @@ * along with this program. If not, see * */ +// required for translation purpose +// t('Files') $l = \OC::$server->getL10N('files'); -\OC::$server->getNavigationManager()->add(function () { - $urlGenerator = \OC::$server->getURLGenerator(); - $l = \OC::$server->getL10N('files'); - return [ - 'id' => 'files_index', - 'order' => 0, - 'href' => $urlGenerator->linkToRoute('files.view.index'), - 'icon' => $urlGenerator->imagePath('core', 'places/files.svg'), - 'name' => $l->t('Files'), - ]; -}); - \OC::$server->getSearch()->registerProvider('OC\Search\Provider\File', array('apps' => array('files'))); $templateManager = \OC_Helper::getFileTemplateManager(); diff --git a/apps/files/appinfo/info.xml b/apps/files/appinfo/info.xml index a25c043f332..1171c0ceb6f 100644 --- a/apps/files/appinfo/info.xml +++ b/apps/files/appinfo/info.xml @@ -53,4 +53,10 @@ OCA\Files\Command\DeleteOrphanedFiles OCA\Files\Command\TransferOwnership + + + files.view.index + 0 + + diff --git a/apps/files/img/app.svg b/apps/files/img/app.svg new file mode 100644 index 00000000000..8f61739bc4a --- /dev/null +++ b/apps/files/img/app.svg @@ -0,0 +1,6 @@ + + + + + + -- cgit v1.2.3