mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-06 23:39:51 +01:00
Added additional filters to attachment datatable
This commit is contained in:
@@ -45,6 +45,9 @@ class AttachmentFilter implements FilterInterface
|
||||
public readonly DateTimeConstraint $lastModified;
|
||||
public readonly DateTimeConstraint $addedDate;
|
||||
|
||||
public readonly TextConstraint $originalFileName;
|
||||
public readonly TextConstraint $externalLink;
|
||||
|
||||
|
||||
public function __construct(NodesListBuilder $nodesListBuilder)
|
||||
{
|
||||
@@ -55,6 +58,9 @@ class AttachmentFilter implements FilterInterface
|
||||
$this->lastModified = new DateTimeConstraint('attachment.lastModified');
|
||||
$this->addedDate = new DateTimeConstraint('attachment.addedDate');
|
||||
$this->showInTable = new BooleanConstraint('attachment.show_in_table');
|
||||
$this->originalFileName = new TextConstraint('attachment.original_filename');
|
||||
$this->externalLink = new TextConstraint('attachment.external_path');
|
||||
|
||||
}
|
||||
|
||||
public function apply(QueryBuilder $queryBuilder): void
|
||||
|
||||
@@ -100,6 +100,15 @@ class AttachmentFilterType extends AbstractType
|
||||
'label' => 'attachment.edit.show_in_table'
|
||||
]);
|
||||
|
||||
$builder->add('originalFileName', TextConstraintType::class, [
|
||||
'label' => 'attachment.file_name'
|
||||
]);
|
||||
|
||||
$builder->add('externalLink', TextConstraintType::class, [
|
||||
'label' => 'attachment.table.external_link'
|
||||
]);
|
||||
|
||||
|
||||
$builder->add('lastModified', DateTimeConstraintType::class, [
|
||||
'label' => 'lastModified'
|
||||
]);
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
{{ form_row(filterForm.attachmentType) }}
|
||||
{{ form_row(filterForm.targetType) }}
|
||||
{{ form_row(filterForm.showInTable) }}
|
||||
{{ form_row(filterForm.originalFileName) }}
|
||||
{{ form_row(filterForm.externalLink) }}
|
||||
{{ form_row(filterForm.lastModified) }}
|
||||
{{ form_row(filterForm.addedDate) }}
|
||||
{{ form_row(filterForm.dbId) }}
|
||||
|
||||
Reference in New Issue
Block a user