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

View file

@ -75,7 +75,9 @@ catch(\Exception $ex){
<hgroup> <hgroup>
<h1><?= Formatter::ToPlainText($ebook->Title) ?></h1> <h1><?= Formatter::ToPlainText($ebook->Title) ?></h1>
<? foreach($ebook->Authors as $author){ ?> <? foreach($ebook->Authors as $author){ ?>
<h2><a href="<?= Formatter::ToPlainText($ebook->AuthorsUrl) ?>"><?= Formatter::ToPlainText($author->Name) ?></a></h2> <? if($author->Name != 'Anonymous'){ ?>
<h2><a href="<?= Formatter::ToPlainText($ebook->AuthorsUrl) ?>"><?= Formatter::ToPlainText($author->Name) ?></a></h2>
<? } ?>
<? } ?> <? } ?>
</hgroup> </hgroup>
<picture> <picture>