| Current Path : /home/helpink/www/components/com_jbusinessdirectory/views/companies/tmpl/ |
| Current File : /home/helpink/www/components/com_jbusinessdirectory/views/companies/tmpl/default_style_1.php |
<?php
/**
* @package J-BusinessDirectory
*
* @author CMSJunkie http://www.cmsjunkie.com/
* @copyright Copyright (C) 2007 - 2022 CMSJunkie. All rights reserved.
* @license https://www.gnu.org/licenses/agpl-3.0.en.html
*/
defined('_JEXEC') or die('Restricted access');
require_once 'header.php';
require_once BD_CLASSES_PATH.'/attributes/attributeservice.php';
require_once HELPERS_PATH.'/listing_styles.php';
$address = JBusinessUtil::getAddressText($this->company);
?>
<?php require_once 'breadcrumbs.php'; ?>
<div id="listing-style-1" class="listing-style-1" itemscope itemtype="http://schema.org/LocalBusiness">
<div class="row">
<div class="col-12">
<div class="listing-header">
<div class="row">
<div class="col-md-7">
<h1 itemprop="name">
<?php echo isset($this->company->name) ? $this->company->name : ""; ?>
<?php echo JBDListingStyles::getCompanyBadges($this->company, $appSettings); ?>
</h1>
<div class="company-info-review">
<?php echo JBDListingStyles::getRatingDisplay($this->company, $appSettings); ?>
<?php echo JBDListingStyles::getReviewActions($this->company, $appSettings, $user); ?>
</div>
<?php if(!empty($this->company->slogan)) { ?>
<div class="business-slogan"><?php echo $this->company->slogan; ?></div>
<?php } ?>
</div>
<div class="col-md-5">
<div class="text-right header-icons">
<?php echo JBDListingStyles::getCompanyHeaderActions($this->company, $appSettings, $user); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-4">
<div class="listing-info-container">
<?php if(isset($this->package->features) && in_array(SHOW_COMPANY_LOGO, $this->package->features) || !$appSettings->enable_packages) { ?>
<span itemprop="image" style="display:none;">
<?php echo (!empty($this->company->logoLocation)) ? BD_PICTURES_PATH.$this->company->logoLocation : BD_ASSETS_FOLDER_PATH."no_image.jpg"; ?>
</span>
<div class="listing-logo" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
<?php if(!empty($this->company->logoLocation)) { ?>
<img title="<?php echo $this->escape($this->company->name); ?>" alt="<?php echo $this->escape($this->company->name); ?>" src="<?php echo BD_PICTURES_PATH.$this->company->logoLocation; ?>" itemprop="contentUrl">
<?php } else { ?>
<img title="<?php echo $this->escape($this->company->name); ?>" alt="<?php echo $this->escape($this->company->name); ?>" src="<?php echo BD_PICTURES_PATH.'/no_image.jpg'; ?>" itemprop="contentUrl">
<?php } ?>
<?php echo JBDListingStyles::getOpeningStatus($this->company, $appSettings); ?>
</div>
<?php } ?>
<div class="listing-info-wrapper">
<?php echo JBDListingStyles::getCompanyContactInfo($this->company, $appSettings, $showData); ?>
<?php echo JBDListingStyles::getCompanyActions($this->company, $appSettings, $user, $showData); ?>
<?php if($showData && (isset($this->package->features) && in_array(SOCIAL_NETWORKS, $this->package->features) || !$appSettings->enable_packages)
&& ((!empty($this->company->linkedin) || !empty($this->company->youtube) || !empty($this->company->facebook) || !empty($this->company->twitter)
|| !empty($this->company->linkedin) || !empty($this->company->skype) || !empty($this->company->instagram) || !empty($this->company->pinterest) || !empty($this->company->whatsapp)))) {
require_once 'listing_social_networks.php';
} ?>
</div>
</div>
<?php if($showData && (isset($this->package->features) && in_array(CONTACT_FORM, $this->package->features) || !$appSettings->enable_packages)) { ?>
<?php if(!empty($this->companyContacts) && (!empty($this->companyContacts[0]->contact_name) || !empty($this->companyContacts[0]->contact_phone))) { ?>
<div class="listing-section">
<div class="listing-section-title">
<?php echo count($this->companyContacts) > 1 ? JText::_('LNG_CONTACT_PERSONS') : JText::_('LNG_CONTACT_PERSON'); ?>
</div>
<div class="listing-section-content">
<?php require_once 'contact_details.php'; ?>
</div>
</div>
<?php } ?>
<?php } ?>
<?php if (!empty($this->company->available_dates)){ ?>
<div class="listing-section">
<div class="listing-section-title">
<?php echo JText::_("LNG_AVAILABILITY"); ?>
</div>
<div class="listing-section-content">
<?php require "listing_availability.php" ?>
</div>
</div>
<?php } ?>
<?php if((isset($this->package->features) && in_array(OPENING_HOURS, $this->package->features) || !$appSettings->enable_packages)
&& (!empty($this->company->business_hours) && $this->company->enableWorkingStatus) || $this->company->opening_status != COMPANY_OPEN_BY_TIMETABLE){ ?>
<?php require_once 'listing_hours.php'; ?>
<?php } ?>
<?php if((!isset($this->company->userId) || $this->company->userId == 0) && $appSettings->claim_business) { ?>
<div class="claim-listing-wrapper">
<div class="claim-listing-content">
<h4 class="claim-listing-title"><?php echo JText::_("LNG_IS_YOUR_BUSINESS"); ?></h4>
<p class="claim-listing-description"><?php echo JText::_("LNG_CLAIM_BENEFIT"); ?></p>
</div>
<a class="round-border-buton" href="<?php echo JRoute::_('index.php?option=com_jbusinessdirectory&task=businessuser.checkUser&claim_listing_id='.$this->company->id.$menuItemId); ?>">
<?php echo JText::_('LNG_CLAIM_COMPANY'); ?>
</a>
</div>
<?php } ?>
</div>
<div id="tab-panel" class="dir-tab-panel col-lg-8">
<div id="tabs" class="clearfix">
<ul class="tab-list">
<?php
$tabs = array();
if (JBDListingStyles::hasPackageFeature(DESCRIPTION, $this->package, $appSettings)
|| !empty($this->company->keywords)
|| !empty($this->company->categoriesDetails)
) {
$tabs[1] = JText::_('LNG_DETAILS');
}
if($showData && JBDListingStyles::hasPackageFeature(GOOGLE_MAP, $this->package, $appSettings)
&& !empty($this->company->latitude) && !empty($this->company->longitude)){
$tabs[2]=JText::_('LNG_MAP');
}
if ($appSettings->enable_packages && $appSettings->enable_reviews && JBDListingStyles::hasPackageFeature(REVIEWS, $this->package, $appSettings) || !$appSettings->enable_packages
&& $appSettings->enable_reviews ) {
$tabs[3]=JText::_('LNG_REVIEWS');
}
if(JBDListingStyles::hasPackageFeature(IMAGE_UPLOAD, $this->package, $appSettings)
&& !empty($this->pictures)){
$tabs[4]=JText::_('LNG_GALLERY');
}
if(JBDListingStyles::hasPackageFeature(VIDEOS, $this->package, $appSettings)
&& isset($this->videos) && count($this->videos)>0){
$tabs[5]=JText::_('LNG_VIDEOS');
}
if(JBDListingStyles::hasPackageFeature(COMPANY_OFFERS, $this->package, $appSettings)
&& isset($this->offers) && count($this->offers) && $appSettings->enable_offers){
$tabs[6]=JText::_('LNG_OFFERS');
}
if(JBDListingStyles::hasPackageFeature(COMPANY_EVENTS, $this->package, $appSettings)
&& isset($this->events) && count($this->events) && $appSettings->enable_events){
$tabs[7]=JText::_('LNG_EVENTS');
}
if(JBDListingStyles::hasPackageFeature(CUSTOM_TAB, $this->package, $appSettings)
&& !empty($this->company->custom_tab_name)){
$tabs[10]=$this->company->custom_tab_name;
}
if(JBDListingStyles::hasPackageFeature(COMPANY_SERVICES, $this->package, $appSettings)
&& isset($this->services) && count($this->services) && $appSettings->enable_services){
$tabs[13]=JText::_('LNG_SERVICES');
}
if(JBDListingStyles::hasPackageFeature(SOUNDS_FEATURE, $this->package, $appSettings)
&& !empty($this->sounds)) {
$tabs[14]=JText::_('LNG_SOUNDS');
}
if(JBDListingStyles::hasPackageFeature(SERVICES_LIST, $this->package, $appSettings)
&& !empty($this->services_list) && count($this->services_list) && $appSettings->enable_price_list){
$tabs[15]=JText::_('LNG_PRICE_LIST');
}
if(JBDListingStyles::hasPackageFeature(PROJECTS, $this->package, $appSettings)
&& !empty($this->companyProjects)){
$tabs[17]=JText::_('LNG_PROJECTS');
}
if(JBDListingStyles::hasPackageFeature(MEMBERSHIPS, $this->package, $appSettings) && !empty($this->memberships)){
$tabs[18]=JText::_('LNG_MEMBERSHIPS');
}
if(JBDListingStyles::hasPackageFeature(PRODUCTS, $this->package, $appSettings)
&& isset($this->productCategories) && count($this->productCategories)){
$tabs[19]=JText::_('LNG_PRODUCTS');
}
if (!empty($this->associatedCompanies) && $appSettings->enable_linked_listings) {
$tabs [21] = JText::_ ( 'LNG_LINKED_COMPANIES' );
}
if(!empty($this->companyArticles) && file_exists(JPATH_SITE.'/plugins/content/business/business.php')) {
$tabs [22] = JText::_ ( 'LNG_LISTING_ARTICLES' );
}
if((!empty($this->teamMembers['leadership']) || !empty($this->teamMembers['team'])) && (isset($this->package->features)
&& in_array(TEAM_FEATURE, $this->package->features) || !$appSettings->enable_packages) ){
$tabs [23] = JText::_ ( 'LNG_TEAM' );
}
if (isset($this->offers) && count($this->offers) && in_array("1", array_column($this->offers, "add_to_price_list")) && $appSettings->enable_offers && $appSettings->show_offer_price_list) {
$tabs [24] = JText::_ ( 'LNG_OFFERS_PRICE_LIST' );
}
foreach($tabs as $key=>$tab){
?>
<li class="dir-dir-tabs-options"><span id="dir-tab-<?php echo $key?>" onclick="jbdListings.showDirTab('#tabs-<?php echo $key?>')" class="track-business-details"><?php echo $tab?></span></li>
<?php } ?>
</ul>
<?php if (JBDListingStyles::hasPackageFeature(DESCRIPTION, $this->package, $appSettings)
|| !empty($this->company->keywords)
|| !empty($this->company->categoriesDetails)
) { ?>
<div id="tabs-1" class="dir-tab ui-tabs-panel">
<div class="listing-detail">
<div class="listing-detail-header"><?php echo JText::_('LNG_OVERVIEW')?></div>
<?php if (JBDListingStyles::hasPackageFeature(DESCRIPTION, $this->package, $appSettings)) { ?>
<div class="dir-listing-description listing-item">
<div class="listing-item-content">
<?php if (!empty($this->company->description) && (isset($this->package->features) && in_array(HTML_DESCRIPTION, $this->package->features) || !$appSettings->enable_packages)) { ?>
<?php echo JHTML::_("content.prepare", $this->company->description); ?>
<?php }else if (!empty($this->company->description) && (isset($this->package->features) && in_array(DESCRIPTION, $this->package->features) || !$appSettings->enable_packages)) { ?>
<?php echo strip_tags($this->company->description); ?>
<?php } ?>
</div>
</div>
<?php } ?>
<?php require_once 'details.php';?>
</div>
<?php if((isset($this->package->features) && in_array(ANNOUNCEMENTS,$this->package->features) || !$appSettings->enable_packages)
&& !empty($this->companyAnnouncements) && count($this->companyAnnouncements) && $appSettings->enable_announcements){
?>
<div class="listing-detail">
<div class="listing-detail-header"><?php echo JText::_('LNG_ANNOUNCEMENTS')?></div>
<?php require_once 'listing_announcements.php';?>
</div>
<?php } ?>
<?php if($showData && $appSettings->enable_attachments && (isset($this->package->features) && in_array(ATTACHMENTS, $this->package->features) || !$appSettings->enable_packages)) { ?>
<?php if(!empty($this->company->attachments)) { ?>
<div class="listing-detail">
<div class="listing-detail-header"><?php echo JText::_('LNG_ATTACHMENTS')?></div>
<?php require "listing_attachments.php" ?>
</div>
<?php } ?>
<?php } ?>
<?php if(isset($this->package->features) && in_array(TESTIMONIALS,$this->package->features) || !$appSettings->enable_packages){ ?>
<div class="listing-detail testimonials">
<div class="listing-detail-header"><?php echo JText::_('LNG_TESTIMONIALS')?></div>
<?php require "listing_testimonials.php" ?>
</div>
<?php } ?>
<?php if((isset($this->package->features) && in_array(RELATED_COMPANIES,$this->package->features) || !$appSettings->enable_packages)
&& isset($this->realtedCompanies) && count($this->realtedCompanies)){
?>
<div class="listing-detail related">
<div class="listing-detail-header"><?php echo JText::_('LNG_RELATED_COMPANIES')?></div>
<?php require_once 'related_business.php';?>
</div>
<?php } ?>
</div>
<?php } ?>
<?php if((isset($this->package->features) && in_array(GOOGLE_MAP,$this->package->features) || !$appSettings->enable_packages )
&& isset($this->company->latitude) && isset($this->company->longitude)){
?>
<div id="tabs-2" class="dir-tab ui-tabs-panel">
<?php
if(!empty($this->company->latitude) && !empty($this->company->longitude))
require_once 'map.php';
else
echo JText::_("LNG_NO_MAP_COORDINATES_DEFINED");
?>
</div>
<?php } ?>
<?php if ($appSettings->enable_packages && $appSettings->enable_reviews && JBDListingStyles::hasPackageFeature(REVIEWS, $this->package, $appSettings) || !$appSettings->enable_packages
&& $appSettings->enable_reviews ) { ?>
<div id="tabs-3" class="dir-tab ui-tabs-panel">
<?php require_once 'listing_reviews.php'; ?>
<?php if(!$appSettings->enable_reviews_users || !$user->id ==0) { ?>
<?php require_once 'default_addreview.php'; ?>
<?php } ?>
</div>
<?php }?>
<?php
if(JBDListingStyles::hasPackageFeature(IMAGE_UPLOAD, $this->package, $appSettings)
&& !empty($this->pictures)){
?>
<div id="tabs-4" class="dir-tab ui-tabs-panel">
<?php require_once JPATH_COMPONENT_SITE.'/include/gallery/image_gallery.php'; ?>
</div>
<?php } ?>
<?php
if(JBDListingStyles::hasPackageFeature(VIDEOS, $this->package, $appSettings)
&& isset($this->videos) && count($this->videos)>0){
?>
<div id="tabs-5" class="dir-tab ui-tabs-panel">
<?php require_once 'listing_videos.php'; ?>
</div>
<?php } ?>
<?php
if(JBDListingStyles::hasPackageFeature(COMPANY_OFFERS, $this->package, $appSettings)
&& isset($this->offers) && count($this->offers) && $appSettings->enable_offers){
?>
<div id="tabs-6" class="dir-tab ui-tabs-panel" itemprop="hasOfferCatalog" itemscope itemtype="http://schema.org/OfferCatalog">
<?php require_once 'listing_offers.php'; ?>
</div>
<?php } ?>
<?php
if(JBDListingStyles::hasPackageFeature(COMPANY_EVENTS, $this->package, $appSettings)
&& isset($this->events) && count($this->events) && $appSettings->enable_events){
?>
<div id="tabs-7" class="dir-tab ui-tabs-panel">
<?php require_once 'listing_events.php'; ?>
<?php if(!empty($this->associatedEvents) && $appSettings->enable_events){ ?>
<div class="associated-events pt-3">
<?php echo JText::_('LNG_ASSOCIATED_EVENTS') ?>
<?php require_once 'listing_associated_events.php'; ?>
</div>
<?php } ?>
</div>
<?php } ?>
<?php if(JBDListingStyles::hasPackageFeature(CUSTOM_TAB, $this->package, $appSettings)
&& !empty($this->company->custom_tab_name)){ ?>
<div id="tabs-10" class="dir-tab ui-tabs-panel">
<?php echo JHTML::_("content.prepare",$this->company->custom_tab_content); ?>
</div>
<?php } ?>
<?php
if(JBDListingStyles::hasPackageFeature(COMPANY_SERVICES, $this->package, $appSettings)
&& isset($this->services) && count($this->services) && $appSettings->enable_services){
?>
<div id="tabs-13" class="dir-tab ui-tabs-panel">
<?php require_once 'listing_services.php';?>
</div>
<?php } ?>
<?php if(JBDListingStyles::hasPackageFeature(SOUNDS_FEATURE, $this->package, $appSettings)
&& !empty($this->sounds)) { ?>
<div id="tabs-14" class="dir-tab ui-tabs-panel">
<?php require_once 'listing_sounds.php'; ?>
</div>
<?php } ?>
<?php
if(JBDListingStyles::hasPackageFeature(SERVICES_LIST, $this->package, $appSettings)
&& !empty($this->services_list) && $appSettings->enable_price_list){
?>
<div id="tabs-15" class="dir-tab ui-tabs-panel">
<?php require_once 'listing_price_list.php';?>
</div>
<?php } ?>
<?php if(JBDListingStyles::hasPackageFeature(PROJECTS, $this->package, $appSettings)
&& !empty($this->companyProjects)){?>
<div id="tabs-17" class="dir-tab ui-tabs-panel" >
<?php require_once 'listing_projects.php';?>
</div>
<?php } ?>
<?php if(JBDListingStyles::hasPackageFeature(MEMBERSHIPS, $this->package, $appSettings) && !empty($this->memberships)) { ?>
<div id="tabs-18" class="dir-tab ui-tabs-panel" >
<?php require_once 'listing_memberships.php';?>
</div>
<?php } ?>
<!-- Listing Products -->
<?php if(JBDListingStyles::hasPackageFeature(PRODUCTS, $this->package, $appSettings)
&& isset($this->productCategories) && count($this->productCategories)) { ?>
<div id="tabs-19" class="dir-tab ui-tabs-panel" >
<?php require_once 'listing_product_categories.php';?>
</div>
<?php } ?>
<?php if(!empty($this->associatedCompanies) && $appSettings->enable_linked_listings){
?>
<div id="tabs-21" class="dir-tab ui-tabs-panel" >
<?php require_once 'listing_associated_companies.php';?>
</div>
<?php } ?>
<?php if(!empty($this->companyArticles) && file_exists(JPATH_SITE.'/plugins/content/business/business.php')) { ?>
<div id="tabs-22" class="dir-tab ui-tabs-panel">
<?php require 'listing_articles.php'; ?>
</div>
<?php } ?>
<?php if((!empty($this->teamMembers['leadership']) || !empty($this->teamMembers['team'])) && (isset($this->package->features)
&& in_array(TEAM_FEATURE, $this->package->features) || !$appSettings->enable_packages) ){
?>
<div id="tabs-23" class="dir-tab ui-tabs-panel">
<?php require_once 'listing_team.php'; ?>
</div>
<?php } ?>
<?php if (isset($this->offers) && count($this->offers) && in_array("1", array_column($this->offers, "add_to_price_list")) && $appSettings->enable_offers && $appSettings->show_offer_price_list) { ?>
<div id="tabs-24" class="dir-tab ui-tabs-panel">
<?php if($appSettings->offer_price_list_view_style == 1) {
require_once 'listing_offers_price_list_style_2.php';
} else {
require_once 'listing_offers_price_list.php';
}
?>
</div>
<?php } ?>
</div>
</div>
</div >
<form name="tabsForm" action="<?php echo JRoute::_('index.php?option=com_jbusinessdirectory'.$menuItemId) ?>" id="tabsForm" method="post">
<input type="hidden" name="option" value="<?php echo JBusinessUtil::getComponentName()?>" />
<input type="hidden" name="task" value="companies.displayCompany" />
<input type="hidden" name="tabId" id="tabId" value="<?php echo $this->tabId?>" />
<input type="hidden" name="view" value="companies" />
<input type="hidden" name="layout2" id="layout2" value="" />
<input type="hidden" name="companyId" value="<?php echo $this->company->id?>" />
<input type="hidden" name="controller" value="companies" />
</form>
</div>
<?php
jimport('joomla.application.module.helper');
// this is where you want to load your module position
$modules = JModuleHelper::getModules('dir-listing');
if(isset($modules) && count($modules)>0){
$fullWidth = false; ?>
<div class="dir-company-module">
<?php foreach($modules as $module) {
echo JModuleHelper::renderModule($module, array("style"=>"xhtml"));
} ?>
</div>
<?php }
?>
<script>
window.addEventListener('load', function(){
jbdListings.initTabs(<?php echo $this->tabId ?>);
});
</script>
<?php require_once 'listing_util.php'; ?>