-
Notifications
You must be signed in to change notification settings - Fork 68
/
Copy pathBulkDownloadTable.php
38 lines (38 loc) · 1.03 KB
/
BulkDownloadTable.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?
/**
* @var string $label
* @var array<stdClass> $collections
*/
?>
<table class="data-table bulk-downloads-table">
<caption aria-hidden="true">Scroll right →</caption>
<thead>
<tr class="mid-header">
<th scope="col"><?= Formatter::EscapeHtml($label) ?></th>
<th scope="col">Ebooks</th>
<th scope="col">Updated</th>
<th scope="col" colspan="10">Ebook format</th>
</tr>
</thead>
<tbody>
<? foreach($collections as $collection){ ?>
<tr>
<td class="row-header"><a href="<?= $collection->Url ?>"><?= Formatter::EscapeHtml($collection->Label) ?></a></td>
<td class="number">
<?= Formatter::EscapeHtml(number_format($collection->EbookCount)) ?>
</td>
<td class="number">
<?= Formatter::EscapeHtml($collection->UpdatedString) ?>
</td>
<? foreach($collection->ZipFiles as $item){ ?>
<td class="download">
<a href="<?= $item->Url ?>"><?= $item->Type ?></a>
</td>
<td>
(<?= Formatter::EscapeHtml($item->Size) ?>)
</td>
<? } ?>
</tr>
<? } ?>
</tbody>
</table>