mirror of
https://github.com/standardebooks/web.git
synced 2025-07-16 11:26:37 -04:00
Inline and remove templates/WantedEbooks.php
This commit is contained in:
parent
5b605a00b7
commit
7bd08087dc
2 changed files with 39 additions and 29 deletions
|
@ -1,26 +0,0 @@
|
|||
<?
|
||||
|
||||
$ebooks = [];
|
||||
if(isset($difficulty)){
|
||||
$ebooks = Ebook::GetWantedByDifficulty($difficulty);
|
||||
}
|
||||
$showPlaceholderMetadata = $showPlaceholderMetadata ?? false;
|
||||
|
||||
?>
|
||||
<ul>
|
||||
<? foreach($ebooks as $ebook){ ?>
|
||||
<li>
|
||||
<? if(isset($ebook->EbookPlaceholder->TranscriptionUrl)){ ?><a href="<?= $ebook->EbookPlaceholder->TranscriptionUrl ?>"><? } ?>
|
||||
<?= Formatter::EscapeHtml($ebook->Title) ?><? if(isset($ebook->EbookPlaceholder->TranscriptionUrl)){ ?></a><? } ?>
|
||||
<? if(sizeof($ebook->CollectionMemberships) > 0){ ?>
|
||||
(<? foreach($ebook->CollectionMemberships as $index => $collectionMembership){ ?><?= Template::CollectionFormatted(['collectionMembership' => $collectionMembership]) ?><? if($index < sizeof($ebook->CollectionMemberships) - 1){ ?>, <? } ?><? } ?>)
|
||||
<? } ?>
|
||||
by <?= Formatter::EscapeHtml($ebook->AuthorsString) ?><? if($ebook->ContributorsHtml != ''){ ?>. <? } ?>
|
||||
<?= $ebook->ContributorsHtml ?>
|
||||
<? if(isset($ebook->EbookPlaceholder->Notes)){ ?>(<?= Formatter::MarkdownToInlineHtml($ebook->EbookPlaceholder->Notes) ?>)<? } ?>
|
||||
<? if($showPlaceholderMetadata){ ?>
|
||||
<p>Ebook ID: <?= $ebook->EbookId ?>, <a href="<?= $ebook->Url ?>">View placeholder</a></p>
|
||||
<? } ?>
|
||||
</li>
|
||||
<? } ?>
|
||||
</ul>
|
Loading…
Add table
Add a link
Reference in a new issue