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

Some tweaks #52

Merged
merged 10 commits into from
Jan 18, 2021
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public function writable($writable)
{
if ($writable)
{
return '<span class="badge badge-success">' . Text::_('COM_ADMIN_WRITABLE') . '</span>';
return '<span class="badge bg-success">' . Text::_('COM_ADMIN_WRITABLE') . '</span>';
}

return '<span class="badge badge-danger">' . Text::_('COM_ADMIN_UNWRITABLE') . '</span>';
return '<span class="badge bg-danger">' . Text::_('COM_ADMIN_UNWRITABLE') . '</span>';
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public static function getAssociationHtmlList($extensionName, $typeName, $itemId
$additional = '<strong>' . Text::sprintf('COM_MENUS_MENU_SPRINTF', $menutypeTitle) . '</strong><br>';
}

$labelClass = 'badge-secondary';
$labelClass = 'bg-secondary';
$target = $langCode . ':' . $items[$langCode]['id'] . ':edit';
$allow = $canEditReference
&& self::allowEdit($extensionName, $typeName, $items[$langCode]['id'])
Expand All @@ -313,7 +313,7 @@ public static function getAssociationHtmlList($extensionName, $typeName, $itemId

$title = Text::_('COM_ASSOCIATIONS_NO_ASSOCIATION');
$additional = $addLink ? Text::_('COM_ASSOCIATIONS_ADD_NEW_ASSOCIATION') : '';
$labelClass = 'badge-warning';
$labelClass = 'bg-warning text-dark';
$target = $langCode . ':0:add';
$allow = $canCreate;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function association($catid, $extension = 'com_content')
$url = Route::_('index.php?option=com_categories&task=category.edit&id=' . (int) $item->id . '&extension=' . $extension);
$tooltip = '<strong>' . htmlspecialchars($item->language_title, ENT_QUOTES, 'UTF-8') . '</strong><br>'
. htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8');
$classes = 'badge badge-secondary';
$classes = 'badge bg-secondary';

$item->link = '<a href="' . $url . '" class="' . $classes . '">' . $text . '</a>'
. '<div role="tooltip" id="tip-' . (int) $catid . '-' . (int) $item->id . '">' . $tooltip . '</div>';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<?php echo Text::sprintf('COM_CHECKIN_TABLE', $table); ?>
</th>
<td>
<span class="badge badge-secondary"><?php echo $count; ?></span>
<span class="badge bg-secondary"><?php echo $count; ?></span>
</td>
</tr>
<?php $i++; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ public function storePermissions($permission = null)
// Current group is a Super User group, so calculated setting is "Allowed (Super User)".
if ($isSuperUserGroupAfter)
{
$result['class'] = 'badge badge-success';
$result['class'] = 'badge bg-success';
$result['text'] = '<span class="icon-lock icon-white" aria-hidden="true"></span>' . Text::_('JLIB_RULES_ALLOWED_ADMIN');
}
// Not super user.
Expand All @@ -1160,13 +1160,13 @@ public function storePermissions($permission = null)
// If recursive calculated setting is "Denied" or null. Calculated permission is "Not Allowed (Inherited)".
if ($inheritedGroupRule === null || $inheritedGroupRule === false)
{
$result['class'] = 'badge badge-danger';
$result['class'] = 'badge bg-danger';
$result['text'] = Text::_('JLIB_RULES_NOT_ALLOWED_INHERITED');
}
// If recursive calculated setting is "Allowed". Calculated permission is "Allowed (Inherited)".
else
{
$result['class'] = 'badge badge-success';
$result['class'] = 'badge bg-success';
$result['text'] = Text::_('JLIB_RULES_ALLOWED_INHERITED');
}

Expand All @@ -1181,13 +1181,13 @@ public function storePermissions($permission = null)
// If there is an explicit permission "Not Allowed". Calculated permission is "Not Allowed".
if ($assetRule === false)
{
$result['class'] = 'badge badge-danger';
$result['class'] = 'badge bg-danger';
$result['text'] = Text::_('JLIB_RULES_NOT_ALLOWED');
}
// If there is an explicit permission is "Allowed". Calculated permission is "Allowed".
elseif ($assetRule === true)
{
$result['class'] = 'badge badge-success';
$result['class'] = 'badge bg-success';
$result['text'] = Text::_('JLIB_RULES_ALLOWED');
}

Expand All @@ -1196,7 +1196,7 @@ public function storePermissions($permission = null)
// Global configuration with "Not Set" permission. Calculated permission is "Not Allowed (Default)".
if (empty($parentGroupId) && $isGlobalConfig === true && $assetRule === null)
{
$result['class'] = 'badge badge-danger';
$result['class'] = 'badge bg-danger';
$result['text'] = Text::_('JLIB_RULES_NOT_ALLOWED_DEFAULT');
}

Expand All @@ -1207,7 +1207,7 @@ public function storePermissions($permission = null)
*/
elseif ($inheritedGroupParentAssetRule === false || $inheritedParentGroupRule === false)
{
$result['class'] = 'badge badge-danger';
$result['class'] = 'badge bg-danger';
$result['text'] = '<span class="icon-lock icon-white" aria-hidden="true"></span>' . Text::_('JLIB_RULES_NOT_ALLOWED_LOCKED');
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function association($contactid)
$url = Route::_('index.php?option=com_contact&task=contact.edit&id=' . (int) $item->id);
$tooltip = '<strong>' . htmlspecialchars($item->language_title, ENT_QUOTES, 'UTF-8') . '</strong><br>'
. htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8') . '<br>' . Text::sprintf('JCATEGORY_SPRINTF', $item->category_title);
$classes = 'badge badge-secondary';
$classes = 'badge bg-secondary';

$item->link = '<a href="' . $url . '" class="' . $classes . '">' . $text . '</a>'
. '<div role="tooltip" id="tip-' . (int) $contactid . '-' . (int) $item->id . '">' . $tooltip . '</div>';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function association($articleid)
$url = Route::_('index.php?option=com_content&task=article.edit&id=' . (int) $item->id);
$tooltip = '<strong>' . htmlspecialchars($item->language_title, ENT_QUOTES, 'UTF-8') . '</strong><br>'
. htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8') . '<br>' . Text::sprintf('JCATEGORY_SPRINTF', $item->category_title);
$classes = 'badge badge-secondary';
$classes = 'badge bg-secondary';

$item->link = '<a href="' . $url . '" class="' . $classes . '">' . $text . '</a>'
. '<div role="tooltip" id="tip-' . (int) $articleid . '-' . (int) $item->id . '">' . $tooltip . '</div>';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,18 +357,18 @@
?>
</td>
<td class="d-none d-lg-table-cell text-center">
<span class="badge badge-info">
<span class="badge bg-info">
<?php echo (int) $item->hits; ?>
</span>
</td>
<?php if ($this->vote) : ?>
<td class="d-none d-md-table-cell text-center">
<span class="badge badge-success">
<span class="badge bg-success">
<?php echo (int) $item->rating_count; ?>
</span>
</td>
<td class="d-none d-md-table-cell text-center">
<span class="badge badge-warning">
<span class="badge bg-warning text-dark">
<?php echo (int) $item->rating; ?>
</span>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,18 +357,18 @@
?>
</td>
<td class="d-none d-lg-table-cell text-center">
<span class="badge badge-info">
<span class="badge bg-info">
<?php echo (int) $item->hits; ?>
</span>
</td>
<?php if ($this->vote) : ?>
<td class="d-none d-md-table-cell text-center">
<span class="badge badge-success" >
<span class="badge bg-success" >
<?php echo (int) $item->rating_count; ?>
</span>
</td>
<td class="d-none d-md-table-cell text-center">
<span class="badge badge-warning" >
<span class="badge bg-warning text-dark" >
<?php echo (int) $item->rating; ?>
</span>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
?>
</th>
<td>
<span class="badge badge-info"><?php echo number_format($type->link_count, 0, Text::_('DECIMALS_SEPARATOR'), Text::_('THOUSANDS_SEPARATOR')); ?></span>
<span class="badge bg-info"><?php echo number_format($type->link_count, 0, Text::_('DECIMALS_SEPARATOR'), Text::_('THOUSANDS_SEPARATOR')); ?></span>
</td>
</tr>
<?php endforeach; ?>
Expand All @@ -45,7 +45,7 @@
<strong><?php echo Text::_('COM_FINDER_STATISTICS_LINK_TYPE_TOTAL'); ?></strong>
</td>
<td>
<span class="badge badge-info"><?php echo number_format($this->data->link_count, 0, Text::_('DECIMALS_SEPARATOR'), Text::_('THOUSANDS_SEPARATOR')); ?></span>
<span class="badge bg-info"><?php echo number_format($this->data->link_count, 0, Text::_('DECIMALS_SEPARATOR'), Text::_('THOUSANDS_SEPARATOR')); ?></span>
</td>
</tr>
</tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ class="<?php echo $buttonClass; ?>"
<?php $minorVersion = $version::MAJOR_VERSION . '.' . $version::MINOR_VERSION; ?>
<?php // Display a Note if language pack version is not equal to Joomla version ?>
<?php if (strpos($language->version, $minorVersion) !== 0 || strpos($language->version, $currentShortVersion) !== 0) : ?>
<span class="badge badge-warning"><?php echo $language->version; ?></span>
<span class="badge bg-warning text-dark"><?php echo $language->version; ?></span>
<span class="icon-info-circle" aria-hidden="true" tabindex="0"></span>
<div role="tooltip" class="text-left" id="tip<?php echo $language->code; ?>">
<?php echo Text::_('JGLOBAL_LANGUAGE_VERSION_NOT_PLATFORM'); ?>
</div>
<?php else : ?>
<span class="badge badge-success"><?php echo $language->version; ?></span>
<span class="badge bg-success"><?php echo $language->version; ?></span>
<?php endif; ?>
</td>
<td class="small d-none d-md-table-cell">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<?php endif; ?>
</div>
<?php if($item->isMissingDownloadKey): ?>
<span class="badge badge-warning">
<span class="badge bg-warning text-dark">
<span class="hasPopover"
title="<?php echo Text::_('COM_INSTALLER_DOWNLOADKEY_MISSING_LABEL') ?>"
data-bs-content="<?php echo Text::_('COM_INSTALLER_DOWNLOADKEY_MISSING_TIP') ?>"
Expand All @@ -119,10 +119,10 @@
<?php echo $item->type_translated; ?>
</td>
<td>
<span class="badge badge-warning"><?php echo $item->current_version; ?></span>
<span class="badge bg-warning text-dark"><?php echo $item->current_version; ?></span>
</td>
<td>
<span class="badge badge-success"><?php echo $item->version; ?></span>
<span class="badge bg-success"><?php echo $item->version; ?></span>
</td>
<td class="d-none d-md-table-cell text-center">
<?php if (!empty($item->changelogurl)) : ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@
<br>
<span class="small break-word">
<?php if ($item->downloadKey['valid']) : ?>
<span class="badge badge-info">
<span class="badge bg-info">
<?php echo Text::_('COM_INSTALLER_DOWNLOADKEY_EXTRA_QUERY_LABEL'); ?>
</span>
<code><?php echo $item->downloadKey['value']; ?></code>
<?php elseif ($item->downloadKey['supported']) : ?>
<span class="badge badge-warning">
<span class="badge bg-warning text-dark">
<span class="hasPopover"
title="<?php echo Text::_('COM_INSTALLER_DOWNLOADKEY_MISSING_LABEL') ?>"
data-bs-content="<?php echo Text::_('COM_INSTALLER_DOWNLOADKEY_MISSING_TIP') ?>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@
<?php $minorVersion = $version::MAJOR_VERSION . '.' . $version::MINOR_VERSION; ?>
<?php // Display a Note if language pack version is not equal to Joomla version ?>
<?php if (strpos($row->version, $minorVersion) !== 0 || strpos($row->version, $currentShortVersion) !== 0) : ?>
<span class="badge badge-warning" title="<?php echo Text::_('JGLOBAL_LANGUAGE_VERSION_NOT_PLATFORM'); ?>"><?php echo $row->version; ?></span>
<span class="badge bg-warning text-dark" title="<?php echo Text::_('JGLOBAL_LANGUAGE_VERSION_NOT_PLATFORM'); ?>"><?php echo $row->version; ?></span>
<?php else : ?>
<span class="badge badge-success"><?php echo $row->version; ?></span>
<span class="badge bg-success"><?php echo $row->version; ?></span>
<?php endif; ?>
</td>
<td class="d-none d-md-table-cell text-center">
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_mails/tmpl/templates/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<?php if ($language->image) : ?>
<?php echo HTMLHelper::_('image', 'mod_languages/' . $language->image . '.gif', $language->title_native, array('title' => $language->title_native), true); ?>
<?php else : ?>
<span class="badge badge-secondary" title="<?php echo $language->title_native; ?>"><?php echo $language->lang_code; ?></span>
<span class="badge bg-secondary" title="<?php echo $language->title_native; ?>"><?php echo $language->lang_code; ?></span>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
Expand All @@ -100,7 +100,7 @@
<?php if ($language->image) : ?>
<?php echo HTMLHelper::_('image', 'mod_languages/' . $language->image . '.gif', $language->title_native, array('title' => $language->title_native), true); ?>
<?php else : ?>
<span class="badge badge-secondary"><?php echo $language->lang_code; ?></span>
<span class="badge bg-secondary"><?php echo $language->lang_code; ?></span>
<?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_menus/src/Service/HTML/Menus.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function association($itemid)
$url = Route::_('index.php?option=com_menus&task=item.edit&id=' . (int) $item->id);
$tooltip = '<strong>' . htmlspecialchars($item->language_title, ENT_QUOTES, 'UTF-8') . '</strong><br>'
. htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8') . '<br>' . Text::sprintf('COM_MENUS_MENU_SPRINTF', $item->menu_title);
$classes = 'badge badge-secondary';
$classes = 'badge bg-secondary';

$item->link = '<a href="' . $url . '" class="' . $classes . '">' . $text . '</a>'
. '<div role="tooltip" id="tip-' . (int) $itemid . '-' . (int) $item->id . '">' . $tooltip . '</div>';
Expand Down Expand Up @@ -136,6 +136,6 @@ public function visibility($params)

$show_menu = $registry->get('menu_show');

return ($show_menu === 0) ? '<span class="badge badge-secondary">' . Text::_('COM_MENUS_LABEL_HIDDEN') . '</span>' : '';
return ($show_menu === 0) ? '<span class="badge bg-secondary">' . Text::_('COM_MENUS_LABEL_HIDDEN') . '</span>' : '';
}
}
14 changes: 7 additions & 7 deletions administrator/components/com_menus/tmpl/item/edit_modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,35 +110,35 @@ class="btn btn-link module-edit-link"
<td id="menus-<?php echo $module->id; ?>">
<?php if (is_null($module->menuid)) : ?>
<?php if ($module->except) : ?>
<span class="badge badge-success">
<span class="badge bg-success">
<?php echo Text::_('JYES'); ?>
</span>
<?php else : ?>
<span class="badge badge-danger">
<span class="badge bg-danger">
<?php echo Text::_('JNO'); ?>
</span>
<?php endif; ?>
<?php elseif ($module->menuid > 0) : ?>
<span class="badge badge-success">
<span class="badge bg-success">
<?php echo Text::_('JYES'); ?>
</span>
<?php elseif ($module->menuid < 0) : ?>
<span class="badge badge-danger">
<span class="badge bg-danger">
<?php echo Text::_('JNO'); ?>
</span>
<?php else : ?>
<span class="badge badge-info">
<span class="badge bg-info">
<?php echo Text::_('JALL'); ?>
</span>
<?php endif; ?>
</td>
<td id="status-<?php echo $module->id; ?>">
<?php if ($module->published) : ?>
<span class="badge badge-success">
<span class="badge bg-success">
<?php echo Text::_('JYES'); ?>
</span>
<?php else : ?>
<span class="badge badge-danger">
<span class="badge bg-danger">
<?php echo Text::_('JNO'); ?>
</span>
<?php endif; ?>
Expand Down
6 changes: 3 additions & 3 deletions administrator/components/com_menus/tmpl/items/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
</div>
<?php if ($item->type === 'component' && !$item->enabled) : ?>
<div>
<span class="badge badge-secondary">
<span class="badge bg-secondary">
<?php echo Text::_($item->enabled === null ? 'JLIB_APPLICATION_ERROR_COMPONENT_NOT_FOUND' : 'COM_MENUS_LABEL_DISABLED'); ?>
</span>
</div>
Expand All @@ -221,15 +221,15 @@
<?php if ($item->language_image) : ?>
<?php echo HTMLHelper::_('image', 'mod_languages/' . $item->language_image . '.gif', $item->language_title, array('title' => Text::sprintf('COM_MENUS_GRID_UNSET_LANGUAGE', $item->language_title)), true); ?>
<?php else : ?>
<span class="badge badge-secondary"
<span class="badge bg-secondary"
title="<?php echo Text::sprintf('COM_MENUS_GRID_UNSET_LANGUAGE', $item->language_title); ?>"><?php echo $item->language; ?></span>
<?php endif; ?>
</a>
<?php else : ?>
<?php if ($item->language_image) : ?>
<?php echo HTMLHelper::_('image', 'mod_languages/' . $item->language_image . '.gif', $item->language_title, array('title' => $item->language_title), true); ?>
<?php else : ?>
<span class="badge badge-secondary"
<span class="badge bg-secondary"
title="<?php echo $item->language_title; ?>"><?php echo $item->language; ?></span>
<?php endif; ?>
<?php endif; ?>
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_menus/tmpl/items/modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
</div>
<?php if ($item->type === 'component' && !$item->enabled) : ?>
<div>
<span class="badge badge-secondary">
<span class="badge bg-secondary">
<?php echo Text::_($item->enabled === null ? 'JLIB_APPLICATION_ERROR_COMPONENT_NOT_FOUND' : 'COM_MENUS_LABEL_DISABLED'); ?>
</span>
</div>
Expand All @@ -154,7 +154,7 @@
<?php if ($item->language_image) : ?>
<?php echo HTMLHelper::_('image', 'mod_languages/' . $item->language_image . '.gif', $item->language_title, array('title' => $item->language_title), true); ?>
<?php else : ?>
<span class="badge badge-secondary" title="<?php echo $item->language_title; ?>"><?php echo $item->language; ?></span>
<span class="badge bg-secondary" title="<?php echo $item->language_title; ?>"><?php echo $item->language; ?></span>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_modules/tmpl/module/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
?>
</h2>
<div class="info-labels">
<span class="badge badge-secondary">
<span class="badge bg-secondary">
<?php echo $this->item->client_id == 0 ? Text::_('JSITE') : Text::_('JADMINISTRATOR'); ?>
</span>
</div>
Expand Down
Loading