feat: additional text field in travel info

This commit is contained in:
Björn Fromme
2024-12-19 14:42:06 +01:00
parent a9d9b0caa4
commit c6e128e204
4 changed files with 33 additions and 3 deletions
@@ -39,6 +39,11 @@ class Travelinfo extends AbstractEntity
*/
protected $introText;
/**
* @var string
*/
protected $busInfoText;
/**
* @var string
*/
@@ -176,6 +181,18 @@ class Travelinfo extends AbstractEntity
return $this;
}
public function getBusInfoText()
{
return $this->busInfoText;
}
public function setBusInfoText($busInfoText)
{
$this->busInfoText = $busInfoText;
return $this;
}
public function getFooterText()
{
return $this->footerText;
@@ -29,9 +29,9 @@ return [
'palettes' => [
'basics' => ['showitem' => 'title,path_segment,--linebreak--,product,hide_address,--linebreak--,links,
--linebreak--,teasers'],
'text' => ['showitem' => 'subline,headline,--linebreak--,intro_text,--linebreak--,footer_text,--linebreak--,
self_arranged_text,--linebreak--,additional_info,--linebreak--,important_phone_numbers,--linebreak--,
important_links'],
'text' => ['showitem' => 'subline,headline,--linebreak--,intro_text,--linebreak--, bus_info_text,--linebreak--,
footer_text,--linebreak--,self_arranged_text,--linebreak--,additional_info,
--linebreak--,important_phone_numbers,--linebreak--,important_links'],
'images' => ['showitem' => 'header_image,--linebreak--,footer_image'],
],
'columns' => [
@@ -237,6 +237,17 @@ return [
'enableRichtext' => true,
]
],
'bus_info_text' => [
'exclude' => false,
'label' => 'Businfo',
'config' => [
'type' => 'text',
'cols' => 40,
'rows' => 3,
'eval' => 'trim',
'enableRichtext' => true,
]
],
'footer_text' => [
'exclude' => false,
'label' => 'Footertext',
@@ -1367,6 +1367,7 @@ CREATE TABLE tx_epproducts_domain_model_travelinfo
headline varchar(255) DEFAULT '' NOT NULL,
subline varchar(255) DEFAULT '' NOT NULL,
intro_text text DEFAULT '0' NOT NULL,
bus_info_text text DEFAULT '0' NOT NULL,
footer_text text DEFAULT '0' NOT NULL,
self_arranged_text text DEFAULT '0' NOT NULL,
additional_info text DEFAULT '0' NOT NULL,
@@ -257,6 +257,7 @@
<p>
Bitte findet euch mindestens <strong>20 Minuten vor Abfahrt</strong> an der gebuchten Haltestelle ein.
</p>
{travelinfo.busInfoText -> f:format.html()}
<table class="w-full bg-zinc-200 text-zinc-800 text-xs md:text-base mb-4">
<tr>
<th class="border-r border-white/50 px-2 py-1 md:p-2 text-left text-sm md:text-base">