mirror of
https://github.com/standardebooks/web.git
synced 2025-07-12 09:32:24 -04:00
Add in-progress and not-pd ribbons for ebook placeholders
This commit is contained in:
parent
77ce4cc6b4
commit
a17aad76c2
2 changed files with 37 additions and 17 deletions
|
@ -12,7 +12,7 @@ $collection = $collection ?? null;
|
|||
<meta property="schema:name" content="<?= Formatter::EscapeHtml($collection->Name) ?>"/>
|
||||
<? } ?>
|
||||
<? foreach($ebooks as $ebook){ ?>
|
||||
<li typeof="schema:Book"<? if($collection !== null){ ?> resource="<?= $ebook->Url ?>" property="schema:hasPart"<? if($ebook->GetCollectionPosition($collection) !== null){ ?> value="<?= $ebook->GetCollectionPosition($collection) ?>"<? } ?><? }else{ ?> about="<?= $ebook->Url ?>"<? } ?><? if($ebook->EbookPlaceholder?->IsWanted){ ?> class="wanted"<? } ?>>
|
||||
<li typeof="schema:Book"<? if($collection !== null){ ?> resource="<?= $ebook->Url ?>" property="schema:hasPart"<? if($ebook->GetCollectionPosition($collection) !== null){ ?> value="<?= $ebook->GetCollectionPosition($collection) ?>"<? } ?><? }else{ ?> about="<?= $ebook->Url ?>"<? } ?><? if($ebook->EbookPlaceholder?->IsWanted){ ?> class="ribbon <? if($ebook->EbookPlaceholder?->Status == \Enums\EbookPlaceholderStatus::InProgress){ ?>in-progress<? }else{ ?>wanted<? } ?>"<? }elseif($ebook->EbookPlaceholder !== null && !$ebook->EbookPlaceholder->IsPublicDomain){ ?> class="ribbon not-pd"<? } ?>>
|
||||
<? if($collection !== null && $ebook->GetCollectionPosition($collection) !== null){ ?>
|
||||
<meta property="schema:position" content="<?= $ebook->GetCollectionPosition($collection) ?>"/>
|
||||
<? } ?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue