forked from mirror/Part-DB.Part-DB-server
Added additional filters to attachment datatable
This commit is contained in:
parent
48be9a8098
commit
f146d88aa5
3 changed files with 17 additions and 0 deletions
|
@ -45,6 +45,9 @@ class AttachmentFilter implements FilterInterface
|
||||||
public readonly DateTimeConstraint $lastModified;
|
public readonly DateTimeConstraint $lastModified;
|
||||||
public readonly DateTimeConstraint $addedDate;
|
public readonly DateTimeConstraint $addedDate;
|
||||||
|
|
||||||
|
public readonly TextConstraint $originalFileName;
|
||||||
|
public readonly TextConstraint $externalLink;
|
||||||
|
|
||||||
|
|
||||||
public function __construct(NodesListBuilder $nodesListBuilder)
|
public function __construct(NodesListBuilder $nodesListBuilder)
|
||||||
{
|
{
|
||||||
|
@ -55,6 +58,9 @@ class AttachmentFilter implements FilterInterface
|
||||||
$this->lastModified = new DateTimeConstraint('attachment.lastModified');
|
$this->lastModified = new DateTimeConstraint('attachment.lastModified');
|
||||||
$this->addedDate = new DateTimeConstraint('attachment.addedDate');
|
$this->addedDate = new DateTimeConstraint('attachment.addedDate');
|
||||||
$this->showInTable = new BooleanConstraint('attachment.show_in_table');
|
$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
|
public function apply(QueryBuilder $queryBuilder): void
|
||||||
|
|
|
@ -100,6 +100,15 @@ class AttachmentFilterType extends AbstractType
|
||||||
'label' => 'attachment.edit.show_in_table'
|
'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, [
|
$builder->add('lastModified', DateTimeConstraintType::class, [
|
||||||
'label' => 'lastModified'
|
'label' => 'lastModified'
|
||||||
]);
|
]);
|
||||||
|
|
|
@ -34,6 +34,8 @@
|
||||||
{{ form_row(filterForm.attachmentType) }}
|
{{ form_row(filterForm.attachmentType) }}
|
||||||
{{ form_row(filterForm.targetType) }}
|
{{ form_row(filterForm.targetType) }}
|
||||||
{{ form_row(filterForm.showInTable) }}
|
{{ form_row(filterForm.showInTable) }}
|
||||||
|
{{ form_row(filterForm.originalFileName) }}
|
||||||
|
{{ form_row(filterForm.externalLink) }}
|
||||||
{{ form_row(filterForm.lastModified) }}
|
{{ form_row(filterForm.lastModified) }}
|
||||||
{{ form_row(filterForm.addedDate) }}
|
{{ form_row(filterForm.addedDate) }}
|
||||||
{{ form_row(filterForm.dbId) }}
|
{{ form_row(filterForm.dbId) }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue