Space To Tab

This commit is contained in:
Tuan Pham Ngoc 2021-08-15 14:03:36 +07:00
parent 047cee28aa
commit 09f7753f34
3 changed files with 119 additions and 119 deletions

View File

@ -32,9 +32,9 @@ if ($this->maxLevelcat != 0 && count($this->items[$this->parent->id]) > 0) :
<button
type="button"
id="category-btn-<?php echo $item->id; ?>"
data-category-id="<?php echo $item->id; ?>"
data-category-id="<?php echo $item->id; ?>"
class="btn btn-secondary btn-sm float-end"
aria-expanded="false"
aria-expanded="false"
aria-label="<?php echo Text::_('JGLOBAL_EXPAND_CATEGORIES'); ?>"
>
<span class="icon-plus" aria-hidden="true"></span>

View File

@ -70,125 +70,125 @@ $listDirn = $this->escape($this->state->get('list.direction'));
<?php else : ?>
<ul class="category list-unstyled">
<?php foreach ($this->items as $i => $item) : ?>
<?php
// Shouldn't this be only for users with admin rights?
// @ToDo: what is the difference -class system-unbublished?
if ($item->state == 0) : ?>
<li class="system-unpublished list-group mt-3">
<?php else : ?>
<li class="list-group mt-3">
<?php endif; ?>
<?php
// Shouldn't this be only for users with admin rights?
// @ToDo: what is the difference -class system-unbublished?
if ($item->state == 0) : ?>
<li class="system-unpublished list-group mt-3">
<?php else : ?>
<li class="list-group mt-3">
<?php endif; ?>
<?php if ($canEdit || ($canEditOwn && $item->created_by == $userId)) : ?>
<div class="icons list-group-item">
<?php echo HTMLHelper::_('weblinkicon.edit', $item, $this->params); ?>
</div>
<?php endif; ?>
<div class="icons list-group-item">
<?php echo HTMLHelper::_('weblinkicon.edit', $item, $this->params); ?>
</div>
<?php endif; ?>
<div class="list-title list-group-item ">
<?php if (!$this->params->get('icons', 1)) : ?>
<?php echo Text::_('COM_WEBLINKS_LINK'); ?>
<?php else : ?>
<?php // ToDo css icons as variables ?>
<?php if (!$this->params->get('link_icons')) : ?>
<span class="icon-globe" aria-hidden="true"></span>
<?php else: ?>
<?php echo '<img src="' . $this->params->get('link_icons') . '" alt="' . Text::_('COM_WEBLINKS_LINK') . '" />'; ?>
<?php endif; ?>
<?php endif; ?>
<div class="list-title list-group-item ">
<?php if (!$this->params->get('icons', 1)) : ?>
<?php echo Text::_('COM_WEBLINKS_LINK'); ?>
<?php else : ?>
<?php // ToDo css icons as variables ?>
<?php if (!$this->params->get('link_icons')) : ?>
<span class="icon-globe" aria-hidden="true"></span>
<?php else: ?>
<?php echo '<img src="' . $this->params->get('link_icons') . '" alt="' . Text::_('COM_WEBLINKS_LINK') . '" />'; ?>
<?php endif; ?>
<?php endif; ?>
<?php // Compute the correct link ?>
<?php $menuclass = 'category' . $this->pageclass_sfx; ?>
<?php $link = $item->link; ?>
<?php $width = $item->params->get('width', 600); ?>
<?php $height = $item->params->get('height', 500); ?>
<?php if ($item->state == 0) : ?>
<span class="badge bg-warning"><?php echo Text::_('JUNPUBLISHED'); ?></span>
<?php endif; ?>
<?php // Compute the correct link ?>
<?php $menuclass = 'category' . $this->pageclass_sfx; ?>
<?php $link = $item->link; ?>
<?php $width = $item->params->get('width', 600); ?>
<?php $height = $item->params->get('height', 500); ?>
<?php if ($item->state == 0) : ?>
<span class="badge bg-warning"><?php echo Text::_('JUNPUBLISHED'); ?></span>
<?php endif; ?>
<?php
switch ($item->params->get('target', $this->params->get('target')))
{
case 1:
// Open in a new window
echo '<a href="' . $link . '" target="_blank" class="' . $menuclass . '" rel="nofollow">' .
$this->escape($item->title) . '</a>';
break;
<?php
switch ($item->params->get('target', $this->params->get('target')))
{
case 1:
// Open in a new window
echo '<a href="' . $link . '" target="_blank" class="' . $menuclass . '" rel="nofollow">' .
$this->escape($item->title) . '</a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=' . $this->escape($width) . ',height=' . $this->escape($height) . '';
echo "<a href=\"$link\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\">" .
$this->escape($item->title) . '</a>';
break;
case 3:
// Open in a modal window
HTMLHelper::_('behavior.modal', 'a.modal');
echo '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size: {x:' . $this->escape($width) . ', y:' . $this->escape($height) . '}}">' .
$this->escape($item->title) . ' </a>';
break;
case 2:
// Open in a popup window
$attribs = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=' . $this->escape($width) . ',height=' . $this->escape($height) . '';
echo "<a href=\"$link\" onclick=\"window.open(this.href, 'targetWindow', '" . $attribs . "'); return false;\">" .
$this->escape($item->title) . '</a>';
break;
case 3:
// Open in a modal window
HTMLHelper::_('behavior.modal', 'a.modal');
echo '<a class="modal" href="' . $link . '" rel="{handler: \'iframe\', size: {x:' . $this->escape($width) . ', y:' . $this->escape($height) . '}}">' .
$this->escape($item->title) . ' </a>';
break;
default:
// Open in parent window
echo '<a href="' . $link . '" class="' . $menuclass . '" rel="nofollow">' .
$this->escape($item->title) . ' </a>';
break;
}
?>
<?php if ($this->params->get('show_link_hits', 1)) : ?>
<div class="list-hits badge bg-info float-end">
<?php echo Text::sprintf('JGLOBAL_HITS_COUNT', $item->hits); ?>
</div>
<?php endif; ?>
default:
// Open in parent window
echo '<a href="' . $link . '" class="' . $menuclass . '" rel="nofollow">' .
$this->escape($item->title) . ' </a>';
break;
}
?>
<?php if ($this->params->get('show_link_hits', 1)) : ?>
<div class="list-hits badge bg-info float-end">
<?php echo Text::sprintf('JGLOBAL_HITS_COUNT', $item->hits); ?>
</div>
<?php endif; ?>
<?php if ($this->params->get('show_tags', 1) && !empty($item->tags->itemTags)) : ?>
<div class="mt-2 mb-2">
<?php echo LayoutHelper::render('joomla.content.tags', $item->tags->itemTags); ?>
</div>
<?php endif; ?>
<?php if ($this->params->get('show_tags', 1) && !empty($item->tags->itemTags)) : ?>
<div class="mt-2 mb-2">
<?php echo LayoutHelper::render('joomla.content.tags', $item->tags->itemTags); ?>
</div>
<?php endif; ?>
<?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 $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">
<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 (($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 $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">
<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 = (empty($images->float_second)) ? $this->params->get('float_second') : $images->float_second; ?>
<?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">
<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($images->image_second)) : ?>
<?php $imgfloat = (empty($images->float_second)) ? $this->params->get('float_second') : $images->float_second; ?>
<?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">
<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 $item->description; ?>
<?php echo $item->description; ?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
</div>
</li>
</li>
<?php endforeach; ?>
</ul>

View File

@ -35,11 +35,11 @@ $params = $this->state->get('params');
?>
<div class="edit item-page<?php echo $this->pageclass_sfx; ?>">
<?php if ($this->params->get('show_page_heading')) : ?>
<div class="page-header">
<h1>
<div class="page-header">
<h1>
<?php echo $this->escape($this->params->get('page_heading')); ?>
</h1>
</div>
</h1>
</div>
<?php endif; ?>
<form action="<?php echo Route::_('index.php?option=com_weblinks&view=form&w_id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="adminForm" class="form-validate form-vertical">
@ -78,19 +78,19 @@ $params = $this->state->get('params');
</div>
<?php endif; ?>
<div class="mb-2">
<button type="button" class="btn btn-primary" onclick="Joomla.submitbutton('weblink.save')">
<span class="icon-check" aria-hidden="true"></span>
<div class="mb-2">
<button type="button" class="btn btn-primary" onclick="Joomla.submitbutton('weblink.save')">
<span class="icon-check" aria-hidden="true"></span>
<?php echo Text::_('JSAVE'); ?>
</button>
<button type="button" class="btn btn-danger" onclick="Joomla.submitbutton('weblink.cancel')">
<span class="icon-times" aria-hidden="true"></span>
</button>
<button type="button" class="btn btn-danger" onclick="Joomla.submitbutton('weblink.cancel')">
<span class="icon-times" aria-hidden="true"></span>
<?php echo Text::_('JCANCEL'); ?>
</button>
</button>
<?php if ($this->params->get('save_history', 0) && $this->item->id) : ?>
<?php echo $this->form->getInput('contenthistory'); ?>
<?php endif; ?>
</div>
</div>
<input type="hidden" name="return" value="<?php echo $this->return_page;?>" />
<input type="hidden" name="task" value="" />