- md5
- 09c3b3fd0bf4b5b9221d9e305d86d7b2
- sha1
- 8a7a3039442631c37e5a850053fc6c2acc5c0c1a
- sha256
- fa4a390535309ae83c2c2eb010d10a3718c9b68e15509db01f48c2aa1044337c
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
<?php
/**
* @package Joomla.Site
* @subpackage com_contact
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Route;
use Joomla\Component\Contact\Site\Helper\Route as ContactHelperRoute;
$cparams = ComponentHelper::getParams('com_media');
$tparams = $this->item->params;
?>
<div class="com-contact contact" itemscope itemtype="https://schema.org/Person">
<?php if ($tparams->get('show_page_heading')) : ?>
<h1>
<?php echo $this->escape($tparams->get('page_heading')); ?>
</h1>
<?php endif; ?>
<?php if ($this->item->name && $tparams->get('show_name')) : ?>
<div class="page-header">
<h2>
<?php if ($this->item->published == 0) : ?>
<span class="badge badge-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span>
<?php endif; ?>
<span class="contact-name" itemprop="name"><?php echo $this->item->name; ?></span>
</h2>
</div>
<?php endif; ?>
<?php $show_contact_category = $tparams->get('show_contact_category'); ?>
<?php if ($show_contact_category === 'show_no_link') : ?>
<h3>
<span class="contact-category"><?php echo $this->item->category_title; ?></span>
</h3>
<?php elseif ($show_contact_category === 'show_with_link') : ?>
<?php $contactLink = ContactHelperRoute::getCategoryRoute($this->item->catid, $this->item->language); ?>
<h3>
<span class="contact-category"><a href="<?php echo $contactLink; ?>">
<?php echo $this->escape($this->item->category_title); ?></a>
</span>
</h3>
<?php endif; ?>
<?php echo $this->item->event->afterDisplayTitle; ?>
<?php if ($tparams->get('show_contact_list') && count($this->contacts) > 1) : ?>
<form action="#" method="get" name="selectForm" id="selectForm">
<label for="select_contact"><?php echo JText::_('COM_CONTACT_SELECT_CONTACT'); ?></label>
<?php echo HTMLHelper::_('select.genericlist', $this->contacts, 'select_contact', 'class="inputbox" onchange="document.location.href = this.value"', 'link', 'name', $this->item->link); ?>
</form>
<?php endif; ?>
<?php if ($tparams->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
<div class="com-contact__tags">
<?php $this->item->tagLayout = new FileLayout('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
</div>
<?php endif; ?>
<?php echo $this->item->event->beforeDisplayContent; ?>
<?php $presentation_style = $tparams->get('presentation_style'); ?>
<?php $accordionStarted = false; ?>
<?php $tabSetStarted = false; ?>
<?php if ($this->params->get('show_info', 1)) : ?>
<?php if ($presentation_style === 'sliders') : ?>
<?php echo HTMLHelper::_('bootstrap.startAccordion', 'slide-contact', array('active' => 'basic-details')); ?>
<?php $accordionStarted = true; ?>
<?php echo HTMLHelper::_('bootstrap.addSlide', 'slide-contact', JText::_('COM_CONTACT_DETAILS'), 'basic-details'); ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', array('active' => 'basic-details')); ?>
<?php $tabSetStarted = true; ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'basic-details', JText::_('COM_CONTACT_DETAILS')); ?>
<?php elseif ($presentation_style === 'plain') : ?>
<?php echo '<h3>' . JText::_('COM_CONTACT_DETAILS') . '</h3>'; ?>
<?php endif; ?>
<?php if ($this->item->image && $tparams->get('show_image')) : ?>
<div class="com-contact__thumbnail thumbnail float-right">
<?php echo HTMLHelper::_('image', $this->item->image, $this->item->name, array('itemprop' => 'image')); ?>
</div>
<?php endif; ?>
<?php if ($this->item->con_position && $tparams->get('show_position')) : ?>
<dl class="com-contact__position contact-position dl-horizontal">
<dt><?php echo JText::_('COM_CONTACT_POSITION'); ?>:</dt>
<dd itemprop="jobTitle">
<?php echo $this->item->con_position; ?>
</dd>
</dl>
<?php endif; ?>
<?php echo $this->loadTemplate('address'); ?>
<?php if ($tparams->get('allow_vcard')) : ?>
<?php echo JText::_('COM_CONTACT_DOWNLOAD_INFORMATION_AS'); ?>
<a href="<?php echo Route::_('index.php?option=com_contact&view=contact&id=' . $this->item->id . '&format=vcf'); ?>">
<?php echo JText::_('COM_CONTACT_VCARD'); ?></a>
<?php endif; ?>
<?php if ($presentation_style === 'sliders') : ?>
<?php echo HTMLHelper::_('bootstrap.endSlide'); ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>
<?php endif; ?>
<?php if ($tparams->get('show_email_form') && ($this->item->email_to || $this->item->user_id)) : ?>
<?php if ($presentation_style === 'sliders') : ?>
<?php if (!$accordionStarted)
{
echo HTMLHelper::_('bootstrap.startAccordion', 'slide-contact', array('active' => 'display-form'));
$accordionStarted = true;
}
?>
<?php echo HTMLHelper::_('bootstrap.addSlide', 'slide-contact', JText::_('COM_CONTACT_EMAIL_FORM'), 'display-form'); ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php if (!$tabSetStarted)
{
echo HTMLHelper::_('uitab.startTabSet', 'myTab', array('active' => 'display-form'));
$tabSetStarted = true;
}
?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'display-form', JText::_('COM_CONTACT_EMAIL_FORM')); ?>
<?php elseif ($presentation_style === 'plain') : ?>
<?php echo '<h3>' . JText::_('COM_CONTACT_EMAIL_FORM') . '</h3>'; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('form'); ?>
<?php if ($presentation_style === 'sliders') : ?>
<?php echo HTMLHelper::_('bootstrap.endSlide'); ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>
<?php endif; ?>
<?php if ($tparams->get('show_links')) : ?>
<?php if ($presentation_style === 'sliders') : ?>
<?php if (!$accordionStarted) : ?>
<?php echo HTMLHelper::_('bootstrap.startAccordion', 'slide-contact', array('active' => 'display-links')); ?>
<?php $accordionStarted = true; ?>
<?php endif; ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php if (!$tabSetStarted) : ?>
<?php echo HTMLHelper::_('uitab.startTabSet', 'myTab', array('active' => 'display-links')); ?>
<?php $tabSetStarted = true; ?>
<?php endif; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('links'); ?>
<?php endif; ?>
<?php if ($tparams->get('show_articles') && $this->item->user_id && $this->item->articles) : ?>
<?php if ($presentation_style === 'sliders') : ?>
<?php if (!$accordionStarted)
{
echo HTMLHelper::_('bootstrap.startAccordion', 'slide-contact', array('active' => 'display-articles'));
$accordionStarted = true;
}
?>
<?php echo HTMLHelper::_('bootstrap.addSlide', 'slide-contact', JText::_('JGLOBAL_ARTICLES'), 'display-articles'); ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php if (!$tabSetStarted)
{
echo HTMLHelper::_('uitab.startTabSet', 'myTab', array('active' => 'display-articles'));
$tabSetStarted = true;
}
?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'display-articles', JText::_('JGLOBAL_ARTICLES')); ?>
<?php elseif ($presentation_style === 'plain') : ?>
<?php echo '<h3>' . JText::_('JGLOBAL_ARTICLES') . '</h3>'; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('articles'); ?>
<?php if ($presentation_style === 'sliders') : ?>
<?php echo HTMLHelper::_('bootstrap.endSlide'); ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>
<?php endif; ?>
<?php if ($tparams->get('show_profile') && $this->item->user_id && PluginHelper::isEnabled('user', 'profile')) : ?>
<?php if ($presentation_style === 'sliders') : ?>
<?php if (!$accordionStarted)
{
echo HTMLHelper::_('bootstrap.startAccordion', 'slide-contact', array('active' => 'display-profile'));
$accordionStarted = true;
}
?>
<?php echo HTMLHelper::_('bootstrap.addSlide', 'slide-contact', JText::_('COM_CONTACT_PROFILE'), 'display-profile'); ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php if (!$tabSetStarted)
{
echo HTMLHelper::_('uitab.startTabSet', 'myTab', array('active' => 'display-profile'));
$tabSetStarted = true;
}
?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'display-profile', JText::_('COM_CONTACT_PROFILE')); ?>
<?php elseif ($presentation_style === 'plain') : ?>
<?php echo '<h3>' . JText::_('COM_CONTACT_PROFILE') . '</h3>'; ?>
<?php endif; ?>
<?php echo $this->loadTemplate('profile'); ?>
<?php if ($presentation_style === 'sliders') : ?>
<?php echo HTMLHelper::_('bootstrap.endSlide'); ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>
<?php endif; ?>
<?php if ($tparams->get('show_user_custom_fields') && $this->contactUser) : ?>
<?php echo $this->loadTemplate('user_custom_fields'); ?>
<?php endif; ?>
<?php if ($this->item->misc && $tparams->get('show_misc')) : ?>
<?php if ($presentation_style === 'sliders') : ?>
<?php if (!$accordionStarted)
{
echo HTMLHelper::_('bootstrap.startAccordion', 'slide-contact', array('active' => 'display-misc'));
$accordionStarted = true;
}
?>
<?php echo HTMLHelper::_('bootstrap.addSlide', 'slide-contact', JText::_('COM_CONTACT_OTHER_INFORMATION'), 'display-misc'); ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php if (!$tabSetStarted)
{
echo HTMLHelper::_('uitab.startTabSet', 'myTab', array('active' => 'display-misc'));
$tabSetStarted = true;
}
?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'display-misc', JText::_('COM_CONTACT_OTHER_INFORMATION')); ?>
<?php elseif ($presentation_style === 'plain') : ?>
<?php echo '<h3>' . JText::_('COM_CONTACT_OTHER_INFORMATION') . '</h3>'; ?>
<?php endif; ?>
<div class="com-contact__miscinfo contact-miscinfo">
<dl class="dl-horizontal">
<dt>
<span class="<?php echo $tparams->get('marker_class'); ?>">
<?php echo $tparams->get('marker_misc'); ?>
</span>
</dt>
<dd>
<span class="contact-misc">
<?php echo $this->item->misc; ?>
</span>
</dd>
</dl>
</div>
<?php if ($presentation_style === 'sliders') : ?>
<?php echo HTMLHelper::_('bootstrap.endSlide'); ?>
<?php elseif ($presentation_style === 'tabs') : ?>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php endif; ?>
<?php endif; ?>
<?php if ($accordionStarted) : ?>
<?php echo HTMLHelper::_('bootstrap.endAccordion'); ?>
<?php elseif ($tabSetStarted) : ?>
<?php echo HTMLHelper::_('uitab.endTabSet'); ?>
<?php endif; ?>
<?php echo $this->item->event->afterDisplayContent; ?>
</div>
The same content is in 2 releases, Joomla 4.0.0-alpha5 to 4.0.0-alpha6. See them all, or every version of this file.