Change the way format are handled in HTML catalog.
More work remaining to make it clean
This commit is contained in:
parent
9a8e9bacae
commit
06ce256e55
4 changed files with 36 additions and 12 deletions
14
index.php
14
index.php
|
@ -153,17 +153,13 @@
|
|||
</div>
|
||||
<div class="download">
|
||||
<?php
|
||||
if (array_key_exists("epub", $entry->book->format)) {
|
||||
foreach ($config['cops_prefered_format'] as $format)
|
||||
{
|
||||
if (array_key_exists($format, $entry->book->format)) {
|
||||
?>
|
||||
<div class="button buttonEffect"><a href="<?php echo "download/" . $entry->book->id . "/" . urlencode ($entry->book->format ["epub"]) ?>">EPUB</a></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if (array_key_exists("pdf", $entry->book->format)) {
|
||||
?>
|
||||
<div class="button buttonEffect"><a href="<?php echo "download/" . $entry->book->id . "/" . urlencode ($entry->book->format ["pdf"]) ?>">PDF</a></div>
|
||||
<div class="button buttonEffect"><a href="<?php echo "download/" . $entry->book->format [$format][0] . "/" . urlencode ($entry->book->format [$format][1]) ?>"><?php echo $format ?></a></div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue