Merge branch '4.0-dev' into emptystate

This commit is contained in:
chmst 2021-09-24 06:43:39 +02:00
commit 82c0cffd27
7 changed files with 37 additions and 64 deletions

View File

@ -1,5 +1,5 @@
extension = weblinks
version = 4.0.0-rc1
version = 4.0.0
source = src
target = package
@ -32,7 +32,7 @@ text = "
* @package Joomla.Administrator
* @subpackage Weblinks
*
* @copyright Copyright (C) 2005 - ##YEAR## Open Source Matters, Inc. All rights reserved.
* @copyright (C) 2005 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
"

View File

@ -299,7 +299,7 @@
</field>
<field
name="show_cat_num_articles_cat"
name="show_cat_num_links_cat"
type="radio"
label="COM_WEBLINKS_FIELD_CONFIG_CAT_SHOWNUMBERS_LABEL"
layout="joomla.form.field.radio.switcher"
@ -337,17 +337,6 @@
<option value="0">JHIDE</option>
</field>
<field
name="show_headings"
type="radio"
layout="joomla.form.field.radio.switcher"
default="1"
label="JGLOBAL_SHOW_HEADINGS_LABEL"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_link_description"
type="radio"

View File

@ -91,7 +91,6 @@ if ($saveOrder && !empty($this->items))
</thead>
<tbody <?php if ($saveOrder) :?> class="js-draggable" data-url="<?php echo $saveOrderingUrl; ?>" data-direction="<?php echo strtolower($listDirn); ?>" data-nested="true"<?php endif; ?>>
<?php foreach ($this->items as $i => $item) : ?>
<?php $ordering = ($listOrder == 'a.ordering'); ?>
<?php $item->cat_link = Route::_('index.php?option=com_categories&extension=com_weblinks&task=edit&type=other&cid[]=' . $item->catid); ?>
<?php $canCreate = $user->authorise('core.create', 'com_weblinks.category.' . $item->catid); ?>
<?php $canEdit = $user->authorise('core.edit', 'com_weblinks.category.' . $item->catid); ?>

View File

@ -217,18 +217,6 @@
<option value="1">JSHOW</option>
</field>
<field
name="show_headings"
type="list"
label="JGLOBAL_SHOW_HEADINGS_LABEL"
useglobal="true"
class="form-select-color-state"
validate="options"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_link_description"
type="list"

View File

@ -16,18 +16,20 @@ use Joomla\Component\Weblinks\Site\Helper\RouteHelper;
if ($this->maxLevelcat != 0 && count($this->items[$this->parent->id]) > 0) :
?>
<?php foreach ($this->items[$this->parent->id] as $id => $item) : ?>
<?php if ($this->params->get('show_empty_categories_cat') || $item->numitems || count($item->getChildren())) : ?>
<div class="com-weblinks-categories__items">
<h3 class="page-header item-title">
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($item->id, $item->language)); ?>">
<?php echo $this->escape($item->title); ?></a>
<?php if ($this->params->get('show_cat_items_cat') == 1) :?>
<span class="badge bg-info">
<?php echo Text::_('COM_WEBLINKS_NUM_ITEMS'); ?>&nbsp;
<?php echo $item->numitems; ?>
</span>
<?php endif; ?>
<div class="com-weblinks-categories__items">
<?php foreach ($this->items[$this->parent->id] as $id => $item) : ?>
<?php if ($this->params->get('show_empty_categories_cat') || $item->numitems || count($item->getChildren())) : ?>
<div class="com-content-categories__item">
<div>
<a href="<?php echo Route::_(RouteHelper::getCategoryRoute($item->id, $item->language)); ?>">
<?php echo $this->escape($item->title); ?></a>
<?php if ($this->params->get('show_cat_num_links_cat') == 1) :?>
<span class="badge bg-info">
<?php echo Text::_('COM_WEBLINKS_NUM_ITEMS'); ?>&nbsp;
<?php echo $item->numitems; ?>
</span>
<?php endif; ?>
</div>
<?php if ($this->maxLevelcat > 1 && count($item->getChildren()) > 0) : ?>
<button
type="button"
@ -40,17 +42,20 @@ if ($this->maxLevelcat != 0 && count($this->items[$this->parent->id]) > 0) :
<span class="icon-plus" aria-hidden="true"></span>
</button>
<?php endif; ?>
</h3>
<?php if ($this->params->get('show_subcat_desc_cat') == 1) : ?>
<?php if ($item->description) : ?>
<div class="category-desc">
<?php echo HTMLHelper::_('content.prepare', $item->description, '', 'com_weblinks.categories'); ?>
</div>
<?php if ($this->params->get('show_description_image') && $item->getParams()->get('image')) : ?>
<img src="<?php echo $item->getParams()->get('image'); ?>" alt="<?php echo htmlspecialchars($item->getParams()->get('image_alt'), ENT_COMPAT, 'UTF-8'); ?>">
<?php endif; ?>
<?php if ($this->params->get('show_subcat_desc_cat') == 1) : ?>
<?php if ($item->description) : ?>
<div class="com-content-categories__description category-desc">
<?php echo HTMLHelper::_('content.prepare', $item->description, '', 'com_weblinks.categories'); ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->maxLevelcat > 1 && count($item->getChildren()) > 0) : ?>
<div class="com-weblinks-categories__children" id="category-<?php echo $item->id; ?>" hidden>
<?php if ($this->maxLevelcat > 1 && count($item->getChildren()) > 0) : ?>
<?php if (count($item->getChildren()) > 0 && $this->maxLevelcat > 1) : ?>
<div class="com-content-categories__children" id="category-<?php echo $item->id; ?>" hidden="">
<?php
$this->items[$item->id] = $item->getChildren();
$this->parent = $item;
@ -59,9 +64,11 @@ if ($this->maxLevelcat != 0 && count($this->items[$this->parent->id]) > 0) :
$this->parent = $item->getParent();
$this->maxLevelcat++;
?>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php endforeach; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>

View File

@ -137,17 +137,6 @@
<option value="1">JSHOW</option>
</field>
<field
name="show_headings"
type="list"
label="JGLOBAL_SHOW_HEADINGS_LABEL"
useglobal="true"
class="form-select-color-state"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="show_link_description"
type="list"

View File

@ -45,7 +45,8 @@ $listDirn = $this->escape($this->state->get('list.direction'));
placeholder="<?php echo Text::_('COM_WEBLINKS_FILTER_SEARCH_DESC'); ?>"
>
<button type="submit" name="filter_submit" class="btn btn-primary"><?php echo Text::_('JGLOBAL_FILTER_BUTTON'); ?></button>
<button type="reset" name="filter-clear-button" class="btn btn-secondary"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
<button type="button" name="filter-clear-button" class="btn btn-secondary"
onclick="this.form.elements['filter-search'].value = ''; this.form.submit();"><?php echo Text::_('JSEARCH_FILTER_CLEAR'); ?></button>
</div>
<?php endif; ?>
<?php if ($this->params->get('show_pagination_limit')) : ?>