mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2024-11-01 03:12:29 +00:00
Merge pull request #11 from chmst/fix-changed-float-params
Float params have changed - fix layouts
This commit is contained in:
commit
72c7f9b072
@ -28,7 +28,6 @@ $canEdit = $user->authorise('core.edit', 'com_weblinks.category.' . $this->ca
|
||||
$canEditOwn = $user->authorise('core.edit.own', 'com_weblinks.category.' . $this->category->id);
|
||||
$canCreate = $user->authorise('core.create', 'com_weblinks.category.' . $this->category->id);
|
||||
|
||||
$n = count($this->items);
|
||||
$listOrder = $this->escape($this->state->get('list.ordering'));
|
||||
$listDirn = $this->escape($this->state->get('list.direction'));
|
||||
?>
|
||||
@ -156,13 +155,16 @@ $listDirn = $this->escape($this->state->get('list.direction'));
|
||||
<?php if (($this->params->get('show_link_description')) && ($item->description != '')) : ?>
|
||||
<div class="mt-2 mb-2">
|
||||
<?php $images = json_decode($item->images); ?>
|
||||
<?php if (!empty($images->image_first)) : ?>
|
||||
<?php $imgfloat = (empty($images->float_first)) ? $this->params->get('float_first') : $images->float_first; ?>
|
||||
<?php if (!empty($images->image_first)) : ?>
|
||||
<?php $imgFloat = '' ;?>
|
||||
<?php if (!empty($images->float_first)) : ?>
|
||||
<?php $imgFloat = $images->float_first == 'right' ? 'float-end' : 'float-start'; ?>
|
||||
<?php endif; ?>
|
||||
<?php $img = HTMLHelper::cleanImageURL($images->image_first); ?>
|
||||
<?php $alt = empty($images->image_first_alt) && empty($images->image_first_alt_empty)
|
||||
? ''
|
||||
: 'alt="' . htmlspecialchars($images->image_first_alt, ENT_COMPAT, 'UTF-8') . '"'; ?>
|
||||
<figure class="item-image">
|
||||
<figure class="item-image <?php echo $imgFloat; ?>">
|
||||
<img src="<?php echo htmlspecialchars($img->url, ENT_COMPAT, 'UTF-8'); ?>"
|
||||
<?php echo $alt; ?> itemprop="thumbnail" />
|
||||
<?php if (!empty($images->image_first_caption)) : ?>
|
||||
@ -172,12 +174,15 @@ $listDirn = $this->escape($this->state->get('list.direction'));
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($images->image_second)) : ?>
|
||||
<?php $imgfloat = (empty($images->float_second)) ? $this->params->get('float_second') : $images->float_second; ?>
|
||||
<?php $imgFloat = ''; ?>
|
||||
<?php if (!empty($images->float_second)) : ?>
|
||||
<?php $imgFloat = $images->float_second == 'right' ? 'float-end' : 'float-start'; ?>
|
||||
<?php endif; ?>
|
||||
<?php $img = HTMLHelper::cleanImageURL($images->image_second); ?>
|
||||
<?php $alt = empty($images->image_second_alt) && empty($images->image_second_alt_empty)
|
||||
? ''
|
||||
: 'alt="' . htmlspecialchars($images->image_second_alt, ENT_COMPAT, 'UTF-8') . '"'; ?>
|
||||
<figure class="item-image">
|
||||
<figure class="item-image <?php echo $imgFloat; ?>">
|
||||
<img src="<?php echo htmlspecialchars($img->url, ENT_COMPAT, 'UTF-8'); ?>"
|
||||
<?php echo $alt; ?> itemprop="thumbnail" />
|
||||
<?php if (!empty($images->image_second_caption)) : ?>
|
||||
|
@ -40,60 +40,70 @@ if (!$canEdit)
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php // Content is generated by content plugin event "onContentAfterTitle" ?>
|
||||
<?php echo $this->item->event->afterDisplayTitle; ?>
|
||||
|
||||
<?php // Content is generated by content plugin event "onContentBeforeDisplay" ?>
|
||||
<?php echo $this->item->event->beforeDisplayContent; ?>
|
||||
|
||||
<div itemprop="articleBody">
|
||||
<a href="<?php echo $weblinkUrl; ?>" target="_blank" itemprop="url">
|
||||
<?php echo $weblinkUrl; ?>
|
||||
</a>
|
||||
|
||||
<?php if (($this->params->get('show_link_description')) && ($this->item->description != '')) : ?>
|
||||
<div class="mt-2 mb-2">
|
||||
<?php $images = json_decode($this->item->images); ?>
|
||||
<?php if (!empty($images->image_first)) : ?>
|
||||
<?php $imgFloat = '';
|
||||
if (!empty($images->float_first)) :
|
||||
$imgFloat = $images->float_first == 'right' ? 'float-end' : 'float-start';
|
||||
endif;
|
||||
$img = HTMLHelper::cleanImageURL($images->image_first);
|
||||
$alt = empty($images->image_first_alt) && empty($images->image_first_alt_empty)
|
||||
? ''
|
||||
: 'alt="' . htmlspecialchars($images->image_first_alt, ENT_COMPAT, 'UTF-8') . '"';
|
||||
?>
|
||||
<figure class="item-image <?php echo $imgFloat; ?>">
|
||||
<img src="<?php echo htmlspecialchars($img->url, ENT_COMPAT, 'UTF-8'); ?>"
|
||||
<?php echo $alt; ?> itemprop="thumbnail" />
|
||||
<?php if (!empty($images->image_first_caption)) : ?>
|
||||
<figcaption class="caption"><?php echo htmlspecialchars($images->image_first_caption, ENT_COMPAT, 'UTF-8'); ?></figcaption>
|
||||
<?php endif; ?>
|
||||
</figure>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($images->image_second)) : ?>
|
||||
<?php $imgFloat = '';
|
||||
if (!empty($images->float_second)) :
|
||||
$imgFloat = $images->float_second == 'right' ? 'float-end' : 'float-start';
|
||||
endif;
|
||||
$img = HTMLHelper::cleanImageURL($images->image_second);
|
||||
$alt = empty($images->image_first_alt) && empty($images->image_second_alt_empty)
|
||||
? ''
|
||||
: 'alt="' . htmlspecialchars($images->image_second_alt, ENT_COMPAT, 'UTF-8') . '"';
|
||||
?>
|
||||
<figure class="item-image <?php echo $imgFloat; ?>">
|
||||
<img src="<?php echo htmlspecialchars($img->url, ENT_COMPAT, 'UTF-8'); ?>"
|
||||
<?php echo $alt; ?> itemprop="thumbnail" />
|
||||
<?php if (!empty($images->image_second_caption)) : ?>
|
||||
<figcaption class="caption"><?php echo htmlspecialchars($images->image_second_caption, ENT_COMPAT, 'UTF-8'); ?></figcaption>
|
||||
<?php endif; ?>
|
||||
</figure>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php echo $this->item->description; ?>
|
||||
<div class="p-3">
|
||||
<a href="<?php echo $weblinkUrl; ?>" target="_blank" itemprop="url">
|
||||
<?php echo $weblinkUrl; ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php if ($this->params->get('show_tags', 1) && !empty($this->item->tags->itemTags)) : ?>
|
||||
<div class="p-2">
|
||||
<?php echo LayoutHelper::render('joomla.content.tags', $this->item->tags->itemTags); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="p-3">
|
||||
<?php $images = json_decode($this->item->images); ?>
|
||||
<?php if (!empty($images->image_first)) : ?>
|
||||
<?php $imgFloat = '' ;?>
|
||||
<?php if (!empty($images->float_first)) : ?>
|
||||
<?php $imgFloat = $images->float_first == 'right' ? 'float-end' : 'float-start'; ?>
|
||||
<?php endif; ?>
|
||||
<?php $img = HTMLHelper::cleanImageURL($images->image_first); ?>
|
||||
<?php $alt = empty($images->image_first_alt) && empty($images->image_first_alt_empty)
|
||||
? ''
|
||||
: 'alt="' . htmlspecialchars($images->image_first_alt, ENT_COMPAT, 'UTF-8') . '"'; ?>
|
||||
<figure class="item-image <?php echo $imgFloat; ?>">
|
||||
<img src="<?php echo htmlspecialchars($img->url, ENT_COMPAT, 'UTF-8'); ?>"
|
||||
<?php echo $alt; ?> itemprop="thumbnail" />
|
||||
<?php if (!empty($images->image_first_caption)) : ?>
|
||||
<figcaption class="caption"><?php echo htmlspecialchars($images->image_first_caption, ENT_COMPAT, 'UTF-8'); ?></figcaption>
|
||||
<?php endif; ?>
|
||||
</figure>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($images->image_second)) : ?>
|
||||
<?php $imgFloat = ''; ?>
|
||||
<?php if (!empty($images->float_second)) : ?>
|
||||
<?php $imgFloat = $images->float_second == 'right' ? 'float-end' : 'float-start'; ?>
|
||||
<?php endif; ?>
|
||||
<?php $img = HTMLHelper::cleanImageURL($images->image_second); ?>
|
||||
<?php $alt = empty($images->image_second_alt) && empty($images->image_second_alt_empty)
|
||||
? ''
|
||||
: 'alt="' . htmlspecialchars($images->image_second_alt, ENT_COMPAT, 'UTF-8') . '"'; ?>
|
||||
<figure class="item-image <?php echo $imgFloat; ?>">
|
||||
<img src="<?php echo htmlspecialchars($img->url, ENT_COMPAT, 'UTF-8'); ?>"
|
||||
<?php echo $alt; ?> itemprop="thumbnail" />
|
||||
<?php if (!empty($images->image_second_caption)) : ?>
|
||||
<figcaption class="caption"><?php echo htmlspecialchars($images->image_second_caption, ENT_COMPAT, 'UTF-8'); ?></figcaption>
|
||||
<?php endif; ?>
|
||||
</figure>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($this->item->description)) : ?>
|
||||
<?php echo $this->item->description; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php // Content is generated by content plugin event "onContentAfterDisplay" ?>
|
||||
<?php echo $this->item->event->afterDisplayContent; ?>
|
||||
|
Loading…
Reference in New Issue
Block a user