Ejemplo n.º 1
0
<?php

defined('SYSPATH') or die('No direct script access.');
if ($value) {
    $img_size = getimagesize(DOCROOT . $orm_helper->file_path($field, $value));
    $src = $orm_helper->file_uri($field, $value);
    if ($img_size[0] > 100 or $img_size[1] > 100) {
        $thumb = Thumb::uri('admin_image_100', $src);
    } else {
        $thumb = $src;
    }
    echo HTML::anchor($src, HTML::image($thumb), array('class' => 'image-holder'));
} else {
    echo __('No image');
}
Ejemplo n.º 2
0
$detail_tpl = URL::base() . Page_Route::uri($page['id'], 'catalog_element', array('element_uri' => '{ELEMENT_URI}', 'element_id' => '{ELEMENT_ID}'));
$orm_helper = ORM_Helper::factory('catalog_Element');
foreach ($list as $_orm) {
    $_link = str_replace(array('{ELEMENT_URI}', '{ELEMENT_ID}'), array($_orm->uri, $_orm->id), $detail_tpl);
    $_thumb_1 = NULL;
    if (!empty($_orm->image_1)) {
        $_src = $orm_helper->file_uri('image_1', $_orm->image_1);
        $_thumb_1 = Thumb::uri('list_420x535', $_src);
        unset($_src);
    } else {
        $_thumb_1 = Thumb::uri('list_420x535_no_img', $NO_IMG);
    }
    $_thumb_2 = NULL;
    if (!empty($_orm->image_2)) {
        $_src = $orm_helper->file_uri('image_2', $_orm->image_2);
        $_thumb_2 = Thumb::uri('list_420x535', $_src);
        unset($_src);
    }
    $_class = empty($_thumb_2) ? 'transform-clear' : '';
    ?>
	
				<div class="four shop columns">
					<figure class="product <?php 
    echo $_class;
    ?>
">
						<div class="mediaholder">
							<a href="<?php 
    echo $_link;
    ?>
">
Ejemplo n.º 3
0
<?php

defined('SYSPATH') or die('No direct script access.');
$list_tpl = URL::base() . Page_Route::uri($PAGE_ID, 'catalog', array('category_uri' => $CATEGORY->uri));
/*
 * FIXME $list_tpl
 */
$orm_helper = ORM_Helper::factory('catalog_Category');
foreach ($list_categories as $_orm) {
    $_link = $list_tpl . '/' . $_orm->uri;
    if (!empty($_orm->image)) {
        $_src = $orm_helper->file_uri('image', $_orm->image);
        $_thumb = Thumb::uri('list_420x420', $_src);
    } else {
        $_thumb = Thumb::uri('list_420x420_no_img', $NO_IMG);
    }
    ?>
	
		<div class="four columns">
			<a href="<?php 
    echo $_link;
    ?>
" class="img-caption" >
				<figure>
<?php 
    echo HTML::image($_thumb, array('alt' => $_orm->title));
    ?>
					
					<figcaption>
						<h3><?php 
    echo HTML::chars($_orm->title);
Ejemplo n.º 4
0
<?php

defined('SYSPATH') or die('No direct script access.');
$thumb = NULL;
if (!empty($orm->image_1)) {
    $src = ORM_Helper::factory('catalog_Element')->file_uri('image_1', $orm->image_1);
    $thumb = Thumb::uri('list_80x80', $src);
    unset($src);
}
if (empty($thumb) and !empty($orm->image_2)) {
    $src = ORM_Helper::factory('catalog_Element')->file_uri('image_2', $orm->image_2);
    $thumb = Thumb::uri('list_80x80', $src);
    unset($src);
}
if (empty($thumb)) {
    $thumb = Thumb::uri('list_80x80_no_img', $NO_IMG);
}
$nom_item = reset($nomenclature);
$currency = 'руб.';
?>
	<section class="relative">
<?php 
echo HTML::anchor('#size-select', __('Choose size'), array('class' => 'button dark popup-with-size-select'));
?>
	
		<span class="product-price js-render-field">
<?php 
if (!empty($nom_item['price'])) {
    echo HTML::chars($nom_item['price'] . ' ' . $currency);
}
?>
Ejemplo n.º 5
0
<?php 
$orm_helper = ORM_Helper::factory('news');
foreach ($list as $_orm) {
    $cat_orm = Arr::get($categories, $_orm->category_id);
    if (empty($cat_orm)) {
        continue;
    }
    $_public_ts = strtotime($_orm->public_date);
    $_link = str_replace(array('{category_uri}', '{uri}', '{id}'), array($cat_orm->uri, $_orm->uri, $_orm->id), $detail_tpl);
    ?>
		
				<article class="post">
<?php 
    if (!empty($_orm->image)) {
        $_src = $orm_helper->file_uri('image', $_orm->image);
        $_thumb = Thumb::uri('news_860', $_src);
        ?>
		
						<figure class="post-img">
							<a href="<?php 
        echo $_link;
        ?>
">
<?php 
        echo HTML::image($_thumb, array('alt' => $_orm->title, 'title' => $_orm->title));
        ?>
							
							</a>
						</figure>
<?php 
    }
Ejemplo n.º 6
0
<?php

defined('SYSPATH') or die('No direct script access.');
if (empty($list)) {
    return;
}
?>
	<div class="slider-padding">
		<div id="product-slider-vertical" class="royalSlider rsDefault">
<?php 
$tpl = '
		    <a href="{SRC_BIG}" class="mfp-gallery" title="{TITLE}">
		    	<img class="rsImg" src="{SRC_NORMAL}" data-rsTmb="{SRC_SMALL}" alt="{TITLE}" />
	    	</a>
		';
$url_base = URL::base();
foreach ($list as $_item) {
    $_thumb_small = $url_base . Thumb::uri('list_96x105', $_item['src']);
    $_thumb_normal = $url_base . Thumb::uri('list_560x632', $_item['src']);
    $_thumb_big = $url_base . Thumb::uri('list_1024x768', $_item['src']);
    echo str_replace(array('{SRC_BIG}', '{SRC_NORMAL}', '{SRC_SMALL}', '{TITLE}'), array($_thumb_big, $_thumb_normal, $_thumb_small, $_item['title']), $tpl);
}
?>
		
		 </div>
		 <div class="clearfix"></div>
	</div>
	<script type="text/javascript">
		s.initList.push('initProductSlider');
	</script>
Ejemplo n.º 7
0
                if (empty($_row['link'])) {
                    $_t = '<span>' . HTML::chars($_row['title']) . '</span>';
                } else {
                    $_t = HTML::anchor($_row['link'], $_row['title']);
                }
                $_list[] = '<li class="' . $_c . '">' . $_t . '</li>';
            }
            $_body = '<ul>' . implode('', $_list) . '</ul>';
            break;
        case 'image':
            $li_class = 'one-fourth-column hidden-on-mobile';
            if (empty($_column['image'])) {
                $_thumb = Thumb::uri('width_267_no_img', $NO_IMG);
            } else {
                $_src = $orm_helper->file_uri('image', $_column['image']);
                $_thumb = Thumb::uri('width_267', $_src);
            }
            $_img = HTML::image($_thumb, array('alt' => $_column['title']));
            $_descr = empty($_column['description']) ? '' : '<span>' . $_column['description'] . '</span>';
            $_body = '
						<figure>
							' . $_img . '
							<figcaption>
								<h3>' . HTML::chars($_column['title']) . '</h3>
								' . HTML::chars($_descr) . '
							</figcaption>
						</figure>
					';
            if (!empty($_row['link'])) {
                $_body = HTML::anchor($_row['link'], $_body, array('class' => 'img-caption margin-reset'));
            } else {
Ejemplo n.º 8
0
<?php

defined('SYSPATH') or die('No direct script access.');
if (Arr::path($properties, 'Paralax.value.Image_1920.value')) {
    echo View_Theme::factory('layout/titlebar/parallax', array('properties' => $properties, 'title' => $titlebar_title));
} else {
    echo View_Theme::factory('layout/titlebar/default', array('title' => $titlebar_title));
}
$thumb_no_img = URL::base() . Thumb::uri('list_80x80_no_img', $NO_IMG);
$currency = 'руб.';
?>
	<div class="container cart">
		<div class="sixteen columns">
			<table id="js-basket-list" class="cart-table responsive-table">
				<thead>
					<tr>
						<th></th>
						<th><?php 
echo __('Product name');
?>
</th>
						<th><?php 
echo __('Price');
?>
 (<?php 
echo $currency;
?>
)</th>
						<th><?php 
echo __('Quantity');
?>
Ejemplo n.º 9
0
    echo View_Theme::factory('layout/titlebar/parallax', array('properties' => $properties, 'title' => $titlebar_title));
} else {
    echo View_Theme::factory('layout/titlebar/default', array('title' => $titlebar_title));
}
$public_ts = strtotime($orm->public_date);
?>
	<div class="container">
	
		<div class="twelve columns">
			<div class="extra-padding">
				<article class="post single">
<?php 
if (!empty($orm->image)) {
    $orm_helper = ORM_Helper::factory('news');
    $src = $orm_helper->file_uri('image', $orm->image);
    $thumb = Thumb::uri('news_860', $src);
    ?>
						<figure class="post-img">
<?php 
    echo HTML::image($thumb, array('alt' => $orm->title, 'title' => $orm->title));
    ?>
						
						</figure>
<?php 
}
?>
					<section class="date">
						<span class="day"><?php 
echo date('d', $public_ts);
?>
</span>
Ejemplo n.º 10
0
echo $control_id;
?>
">
<?php 
echo __($labels[$field]), in_array($field, $required) ? '<span class="required">*</span>' : '', '&nbsp;:&nbsp;';
?>
		</label>
		<div class="controls <?php 
echo $controls_class;
?>
">
<?php 
if (!empty($value)) {
    $mime_group = Ku_File::mime_group(realpath(DOCROOT . $value));
    if ($mime_group == 'image') {
        $thumb = Thumb::uri('admin_prop_image_300', $value);
        echo HTML::anchor($value, HTML::image($thumb), array('class' => 'image-holder', 'title' => '', 'target' => '_blank'));
    } else {
        echo HTML::anchor($value, __('Open in new window'), array('class' => 'file-link', 'target' => '_blank'));
    }
}
$attr = array('id' => $control_id);
if (!empty($accept)) {
    $attr['accept'] = $accept;
}
echo Form::file($controll_name, $attr);
if (!empty($help_text)) {
    echo '<p class="help-block help-text"><small><strong>', HTML::chars($help_text), '</strong></small></p>';
}
if (isset($errors[$field])) {
    echo '<p class="text-error">', HTML::chars($errors[$field]), '</p>';
Ejemplo n.º 11
0
echo __('Best deals');
?>
</h3><span class="line"></span><div class="clearfix"></div>
		<ul class="widget-tabs">
<?php 
$detail_tpl = URL::base() . Page_Route::uri($page['id'], 'catalog_element', array('element_uri' => '{ELEMENT_URI}', 'element_id' => '{ELEMENT_ID}'));
$orm_helper = ORM_Helper::factory('catalog_Element');
foreach ($list as $_orm) {
    $_link = str_replace(array('{ELEMENT_URI}', '{ELEMENT_ID}'), array($_orm->uri, $_orm->id), $detail_tpl);
    $_thumb_1 = NULL;
    if (!empty($_orm->image_1)) {
        $_src = $orm_helper->file_uri('image_1', $_orm->image_1);
        $_thumb_1 = Thumb::uri('list_90x90', $_src);
        unset($_src);
    } else {
        $_thumb_1 = Thumb::uri('list_90x90_no_img', $NO_IMG);
    }
    ?>
			<li>
				<div class="widget-thumb">
					<a href="<?php 
    echo $_link;
    ?>
">
<?php 
    echo HTML::image($_thumb_1, array('alt' => $_orm->title));
    ?>
					
					</a>
				</div>
				<div class="widget-text">