mirror of
https://github.com/Yetangitu/owncloud-apps.git
synced 2025-10-02 14:49:17 +02:00

- add cover images - add configurable preview settings (should probably be in core or in a separate app) - add some metadata to feed template (file size, type and filename)
30 lines
967 B
PHP
30 lines
967 B
PHP
<?php
|
|
/**
|
|
* ownCloud - Files_Opds app
|
|
*
|
|
* Copyright (c) 2014 Frank de Lange
|
|
* This file is licensed under the Affero General Public License version 3 or
|
|
* later.
|
|
* See the COPYING-README file.
|
|
*/
|
|
|
|
namespace OCA\Files_Opds;
|
|
|
|
\OCP\Util::addScript('files_opds', 'admin');
|
|
\OCP\Util::addStyle('files_opds', 'settings');
|
|
|
|
$formats = array(
|
|
["epub" => Config::getPreview('OC\Preview\Epub') ? 1 : 0 ],
|
|
["pdf" => Config::getPreview('OC\Preview\PDF') ? 1 : 0],
|
|
["openoffice" => Config::getPreview('OC\Preview\OpenOffice') ? 1 : 0],
|
|
["msoffice" => Config::getPreview('OC\Preview\MSOfficeDoc') ? 1 : 0]
|
|
);
|
|
|
|
$tmpl = new \OCP\Template('files_opds', 'admin');
|
|
$tmpl->assign('previewFormats', $formats);
|
|
$tmpl->assign('cover-x', Config::getApp('cover-x', '200'));
|
|
$tmpl->assign('cover-y', Config::getApp('cover-y', '200'));
|
|
$tmpl->assign('thumb-x', Config::getApp('thumb-x', '36'));
|
|
$tmpl->assign('thumb-y', Config::getApp('thumb-y', '36'));
|
|
|
|
return $tmpl->fetchPage();
|