-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathuser-items.php
More file actions
67 lines (64 loc) · 2.63 KB
/
Copy pathuser-items.php
File metadata and controls
67 lines (64 loc) · 2.63 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
/*
* This file is part of the Bender theme for Shopclass (Mindstellar).
* Copyright (c) 2014 Osclass (original work, licensed under the Apache License 2.0)
* Copyright (c) 2021-2026 Mindstellar Community
*
* Distributed under the GNU General Public License v3.0 or later. The original
* Osclass code it derives from was licensed under the Apache License 2.0.
* See LICENSE for the full GPL-3.0 text.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
// meta tag robots
osc_add_hook('header','bender_nofollow_construct');
bender_add_body_class('user user-items');
osc_add_hook('before-main','sidebar');
function sidebar(){
osc_current_web_theme_path('user-sidebar.php');
}
osc_current_web_theme_path('header.php') ;
$listClass = '';
$buttonClass = '';
if(Params::getParam('ShowAs') === 'gallery'){
$listClass = 'listing-grid';
$buttonClass = 'active';
}
?>
<div class="list-header">
<?php osc_run_hook('search_ads_listing_top'); ?>
<h1><?php _e('My listings', 'bender'); ?></h1>
<?php if(osc_count_items() == 0) { ?>
<p class="empty" ><?php _e('No listings have been added yet', 'bender'); ?></p>
<?php } else { ?>
<div class="actions">
<span class="doublebutton <?php echo $buttonClass; ?>">
<a href="<?php echo osc_user_list_items_url(); ?>&ShowAs=list" class="list-button"
data-class-toggle="listing-grid" data-destination="#listing-card-list"><span>Lista</span></a>
<a href="<?php echo osc_user_list_items_url(); ?>&ShowAs=gallery" class="grid-button"
data-class-toggle="listing-grid" data-destination="#listing-card-list"><span>Grid</span></a>
</span>
</div>
</div>
<?php
View::newInstance()->_exportVariableToView("listClass",$listClass);
View::newInstance()->_exportVariableToView("listAdmin", true);
osc_current_web_theme_path('loop.php');
?>
<div class="clear"></div>
<?php
if(osc_rewrite_enabled()){
$footerLinks = osc_search_footer_links();
?>
<ul class="footer-links">
<?php foreach($footerLinks as $f) { View::newInstance()->_exportVariableToView('footer_link', $f); ?>
<?php if($f['total'] < 3) continue; ?>
<li><a href="<?php echo osc_footer_link_url(); ?>"><?php echo osc_footer_link_title(); ?></a></li>
<?php } ?>
</ul>
<?php } ?>
<div class="paginate" >
<?php echo osc_pagination_items(); ?>
</div>
<?php } ?>
<?php osc_current_web_theme_path('footer.php') ; ?>