1<?php
2/* vim:set softtabstop=4 shiftwidth=4 expandtab: */
3/**
4 *
5 * LICENSE: GNU Affero General Public License, version 3 (AGPL-3.0-or-later)
6 * Copyright 2001 - 2020 Ampache.org
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Affero General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 * GNU Affero General Public License for more details.
17 *
18 * You should have received a copy of the GNU Affero General Public License
19 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20 *
21 */
22
23use Ampache\Repository\Model\Share;
24use Ampache\Module\Api\Ajax;
25use Ampache\Module\Util\Ui;
26
27?>
28<table class="tabledata striped-rows <?php echo $browse->get_css_class() ?>" data-objecttype="share">
29    <thead>
30    <tr class="th-top">
31            <th class="cel_object essential"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=share&sort=object', T_('Object'), 'sort_share_object'); ?></th>
32            <th class="cel_object_type optional"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=share&sort=object_type', T_('Object Type'), 'sort_share_object_type'); ?></th>
33            <th class="cel_user optional"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=share&sort=user', T_('User'), 'sort_share_user'); ?></th>
34            <th class="cel_creation_date optional"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=share&sort=creation_date', T_('Creation Date'), 'sort_share_creation_date'); ?></th>
35            <th class="cel_lastvisit_date optional"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=share&sort=lastvisit_date', T_('Last Visit'), 'sort_share_lastvisit_date'); ?></th>
36            <th class="cel_counter optional"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=share&sort=counter', T_('Counter'), 'sort_share_counter'); ?></th>
37            <th class="cel_max_counter optional"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=share&sort=max_counter', T_('Max Counter'), 'sort_share_max_counter'); ?></th>
38            <th class="cel_allow_stream optional"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=share&sort=allow_stream', T_('Allow Stream'), 'sort_share_allow_stream'); ?></th>
39            <th class="cel_allow_download optional"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=share&sort=allow_download', T_('Allow Download'), 'sort_share_allow_download'); ?></th>
40            <th class="cel_expire optional"><?php echo Ajax::text('?page=browse&action=set_sort&browse_id=' . $browse->id . '&type=share&sort=expire', T_('Expiry Days'), 'sort_share_expire'); ?></th>
41            <th class="cel_public_url essential"><?php echo T_('Public URL'); ?></th>
42            <th class="cel_action  essential"><?php echo T_('Actions'); ?></th>
43        </tr>
44    </thead>
45    <tbody>
46    <?php
47    foreach ($object_ids as $share_id) {
48        $libitem = new Share($share_id); ?>
49    <tr id="share_<?php echo $libitem->id; ?>">
50        <?php require Ui::find_template('show_share_row.inc.php'); ?>
51    </tr>
52    <?php
53    } ?>
54    </tbody>
55</table>
56<?php Ui::show_box_bottom(); ?>
57