Skip to content

Commit

Permalink
Revert "Add plugin events to com_contact (redo) Fixes #8024"
Browse files Browse the repository at this point in the history
This reverts commit 88fb40b.
  • Loading branch information
Michael Babker committed Dec 2, 2015
1 parent 35b005e commit 5c19acf
Show file tree
Hide file tree
Showing 12 changed files with 86 additions and 184 deletions.
12 changes: 7 additions & 5 deletions components/com_contact/views/categories/tmpl/default_items.php
Expand Up @@ -25,15 +25,17 @@
<div <?php echo $class; ?> >
<?php $class = ''; ?>
<h3 class="page-header item-title">
<a href="<?php echo JRoute::_(ContactHelperRoute::getCategoryRoute($item->id)); ?>">
<a href="<?php echo JRoute::_(ContactHelperRoute::getCategoryRoute($item->id, $item->language)); ?>">
<?php echo $this->escape($item->title); ?></a>
<?php if ($this->params->get('show_cat_num_articles_cat') == 1) :?>
<?php if ($this->params->get('show_cat_items_cat') == 1) :?>
<span class="badge badge-info tip hasTooltip" title="<?php echo JHtml::tooltipText('COM_CONTACT_NUM_ITEMS'); ?>">
<?php echo JText::_('COM_CONTACT_NUM_ITEMS'); ?>&nbsp;
<?php echo $item->numitems; ?>
</span>
<?php endif; ?>
<?php if (count($item->getChildren()) > 0) : ?>
<a href="#category-<?php echo $item->id;?>" data-toggle="collapse" data-toggle="button" class="btn btn-mini pull-right"><span class="icon-plus"></span></a>
<?php if (count($item->getChildren()) > 0 && $this->maxLevelcat > 1) : ?>
<a id="category-btn-<?php echo $item->id;?>" href="#category-<?php echo $item->id;?>"
data-toggle="collapse" data-toggle="button" class="btn btn-mini pull-right"><span class="icon-plus"></span></a>
<?php endif;?>
</h3>
<?php if ($this->params->get('show_subcat_desc_cat') == 1) :?>
Expand All @@ -44,7 +46,7 @@
<?php endif; ?>
<?php endif; ?>

<?php if (count($item->getChildren()) > 0) :?>
<?php if (count($item->getChildren()) > 0 && $this->maxLevelcat > 1) :?>
<div class="collapse fade" id="category-<?php echo $item->id;?>">
<?php
$this->items[$item->id] = $item->getChildren();
Expand Down
7 changes: 0 additions & 7 deletions components/com_contact/views/category/tmpl/default_items.php
Expand Up @@ -71,11 +71,6 @@
<span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span>
<?php endif; ?>
</div>

<?php echo $item->event->afterDisplayTitle; ?>

<?php echo $item->event->beforeDisplayContent; ?>

<?php if ($this->params->get('show_position_headings')) : ?>
<?php echo $item->con_position; ?><br />
<?php endif; ?>
Expand All @@ -94,8 +89,6 @@
<?php echo $item->country; ?><br />
<?php endif; ?>
</div>

<?php echo $item->event->afterDisplayContent; ?>
</li>
<?php endif; ?>
<?php endforeach; ?>
Expand Down
6 changes: 4 additions & 2 deletions components/com_contact/views/category/view.html.php
Expand Up @@ -9,6 +9,8 @@

defined('_JEXEC') or die;

use Joomla\Registry\Registry;

/**
* HTML View class for the Contacts component
*
Expand Down Expand Up @@ -49,8 +51,8 @@ public function display($tpl = null)
// Compute the contact slug.
foreach ($this->items as $item)
{
$item->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id;
$temp = new JRegistry;
$item->slug = $item->alias ? ($item->id . ':' . $item->alias) : $item->id;
$temp = new Registry;
$temp->loadString($item->params);
$item->params = clone($this->params);
$item->params->merge($temp);
Expand Down
37 changes: 12 additions & 25 deletions components/com_contact/views/contact/tmpl/default.php
Expand Up @@ -13,32 +13,27 @@

jimport('joomla.html.html.bootstrap');
?>
<div class="contact<?php echo $this->pageclass_sfx?>">
<div class="contact<?php echo $this->pageclass_sfx?>" itemscope itemtype="http://schema.org/Person">
<?php if ($this->params->get('show_page_heading')) : ?>
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
<?php endif; ?>

<?php if ($this->contact->name && $this->params->get('show_name')) : ?>
<div class="page-header">
<h2>
<?php if ($this->item->published == 0) : ?>
<span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span>
<?php endif; ?>
<span class="contact-name"><?php echo $this->contact->name; ?></span>
<span class="contact-name" itemprop="name"><?php echo $this->contact->name; ?></span>
</h2>
</div>
<?php endif; ?>

<?php endif; ?>
<?php if ($this->params->get('show_contact_category') == 'show_no_link') : ?>
<h3>
<span class="contact-category"><?php echo $this->contact->category_title; ?></span>
</h3>
<?php endif; ?>

<?php echo $this->item->event->afterDisplayTitle; ?>

<?php if ($this->params->get('show_contact_category') == 'show_with_link') : ?>
<?php $contactLink = ContactHelperRoute::getCategoryRoute($this->contact->catid); ?>
<h3>
Expand All @@ -47,7 +42,6 @@
</span>
</h3>
<?php endif; ?>

<?php if ($this->params->get('show_contact_list') && count($this->contacts) > 1) : ?>
<form action="#" method="get" name="selectForm" id="selectForm">
<?php echo JText::_('COM_CONTACT_SELECT_CONTACT'); ?>
Expand All @@ -60,37 +54,32 @@
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
<?php endif; ?>

<?php echo $this->item->event->beforeDisplayContent; ?>

<?php if ($this->params->get('presentation_style') == 'sliders') : ?>
<?php echo JHtml::_('bootstrap.startAccordion', 'slide-contact', array('active' => 'basic-details')); ?>
<?php endif; ?>

<?php if ($this->params->get('presentation_style') == 'tabs') : ?>
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'basic-details')); ?>
<?php endif; ?>

<?php if ($this->params->get('presentation_style') == 'sliders') : ?>
<?php echo JHtml::_('bootstrap.addSlide', 'slide-contact', JText::_('COM_CONTACT_DETAILS'), 'basic-details'); ?>
<?php endif; ?>

<?php if ($this->params->get('presentation_style') == 'tabs') : ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'basic-details', JText::_('COM_CONTACT_DETAILS', true)); ?>
<?php endif; ?>

<?php if ($this->params->get('presentation_style') == 'plain'):?>
<?php echo '<h3>' . JText::_('COM_CONTACT_DETAILS') . '</h3>'; ?>
<?php endif; ?>

<?php if ($this->contact->image && $this->params->get('show_image')) : ?>
<div class="thumbnail pull-right">
<?php echo JHtml::_('image', $this->contact->image, JText::_('COM_CONTACT_IMAGE_DETAILS'), array('align' => 'middle')); ?>
<?php echo JHtml::_('image', $this->contact->image, JText::_('COM_CONTACT_IMAGE_DETAILS'), array('align' => 'middle', 'itemprop' => 'image')); ?>
</div>
<?php endif; ?>

<?php if ($this->contact->con_position && $this->params->get('show_position')) : ?>
<dl class="contact-position dl-horizontal">
<dd>
<dd itemprop="jobTitle">
<?php echo $this->contact->con_position; ?>
</dd>
</dl>
Expand All @@ -107,7 +96,6 @@
<?php if ($this->params->get('presentation_style') == 'sliders') : ?>
<?php echo JHtml::_('bootstrap.endSlide'); ?>
<?php endif; ?>

<?php if ($this->params->get('presentation_style') == 'tabs') : ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
Expand All @@ -120,7 +108,7 @@
<?php if ($this->params->get('presentation_style') == 'tabs') : ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'display-form', JText::_('COM_CONTACT_EMAIL_FORM', true)); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') == 'plain'): ?>
<?php if ($this->params->get('presentation_style') == 'plain'):?>
<?php echo '<h3>' . JText::_('COM_CONTACT_EMAIL_FORM') . '</h3>'; ?>
<?php endif; ?>

Expand All @@ -129,10 +117,10 @@
<?php if ($this->params->get('presentation_style') == 'sliders') : ?>
<?php echo JHtml::_('bootstrap.endSlide'); ?>
<?php endif; ?>
<?php if ($this->params->get('presentation_style') == 'tabs') : ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>

<?php if ($this->params->get('presentation_style') == 'tabs') : ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>
<?php endif; ?>

<?php if ($this->params->get('show_links')) : ?>
Expand All @@ -144,11 +132,9 @@
<?php if ($this->params->get('presentation_style') == 'sliders') : ?>
<?php echo JHtml::_('bootstrap.addSlide', 'slide-contact', JText::_('JGLOBAL_ARTICLES'), 'display-articles'); ?>
<?php endif; ?>

<?php if ($this->params->get('presentation_style') == 'tabs') : ?>
<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'display-articles', JText::_('JGLOBAL_ARTICLES', true)); ?>
<?php endif; ?>

<?php if ($this->params->get('presentation_style') == 'plain'):?>
<?php echo '<h3>' . JText::_('JGLOBAL_ARTICLES') . '</h3>'; ?>
<?php endif; ?>
Expand All @@ -158,14 +144,14 @@
<?php if ($this->params->get('presentation_style') == 'sliders') : ?>
<?php echo JHtml::_('bootstrap.endSlide'); ?>
<?php endif; ?>

<?php if ($this->params->get('presentation_style') == 'tabs') : ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>

<?php endif; ?>

<?php if ($this->params->get('show_profile') && $this->contact->user_id && JPluginHelper::isEnabled('user', 'profile')) : ?>

<?php if ($this->params->get('presentation_style') == 'sliders') : ?>
<?php echo JHtml::_('bootstrap.addSlide', 'slide-contact', JText::_('COM_CONTACT_PROFILE'), 'display-profile'); ?>
<?php endif; ?>
Expand All @@ -184,9 +170,11 @@
<?php if ($this->params->get('presentation_style') == 'tabs') : ?>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php endif; ?>

<?php endif; ?>

<?php if ($this->contact->misc && $this->params->get('show_misc')) : ?>

<?php if ($this->params->get('presentation_style') == 'sliders') : ?>
<?php echo JHtml::_('bootstrap.addSlide', 'slide-contact', JText::_('COM_CONTACT_OTHER_INFORMATION'), 'display-misc'); ?>
<?php endif; ?>
Expand Down Expand Up @@ -227,5 +215,4 @@
<?php if ($this->params->get('presentation_style') == 'tabs') : ?>
<?php echo JHtml::_('bootstrap.endTabSet'); ?>
<?php endif; ?>
<?php echo $this->item->event->afterDisplayContent; ?>
</div>

0 comments on commit 5c19acf

Please sign in to comment.