Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] Remove module description popover #24634

Merged
merged 3 commits into from
Apr 22, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions administrator/components/com_modules/tmpl/select/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,25 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;

HTMLHelper::_('bootstrap.popover');
$document = Factory::getDocument();
?>

<h2 class="mb-3"><?php echo Text::_('COM_MODULES_TYPE_CHOOSE'); ?></h2>
<ul id="new-modules-list" class="list-group">
<?php foreach ($this->items as &$item) : ?>
<?php // Prepare variables for the link. ?>
<?php $link = 'index.php?option=com_modules&task=module.add&eid=' . $item->extension_id; ?>
<?php $name = $this->escape($item->name); ?>
<?php $desc = HTMLHelper::_('string.truncate', $this->escape(strip_tags($item->desc)), 200); ?>
<?php $short_desc = HTMLHelper::_('string.truncate', $this->escape(strip_tags($item->desc)), 90); ?>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove spaces before =.

<?php $link = 'index.php?option=com_modules&task=module.add&eid=' . $item->extension_id; ?>
<?php $name = $this->escape($item->name); ?>
<?php $desc = HTMLHelper::_('string.truncate', $this->escape(strip_tags($item->desc)), 200); ?>

<?php if ($document->direction != 'rtl') : ?>
<li class="list-group-item">
<a href="<?php echo Route::_($link); ?>" class="mr-2">
<strong><?php echo $name; ?></strong></a>
<small class="hasPopover" data-placement="right" title="<?php echo $name; ?>" data-content="<?php echo $desc; ?>"><?php echo $short_desc; ?></small>
<a href="<?php echo Route::_($link); ?>" class="mr-2"><strong><?php echo $name; ?></strong></a>
<small><?php echo $desc; ?></small>
</li>
<?php else : ?>
<li class="list-group-item">
<small rel="popover" data-placement="left" title="<?php echo $name; ?>" data-content="<?php echo $desc; ?>"><?php echo $short_desc; ?></small>
<small><?php echo $desc; ?></small>
<a href="<?php echo Route::_($link); ?>" class="mr-2"><strong><?php echo $name; ?></strong></a>
</li>
<?php endif; ?>
Expand Down