summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-12-08 17:43:46 +0100
committerLukas Reschke <lukas@statuscode.ch>2016-12-22 12:34:41 +0100
commitaa8755bd4b2d5a949a35f1308eefa6d00140a1a7 (patch)
tree09153939dd285480a1225290d7bde664e41826fa /apps/files
parent7f8d22e7102293d96c365b380bf1845ff2de6b71 (diff)
downloadnextcloud-server-aa8755bd4b2d5a949a35f1308eefa6d00140a1a7.tar.gz
nextcloud-server-aa8755bd4b2d5a949a35f1308eefa6d00140a1a7.zip
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 <lukas@statuscode.ch>
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/appinfo/app.php14
-rw-r--r--apps/files/appinfo/info.xml6
-rw-r--r--apps/files/img/app.svg6
3 files changed, 14 insertions, 12 deletions
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 <http://www.gnu.org/licenses/>
*
*/
+// 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 @@
<command>OCA\Files\Command\DeleteOrphanedFiles</command>
<command>OCA\Files\Command\TransferOwnership</command>
</commands>
+
+ <navigation>
+ <route>files.view.index</route>
+ <order>0</order>
+ </navigation>
+
</info>
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 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="32" width="32" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <g fill-rule="evenodd" transform="matrix(1.7333 0 0 1.7333 -344.09 -1727.8)" fill="#fff">
+ <path d="m200.2 999.72c-0.28913 0-0.53125 0.2421-0.53125 0.5312v12.784c0 0.2985 0.23264 0.5312 0.53125 0.5312h15.091c0.2986 0 0.53124-0.2327 0.53124-0.5312l0.0004-10.474c0-0.2889-0.24211-0.5338-0.53124-0.5338l-7.5457 0.0005-2.3076-2.3078z" fill-rule="evenodd" fill="#fff"/>
+ </g>
+</svg>