Don't show author name in grid or detail view if the name is 'Anonymous'

This commit is contained in:
Alex Cabal 2020-12-03 11:47:54 -06:00
parent 999fa70675
commit 4eae8af914
2 changed files with 6 additions and 2 deletions

View file

@ -15,8 +15,10 @@ if(!isset($ebooks)){
</a>
<p><a href="<?= $ebook->Url ?>"><?= Formatter::ToPlainText($ebook->Title) ?></a></p>
<? foreach($ebook->Authors as $author){ ?>
<? if($author->Name != 'Anonymous'){ ?>
<p class="author"><a href="<?= Formatter::ToPlainText($ebook->AuthorsUrl) ?>"><?= Formatter::ToPlainText($author->Name) ?></a></p>
<? } ?>
<? } ?>
</li>
<? } ?>
</ol>

View file

@ -75,8 +75,10 @@ catch(\Exception $ex){
<hgroup>
<h1><?= Formatter::ToPlainText($ebook->Title) ?></h1>
<? foreach($ebook->Authors as $author){ ?>
<? if($author->Name != 'Anonymous'){ ?>
<h2><a href="<?= Formatter::ToPlainText($ebook->AuthorsUrl) ?>"><?= Formatter::ToPlainText($author->Name) ?></a></h2>
<? } ?>
<? } ?>
</hgroup>
<picture>
<? if($ebook->HeroImage2xAvifUrl !== null){ ?><source srcset="<?= $ebook->HeroImage2xAvifUrl ?> 2x, <?= $ebook->HeroImageAvifUrl ?> 1x" type="image/avif"/><? } ?>