Skip to content

Commit

Permalink
Add new column storage_folder to sys_reactions table
Browse files Browse the repository at this point in the history
  • Loading branch information
sfroemkenjw committed Nov 5, 2024
1 parent 8ff7324 commit 2721023
Show file tree
Hide file tree
Showing 6 changed files with 154 additions and 103 deletions.
50 changes: 33 additions & 17 deletions Configuration/TCA/Overrides/sys_reaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,46 @@
'icon' => \JWeiland\Events2\Reaction\ImportEventsReaction::getIconIdentifier(),
]
);
}

$GLOBALS['TCA']['sys_reaction']['palettes']['setStorage'] = [
'label' => 'LLL:EXT:reactions/Resources/Private/Language/locallang_db.xlf:palette.additional',
'showitem' => 'storage_pid, impersonate_user',
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
'sys_reaction',
[
'storage_folder' => [
'label' => 'LLL:EXT:events2/Resources/Private/Language/locallang_db.xlf:sys_reactions.storage_folder',
'description' => 'LLL:EXT:events2/Resources/Private/Language/locallang_db.xlf:sys_reactions.storage_folder.description',
'config' => [
'type' => 'folder',
'required' => true,
'maxitems' => 1,
'size' => 1,
],
],
]
);

$GLOBALS['TCA']['sys_reaction']['palettes']['setStorage'] = [
'label' => 'LLL:EXT:reactions/Resources/Private/Language/locallang_db.xlf:palette.additional',
'showitem' => 'storage_pid, impersonate_user, --linebreak--, storage_folder',
];

$GLOBALS['TCA']['sys_reaction']['types'][\JWeiland\Events2\Reaction\ImportEventsReaction::getType()] = [
'showitem' => '
$GLOBALS['TCA']['sys_reaction']['types'][\JWeiland\Events2\Reaction\ImportEventsReaction::getType()] = [
'showitem' => '
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:general,
--palette--;;config,
--palette--;;setStorage,
--div--;LLL:EXT:core/Resources/Private/Language/Form/locallang_tabs.xlf:access,
--palette--;;access',
'columnsOverrides' => [
'storage_pid' => [
'config' => [
'required' => true,
'columnsOverrides' => [
'storage_pid' => [
'config' => [
'required' => true,
],
],
],
'impersonate_user' => [
'config' => [
'required' => true,
'impersonate_user' => [
'config' => [
'required' => true,
],
],
],
],
];
];
}
9 changes: 9 additions & 0 deletions Resources/Private/Language/de.locallang_db.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,15 @@
<source>Month</source>
<target>Monat</target>
</trans-unit>

<trans-unit id="sys_reactions.storage_folder">
<source>Storage location for images</source>
<target>Speicherort für Bilder</target>
</trans-unit>
<trans-unit id="sys_reactions.storage_folder.description">
<source>Select a storage location for the images to be imported</source>
<target>Wähle einen Speicherort für die zu importierenden Bilder</target>
</trans-unit>
</body>
</file>
</xliff>
6 changes: 6 additions & 0 deletions Resources/Private/Language/locallang_db.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,12 @@
<source>Month</source>
</trans-unit>

<trans-unit id="sys_reactions.storage_folder">
<source>Storage location for images</source>
</trans-unit>
<trans-unit id="sys_reactions.storage_folder.description">
<source>Select a storage location for the images to be imported</source>
</trans-unit>
</body>
</file>
</xliff>
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"ext-dom": "*",
"ext-libxml": "*",
"sjbr/static-info-tables": "^12.4",
"typo3/cms-core": "^12.4.8"
"typo3/cms-core": "^12.4.8",
"typo3/cms-reactions": "^12.4.8"
},
"require-dev": {
"ergebnis/composer-normalize": "~2.42.0",
Expand Down
1 change: 1 addition & 0 deletions ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
'constraints' => [
'depends' => [
'typo3' => '12.4.8-12.4.99',
'reactions' => '12.4.8-12.4.99',
],
'conflicts' => [
],
Expand Down
188 changes: 103 additions & 85 deletions ext_tables.sql
Original file line number Diff line number Diff line change
@@ -1,139 +1,157 @@
#
# Table structure for table 'tx_events2_domain_model_event'
#
CREATE TABLE tx_events2_domain_model_event (
event_type varchar(255) DEFAULT '' NOT NULL,
top_of_list tinyint(1) unsigned DEFAULT '0' NOT NULL,
title varchar(255) DEFAULT '' NOT NULL,
path_segment varchar(2048) DEFAULT '' NOT NULL,
teaser varchar(255) DEFAULT '' NOT NULL,
event_begin int(11) DEFAULT '0' NOT NULL,
event_end int(11) DEFAULT '0' NOT NULL,
event_time int(11) unsigned DEFAULT '0',
same_day tinyint(1) unsigned DEFAULT '0' NOT NULL,
multiple_times int(11) unsigned DEFAULT '0' NOT NULL,
xth int(11) DEFAULT '0' NOT NULL,
weekday int(11) DEFAULT '0' NOT NULL,
different_times int(11) unsigned DEFAULT '0' NOT NULL,
each_weeks int(11) DEFAULT '0' NOT NULL,
each_months int(11) DEFAULT '0' NOT NULL,
recurring_end int(11) DEFAULT '0' NOT NULL,
exceptions int(11) DEFAULT '0' NOT NULL,
detail_information text,
free_entry tinyint(1) unsigned DEFAULT '0' NOT NULL,
ticket_link varchar(11) DEFAULT '' NOT NULL,
days int(11) unsigned DEFAULT '0' NOT NULL,
location int(11) unsigned DEFAULT '0',
organizers int(11) unsigned DEFAULT '0',
images int(11) unsigned DEFAULT '0',
video_link varchar(11) DEFAULT '' NOT NULL,
download_links varchar(255) DEFAULT '' NOT NULL,
import_id varchar(255) DEFAULT '' NOT NULL,
CREATE TABLE tx_events2_domain_model_event
(
event_type varchar(255) DEFAULT '' NOT NULL,
top_of_list tinyint(1) unsigned DEFAULT '0' NOT NULL,
title varchar(255) DEFAULT '' NOT NULL,
path_segment varchar(2048) DEFAULT '' NOT NULL,
teaser varchar(255) DEFAULT '' NOT NULL,
event_begin int(11) DEFAULT '0' NOT NULL,
event_end int(11) DEFAULT '0' NOT NULL,
event_time int(11) unsigned DEFAULT '0',
same_day tinyint(1) unsigned DEFAULT '0' NOT NULL,
multiple_times int(11) unsigned DEFAULT '0' NOT NULL,
xth int(11) DEFAULT '0' NOT NULL,
weekday int(11) DEFAULT '0' NOT NULL,
different_times int(11) unsigned DEFAULT '0' NOT NULL,
each_weeks int(11) DEFAULT '0' NOT NULL,
each_months int(11) DEFAULT '0' NOT NULL,
recurring_end int(11) DEFAULT '0' NOT NULL,
exceptions int(11) DEFAULT '0' NOT NULL,
detail_information text,
free_entry tinyint(1) unsigned DEFAULT '0' NOT NULL,
ticket_link varchar(11) DEFAULT '' NOT NULL,
days int(11) unsigned DEFAULT '0' NOT NULL,
location int(11) unsigned DEFAULT '0',
organizers int(11) unsigned DEFAULT '0',
images int(11) unsigned DEFAULT '0',
video_link varchar(11) DEFAULT '' NOT NULL,
download_links varchar(255) DEFAULT '' NOT NULL,
import_id varchar(255) DEFAULT '' NOT NULL,

KEY path_segment (path_segment(185), uid)
KEY path_segment (path_segment(185), uid)
);

#
# Table structure for table 'tx_events2_domain_model_day'
#
CREATE TABLE tx_events2_domain_model_day (
day int(11) unsigned DEFAULT '0' NOT NULL,
day_time int(11) unsigned DEFAULT '0' NOT NULL,
sort_day_time int(11) unsigned DEFAULT '0' NOT NULL,
same_day_time int(11) unsigned DEFAULT '0' NOT NULL,
is_removed_date tinyint(1) unsigned DEFAULT '0' NOT NULL,
event int(11) unsigned DEFAULT '0' NOT NULL,
CREATE TABLE tx_events2_domain_model_day
(
day int(11) unsigned DEFAULT '0' NOT NULL,
day_time int(11) unsigned DEFAULT '0' NOT NULL,
sort_day_time int(11) unsigned DEFAULT '0' NOT NULL,
same_day_time int(11) unsigned DEFAULT '0' NOT NULL,
is_removed_date tinyint(1) unsigned DEFAULT '0' NOT NULL,
event int(11) unsigned DEFAULT '0' NOT NULL,

KEY keyForDay (day),
KEY booster (event,pid,hidden,day,sort_day_time,day_time,tstamp,crdate,uid)
KEY keyForDay (day),
KEY booster (event,pid,hidden,day,sort_day_time,day_time,tstamp,crdate,uid)
);

#
# Table structure for table 'tx_events2_domain_model_time'
#
CREATE TABLE tx_events2_domain_model_time (
type varchar(50) DEFAULT '' NOT NULL,
weekday varchar(10) DEFAULT '' NOT NULL,
time_begin varchar(5) DEFAULT '' NOT NULL,
time_entry varchar(5) DEFAULT '' NOT NULL,
duration varchar(5) DEFAULT '' NOT NULL,
time_end varchar(5) DEFAULT '' NOT NULL,
event int(11) unsigned DEFAULT '0' NOT NULL,
exception int(11) unsigned DEFAULT '0' NOT NULL,
CREATE TABLE tx_events2_domain_model_time
(
type varchar(50) DEFAULT '' NOT NULL,
weekday varchar(10) DEFAULT '' NOT NULL,
time_begin varchar(5) DEFAULT '' NOT NULL,
time_entry varchar(5) DEFAULT '' NOT NULL,
duration varchar(5) DEFAULT '' NOT NULL,
time_end varchar(5) DEFAULT '' NOT NULL,
event int(11) unsigned DEFAULT '0' NOT NULL,
exception int(11) unsigned DEFAULT '0' NOT NULL,

KEY eventType (event,type)
KEY eventType (event,type)
);

#
# Table structure for table 'tx_events2_domain_model_exception'
#
CREATE TABLE tx_events2_domain_model_exception (
exception_type varchar(255) DEFAULT '' NOT NULL,
exception_date int(11) DEFAULT '0' NOT NULL,
exception_time int(11) unsigned DEFAULT '0',
exception_details text,
show_anyway tinyint(1) unsigned DEFAULT '0' NOT NULL,
mark_as varchar(255) DEFAULT '' NOT NULL,
event int(11) unsigned DEFAULT '0' NOT NULL,
CREATE TABLE tx_events2_domain_model_exception
(
exception_type varchar(255) DEFAULT '' NOT NULL,
exception_date int(11) DEFAULT '0' NOT NULL,
exception_time int(11) unsigned DEFAULT '0',
exception_details text,
show_anyway tinyint(1) unsigned DEFAULT '0' NOT NULL,
mark_as varchar(255) DEFAULT '' NOT NULL,
event int(11) unsigned DEFAULT '0' NOT NULL,

KEY events (event)
KEY events (event)
);

#
# Table structure for table 'tx_events2_domain_model_location'
#
CREATE TABLE tx_events2_domain_model_location (
location varchar(255) DEFAULT '' NOT NULL,
street varchar(255) DEFAULT '' NOT NULL,
house_number varchar(10) DEFAULT '' NOT NULL,
zip varchar(10) DEFAULT '' NOT NULL,
city varchar(255) DEFAULT '' NOT NULL,
country int(11) unsigned DEFAULT '0',
link int(11) unsigned DEFAULT '0'
CREATE TABLE tx_events2_domain_model_location
(
location varchar(255) DEFAULT '' NOT NULL,
street varchar(255) DEFAULT '' NOT NULL,
house_number varchar(10) DEFAULT '' NOT NULL,
zip varchar(10) DEFAULT '' NOT NULL,
city varchar(255) DEFAULT '' NOT NULL,
country int(11) unsigned DEFAULT '0',
link int(11) unsigned DEFAULT '0'
);

#
# Table structure for table 'tx_events2_domain_model_organizer'
#
CREATE TABLE tx_events2_domain_model_organizer (
organizer varchar(255) DEFAULT '' NOT NULL,
hide_in_filter tinyint(1) DEFAULT '0' NOT NULL,
link int(11) unsigned DEFAULT '0'
CREATE TABLE tx_events2_domain_model_organizer
(
organizer varchar(255) DEFAULT '' NOT NULL,
hide_in_filter tinyint(1) DEFAULT '0' NOT NULL,
link int(11) unsigned DEFAULT '0'
);

#
# Table structure for table 'tx_events2_domain_model_link'
#
CREATE TABLE tx_events2_domain_model_link (
title varchar(255) DEFAULT '' NOT NULL,
link varchar(255) DEFAULT '' NOT NULL
CREATE TABLE tx_events2_domain_model_link
(
title varchar(255) DEFAULT '' NOT NULL,
link varchar(255) DEFAULT '' NOT NULL
);

#
# Table structure for table 'tx_events2_domain_model_holiday'
#
CREATE TABLE tx_events2_domain_model_holiday (
title varchar(255) DEFAULT '' NOT NULL,
day int(2) unsigned DEFAULT '0' NOT NULL,
month int(2) unsigned DEFAULT '0' NOT NULL
CREATE TABLE tx_events2_domain_model_holiday
(
title varchar(255) DEFAULT '' NOT NULL,
day int(2) unsigned DEFAULT '0' NOT NULL,
month int(2) unsigned DEFAULT '0' NOT NULL
);

#
# Table structure for table 'tx_events2_event_organizer_mm'
#
CREATE TABLE tx_events2_event_organizer_mm (
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
sorting int(11) unsigned DEFAULT '0' NOT NULL,
sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL,
CREATE TABLE tx_events2_event_organizer_mm
(
uid_local int(11) unsigned DEFAULT '0' NOT NULL,
uid_foreign int(11) unsigned DEFAULT '0' NOT NULL,
sorting int(11) unsigned DEFAULT '0' NOT NULL,
sorting_foreign int(11) unsigned DEFAULT '0' NOT NULL,

KEY uid_local (uid_local),
KEY uid_foreign (uid_foreign)
KEY uid_local (uid_local),
KEY uid_foreign (uid_foreign)
);

#
# Table structure for table 'fe_users'
#
CREATE TABLE fe_users (
tx_events2_organizer int(11) unsigned DEFAULT '0' NOT NULL
CREATE TABLE fe_users
(
tx_events2_organizer int(11) unsigned DEFAULT '0' NOT NULL
);

#
# Table structure for table 'sys_reaction'
#
CREATE TABLE sys_reaction
(
storage_folder varchar(255) DEFAULT '' NOT NULL
);

0 comments on commit 2721023

Please sign in to comment.