mirror of
https://github.com/standardebooks/web.git
synced 2025-07-17 20:06:39 -04:00
Fix incorrect series display on ebooks with more than one series
This commit is contained in:
parent
5cb7109e33
commit
1383eba0f5
1 changed files with 8 additions and 1 deletions
|
@ -95,7 +95,14 @@ catch(\Exception $ex){
|
||||||
<? if(sizeof($ebook->Collections) > 0){ ?>
|
<? if(sizeof($ebook->Collections) > 0){ ?>
|
||||||
<? foreach($ebook->Collections as $collection){ ?>
|
<? foreach($ebook->Collections as $collection){ ?>
|
||||||
<p><? if($collection->SequenceNumber !== null){ ?>№ <?= number_format($collection->SequenceNumber) ?> in the<? }else{ ?>Part of the<? } ?> <a href="<?= $collection->Url ?>"><?= Formatter::ToPlainText(preg_replace('/^The /ius', '', (string)$collection->Name) ?? '') ?></a>
|
<p><? if($collection->SequenceNumber !== null){ ?>№ <?= number_format($collection->SequenceNumber) ?> in the<? }else{ ?>Part of the<? } ?> <a href="<?= $collection->Url ?>"><?= Formatter::ToPlainText(preg_replace('/^The /ius', '', (string)$collection->Name) ?? '') ?></a>
|
||||||
<? if(sizeof($ebook->Collections) == 1 && $collection->Type !== null){ ?><? if(substr_compare(mb_strtolower($collection->Name), mb_strtolower($collection->Type), -strlen(mb_strtolower($collection->Type))) !== 0){ ?><?= $collection->Type ?><? } ?><? }else{ ?>collection<? } ?>.</p>
|
<? if($collection->Type !== null){ ?>
|
||||||
|
<? if(substr_compare(mb_strtolower($collection->Name), mb_strtolower($collection->Type), -strlen(mb_strtolower($collection->Type))) !== 0){ ?>
|
||||||
|
<?= $collection->Type ?>.
|
||||||
|
<? } ?>
|
||||||
|
<? }else{ ?>
|
||||||
|
collection.
|
||||||
|
<? } ?>
|
||||||
|
</p>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
<ul class="tags"><? foreach($ebook->Tags as $tag){ ?><li><a href="<?= $tag->Url ?>"><?= Formatter::ToPlainText($tag->Name) ?></a></li><? } ?></ul>
|
<ul class="tags"><? foreach($ebook->Tags as $tag){ ?><li><a href="<?= $tag->Url ?>"><?= Formatter::ToPlainText($tag->Name) ?></a></li><? } ?></ul>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue