Skip to content

Commit

Permalink
replace hard coded icon with extra class by JLayout iconclass with ex…
Browse files Browse the repository at this point in the history
…tra class
  • Loading branch information
hans2103 committed Sep 11, 2020
1 parent c1255d5 commit f8e7781
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion layouts/joomla/content/icons/create.php
Expand Up @@ -10,12 +10,13 @@
defined('_JEXEC') or die;

use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;

$params = $displayData['params'];

?>
<?php if ($params->get('show_icons')) : ?>
<span class="fas fa-plus fa-fw" aria-hidden="true"></span>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'new', 'class' => 'fa-fw']); ?>
<?php echo Text::_('JNEW'); ?>
<?php else : ?>
<?php echo Text::_('JNEW') . '&#160;'; ?>
Expand Down
3 changes: 2 additions & 1 deletion layouts/joomla/form/field/subform/repeatable.php
Expand Up @@ -11,6 +11,7 @@

use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;

extract($displayData);

Expand Down Expand Up @@ -49,7 +50,7 @@
<div class="btn-toolbar">
<div class="btn-group">
<a class="group-add btn btn-sm button btn-success" aria-label="<?php echo Text::_('JGLOBAL_FIELD_ADD'); ?>" tabindex="0">
<span class="fas fa-plus icon-white" aria-hidden="true"></span> </a>
<?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'add', 'class' => 'icon-white']); ?>
</div>
</div>
<?php endif; ?>
Expand Down
Expand Up @@ -27,7 +27,7 @@
<?php if (!empty($buttons)) : ?>
<div class="btn-toolbar text-right">
<div class="btn-group">
<?php if (!empty($buttons['add'])) : ?><a class="group-add btn btn-sm button btn-success" aria-label="<?php echo Text::_('JGLOBAL_FIELD_ADD'); ?>" tabindex="0"><span class="fas fa-plus icon-white" aria-hidden="true"></span> </a><?php endif; ?>
<?php if (!empty($buttons['add'])) : ?><a class="group-add btn btn-sm button btn-success" aria-label="<?php echo Text::_('JGLOBAL_FIELD_ADD'); ?>" tabindex="0"><?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'add', 'class' => 'icon-white']); ?> </a><?php endif; ?>
<?php if (!empty($buttons['remove'])) : ?><a class="group-remove btn btn-sm button btn-danger" aria-label="<?php echo Text::_('JGLOBAL_FIELD_REMOVE'); ?>" tabindex="0"><span class="fas fa-minus icon-white" aria-hidden="true"></span> </a><?php endif; ?>
<?php if (!empty($buttons['move'])) : ?><a class="group-move btn btn-sm button btn-primary" aria-label="<?php echo Text::_('JGLOBAL_FIELD_MOVE'); ?>"><span class="fas fa-arrows-alt icon-white" aria-hidden="true"></span> </a><?php endif; ?>
</div>
Expand Down
2 changes: 1 addition & 1 deletion layouts/joomla/form/field/subform/repeatable/section.php
Expand Up @@ -27,7 +27,7 @@
<?php if (!empty($buttons)) : ?>
<div class="btn-toolbar text-right">
<div class="btn-group">
<?php if (!empty($buttons['add'])) : ?><a class="group-add btn btn-sm button btn-success" aria-label="<?php echo Text::_('JGLOBAL_FIELD_ADD'); ?>" tabindex="0"><span class="fas fa-plus icon-white" aria-hidden="true"></span> </a><?php endif; ?>
<?php if (!empty($buttons['add'])) : ?><a class="group-add btn btn-sm button btn-success" aria-label="<?php echo Text::_('JGLOBAL_FIELD_ADD'); ?>" tabindex="0"><?php echo LayoutHelper::render('joomla.icon.iconclass', ['icon' => 'add', 'class' => 'icon-white']); ?> </a><?php endif; ?>
<?php if (!empty($buttons['remove'])) : ?><a class="group-remove btn btn-sm button btn-danger" aria-label="<?php echo Text::_('JGLOBAL_FIELD_REMOVE'); ?>" tabindex="0"><span class="fas fa-minus icon-white" aria-hidden="true"></span> </a><?php endif; ?>
<?php if (!empty($buttons['move'])) : ?><a class="group-move btn btn-sm button btn-primary" aria-label="<?php echo Text::_('JGLOBAL_FIELD_MOVE'); ?>"><span class="fas fa-arrows-alt icon-white" aria-hidden="true"></span> </a><?php endif; ?>
</div>
Expand Down

0 comments on commit f8e7781

Please sign in to comment.