Skip to content
Open
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
c843d14
NGSTACK-906 add 'priority' property to Tag objects
AntePrkacin Jun 18, 2025
1c5b716
NGSTACK-906 add support for 'priority' property in the Mapper layer
AntePrkacin Jun 18, 2025
2d27fc0
NGSTACK-906 modify createTagFindQuery method to select 'priority' pro…
AntePrkacin Jun 18, 2025
a8cf605
NGSTACK-906 add 'priority' column to 'eztags' table in MySQL and Post…
AntePrkacin Jun 18, 2025
3a84111
NGSTACK-906 add translations for tag priority
AntePrkacin Jun 18, 2025
8e535ea
NGSTACK-906 show 'priority' column for tag's children
AntePrkacin Jun 18, 2025
7d59685
NGSTACK-906 add 'subitems' tab to the show tag template
AntePrkacin Jun 18, 2025
fe7ba81
NGSTACK-906 add 'subitems' tab template with dropdowns for sortBy and…
AntePrkacin Jun 18, 2025
9158a5d
NGSTACK-906 add translations for tag subitems sorting
AntePrkacin Jun 18, 2025
9ce9427
NGSTACK-906 update tag children sorting functionality in TagControlle…
AntePrkacin Jun 20, 2025
60cf2cf
NGSTACK-906 add support for sorting in loadTagChildren() method in Se…
AntePrkacin Jun 20, 2025
1041265
NGSTACK-906 add support for sorting in loadChildren() method for Tag …
AntePrkacin Jun 20, 2025
0955f35
NGSTACK-906 add support for sorting in getChildren() method for Gatew…
AntePrkacin Jun 20, 2025
43def26
NGSTACK-906 update subitems sort option value from 'tag_id' to 'id' i…
AntePrkacin Jun 20, 2025
f0aa890
NGSTACK-906 remove 'subitems' tag tab and add the tag sorting at the …
AntePrkacin Jun 20, 2025
f1e4e1a
NGSTACK-906 update tests to handle 'priority' property
AntePrkacin Jun 20, 2025
6139978
NGSTACK-906 add enums for tag sortField and sortOrder properties
AntePrkacin Jun 24, 2025
df8003b
NGSTACK-906 add sortField and sortOrder properties to Tag objects and…
AntePrkacin Jun 24, 2025
ef0d60a
NGSTACK-906 update Mappers with sortField and sortOrder fields
AntePrkacin Jun 24, 2025
be00504
NGSTACK-906 remove sortBy and sortOrder parameters from the getChildr…
AntePrkacin Jun 24, 2025
d88c066
NGSTACK-906 remove sortBy and sortOrder parameters from the loadChild…
AntePrkacin Jun 24, 2025
c0bf0f4
NGSTACK-906 remove sortBy and sortOrder parameters from the loadTagCh…
AntePrkacin Jun 24, 2025
c719cc4
NGSTACK-906 rename subitems template to sort_children_tags template a…
AntePrkacin Jun 24, 2025
93c1134
NGSTACK-906 add sortField and sortOrder properties to UpdateStruct an…
AntePrkacin Jun 24, 2025
41e6787
NGSTACK-906 remove sorting logic in ChildrenTagsAdapter
AntePrkacin Jun 24, 2025
705fc35
NGSTACK-906 add new route and controller method for updating sortFiel…
AntePrkacin Jun 24, 2025
2397fcc
NGSTACK-906 rename sortField property to sortBy property everywhere
AntePrkacin Jun 24, 2025
c6c4555
NGSTACK-906 add logic for sorting children by sortBy and sortOrder in…
AntePrkacin Jun 24, 2025
4a5391d
NGSTACK-906 fix tests regarding sortBy and sortOrder properties
AntePrkacin Jun 24, 2025
4224d33
NGSTACK-906 update TagSortBy and TagSortOrder enums, iterate through …
AntePrkacin Jun 24, 2025
e16f73f
NGSTACK-906 throw BadRequestHttpException if sortBy or sortOrder para…
AntePrkacin Jun 24, 2025
dba4689
NGSTACK-906 change sort_by and sort_order column types from enums to …
AntePrkacin Jun 25, 2025
a6100ae
NGSTACK-906 add config params for sorting all child tags and for sort…
AntePrkacin Jun 25, 2025
5733962
NGSTACK-906 update Mapper and DoctrineDatabase Gateway with logic for…
AntePrkacin Jun 25, 2025
5479257
NGSTACK-906 add support for 'sort' config params in tests
AntePrkacin Jun 25, 2025
148a3c3
NGSTACK-906 add ability to modify 'priority' property when editing a …
AntePrkacin Jun 25, 2025
3704566
NGSTACK-906 fix the update() method in DoctrineDatabase and the test …
AntePrkacin Jun 25, 2025
59beb45
NGSTACK-906 update 'sortBy' and 'sortOrder' properties to be null on …
AntePrkacin Jun 25, 2025
84d9758
NGSTACK-906 update getChildren() and update() methods in DoctrineData…
AntePrkacin Jun 25, 2025
fd507dd
NGSTACK-906 update Mapper to properly handle the case when sortBy or …
AntePrkacin Jun 25, 2025
a81d3f6
NGSTACK-906 update sort_children_tags template to check if sortBy or …
AntePrkacin Jun 25, 2025
0ce8c25
NGSTACK-906 add MySQL and PostgreSQL upgrade scripts for 'priority', …
AntePrkacin Jun 26, 2025
3e9628a
NGSTACK-906 don't show 'priority' info on synonyms and remove 'priori…
AntePrkacin Jun 26, 2025
c6d1f47
NGSTACK-906 add 'priority', 'sort_by' and 'sort_order' fields to lega…
AntePrkacin Jun 26, 2025
031c1aa
NGSTACK-906 add policy for sorting children tags
AntePrkacin Jun 26, 2025
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
13 changes: 13 additions & 0 deletions bundle/API/Repository/Values/Enums/TagSortField.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

declare(strict_types=1);

namespace Netgen\TagsBundle\API\Repository\Values\Enums;

enum TagSortField: string
{
case ID = 'id';
case KEYWORD = 'keyword';
case MODIFIED = 'modified';
case PRIORITY = 'priority';
}
11 changes: 11 additions & 0 deletions bundle/API/Repository/Values/Enums/TagSortOrder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

declare(strict_types=1);

namespace Netgen\TagsBundle\API\Repository\Values\Enums;

enum TagSortOrder: string
{
case ASC = 'asc';
case DESC = 'desc';
}
22 changes: 22 additions & 0 deletions bundle/API/Repository/Values/Tags/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

use DateTimeInterface;
use Ibexa\Contracts\Core\Repository\Values\ValueObject;
use Netgen\TagsBundle\API\Repository\Values\Enums\TagSortField;
use Netgen\TagsBundle\API\Repository\Values\Enums\TagSortOrder;

use function array_map;
use function count;
Expand All @@ -28,6 +30,9 @@
* @property-read bool $alwaysAvailable Indicates if the Tag object is shown in the main language if it is not present in an other requested language
* @property-read string $mainLanguageCode The main language code of the Tag object
* @property-read string[] $languageCodes List of languages in this Tag object
* @property-read int $priority Tag priority
* @property-read TagSortField $sortField Specifies by which property the child tags should be sorted on
* @property-read TagSortOrder $sortOrder Specifies whether the sort order should be ascending or descending
*/
final class Tag extends ValueObject
{
Expand Down Expand Up @@ -104,6 +109,23 @@ final class Tag extends ValueObject
*/
protected ?string $prioritizedLanguageCode;

/**
* Tag priority.
*
* Position of the Tag among its siblings when sorted by priority.
*/
protected int $priority;

/**
* Specifies by which property the child tags should be sorted on.
*/
protected TagSortField $sortField;

/**
* Specifies whether the sort order should be ascending or descending.
*/
protected TagSortOrder $sortOrder;

/**
* Construct object optionally with a set of properties.
*
Expand Down
12 changes: 12 additions & 0 deletions bundle/API/Repository/Values/Tags/TagStruct.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
namespace Netgen\TagsBundle\API\Repository\Values\Tags;

use Ibexa\Contracts\Core\Repository\Values\ValueObject;
use Netgen\TagsBundle\API\Repository\Values\Enums\TagSortField;
use Netgen\TagsBundle\API\Repository\Values\Enums\TagSortOrder;

use function array_key_exists;

Expand All @@ -22,6 +24,16 @@ abstract class TagStruct extends ValueObject
*/
public ?string $remoteId = null;

/**
* Specifies by which property the child tags should be sorted on.
*/
public TagSortField $sortField;

/**
* Specifies whether the sort order should be ascending or descending.
*/
public TagSortOrder $sortOrder;

/**
* Tag keywords in the target languages
* Eg. array( "cro-HR" => "Hrvatska", "eng-GB" => "Croatia" ).
Expand Down
24 changes: 23 additions & 1 deletion bundle/Controller/Admin/TagController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
use Ibexa\Contracts\Core\Repository\ContentTypeService;
use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException;
use Netgen\TagsBundle\API\Repository\TagsService;
use Netgen\TagsBundle\API\Repository\Values\Enums\TagSortField;
use Netgen\TagsBundle\API\Repository\Values\Enums\TagSortOrder;
use Netgen\TagsBundle\API\Repository\Values\Tags\Tag;
use Netgen\TagsBundle\API\Repository\Values\Tags\TagUpdateStruct;
use Netgen\TagsBundle\Core\Pagination\Pagerfanta\SearchTagsAdapter;
use Netgen\TagsBundle\Form\Type\CopyTagsType;
use Netgen\TagsBundle\Form\Type\LanguageSelectType;
Expand Down Expand Up @@ -44,7 +47,6 @@ public function showTagAction(Request $request, ?Tag $tag = null): Response

if (!$tag instanceof Tag || !$tag->isSynonym()) {
$configResolver = $this->getConfigResolver();

$currentPage = (int) $request->query->get('page');
$pager = $this->createPager(
$this->tagChildrenAdapter,
Expand Down Expand Up @@ -264,6 +266,26 @@ public function updateTagAction(Request $request, Tag $tag, string $languageCode
);
}

public function updateTagSortAction(Request $request, Tag $tag): Response
{
if (!$this->isCsrfTokenValid('netgen_tags_admin', (string) ($request->request->get('_csrf_token') ?? ''))) {
$this->addFlashMessage('errors', 'invalid_csrf_token');

return $this->redirectToTag($tag);
}

$sortBy = $request->request->get('sort_by');
$sortOrder = $request->request->get('sort_order');

$tagUpdateStruct = new TagUpdateStruct();
$tagUpdateStruct->sortField = TagSortField::from((string) $sortBy);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use ::tryFrom here, catch the exception and throw BadRequestHttpException. Otherwise, transfering an invalid value would get you error 500.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did so here: e16f73f

$tagUpdateStruct->sortOrder = TagSortOrder::from((string) $sortOrder);

$this->tagsService->updateTag($tag, $tagUpdateStruct);

return $this->redirectToTag($tag);
}

/**
* This method is called for delete tag or synonym action.
* It shows a confirmation view.
Expand Down
9 changes: 6 additions & 3 deletions bundle/Core/Pagination/Pagerfanta/ChildrenTagsAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
final class ChildrenTagsAdapter implements AdapterInterface, TagAdapterInterface
{
private ?Tag $tag = null;

private int $nbResults;

public function __construct(private TagsService $tagsService) {}
public function __construct(private readonly TagsService $tagsService) {}

public function setTag(Tag $tag): void
{
Expand All @@ -30,7 +29,11 @@ public function getNbResults(): int

public function getSlice($offset, $length): iterable
{
$childrenTags = $this->tagsService->loadTagChildren($this->tag, $offset, $length);
$childrenTags = $this->tagsService->loadTagChildren(
$this->tag,
$offset,
$length,
);

$this->nbResults = $this->nbResults ?? $this->tagsService->getTagChildrenCount($this->tag);

Expand Down
13 changes: 7 additions & 6 deletions bundle/Core/Persistence/Legacy/Tags/Gateway/DoctrineDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,8 @@ public function getChildren(int $tagId, int $offset = 0, int $limit = -1, ?array
$tagIdsQuery->expr()->eq('eztags.main_tag_id', 0),
),
)->setParameter('parent_id', $tagId, Types::INTEGER)
->orderBy('eztags.keyword', 'ASC')
->setFirstResult($offset)
->setMaxResults($limit > 0 ? $limit : PHP_INT_MAX);
->setFirstResult($offset)
->setMaxResults($limit > 0 ? $limit : PHP_INT_MAX);

$statement = $tagIdsQuery->execute();

Expand All @@ -160,8 +159,7 @@ public function getChildren(int $tagId, int $offset = 0, int $limit = -1, ?array
[':id'],
),
)
->setParameter('id', $tagIds, Connection::PARAM_INT_ARRAY)
->orderBy('eztags_keyword.keyword', 'ASC');
->setParameter('id', $tagIds, Connection::PARAM_INT_ARRAY);

return $query->execute()->fetchAll(FetchMode::ASSOCIATIVE);
}
Expand Down Expand Up @@ -847,7 +845,7 @@ public function deleteTag(int $tagId): void
private function createTagIdsQuery(?array $translations = null, bool $useAlwaysAvailable = true): QueryBuilder
{
$query = $this->connection->createQueryBuilder();
$query->select('DISTINCT eztags.id, eztags.keyword')
$query->select('DISTINCT eztags.id, eztags.keyword, eztags.modified, eztags.priority')
->from('eztags', 'eztags')
// @todo: Joining with eztags_keyword is probably a VERY bad way to gather that information
// since it creates an additional cartesian product with translations.
Expand Down Expand Up @@ -930,6 +928,9 @@ private function createTagFindQuery(?array $translations = null, bool $useAlways
'eztags.remote_id',
'eztags.main_language_id',
'eztags.language_mask',
'eztags.priority',
'eztags.sortField',
'eztags.sortOrder',
// Tag keywords
'eztags_keyword.keyword',
'eztags_keyword.locale',
Expand Down
8 changes: 8 additions & 0 deletions bundle/Core/Persistence/Legacy/Tags/Mapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

use Ibexa\Contracts\Core\Persistence\Content\Language\Handler as LanguageHandler;
use Ibexa\Core\Persistence\Legacy\Content\Language\MaskGenerator as LanguageMaskGenerator;
use Netgen\TagsBundle\API\Repository\Values\Enums\TagSortField;
use Netgen\TagsBundle\API\Repository\Values\Enums\TagSortOrder;
use Netgen\TagsBundle\SPI\Persistence\Tags\Tag;
use Netgen\TagsBundle\SPI\Persistence\Tags\TagInfo;

Expand Down Expand Up @@ -35,6 +37,9 @@ public function createTagInfoFromRow(array $row): TagInfo
$tagInfo->alwaysAvailable = (bool) ((int) $row['language_mask'] & 1);
$tagInfo->mainLanguageCode = $this->languageHandler->load($row['main_language_id'])->languageCode;
$tagInfo->languageIds = $this->languageMaskGenerator->extractLanguageIdsFromMask((int) $row['language_mask']);
$tagInfo->priority = (int) $row['priority'];
$tagInfo->sortField = TagSortField::from($row['sortField']);
$tagInfo->sortOrder = TagSortOrder::from($row['sortOrder']);

return $tagInfo;
}
Expand All @@ -60,6 +65,9 @@ public function extractTagListFromRows(array $rows): array
$tag->alwaysAvailable = (bool) ((int) $row['language_mask'] & 1);
$tag->mainLanguageCode = $this->languageHandler->load($row['main_language_id'])->languageCode;
$tag->languageIds = $this->languageMaskGenerator->extractLanguageIdsFromMask((int) $row['language_mask']);
$tag->priority = (int) $row['priority'];
$tag->sortField = TagSortField::from($row['sortField']);
$tag->sortOrder = TagSortOrder::from($row['sortOrder']);
$tagList[$tagId] = $tag;
}

Expand Down
3 changes: 3 additions & 0 deletions bundle/Core/Repository/TagsMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ public function buildTagDomainList(array $spiTags, array $prioritizedLanguages =
'mainLanguageCode' => $spiTag->mainLanguageCode,
'languageCodes' => $languageCodes,
'prioritizedLanguageCode' => $prioritizedLanguageCode,
'priority' => $spiTag->priority,
'sortField' => $spiTag->sortField,
'sortOrder' => $spiTag->sortOrder,
],
);
}
Expand Down
2 changes: 2 additions & 0 deletions bundle/Core/Repository/TagsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,8 @@ public function updateTag(Tag $tag, TagUpdateStruct $tagUpdateStruct): Tag
$updateStruct->remoteId = trim($tagUpdateStruct->remoteId ?? $spiTag->remoteId);
$updateStruct->mainLanguageCode = $mainLanguageCode;
$updateStruct->alwaysAvailable = $tagUpdateStruct->alwaysAvailable ?? $spiTag->alwaysAvailable;
$updateStruct->sortField = $tagUpdateStruct->sortField ?? $spiTag->sortField;
$updateStruct->sortOrder = $tagUpdateStruct->sortOrder ?? $spiTag->sortOrder;

$this->repository->beginTransaction();

Expand Down
5 changes: 5 additions & 0 deletions bundle/Resources/config/routing/admin/tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ netgen_tags_admin_tag_update_select:
controller: netgen_tags.admin.controller.tag:updateTagSelectAction
methods: [GET, POST]

netgen_tags_admin_tag_update_sort:
path: /{tagId}/update/sort
controller: netgen_tags.admin.controller.tag:updateTagSortAction
methods: [POST]

netgen_tags_admin_tag_update:
path: /{tagId}/update/{languageCode}
controller: netgen_tags.admin.controller.tag:updateTagAction
Expand Down
24 changes: 23 additions & 1 deletion bundle/Resources/public/admin/css/style.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions bundle/Resources/sql/mysql/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ CREATE TABLE `eztags` (
`remote_id` varchar(100) NOT NULL default '',
`main_language_id` int(11) NOT NULL default '0',
`language_mask` int(11) NOT NULL default '0',
`priority` int(11) NOT NULL default '0',
PRIMARY KEY ( `id` ),
KEY `idx_eztags_keyword` ( `keyword`(191) ),
KEY `idx_eztags_keyword_id` ( `keyword`(191), `id` ),
Expand Down
1 change: 1 addition & 0 deletions bundle/Resources/sql/postgresql/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ CREATE TABLE eztags (
remote_id varchar(100) NOT NULL default '',
main_language_id integer not null default 0,
language_mask integer not null default 0,
priority integer not null default 0,
PRIMARY KEY (id),
CONSTRAINT idx_eztags_remote_id UNIQUE (remote_id)
);
Expand Down
7 changes: 7 additions & 0 deletions bundle/Resources/translations/netgen_tags_admin.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ tag.remote_id: 'Remote ID'
tag.tag_name: 'Keyword'
tag.translations: 'Translations'
tag.modified: 'Modified'
tag.priority: 'Priority'
tag.main_tag: 'Main tag'
tag.parent_tag: 'Parent tag'

Expand Down Expand Up @@ -43,6 +44,12 @@ tag.children.no_children: 'No tags found'
tag.subtree_limitations.title: 'Subtree limitations'
tag.subtree_limitations.no_limitations: 'No subtree limitations'

tag.subitems.title: 'Subitems'
tag.subitems.sort_by: 'Sort by'
tag.subitems.sort_order: 'Sort order'
tag.subitems.sort_order.ascending: 'Ascending'
tag.subitems.sort_order.descending: 'Descending'

tag.related_content.title: 'List of content related to tag'
tag.related_content.filter.content_type: 'Content type filter'
tag.related_content.filter.sort: 'Sort'
Expand Down
7 changes: 7 additions & 0 deletions bundle/Resources/translations/netgen_tags_admin.fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ tag.remote_id: 'Identification à distance'
tag.tag_name: 'Mot-clé'
tag.translations: 'Traductions'
tag.modified: 'Modifié'
tag.priority: 'Priorité'
tag.main_tag: 'Tag principale'
tag.parent_tag: 'Tag parent'

Expand Down Expand Up @@ -43,6 +44,12 @@ tag.children.no_children: 'Pas de tags trouvés'
tag.subtree_limitations.title: 'Limites des sous-arbres'
tag.subtree_limitations.no_limitations: 'Aucune limite de sous-arbre'

tag.subitems.title: 'Sous-éléments'
tag.subitems.sort_by: 'Trier par'
tag.subitems.sort_order: 'Ordre de tri'
tag.subitems.sort_order.ascending: 'Ascendant'
tag.subitems.sort_order.descending: 'Descendant'

tag.related_content.title: 'Liste des contenus liés au tag'

tag.add.title: 'Nouveau tag'
Expand Down
6 changes: 6 additions & 0 deletions bundle/Resources/views/admin/tag/children.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<th>{{ 'tag.tag_name'|trans }}</th>
<th>{{ 'tag.translations'|trans }}</th>
<th>{{ 'tag.modified'|trans }}</th>
<th>{{ 'tag.priority'|trans }}</th>
</tr>
</thead>
<tbody>
Expand All @@ -48,6 +49,7 @@
{% endfor %}
</td>
<td>{{ child.modificationDate|date }}</td>
<td>{{ child.priority }}</td>
</tr>
{% endfor %}
</tbody>
Expand All @@ -71,6 +73,10 @@
{% endif %}
</div>
</form>

{% if tag is defined and not tag.isSynonym %}
{% include '@NetgenTags/admin/tag/sort_children_tags.html.twig' %}
{% endif %}
{% else %}
<p>{{ 'tag.children.no_children'|trans }}</p>
{% endif %}
27 changes: 27 additions & 0 deletions bundle/Resources/views/admin/tag/sort_children_tags.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{% trans_default_domain 'netgen_tags_admin' %}

<form method="post" action="{{ path('netgen_tags_admin_tag_update_sort', {'tagId': tag.id}) }}" class="ng-tags-sort">
<div class="sorting">
<div class="sort-dropdown">
<label for="sort_by">{{ 'tag.subitems.sort_by'|trans }}:</label>
<select id="sort_by" name="sort_by">
<option value="id" {% if tag.sortField.value == 'id' %}selected="selected"{% endif %}>{{ 'tag.tag_id'|trans }}</option>
<option value="keyword" {% if tag.sortField.value == 'keyword' %}selected="selected"{% endif %}>{{ 'tag.tag_name'|trans }}</option>
<option value="modified" {% if tag.sortField.value == 'modified' %}selected="selected"{% endif %}>{{ 'tag.modified'|trans }}</option>
<option value="priority" {% if tag.sortField.value == 'priority' %}selected="selected"{% endif %}>{{ 'tag.priority'|trans }}</option>
</select>
</div>

<div class="sort-dropdown">
<label for="sort_order">{{ 'tag.subitems.sort_order'|trans }}:</label>
<select id="sort_order" name="sort_order">
<option value="asc" {% if tag.sortOrder.value == 'asc' %}selected="selected"{% endif %}>{{ 'tag.subitems.sort_order.ascending'|trans }}</option>
<option value="desc" {% if tag.sortOrder.value == 'desc' %}selected="selected"{% endif %}>{{ 'tag.subitems.sort_order.descending'|trans }}</option>
</select>
</div>
</div>

<input type="hidden" name="_csrf_token" value="{{ csrf_token('netgen_tags_admin') }}" />

<input type="submit" class="tags-btn tags-btn-primary" value="{{ 'tag.related_content.filter.button.submit'|trans }}" />
</form>
Loading