mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-19 10:24:50 +02:00
Added some basic DB fields for the new project system
This commit is contained in:
parent
8ae4e9fe05
commit
0c7ec9f0c7
36 changed files with 281 additions and 130 deletions
42
src/Form/AdminPages/ProjectAdminForm.php
Normal file
42
src/Form/AdminPages/ProjectAdminForm.php
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
/*
|
||||
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
|
||||
*
|
||||
* Copyright (C) 2019 - 2022 Jan Böhmer (https://github.com/jbtronics)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace App\Form\AdminPages;
|
||||
|
||||
use App\Entity\Base\AbstractNamedDBElement;
|
||||
use App\Form\Type\RichTextEditorType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ProjectAdminForm extends BaseEntityAdminForm
|
||||
{
|
||||
protected function additionalFormElements(FormBuilderInterface $builder, array $options, AbstractNamedDBElement $entity): void
|
||||
{
|
||||
$builder->add('description', RichTextEditorType::class, [
|
||||
'required' => false,
|
||||
'empty_data' => '',
|
||||
'label' => 'part.edit.description',
|
||||
'mode' => 'markdown-single_line',
|
||||
'attr' => [
|
||||
'placeholder' => 'part.edit.description.placeholder',
|
||||
'rows' => 2,
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
|
@ -25,7 +25,7 @@ use App\Entity\Attachments\AttachmentType;
|
|||
use App\Entity\Attachments\AttachmentTypeAttachment;
|
||||
use App\Entity\Attachments\CategoryAttachment;
|
||||
use App\Entity\Attachments\CurrencyAttachment;
|
||||
use App\Entity\Attachments\DeviceAttachment;
|
||||
use App\Entity\Attachments\ProjectAttachment;
|
||||
use App\Entity\Attachments\FootprintAttachment;
|
||||
use App\Entity\Attachments\GroupAttachment;
|
||||
use App\Entity\Attachments\LabelAttachment;
|
||||
|
@ -80,7 +80,7 @@ class AttachmentFilterType extends AbstractType
|
|||
'attachment_type.label' => AttachmentTypeAttachment::class,
|
||||
'category.label' => CategoryAttachment::class,
|
||||
'currency.label' => CurrencyAttachment::class,
|
||||
'device.label' => DeviceAttachment::class,
|
||||
'device.label' => ProjectAttachment::class,
|
||||
'footprint.label' => FootprintAttachment::class,
|
||||
'group.label' => GroupAttachment::class,
|
||||
'label_profile.label' => LabelAttachment::class,
|
||||
|
|
|
@ -23,8 +23,8 @@ namespace App\Form\Filters;
|
|||
use App\DataTables\Filters\LogFilter;
|
||||
use App\Entity\Attachments\Attachment;
|
||||
use App\Entity\Attachments\AttachmentType;
|
||||
use App\Entity\Devices\Device;
|
||||
use App\Entity\Devices\DevicePart;
|
||||
use App\Entity\ProjectSystem\Project;
|
||||
use App\Entity\ProjectSystem\ProjectBOMEntry;
|
||||
use App\Entity\LabelSystem\LabelProfile;
|
||||
use App\Entity\LogSystem\AbstractLogEntry;
|
||||
use App\Entity\LogSystem\CollectionElementDeleted;
|
||||
|
@ -135,8 +135,8 @@ class LogFilterType extends AbstractType
|
|||
'attachment.label' => AbstractLogEntry::targetTypeClassToID(Attachment::class),
|
||||
'attachment_type.label' => AbstractLogEntry::targetTypeClassToID(AttachmentType::class),
|
||||
'category.label' => AbstractLogEntry::targetTypeClassToID(Category::class),
|
||||
'device.label' => AbstractLogEntry::targetTypeClassToID(Device::class),
|
||||
'device_part.label' => AbstractLogEntry::targetTypeClassToID(DevicePart::class),
|
||||
'device.label' => AbstractLogEntry::targetTypeClassToID(Project::class),
|
||||
'device_part.label' => AbstractLogEntry::targetTypeClassToID(ProjectBOMEntry::class),
|
||||
'footprint.label' => AbstractLogEntry::targetTypeClassToID(Footprint::class),
|
||||
'group.label' => AbstractLogEntry::targetTypeClassToID(Group::class),
|
||||
'manufacturer.label' => AbstractLogEntry::targetTypeClassToID(Manufacturer::class),
|
||||
|
|
|
@ -45,7 +45,7 @@ use App\Entity\Parameters\AbstractParameter;
|
|||
use App\Entity\Parameters\AttachmentTypeParameter;
|
||||
use App\Entity\Parameters\CategoryParameter;
|
||||
use App\Entity\Parameters\CurrencyParameter;
|
||||
use App\Entity\Parameters\DeviceParameter;
|
||||
use App\Entity\Parameters\ProjectParameter;
|
||||
use App\Entity\Parameters\FootprintParameter;
|
||||
use App\Entity\Parameters\GroupParameter;
|
||||
use App\Entity\Parameters\ManufacturerParameter;
|
||||
|
@ -158,7 +158,7 @@ class ParameterType extends AbstractType
|
|||
AttachmentTypeParameter::class => 'attachment_type',
|
||||
CategoryParameter::class => 'category',
|
||||
CurrencyParameter::class => 'currency',
|
||||
DeviceParameter::class => 'device',
|
||||
ProjectParameter::class => 'device',
|
||||
FootprintParameter::class => 'footprint',
|
||||
GroupParameter::class => 'group',
|
||||
ManufacturerParameter::class => 'manufacturer',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue