1
0

app.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Joas Schilling <coding@schilljs.com>
  6. * @author Jörn Friedrich Dreyer <jfd@butonic.de>
  7. * @author Lukas Reschke <lukas@statuscode.ch>
  8. * @author Robin Appelman <robin@icewind.nl>
  9. * @author Thomas Müller <thomas.mueller@tmit.eu>
  10. * @author Vincent Petry <pvince81@owncloud.com>
  11. *
  12. * @license AGPL-3.0
  13. *
  14. * This code is free software: you can redistribute it and/or modify
  15. * it under the terms of the GNU Affero General Public License, version 3,
  16. * as published by the Free Software Foundation.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU Affero General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU Affero General Public License, version 3,
  24. * along with this program. If not, see <http://www.gnu.org/licenses/>
  25. *
  26. */
  27. use OC\Search\Provider\File;
  28. // required for translation purpose
  29. // t('Files')
  30. $l = \OC::$server->getL10N('files');
  31. \OC::$server->getSearch()->registerProvider(File::class, array('apps' => array('files')));
  32. $templateManager = \OC_Helper::getFileTemplateManager();
  33. $templateManager->registerTemplate('text/html', 'core/templates/filetemplates/template.html');
  34. $templateManager->registerTemplate('application/vnd.oasis.opendocument.presentation', 'core/templates/filetemplates/template.odp');
  35. $templateManager->registerTemplate('application/vnd.oasis.opendocument.text', 'core/templates/filetemplates/template.odt');
  36. $templateManager->registerTemplate('application/vnd.oasis.opendocument.spreadsheet', 'core/templates/filetemplates/template.ods');
  37. \OCA\Files\App::getNavigationManager()->add([
  38. 'id' => 'files',
  39. 'appname' => 'files',
  40. 'script' => 'list.php',
  41. 'order' => 0,
  42. 'name' => $l->t('All files')
  43. ]);
  44. \OCA\Files\App::getNavigationManager()->add([
  45. 'id' => 'recent',
  46. 'appname' => 'files',
  47. 'script' => 'recentlist.php',
  48. 'order' => 2,
  49. 'name' => $l->t('Recent')
  50. ]);
  51. \OCA\Files\App::getNavigationManager()->add([
  52. 'id' => 'favorites',
  53. 'appname' => 'files',
  54. 'script' => 'simplelist.php',
  55. 'order' => 5,
  56. 'name' => $l->t('Favorites'),
  57. 'expandedState' => 'show_Quick_Access'
  58. ]);
  59. \OCP\Util::connectHook('\OCP\Config', 'js', '\OCA\Files\App', 'extendJsConfig');