From b1e2513efb191b1c1c23875bdcaff1ad0f555144 Mon Sep 17 00:00:00 2001 From: domjos1994 Date: Mon, 3 Sep 2018 18:45:51 +0200 Subject: [PATCH] solve bug 0000050 --- Classes/Domain/Model/TimelineEvent.php | 16 +++++++++++++ ...tx_timeline_domain_model_timelineevent.php | 24 ++++++++++++++++++- Resources/Private/Language/locallang_db.xlf | 3 +++ .../Private/Templates/Timeline/List.html | 6 +++++ ext_tables.sql | 1 + 5 files changed, 49 insertions(+), 1 deletion(-) diff --git a/Classes/Domain/Model/TimelineEvent.php b/Classes/Domain/Model/TimelineEvent.php index ac0126e..16e41bf 100644 --- a/Classes/Domain/Model/TimelineEvent.php +++ b/Classes/Domain/Model/TimelineEvent.php @@ -13,6 +13,13 @@ class TimelineEvent extends AbstractEntity { * */ protected $title = ''; + /** + * The link for the title + * + * @var string + * */ + protected $eventLink = ''; + /** * The description of the Event * @@ -36,6 +43,7 @@ class TimelineEvent extends AbstractEntity { public function __construct($title = '', $description = '', $startDate = null, $endDate = null) { $this->title = $title; + $this->eventLink = ""; $this->description = $description; $this->startDate = $startDate; $this->endDate = $endDate; @@ -48,6 +56,14 @@ public function setTitle($title) { public function getTitle() { return $this->title; } + + public function setEventLink($eventLink) { + $this->eventLink = $eventLink; + } + + public function getEventLink() { + return $this->eventLink; + } public function setDescription($description) { $this->description = $description; diff --git a/Configuration/TCA/tx_timeline_domain_model_timelineevent.php b/Configuration/TCA/tx_timeline_domain_model_timelineevent.php index ab3c71f..4c753e8 100644 --- a/Configuration/TCA/tx_timeline_domain_model_timelineevent.php +++ b/Configuration/TCA/tx_timeline_domain_model_timelineevent.php @@ -30,6 +30,28 @@ 'eval' => 'trim,required' ] ], + 'event_link' => [ + 'exclude' => 1, + 'label' => 'LLL:EXT:timeline/Resources/Private/Language/locallang_db.xlf:tx_timeline_domain_model_timelineevent.item_event_title', + 'config' => array( + 'type' => 'input', + 'wizards' => array( + 'link' => array( + 'type' => 'popup', + 'title' => 'Link', + 'icon' => 'link_popup.gif', + 'module' => array( + 'name' => 'wizard_element_browser', + 'urlParameters' => array( + 'mode' => 'wizard' + ) + ), + 'JSopenParams' => 'height=300,width=500,status=0,menubar=0,scrollbars=1' + ), + ), + 'softref' => 'typolink[linkList]', + ), + ], 'description' => [ 'label' => 'LLL:EXT:timeline/Resources/Private/Language/locallang_db.xlf:tx_timeline_domain_model_timelineevent.item_description', 'config' => [ @@ -55,7 +77,7 @@ ], ], 'types' => [ - '0' => ['showitem' => 'title, description, start_date, end_date'] + '0' => ['showitem' => 'title, event_link, description, start_date, end_date'] ] ]; diff --git a/Resources/Private/Language/locallang_db.xlf b/Resources/Private/Language/locallang_db.xlf index de64af1..ae94e78 100644 --- a/Resources/Private/Language/locallang_db.xlf +++ b/Resources/Private/Language/locallang_db.xlf @@ -16,6 +16,9 @@ Title + + Link zu den Details + Description diff --git a/Resources/Private/Templates/Timeline/List.html b/Resources/Private/Templates/Timeline/List.html index 10a6314..18c43bb 100644 --- a/Resources/Private/Templates/Timeline/List.html +++ b/Resources/Private/Templates/Timeline/List.html @@ -25,6 +25,12 @@

{event.description} + + +
+ More Details +
+

diff --git a/ext_tables.sql b/ext_tables.sql index 11903fd..2a40fe6 100644 --- a/ext_tables.sql +++ b/ext_tables.sql @@ -3,6 +3,7 @@ CREATE TABLE tx_timeline_domain_model_timelineevent ( pid int(11) DEFAULT '0' NOT NULL, title varchar(255) DEFAULT '' NOT NULL, + event_link text, description text NOT NULL, start_date int(11) DEFAULT '0' NOT NULL, end_date int(11) DEFAULT '0',