45 lines
1.1 KiB
PHTML
45 lines
1.1 KiB
PHTML
<?php
|
|
$registry = \Helper\Registry::getInstance();
|
|
$imagePath = $registry->editorConfig['mediaPrefix'] . $registry->navID . '/';
|
|
$imageData = json_decode($this->data['carColorImages']);
|
|
|
|
$images = array();
|
|
$thumbs = array();
|
|
|
|
$editorData = '';
|
|
if ($this->isEditable === true)
|
|
{
|
|
$editorData = ' data-editor="CarColor" data-id="' . $this->data['carColorID'] . '" data-element="CarColor_' . $this->data['carColorID'] . '"';
|
|
}
|
|
|
|
?>
|
|
<div class="row"<?php echo $editorData; ?>>
|
|
<div class="col-md-12 car-color">
|
|
<?php
|
|
foreach ($imageData as $key => $image)
|
|
{
|
|
$imageName = explode('.', $image);
|
|
$extension = '.' . end($imageName);
|
|
$thumb = str_replace($extension, '-thumb' . $extension, $image);
|
|
$thumbs[] = '<img data-thumb="' . $key . '" src="' . $imagePath . $thumb . '"/>';
|
|
|
|
?>
|
|
<img class="center-block img-responsive" data-image="<?php echo $key; ?>" src="<?php echo $imagePath . $image; ?>"/>
|
|
<?php
|
|
}
|
|
?>
|
|
</div>
|
|
<div class="col-md-12 car-color-thumbs text-center">
|
|
<?php
|
|
|
|
foreach ($thumbs as $thumb)
|
|
{
|
|
echo $thumb;
|
|
}
|
|
|
|
?>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-12"> </div>
|
|
|