Fix links to existing books in in-use artwork

This commit is contained in:
Alex Cabal 2024-01-08 20:54:03 -06:00
parent 1c125ef625
commit 17abf45850
2 changed files with 2 additions and 2 deletions

View file

@ -200,7 +200,7 @@ class Artwork extends PropertiesBase{
protected function GetEbook(): ?Ebook{ protected function GetEbook(): ?Ebook{
if($this->_Ebook === null){ if($this->_Ebook === null){
$this->_Ebook = Library::GetEbook($this->EbookWwwFilesystemPath); $this->_Ebook = Library::GetEbook(EBOOKS_DIST_PATH . str_replace('_', '/', $this->EbookWwwFilesystemPath ?? ''));
} }
return $this->_Ebook; return $this->_Ebook;

View file

@ -19,7 +19,7 @@ $showStatus = $showStatus ?? false;
<? if(sizeof($artwork->Artist->AlternateSpellings) > 0){ ?>(<abbr>AKA</abbr> <span class="author" typeof="schema:Person" property="schema:name"><?= implode('</span>, <span class="author" typeof="schema:Person" property="schema:name">', array_map('Formatter::ToPlainText', $artwork->Artist->AlternateSpellings)) ?></span>)<? } ?> <? if(sizeof($artwork->Artist->AlternateSpellings) > 0){ ?>(<abbr>AKA</abbr> <span class="author" typeof="schema:Person" property="schema:name"><?= implode('</span>, <span class="author" typeof="schema:Person" property="schema:name">', array_map('Formatter::ToPlainText', $artwork->Artist->AlternateSpellings)) ?></span>)<? } ?>
</p> </p>
<div> <div>
<p>Year completed: <? if($artwork->CompletedYear === null){ ?>Unknown<? }else{ ?><? if($artwork->CompletedYearIsCirca){ ?>Circa<? } ?><?= $artwork->CompletedYear ?><? } ?></p> <p>Year completed: <? if($artwork->CompletedYear === null){ ?>Unknown<? }else{ ?><? if($artwork->CompletedYearIsCirca){ ?>Circa <? } ?><?= $artwork->CompletedYear ?><? } ?></p>
<? if($showStatus || $artwork->Status == COVER_ARTWORK_STATUS_IN_USE){ ?><p>Status: <?= Template::ArtworkStatus(['artwork' => $artwork]) ?></p><? } ?> <? if($showStatus || $artwork->Status == COVER_ARTWORK_STATUS_IN_USE){ ?><p>Status: <?= Template::ArtworkStatus(['artwork' => $artwork]) ?></p><? } ?>
<? if(count($artwork->Tags) > 0){ ?> <? if(count($artwork->Tags) > 0){ ?>
<p>Tags:</p> <p>Tags:</p>