diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-01-27 11:25:26 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-27 11:25:26 -0600 |
commit | 8b95bd29ee5131721ff2644936309fd75c1ab956 (patch) | |
tree | 82fb4a10a5c85e6540698bee7c355d420c316ac7 /apps/files | |
parent | 05884bcd7c80ddd84b945ba6917bdf4a16532b52 (diff) | |
parent | 27f8a832e41590a33a7815d328564a1fd70e7760 (diff) | |
download | nextcloud-server-8b95bd29ee5131721ff2644936309fd75c1ab956.tar.gz nextcloud-server-8b95bd29ee5131721ff2644936309fd75c1ab956.zip |
Merge pull request #2822 from nextcloud/add-navigation-via-info.xml
Add navigation via info.xml (#26785)
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/appinfo/app.php | 14 | ||||
-rw-r--r-- | apps/files/appinfo/info.xml | 7 | ||||
-rw-r--r-- | apps/files/img/app.svg | 6 |
3 files changed, 15 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..2bb4d98c158 100644 --- a/apps/files/appinfo/info.xml +++ b/apps/files/appinfo/info.xml @@ -53,4 +53,11 @@ <command>OCA\Files\Command\DeleteOrphanedFiles</command> <command>OCA\Files\Command\TransferOwnership</command> </commands> + + <navigation> + <name>Files</name> + <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..130f59eab23 --- /dev/null +++ b/apps/files/img/app.svg @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg xmlns="http://www.w3.org/2000/svg" height="32" width="32" version="1.1" viewBox="0 0 32 32"> + <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> |