bug fixes and template adjustments

This commit is contained in:
Dennis Eichhorn 2021-07-31 17:20:48 +02:00
parent c7aecd438c
commit b216de5ccd
3 changed files with 4 additions and 4 deletions

View File

@ -140,7 +140,7 @@ final class TemplateMapper extends DataMapperAbstract
public static function getByVirtualPath(string $virtualPath = '/') : array
{
$depth = 3;
$query = self::getQuery();
$query = self::getQuery(depth: $depth);
$query->where(self::$table . '_d' . $depth . '.helper_template_virtual', '=', $virtualPath);
return self::getAllByQuery($query, RelationType::ALL, $depth);

View File

@ -148,7 +148,7 @@ echo $this->getData('nav')->render(); ?>
<td><a href="<?= $url; ?>"><i class="fa fa-folder-open-o"></i></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
<td>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->createdBy->name1); ?></a>
<td><a class="content" href="<?= UriFactory::build('{/prefix}profile/single?{?}&for=' . $value->createdBy->getId()); ?>"><?= $this->printHtml($value->createdBy->name1); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->createdAt->format('Y-m-d')); ?></a>
<?php endforeach; ?>
<?php foreach ($templates as $key => $template) : ++$count;
@ -164,7 +164,7 @@ echo $this->getData('nav')->render(); ?>
<?php $tags = $template->getTags(); foreach ($tags as $tag) : ?>
<span class="tag" style="background: <?= $this->printHtml($tag->color); ?>"><?= $tag->icon !== null ? '<i class="' . $this->printHtml($tag->icon ?? '') . '"></i>' : ''; ?><?= $this->printHtml($tag->getL11n()); ?></span>
<?php endforeach; ?>
<td data-label="<?= $this->getHtml('Creator'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($template->createdBy->name1); ?></a>
<td data-label="<?= $this->getHtml('Creator'); ?>"><a class="content" href="<?= UriFactory::build('{/prefix}profile/single?{?}&for=' . $template->createdBy->getId()); ?>"><?= $this->printHtml($template->createdBy->name1); ?></a>
<td data-label="<?= $this->getHtml('Updated'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($template->createdAt->format('Y-m-d')); ?></a>
<?php endforeach; ?>
<?php if ($count === 0) : ?>

View File

@ -10,7 +10,7 @@
"require-dev": {
"phpunit/phpunit": ">=9.4",
"friendsofphp/php-cs-fixer": ">=3.0",
"squizlabs/php_codesniffer": ">=3.5",
"squizlabs/php_codesniffer": ">=3.6",
"phpmd/phpmd": ">=2.9",
"phpstan/phpstan": ">=0.12.58",
"phan/phan": ">=3.2.6"