-
Notifications
You must be signed in to change notification settings - Fork 1
/
loop-single-premium.php
58 lines (57 loc) · 3.82 KB
/
loop-single-premium.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/*
* Osclass – software for creating and publishing online classified
* advertising platforms
*
* Copyright (C) 2014 OSCLASS
*
* This program is free software: you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
?>
<?php $size = explode('x', osc_thumbnail_dimensions()); ?>
<li class="listing-card <?php echo $class; ?> premium">
<?php if( osc_images_enabled_at_items() ) { ?>
<?php if(osc_count_premium_resources()) { ?>
<a class="listing-thumb" href="<?php echo osc_premium_url() ; ?>" title="<?php echo osc_esc_html(osc_premium_title()) ; ?>"><img src="<?php echo osc_resource_thumbnail_url(); ?>" title="" alt="<?php echo osc_esc_html(osc_premium_title()) ; ?>" width="<?php echo $size[0]; ?>" height="<?php echo $size[1]; ?>"></a>
<?php } else { ?>
<a class="listing-thumb" href="<?php echo osc_premium_url() ; ?>" title="<?php echo osc_esc_html(osc_premium_title()) ; ?>"><img src="<?php echo osc_current_web_theme_url('images/no_photo.gif'); ?>" title="" alt="<?php echo osc_esc_html(osc_premium_title()) ; ?>" width="<?php echo $size[0]; ?>" height="<?php echo $size[1]; ?>"></a>
<?php } ?>
<?php } ?>
<div class="listing-detail">
<div class="listing-cell">
<div class="listing-data">
<div class="listing-basicinfo">
<a href="<?php echo osc_premium_url() ; ?>" class="title" title="<?php echo osc_esc_html(osc_premium_title()) ; ?>"><?php echo osc_premium_title() ; ?></a>
<div class="listing-attributes">
<span class="category"><?php echo osc_premium_category() ; ?></span> -
<span class="location"><?php echo osc_premium_city(); ?> <?php if(osc_premium_region()!='') { ?>(<?php echo osc_premium_region(); ?>)<?php } ?></span> <span class="g-hide">-</span> <?php echo osc_format_date(osc_premium_pub_date()); ?>
<?php if( osc_price_enabled_at_items() ) { ?><span class="currency-value"><?php echo osc_format_price(osc_premium_price()); ?></span><?php } ?>
</div>
<p><?php echo osc_highlight( osc_premium_description(), 250 ); ?></p>
</div>
<?php if($admin){ ?>
<span class="admin-options">
<a href="<?php echo osc_premium_edit_url(); ?>" rel="nofollow"><?php _e('Edit item', 'osclassclsx'); ?></a>
<span>|</span>
<a class="delete" onclick="javascript:return confirm('<?php echo osc_esc_js(__('This action can not be undone. Are you sure you want to continue?', 'osclassclsx')); ?>')" href="<?php echo osc_premium_delete_url();?>" ><?php _e('Delete', 'osclassclsx'); ?></a>
<?php if(osc_premium_is_inactive()) {?>
<span>|</span>
<a href="<?php echo osc_premium_activate_url();?>" ><?php _e('Activate', 'osclassclsx'); ?></a>
<?php } ?>
</span>
<?php } ?>
</div>
</div>
</div>
</li>