| Current Path : /home/purehotels/public_html/templates/purehotels/html/com_k2/Eventer/ |
| Current File : /home/purehotels/public_html/templates/purehotels/html/com_k2/Eventer/item.php |
<?php
/**
* @version 2.6.x
* @package K2
* @author JoomlaWorks http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2014 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
defined('_JEXEC') or die;
$document = JFactory::getDocument();
$document->addScript('https://maps.googleapis.com/maps/api/js');
$gallery ='';
$json = 'media/k2/gallerychamp/item'.$this->item->id.'/ordering.json';
if(file_exists($json)){
$ordering = json_decode(file_get_contents($json));
$ordering = $ordering->ordering;
$gallery = $ordering;
}
$this->item->routeMap = false;
$this->item->routeDesc = false;
if( $this->item->extraFields->Longitude->value && $this->item->extraFields->Latitude->value ){
$this->item->routeMap = true;
}
if( $this->item->extraFields->Veibeskrivelse->value ){
$this->item->routeDesc = true;
}
?>
<article id="default" class="article article-2">
<?php if ( count($gallery) ): ?>
<div class="main-image">
<div class="jcarousel-wrapper gallery" style="display: block;">
<div class="jcarousel">
<ul>
<?php foreach($gallery as $image): ?>
<?php
$thumb = new JImage('media/k2/gallerychamp/item'.$this->item->id.'/main/'.$image);
$thumb = $thumb->createThumbs('360x330', JImage::CROP_RESIZE)[0]->getPath();
?>
<li><img src="<?php echo $thumb; ?>" width="100%" alt=""></li>
<?php endforeach; ?>
</ul>
</div>
<a href="#" class="jcarousel-control-prev"><img src="templates/purehotels/images/arrow-left.png" alt=""></a>
<a href="#" class="jcarousel-control-next"><img src="templates/purehotels/images/arrow-right.png" alt=""></a>
</div>
<div class="gmaps" style="display: none;">
<div id="mymap" class="GoogleMap"></div>
</div>
<script type="text/javascript">
var pos = new google.maps.LatLng(<?php echo $this->item->extraFields->Longitude->value; ?>, <?php echo $this->item->extraFields->Latitude->value; ?>);
var myMap = new google.maps.Map(document.getElementById("mymap"),
{
center: pos,
zoom: 15,
maxZoom: 20,
mapTypeId: google.maps.MapTypeId.ROADMAP,
streetViewControl: false,
disableDefaultUI: false,
mapTypeControl: false,
styles: [{"featureType":"water","elementType":"geometry","stylers":[{"color":"#e9e9e9"},{"lightness":17}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#f5f5f5"},{"lightness":20}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#ffffff"},{"lightness":17}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#ffffff"},{"lightness":29},{"weight":0.2}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#ffffff"},{"lightness":18}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#ffffff"},{"lightness":16}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#f5f5f5"},{"lightness":21}]},{"featureType":"poi.park","elementType":"geometry","stylers":[{"color":"#dedede"},{"lightness":21}]},{"elementType":"labels.text.stroke","stylers":[{"visibility":"on"},{"color":"#ffffff"},{"lightness":16}]},{"elementType":"labels.text.fill","stylers":[{"saturation":36},{"color":"#333333"},{"lightness":40}]},{"elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#f2f2f2"},{"lightness":19}]},{"featureType":"administrative","elementType":"geometry.fill","stylers":[{"color":"#fefefe"},{"lightness":20}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#fefefe"},{"lightness":17},{"weight":1.2}]}]
});
var myMarker = new google.maps.Marker(
{
position: pos,
map: myMap
//icon: "/templates/purehotels/images/mapMarker.png"
});
google.maps.event.addDomListener(window, "resize", function() {
var center = myMap.getCenter();
google.maps.event.trigger(myMap, "resize");
myMap.setCenter(center);
});
</script>
<div class="image-bottom-tag"></div>
</div>
<?php endif; ?>
<div class="content hotel-content">
<div class="hotel-pure-logo">
<img src="/templates/purehotels/images/logo-nourl.png" alt="">
</div>
<?php if($this->item->params->get('itemTitle')): ?>
<h2 class="title">
<?php echo $this->item->title; ?>
</h2>
<?php endif; ?>
<?php if(isset($this->item->editLink)): ?>
<!-- Item edit link -->
<span class="itemEditLink">
<a class="btn modal" rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $this->item->editLink; ?>">
<?php echo JText::_('K2_EDIT_ITEM'); ?>
</a>
</span>
<?php endif; ?>
<div class="textWrapper">
<div class="aboutHotel">
<?php if (strlen($this->item->introtext) > 2): ?>
<div class="introtext">
<?php echo $this->item->introtext; ?>
</div>
<?php endif; ?>
<?php if (strlen($this->item->fulltext) > 2): ?>
<div class="fulltext col2">
<?php echo $this->item->fulltext; ?>
</div>
<?php endif; ?>
<?php if ($this->item->routeMap): ?>
<a class="button button-link" onClick="showMap()"><?php echo JText::_('TPL_PUREHOTELS_ROUTE'); ?></a>
<?php endif; ?>
</div>
<?php if ($this->item->extraFields->Veibeskrivelse->value): ?>
<div class="routeDirections" style="display: none;">
<?php echo $this->item->extraFields->Veibeskrivelse->value; ?>
<a class="button button-link" onClick="showHotel()"><?php echo JText::_('TPL_PUREHOTELS_BACK'); ?></a>
</div>
<?php endif; ?>
</div>
</div>
</div>