mirror of
https://github.com/standardebooks/web.git
synced 2025-07-09 16:20:27 -04:00
Add more type hints and work on some code formatting
This commit is contained in:
parent
06b82cdaaa
commit
c3c588cc1b
35 changed files with 343 additions and 167 deletions
|
@ -1,12 +1,19 @@
|
|||
<?
|
||||
$allSelected = sizeof($tags) == 0 || in_array('all', $tags);
|
||||
/**
|
||||
* @var array<string> $tags
|
||||
* @var EbookSortType $sort
|
||||
* @var ViewType $view
|
||||
* @var int $perPage
|
||||
*/
|
||||
|
||||
$isAllSelected = sizeof($tags) == 0 || in_array('all', $tags);
|
||||
?>
|
||||
<form action="/ebooks" method="get" rel="search">
|
||||
<label class="tags">Subjects
|
||||
<select <? if(!Template::IsEreaderBrowser()){ ?> multiple="multiple"<? } ?> name="tags[]" size="1">
|
||||
<option value="all">All</option>
|
||||
<? foreach(Library::GetTags() as $tag){ ?>
|
||||
<option value="<?= $tag->UrlName ?>"<? if(!$allSelected && in_array($tag->UrlName, $tags)){ ?> selected="selected"<? } ?>><?= Formatter::EscapeHtml($tag->Name) ?></option>
|
||||
<option value="<?= $tag->UrlName ?>"<? if(!$isAllSelected && in_array($tag->UrlName, $tags)){ ?> selected="selected"<? } ?>><?= Formatter::EscapeHtml($tag->Name) ?></option>
|
||||
<? } ?>
|
||||
</select>
|
||||
</label>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue