aboutsummaryrefslogtreecommitdiffstats
path: root/gaming/collection/wishlist.php
blob: 47fa2a4304d10c59205483a4d47f04dc7777463a (plain) (blame)
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
39
40
41
42
43
44
45
<?php
/**
 * Wishlist — games, consoles, hardware, and song packs marked Wishlist.
 */
require_once __DIR__ . '/_lib.php';

$data = collection_load();
$rows = collection_filter_wishlist(array_merge(
    collection_games_library_rows($data),
    collection_console_rows($data),
    collection_hardware_inventory_rows($data),
    collection_pack_rows($data)
));

collection_page_open(
    'wishlist',
    t('collection.wishlist_title'),
    t('collection.wishlist_blurb'),
    'wishlist'
);
?>
    <p class="gc-page-blurb"><?= collection_h('collection.wishlist_blurb') ?></p>
    <p class="gc-count"><?= count($rows) ?> <?= collection_h('collection.wishlist_count') ?></p>

<?php if (!$rows): ?>
    <p class="gc-empty"><?= collection_h('collection.wishlist_empty') ?></p>
<?php else: ?>
    <div class="gc-catalog">
<?php foreach ($rows as $row) {
    collection_render_row($row);
} ?>
    </div>
<?php endif; ?>

    <p class="gc-footer-hint">
      <a href="/gaming/collection/"><?= collection_h('collection.menu_games') ?></a>
      ·
      <a href="/gaming/collection/consoles.php"><?= collection_h('collection.menu_consoles') ?></a>
      ·
      <a href="/gaming/collection/hardware.php"><?= collection_h('collection.menu_hardware') ?></a>
      ·
      <a href="/gaming/collection/packs.php"><?= collection_h('collection.menu_packs') ?></a>
    </p>
<?php
collection_page_close();