mirror of
https://github.com/Yetangitu/owncloud-apps.git
synced 2025-10-02 14:49:17 +02:00
Initial commit
This commit is contained in:
parent
26dd81b2df
commit
993289d86b
51 changed files with 16863 additions and 0 deletions
124
files_opds/templates/feed.php
Normal file
124
files_opds/templates/feed.php
Normal file
|
@ -0,0 +1,124 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* ownCloud - Files_Opds App
|
||||
*
|
||||
* @author Frank de Lange
|
||||
* @copyright 2014 Frank de Lange
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
*/
|
||||
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?>';
|
||||
?>
|
||||
|
||||
<feed xmlns="http://www.w3.org/2005/Atom"
|
||||
xmlns:dc="http://purl.org/dc/terms/"
|
||||
xmlns:opds="http://opds-spec.org/2010/catalog">
|
||||
<id>id:<?php p($_['feed_id']); ?></id>
|
||||
<title><?php p($l->t("%s's library", array($_['user']))); ?></title>
|
||||
<subtitle><?php p($l->t("%s OPDS Catalog", array($_['ocname']))); ?></subtitle>
|
||||
<updated><?php p(date("Y-m-d\TH:i:sP", $_['feed_updated'])); ?></updated>
|
||||
<author>
|
||||
<name><?php p($_['user']); ?></name>
|
||||
</author>
|
||||
|
||||
<link rel="start"
|
||||
href="?id=root"
|
||||
type="application/atom+xml;profile=opds-catalog;kind=navigation"/>
|
||||
<link rel="self"
|
||||
href="?id=<?php p($_['id']); ?>"
|
||||
type="application/atom+xml;profile=opds-catalog;kind=navigation"/>
|
||||
<?php if ($_['id'] == 'root'): ?>
|
||||
<entry>
|
||||
<title><?php p($l->t("Browse catalog")); ?></title>
|
||||
<content type="text"><?php p($l->t("Browse the catalog in alphabetical order")); ?></content>
|
||||
<link type="application/atom+xml;profile=opds-catalog;kind=navigation"
|
||||
href="?id=directory"/>
|
||||
<id>id:by_directory</id>
|
||||
</entry>
|
||||
<entry>
|
||||
<title><?php p($l->t("%s's bookshelf", array($_['user']))); ?></title>
|
||||
<content type="text"><?php p($l->t("This bookshelf contains %s books", array($_['bookshelf-count']))); ?></content>
|
||||
<link type="application/atom+xml;profile=opds-catalog;kind=navigation"
|
||||
href="?id=bookshelf"/>
|
||||
<id>id:by_bookshelf</id>
|
||||
</entry>
|
||||
<?php elseif ($_['id'] == 'bookshelf'): ?>
|
||||
<link rel="http://opds-spec.org/facet"
|
||||
href="?id=bookshelf"
|
||||
title="Bookshelf"
|
||||
opds:activeFacet="true" />
|
||||
|
||||
<?php foreach ($_['bookshelf'] as $file): ?>
|
||||
<entry>
|
||||
<title><?php p($file['name']); ?></title>
|
||||
<updated><?php p(date("Y-m-d\TH:i:sP", $file['mtime'])); ?></updated>
|
||||
<id>id:<?php p($file['id']); ?></id>
|
||||
<link type="<?php p($file['mimetype']); ?>"
|
||||
rel="alternate"
|
||||
href="?id=<?php p($file['id']); ?>"/>
|
||||
<link type="<?php p($file['mimetype']); ?>"
|
||||
rel="http://opds-spec.org/acquisition/open-access"
|
||||
href="?id=<?php p($file['id']); ?>"/>
|
||||
<link href="<?php p($file['icon']); ?>"
|
||||
rel="http://opds-spec.org/image"
|
||||
type="image/jpeg" />
|
||||
<link href="<?php p($file['icon']); ?>"
|
||||
rel="x-stanza-cover-image"
|
||||
type="image/jpeg" />
|
||||
<link href="<?php p($file['icon']); ?>"
|
||||
rel="http://opds-spec.org/thumbnail"
|
||||
type="image/jpeg" />
|
||||
<link href="<?php p($file['icon']); ?>"
|
||||
rel="x-stanza-cover-image-thumbnail"
|
||||
type="image/jpeg" />
|
||||
<content type="text"></content>
|
||||
</entry>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<?php foreach ($_['files'] as $file): ?>
|
||||
<?php if ($file['type'] == 'dir'): ?>
|
||||
<entry>
|
||||
<title><?php p($file['name']); ?></title>
|
||||
<updated><?php p(date("Y-m-d\TH:i:sP", $file['mtime'])); ?></updated>
|
||||
<id>id:<?php p($file['id']); ?></id>
|
||||
<link type="application/atom+xml"
|
||||
rel="alternate"
|
||||
href="?id=<?php p($file['id']); ?>"/>
|
||||
<link type="application/atom+xml;profile=opds-catalog;kind=navigation"
|
||||
rel="subsection"
|
||||
href="?id=<?php p($file['id']); ?>"/>
|
||||
<content type="text"></content>
|
||||
</entry>
|
||||
<?php else: ?>
|
||||
<entry>
|
||||
<title><?php p($file['name']); ?></title>
|
||||
<updated><?php p(date("Y-m-d\TH:i:sP", $file['mtime'])); ?></updated>
|
||||
<id>id:<?php p($file['id']); ?></id>
|
||||
<link type="<?php p($file['mimetype']); ?>"
|
||||
rel="alternate"
|
||||
href="?id=<?php p($file['id']); ?>"/>
|
||||
<link type="<?php p($file['mimetype']); ?>"
|
||||
rel="http://opds-spec.org/acquisition/open-access"
|
||||
href="?id=<?php p($file['id']); ?>"/>
|
||||
<link href="<?php p($file['icon']); ?>"
|
||||
rel="http://opds-spec.org/image"
|
||||
type="image/jpeg" />
|
||||
<link href="<?php p($file['icon']); ?>"
|
||||
rel="x-stanza-cover-image"
|
||||
type="image/jpeg" />
|
||||
<link href="<?php p($file['icon']); ?>"
|
||||
rel="http://opds-spec.org/thumbnail"
|
||||
type="image/jpeg" />
|
||||
<link href="<?php p($file['icon']); ?>"
|
||||
rel="x-stanza-cover-image-thumbnail"
|
||||
type="image/jpeg" />
|
||||
<content type="text/html"></content>
|
||||
</entry>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</feed>
|
||||
|
39
files_opds/templates/personal.php
Normal file
39
files_opds/templates/personal.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* ownCloud - Files_Opds App
|
||||
*
|
||||
* @author Frank de Lange
|
||||
* @copyright 2014 Frank de Lange
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<div class="section" id="opds-personal">
|
||||
<h2><?php p($l->t('OPDS')); ?></h2>
|
||||
<div>
|
||||
<input id="opds-enable" name="opds-enable" value="<?php p($_['opdsEnable-value']) ?>" <?php p($_['opdsEnable-checked']) ?> type="checkbox">
|
||||
<label for="opds-enable"><?php p($l->t('enable OPDS catalog')) ?></label>
|
||||
</div>
|
||||
<div>
|
||||
<label for="opds-root-path"><?php p($l->t('Root directory:')) ?></label>
|
||||
<input type="text" id="opds-root-path" title="<?php p($l->t("Enter root directory for OPDS catalog.")); ?>" value="<?php p($_['rootPath']) ?>" /><span class="msg"></span>
|
||||
</div>
|
||||
<div>
|
||||
<label for="opds-file-types"><?php p($l->t('Supported extensions:')) ?></label>
|
||||
<input type="text" id="opds-file-types" title="<?php p($l->t("Enter list of comma-separated extensions (eg. pdf,epub,doc,txt). Leave blank to publish all file types.")); ?>" value="<?php p($_['fileTypes']) ?>" />
|
||||
</div>
|
||||
<div>
|
||||
<input type="button" id="opds-clear-bookshelf" value="<?php p($l -> t('Clear Bookshelf')); ?>" />
|
||||
<input type="button" id="opds-really-clear-bookshelf" title="<?php p($l->t("Clear list of downloaded books from bookshelf. This only clears the list, it does not delete any books.")); ?>" value="<?php p($l -> t('Yes, I really want to clear my personal bookshelf')); ?>" hidden />
|
||||
<input type="button" id="opds-dont-clear-bookshelf" value="<?php p($l -> t('No, I do not want to clear my bookshelf')); ?>" hidden />
|
||||
<span class="clr"></span>
|
||||
<div>
|
||||
<span id="opds-book-count"><?php p($l->t('There are %s books on your personal bookshelf', array($_['bookshelf-count']))) ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue