Skip to content

Commit

Permalink
[update] com_content & com_contact (not yet test BS3)
Browse files Browse the repository at this point in the history
Overrides
  • Loading branch information
Alexon Balangue committed Dec 31, 2016
1 parent 745e73d commit 6867566
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 63 deletions.
8 changes: 3 additions & 5 deletions Boostrap3/components/com_contact/contact/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,25 @@

jimport('joomla.html.html.bootstrap');
?>
<div class="contact<?php echo $this->pageclass_sfx?>" itemscope itemtype="https://schema.org/Person">
<div itemscope itemtype="https://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" itemprop="name"><?php echo $this->contact->name; ?></span>
<span itemprop="name"><?php echo $this->contact->name; ?></span>
</h2>
</div>
<?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>
<span><?php echo $this->contact->category_title; ?></span>
</h3>
<?php endif; ?>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* jicon-text, jicon-none, jicon-icon
*/
?>
<dl class="contact-address dl-horizontal" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<dl class="dl-horizontal" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<?php if (($this->params->get('address_check') > 0) &&
($this->contact->address || $this->contact->suburb || $this->contact->state || $this->contact->country || $this->contact->postcode)) : ?>
<dt>
Expand Down
2 changes: 0 additions & 2 deletions Boostrap3/components/com_contact/contact/default_articles.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@

?>
<?php if ($this->params->get('show_articles')) : ?>
<div class="contact-articles">
<ul class="nav nav-tabs nav-stacked">
<?php foreach ($this->item->articles as $article) : ?>
<li>
<?php echo JHtml::_('link', JRoute::_(ContentHelperRoute::getArticleRoute($article->slug, $article->catid, $article->language)), htmlspecialchars($article->title, ENT_COMPAT, 'UTF-8')); ?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
10 changes: 3 additions & 7 deletions Boostrap3/components/com_contact/contact/default_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,22 @@
}
}
?>
<div class="contact-form">
<form id="contact-form" action="<?php echo JRoute::_('index.php'); ?>" method="post" class="form-validate form-horizontal well">
<form id="contact-form" action="<?php echo JRoute::_('index.php'); ?>" method="post" class="form-validate form-horizontal">
<?php foreach ($this->form->getFieldsets() as $fieldset): ?>
<?php if ($fieldset->name === 'captcha' && !$captchaEnabled) : ?>
<?php continue; ?>
<?php endif; ?>
<?php $fields = $this->form->getFieldset($fieldset->name); ?>
<?php if (count($fields)) : ?>
<fieldset>
<?php if (isset($fieldset->label) && strlen($legend = trim(JText::_($fieldset->label)))) : ?>
<legend><?php echo $legend; ?></legend>
<label><?php echo $legend; ?></label>
<?php endif; ?>
<?php foreach ($fields as $field) : ?>
<?php if ($field->name === 'contact_email_copy' && !$this->params->get('show_email_copy')) : ?>
<?php continue; ?>
<?php endif; ?>
<?php echo $field->renderField(); ?>
<?php endforeach; ?>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
<div class="control-group">
Expand All @@ -56,5 +53,4 @@
<?php echo JHtml::_('form.token'); ?>
</div>
</div>
</form>
</div>
</form>
6 changes: 2 additions & 4 deletions Boostrap3/components/com_contact/contact/default_links.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
<?php echo '<h3>' . JText::_('COM_CONTACT_LINKS') . '</h3>'; ?>
<?php endif; ?>

<div class="contact-links">
<ul class="nav nav-tabs nav-stacked">
<?php
// Letters 'a' to 'e'
Expand All @@ -32,8 +31,8 @@
continue;
endif;

// Add 'http://' if not present
$link = (0 === strpos($link, 'http')) ? $link : 'http://' . $link;
// Add 'https://' if not present = require ssl
$link = (0 === strpos($link, 'https')) ? $link : 'https://' . $link;

// If no label is present, take the link
$label = ($label) ? $label : $link;
Expand All @@ -45,7 +44,6 @@
</li>
<?php endforeach; ?>
</ul>
</div>

<?php if ($this->params->get('presentation_style') == 'sliders') : ?>
<?php echo JHtml::_('bootstrap.endSlide'); ?>
Expand Down
4 changes: 2 additions & 2 deletions Boostrap3/components/com_contact/contact/default_profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
?>
<?php if (JPluginHelper::isEnabled('user', 'profile')) :
$fields = $this->item->profile->getFieldset('profile'); ?>
<div class="contact-profile" id="users-profile-custom">
<div id="users-profile-custom">
<dl class="dl-horizontal">
<?php foreach ($fields as $profile) :
if ($profile->value) :
Expand All @@ -25,7 +25,7 @@
if ($v_http == "http") :
echo '<dd><a href="' . $profile->text . '">' . JStringPunycode::urlToUTF8($profile->text) . '</a></dd>';
else :
echo '<dd><a href="http://' . $profile->text . '">' . JStringPunycode::urlToUTF8($profile->text) . '</a></dd>';
echo '<dd><a href="//' . $profile->text . '">' . JStringPunycode::urlToUTF8($profile->text) . '</a></dd>';
endif;
break;

Expand Down
5 changes: 2 additions & 3 deletions Boostrap3/components/com_contact/featured/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// If the page class is defined, add to class as suffix.
// It will be a separate class if the user starts it with a space
?>
<div class="blog-featured<?php echo $this->pageclass_sfx;?>">

<?php if ($this->params->get('show_page_heading') != 0 ) : ?>
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
Expand All @@ -34,5 +34,4 @@

<?php echo $this->pagination->getPagesLinks(); ?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
58 changes: 27 additions & 31 deletions Boostrap3/components/com_contact/featured/default_items.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,69 +22,65 @@
<?php else : ?>

<form action="<?php echo htmlspecialchars(JUri::getInstance()->toString()); ?>" method="post" name="adminForm" id="adminForm">
<fieldset class="filters">
<legend class="hidelabeltxt"><?php echo JText::_('JGLOBAL_FILTER_LABEL'); ?></legend>
<?php if ($this->params->get('show_pagination_limit')) : ?>
<div class="display-limit">
<?php echo JText::_('JGLOBAL_DISPLAY_NUM'); ?>&#160;
<?php echo $this->pagination->getLimitBox(); ?>
</div>
<?php echo JText::_('JGLOBAL_DISPLAY_NUM'); ?>&#160; <?php echo $this->pagination->getLimitBox(); ?>
<?php endif; ?>
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
</fieldset>

<table class="category">
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />

<div class="table-responsive">
<table class="table table-striped">
<?php if ($this->params->get('show_headings')) : ?>
<thead><tr>
<th class="item-num">
<th>
<?php echo JText::_('JGLOBAL_NUM'); ?>
</th>
<th class="item-title">
<th>
<?php echo JHtml::_('grid.sort', 'COM_CONTACT_CONTACT_EMAIL_NAME_LABEL', 'a.name', $listDirn, $listOrder); ?>
</th>
<?php if ($this->params->get('show_position_headings')) : ?>
<th class="item-position">
<th>
<?php echo JHtml::_('grid.sort', 'COM_CONTACT_POSITION', 'a.con_position', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<?php if ($this->params->get('show_email_headings')) : ?>
<th class="item-email">
<th>
<?php echo JText::_('JGLOBAL_EMAIL'); ?>
</th>
<?php endif; ?>
<?php if ($this->params->get('show_telephone_headings')) : ?>
<th class="item-phone">
<th>
<?php echo JText::_('COM_CONTACT_TELEPHONE'); ?>
</th>
<?php endif; ?>

<?php if ($this->params->get('show_mobile_headings')) : ?>
<th class="item-phone">
<th>
<?php echo JText::_('COM_CONTACT_MOBILE'); ?>
</th>
<?php endif; ?>

<?php if ($this->params->get('show_fax_headings')) : ?>
<th class="item-phone">
<th>
<?php echo JText::_('COM_CONTACT_FAX'); ?>
</th>
<?php endif; ?>

<?php if ($this->params->get('show_suburb_headings')) : ?>
<th class="item-suburb">
<th>
<?php echo JHtml::_('grid.sort', 'COM_CONTACT_SUBURB', 'a.suburb', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>

<?php if ($this->params->get('show_state_headings')) : ?>
<th class="item-state">
<th>
<?php echo JHtml::_('grid.sort', 'COM_CONTACT_STATE', 'a.state', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>

<?php if ($this->params->get('show_country_headings')) : ?>
<th class="item-state">
<th>
<?php echo JHtml::_('grid.sort', 'COM_CONTACT_COUNTRY', 'a.country', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
Expand All @@ -95,12 +91,12 @@

<tbody>
<?php foreach ($this->items as $i => $item) : ?>
<tr class="<?php echo ($i % 2) ? "odd" : "even"; ?>" itemscope itemtype="https://schema.org/Person">
<td class="item-num">
<tr itemscope itemtype="https://schema.org/Person">
<td>
<?php echo $i; ?>
</td>

<td class="item-title">
<td>
<?php if ($this->items[$i]->published == 0) : ?>
<span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span>
<?php endif; ?>
Expand All @@ -110,49 +106,49 @@
</td>

<?php if ($this->params->get('show_position_headings')) : ?>
<td class="item-position" itemprop="jobTitle">
<td itemprop="jobTitle">
<?php echo $item->con_position; ?>
</td>
<?php endif; ?>

<?php if ($this->params->get('show_email_headings')) : ?>
<td class="item-email" itemprop="email">
<td itemprop="email">
<?php echo $item->email_to; ?>
</td>
<?php endif; ?>

<?php if ($this->params->get('show_telephone_headings')) : ?>
<td class="item-phone" itemprop="telephone">
<td itemprop="telephone">
<?php echo $item->telephone; ?>
</td>
<?php endif; ?>

<?php if ($this->params->get('show_mobile_headings')) : ?>
<td class="item-phone" itemprop="telephone">
<td itemprop="telephone">
<?php echo $item->mobile; ?>
</td>
<?php endif; ?>

<?php if ($this->params->get('show_fax_headings')) : ?>
<td class="item-phone" itemprop="faxNumber">
<td itemprop="faxNumber">
<?php echo $item->fax; ?>
</td>
<?php endif; ?>

<?php if ($this->params->get('show_suburb_headings')) : ?>
<td class="item-suburb" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<td itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<span itemprop="addressLocality"><?php echo $item->suburb; ?></span>
</td>
<?php endif; ?>

<?php if ($this->params->get('show_state_headings')) : ?>
<td class="item-state" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<td itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<span itemprop="addressRegion"><?php echo $item->state; ?></span>
</td>
<?php endif; ?>

<?php if ($this->params->get('show_country_headings')) : ?>
<td class="item-state" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<td itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
<span itemprop="addressCountry"><?php echo $item->country; ?></span>
</td>
<?php endif; ?>
Expand All @@ -161,6 +157,6 @@

</tbody>
</table>

</div>
</form>
<?php endif; ?>
5 changes: 2 additions & 3 deletions Boostrap3/components/com_content/categories/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
});
});");
?>
<div class="<?php echo $this->pageclass_sfx;?>">

<?php
echo JLayoutHelper::render('joomla.content.categories_default', $this);
echo $this->loadTemplate('items');
?>
</div>
?>
2 changes: 1 addition & 1 deletion Boostrap3/components/com_content/featured/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// If the page class is defined, add to class as suffix.
// It will be a separate class if the user starts it with a space
?>
<div class="<?php echo $this->pageclass_sfx;?>" itemscope itemtype="https://schema.org/Blog">
<div itemscope itemtype="https://schema.org/Blog">
<?php if ($this->params->get('show_page_heading') != 0) : ?>
<div class="page-header">
<h1>
Expand Down
8 changes: 4 additions & 4 deletions Boostrap3/components/com_content/form/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@
<div class="btn-toolbar">
<div class="btn-group">
<button type="button" class="btn btn-primary" onclick="Joomla.submitbutton('article.save')">
<span class="icon-ok"></span><?php echo JText::_('JSAVE') ?>
<i class="fa check-square-o"></i> <?php echo JText::_('JSAVE') ?>
</button>
</div>
<div class="btn-group">
<button type="button" class="btn" onclick="Joomla.submitbutton('article.cancel')">
<span class="icon-cancel"></span><?php echo JText::_('JCANCEL') ?>
<i class="fa fa-ban"></i> <?php echo JText::_('JCANCEL') ?>
</button>
</div>
<?php if ($params->get('save_history', 0) && $this->item->id) : ?>
Expand All @@ -65,7 +65,7 @@
<?php endif; ?>
</div>
<ul class="nav nav-tabs">
<li class="active"><a href="#editor" data-toggle="tab"><?php echo JText::_('COM_CONTENT_ARTICLE_CONTENT') ?></a></li>
<li><a href="#editor" data-toggle="tab"><?php echo JText::_('COM_CONTENT_ARTICLE_CONTENT') ?></a></li>
<?php if ($params->get('show_urls_images_frontend') ) : ?>
<li><a href="#images" data-toggle="tab"><?php echo JText::_('COM_CONTENT_IMAGES_AND_URLS') ?></a></li>
<?php endif; ?>
Expand All @@ -78,7 +78,7 @@
</ul>

<div class="tab-content">
<div class="tab-pane active" id="editor">
<div class="tab-pane" id="editor">
<?php echo $this->form->renderField('title'); ?>

<?php if (is_null($this->item->id)) : ?>
Expand Down

0 comments on commit 6867566

Please sign in to comment.