| Current Path : /home/purehotels/public_html/templates/purehotels/html/com_k2/Hoteller/ |
| Current File : /home/purehotels/public_html/templates/purehotels/html/com_k2/Hoteller/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();
$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 hotel">
<?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 class="GoogleMap">
<iframe class="actAsDiv"
style="width:100%;height:100%;"
frameborder="0"
scrolling="no"
marginheight="0"
marginwidth="0"
src="https://maps.google.com/maps?f=q&source=s_q&q=<?php echo $this->item->extraFields->Longitude->value; ?>, <?php echo $this->item->extraFields->Latitude->value; ?>&aq=0&ie=UTF8&t=m&z=9&iwloc=A&output=embed"
></iframe>
</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":"administrative","elementType":"labels.text.fill","stylers":[{"color":"#444444"}]},{"featureType":"landscape","elementType":"all","stylers":[{"color":"#f2f2f2"}]},{"featureType":"poi","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"all","stylers":[{"saturation":-100},{"lightness":45}]},{"featureType":"road.highway","elementType":"all","stylers":[{"visibility":"simplified"}]},{"featureType":"road.arterial","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"all","stylers":[{"color":"#46bcec"},{"visibility":"on"}]}]
});
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->extraFields->booking->value): ?>
<a class="button button-link" href="<?php echo $this->item->extraFields->booking->value; ?>" target="_blank"><?php echo JText::_('TPL_PUREHOTELS_BOOKING'); ?></a>
<?php endif; ?>
<?php if ($this->item->routeMap): ?>
<a class="button button-link" onClick="showMap()"><?php echo JText::_('TPL_PUREHOTELS_ROUTE'); ?></a>
<?php endif; ?>
<?php if ($this->item->extraFields->website->value): ?>
<a class="button button-link" href="<?php echo $this->item->extraFields->website->value; ?>" target="_blank"><?php echo JText::_('TPL_PUREHOTELS_WEBSITE'); ?></a>
<?php endif; ?>
<?php if ($this->item->extraFields->TripAdvisor->value): ?>
<a class="button button-link" href="<?php echo $this->item->extraFields->TripAdvisor->value; ?>" target="_blank"><?php echo JText::_('TPL_PUREHOTELS_TRIPADVISOR'); ?></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>