mirror of
https://github.com/standardebooks/web.git
synced 2025-07-21 06:45:14 -04:00
Add feed/download toolbar to author and collection indexes
This commit is contained in:
parent
4268c6f91c
commit
dc0e873577
14 changed files with 151 additions and 43 deletions
|
@ -23,10 +23,11 @@ catch(Exceptions\InvalidAuthorException $ex){
|
|||
}
|
||||
?><?= Template::Header(['title' => 'Ebooks by ' . strip_tags($ebooks[0]->AuthorsHtml), 'highlight' => 'ebooks', 'description' => 'All of the Standard Ebooks ebooks by ' . strip_tags($ebooks[0]->AuthorsHtml)]) ?>
|
||||
<main class="ebooks">
|
||||
<h1<? if(sizeof($ebooks) > 1){ ?> class="is-collection"<? } ?>>Ebooks by <?= $ebooks[0]->AuthorsHtml ?></h1>
|
||||
<? if(sizeof($ebooks) > 1){ ?>
|
||||
<p class="download-collection"><a href="<?= Formatter::ToPlainText($ebooks[0]->AuthorsUrl) ?>/downloads">Download all ebooks in this collection</a></p>
|
||||
<? } ?>
|
||||
<h1 class="is-collection">Ebooks by <?= $ebooks[0]->AuthorsHtml ?></h1>
|
||||
<p class="ebooks-toolbar">
|
||||
<a class="button" href="<?= Formatter::ToPlainText($ebooks[0]->AuthorsUrl) ?>/downloads">Download collection</a>
|
||||
<a class="button" href="<?= Formatter::ToPlainText($ebooks[0]->AuthorsUrl) ?>/feeds">Author feeds</a>
|
||||
</p>
|
||||
<?= Template::EbookGrid(['ebooks' => $ebooks, 'view' => VIEW_GRID]) ?>
|
||||
<p class="feeds-alert">We also have <a href="/bulk-downloads">bulk ebook downloads</a> available, as well as <a href="/feeds">ebook catalog feeds</a> for use directly in your ereader app or RSS reader.</p>
|
||||
<?= Template::ContributeAlert() ?>
|
||||
|
|
|
@ -118,7 +118,7 @@ catch(Exceptions\InvalidCollectionException $ex){
|
|||
}
|
||||
?><?= Template::Header(['title' => $pageTitle, 'highlight' => 'ebooks', 'description' => $pageDescription]) ?>
|
||||
<main class="ebooks">
|
||||
<h1<? if($collection !== null && sizeof($ebooks) > 1){ ?> class="is-collection"<? } ?>><?= $pageHeader ?></h1>
|
||||
<h1<? if($collection !== null){ ?> class="is-collection"<? } ?>><?= $pageHeader ?></h1>
|
||||
<?= Template::DonationCounter() ?>
|
||||
<?= Template::DonationProgress() ?>
|
||||
<? if(!DONATION_DRIVE_ON && !DONATION_DRIVE_COUNTER_ON && DONATION_HOLIDAY_ALERT_ON){ ?>
|
||||
|
@ -127,8 +127,11 @@ catch(Exceptions\InvalidCollectionException $ex){
|
|||
<? if($collection === null){ ?>
|
||||
<?= Template::SearchForm(['query' => $query, 'tags' => $tags, 'sort' => $sort, 'view' => $view, 'perPage' => $perPage]) ?>
|
||||
<? } ?>
|
||||
<? if($collection !== null && sizeof($ebooks) > 1){ ?>
|
||||
<p class="download-collection"><a href="/collections/<?= Formatter::ToPlainText($collection) ?>/downloads">Download all ebooks in this collection</a></p>
|
||||
<? if($collection !== null){ ?>
|
||||
<p class="ebooks-toolbar">
|
||||
<a class="button" href="/collections/<?= Formatter::ToPlainText($collection) ?>/downloads">Download collection</a>
|
||||
<a class="button" href="/collections/<?= Formatter::ToPlainText($collection) ?>/feeds">Collection feeds</a>
|
||||
</p>
|
||||
<? } ?>
|
||||
<? if(sizeof($ebooks) == 0){ ?>
|
||||
<p class="no-results">No ebooks matched your filters. You can try different filters, or <a href="/ebooks">browse all of our ebooks</a>.</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue