Merge branch 'asset-mapper' of https://git.thomas-peterson.de/boonkerz/printshopcreator into asset-mapper
Some checks failed
Gitea Actions / Run-Tests-On-Arm64 (push) Failing after 18s
Gitea Actions / Run-Tests-On-Amd64 (push) Failing after 3m57s

This commit is contained in:
Thomas Peterson 2025-04-07 09:27:19 +02:00
commit f9ce89f6e7
8 changed files with 39 additions and 6 deletions

View File

@ -32,6 +32,7 @@ class Shop
public $subTitle;
public $keywords;
public $description;
public $templateCopyright;
public $copyright;
public $author;
public $private;

View File

@ -14,5 +14,6 @@ Subtitle: Untertitel
NoIntern: Nr. Intern
Producttype: Produkttyp
Productgroups: Produktgruppen
Mainproduct: Hauptprodukt
Mainproduct: H
Private: P
Filter: Filtern

View File

@ -75,7 +75,8 @@
<th>{{ knp_pagination_sortable(pagination, 'NoIntern'|trans, 'product.nrIntern') }}</th>
<th>{{ knp_pagination_sortable(pagination, 'Producttype'|trans, 'product.type') }}</th>
<th>{{ "Productgroups"|trans }}</th>
<th>{{ 'Mainproduct'|trans }}</th>
<th title="Hauptprodukt">{{ 'Mainproduct'|trans }}</th>
<th title="Private">{{ 'Private'|trans }}</th>
<th></th>
</tr>
</thead>
@ -96,6 +97,7 @@
<td>{{ product.type|productType }}</td>
<td>{% for productGroup in product.productGroups %}{{ productGroup.title }}{% if loop.last != true %}, {% endif %}{% endfor %}</td>
<td>{% if product.originalproduct == 0 %}<span class="badge bg-success">{{ 'Yes'|trans }}</span>{% else %}<span class="badge bg-warning">{{ 'No'|trans }}</span>{% endif %}</td>
<td>{% if product.private %}<span class="badge bg-success">{{ 'Yes'|trans }}</span>{% else %}<span class="badge bg-warning">{{ 'No'|trans }}</span>{% endif %}</td>
<td>
<a href="{{ path("backend_production_product_edit", {uuid: product.uuid}) }}" class="btn btn-info btn-sm"><span class="fa fa-edit"></span></a>
<a href="{{ path("psc_shop_product_backend_edit_copy", {uuid: product.uuid}) }}" class="btn btn-warning btn-sm"><span class="fa fa-copy"></span></a>

View File

@ -80,9 +80,9 @@ class SettingsController extends AbstractController
) {
$customFields = $fieldService->getFields(\PSC\System\PluginBundle\Form\Interfaces\Field::Shop);
$customGroups = $fieldService->getGroups(\PSC\System\PluginBundle\Form\Interfaces\Field::Shop);
/** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */
/** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */
$selectedShop = $shopService->getSelectedShop();
/** @var Shop $shop */
/** @var Shop $shop */
$shop = $documentManager
->getRepository('PSC\Shop\EntityBundle\Document\Shop')
->findOneBy(array('uid' => (string)$selectedShop->getUid()));
@ -99,6 +99,7 @@ class SettingsController extends AbstractController
$shop->productSortDir = $selectedShop->getProductSortDir();
$shop->title = $selectedShop->getTitle();
$shop->subTitle = $selectedShop->getSubTitle();
$shop->templateCopyright = $selectedShop->getTemplateCopyright();
$shop->keywords = $selectedShop->getKeywords();
$shop->description = $selectedShop->getDescription();
$shop->deleted = $selectedShop->isDeleted();
@ -149,6 +150,7 @@ class SettingsController extends AbstractController
$selectedShop->setLogo1($shop->logo1);
$selectedShop->setLogo2($shop->logo2);
$selectedShop->setSitemap($shop->sitemap);
$selectedShop->setTemplateCopyright($shop->templateCopyright);
$selectedShop->setRobots($shop->robots);
$selectedShop->setTitle($shop->title);
$selectedShop->setSubTitle($shop->subTitle);
@ -220,7 +222,7 @@ class SettingsController extends AbstractController
{
/** @var \PSC\Shop\EntityBundle\Entity\Shop $selectedShop */
$selectedShop = $shopService->getSelectedShop();
/** @var Shop $shop */
/** @var Shop $shop */
$shop = $documentManager
->getRepository('PSC\Shop\EntityBundle\Document\Shop')
->findOneBy(array('uid' => (string)$selectedShop->getUid()));

View File

@ -483,6 +483,10 @@ class ShopSettingsType extends AbstractType
'label' => 'Text',
'required' => false,
))
->add('templateCopyright', TextareaType::class, array(
'label' => 'Text',
'required' => false,
))
->add('conditionsText', TextareaType::class, array(
'label' => 'Text',
'required' => false,

View File

@ -1685,6 +1685,9 @@
<li class="nav-item">
<a class="nav-link" data-bs-toggle="tab" href="#datenschutz" role="tab">Datenschutz</a>
</li>
<li class="nav-item">
<a class="nav-link" data-bs-toggle="tab" href="#templateCopyright" role="tab">Template / Copyright</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="impress" role="tabpanel">
@ -1723,6 +1726,18 @@
</div>
</div>
</div>
<div class="tab-pane" id="templateCopyright" role="tabpanel">
<div class="row">
<div class="col-md-12">
<div class="row mb-3">
<label class="col-md-1 form-control-label">{{ form_label(form.templateCopyright) }}</label>
<div class="col-md-11">
{{ form_widget(form.templateCopyright, {attr: {'class': 'form-control summernote'}}) }}
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane" id="datenschutz" role="tabpanel">
<div class="row">
<div class="col-md-12">

View File

@ -189,6 +189,8 @@ class GetPrice extends AbstractController
$tmpOpt = new Option();
$tmpOpt->id = $opt->getId();
$tmpOpt->name = $opt->getLabel();
$tmpOpt->prefix = $opt->getPrefix();
$tmpOpt->suffix = $opt->getSuffix();
$tmpOpt->valid = $opt->isValid();
$tmpOpt->selected = $opt->isSelected();
$output->colorDb[$option->getColorSystem()][] = $tmpOpt;

View File

@ -6,13 +6,19 @@ use OpenApi\Attributes as OA;
final class Option
{
#[OA\Property(type: 'string')]
public string $id;
#[OA\Property(type: 'string')]
public string $name;
#[OA\Property(type: 'string')]
public string $prefix;
#[OA\Property(type: 'string')]
public string $suffix;
#[OA\Property(type: 'string')]
public string $info;