mirror of
https://github.com/werkraum-media/events.git
synced 2024-11-14 05:16:10 +01:00
Allow an date to be marked as canceled
That has no effect, the info is just available from model. This can be used to display a canceled date in a different way, or render a notice. Relates: #8092
This commit is contained in:
parent
f111884299
commit
ca7340782b
6 changed files with 81 additions and 39 deletions
|
@ -20,6 +20,11 @@ class Date extends AbstractEntity
|
||||||
*/
|
*/
|
||||||
protected $end = null;
|
protected $end = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
protected $canceled = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \Wrm\Events\Domain\Model\Event
|
* @var \Wrm\Events\Domain\Model\Event
|
||||||
*/
|
*/
|
||||||
|
@ -64,6 +69,11 @@ class Date extends AbstractEntity
|
||||||
$this->end = $end;
|
$this->end = $end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isCanceled(): bool
|
||||||
|
{
|
||||||
|
return $this->canceled;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Event
|
* @return Event
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'ctrl' => [
|
'ctrl' => [
|
||||||
'title' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_date.xlf:tx_events_domain_model_date',
|
'title' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_date.xlf:tx_events_domain_model_date',
|
||||||
'label' => 'start',
|
'label' => 'start',
|
||||||
|
'label_alt' => 'end, canceled',
|
||||||
|
'label_alt_force' => true,
|
||||||
'tstamp' => 'tstamp',
|
'tstamp' => 'tstamp',
|
||||||
'crdate' => 'crdate',
|
'crdate' => 'crdate',
|
||||||
'cruser_id' => 'cruser_id',
|
'cruser_id' => 'cruser_id',
|
||||||
|
@ -20,7 +23,7 @@ return [
|
||||||
'iconfile' => 'EXT:events/Resources/Public/Icons/tx_events_domain_model_date.gif'
|
'iconfile' => 'EXT:events/Resources/Public/Icons/tx_events_domain_model_date.gif'
|
||||||
],
|
],
|
||||||
'types' => [
|
'types' => [
|
||||||
'1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, start, end, event, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'],
|
'1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, start, end, canceled, event, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'],
|
||||||
],
|
],
|
||||||
'columns' => [
|
'columns' => [
|
||||||
'sys_language_uid' => [
|
'sys_language_uid' => [
|
||||||
|
@ -136,6 +139,18 @@ return [
|
||||||
'default' => null,
|
'default' => null,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
'canceled' => [
|
||||||
|
'exclude' => true,
|
||||||
|
'label' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_date.xlf:tx_events_domain_model_date.canceled',
|
||||||
|
'config' => [
|
||||||
|
'type' => 'check',
|
||||||
|
'renderType' => 'checkboxToggle',
|
||||||
|
'default' => 0,
|
||||||
|
'items' => [
|
||||||
|
['LLL:EXT:events/Resources/Private/Language/locallang_csh_date.xlf:tx_events_domain_model_date.canceled.yes'],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
'event' => array(
|
'event' => array(
|
||||||
'exclude' => 1,
|
'exclude' => 1,
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'ctrl' => [
|
'ctrl' => [
|
||||||
'title' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event',
|
'title' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event',
|
||||||
'label' => 'title',
|
'label' => 'title',
|
||||||
|
'thumbnail' => 'images',
|
||||||
'tstamp' => 'tstamp',
|
'tstamp' => 'tstamp',
|
||||||
'crdate' => 'crdate',
|
'crdate' => 'crdate',
|
||||||
'cruser_id' => 'cruser_id',
|
'cruser_id' => 'cruser_id',
|
||||||
|
|
|
@ -15,6 +15,14 @@
|
||||||
<source>End</source>
|
<source>End</source>
|
||||||
<target>Ende</target>
|
<target>Ende</target>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="tx_events_domain_model_date.canceled">
|
||||||
|
<source>Canceled?</source>
|
||||||
|
<target>Abgesagt?</target>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="tx_events_domain_model_date.canceled.yes">
|
||||||
|
<source>Canceled</source>
|
||||||
|
<target>Abgesagt</target>
|
||||||
|
</trans-unit>
|
||||||
<trans-unit id="tx_events_domain_model_date.event">
|
<trans-unit id="tx_events_domain_model_date.event">
|
||||||
<source>Associated event</source>
|
<source>Associated event</source>
|
||||||
<target>Verknüpfte Veranstaltungen</target>
|
<target>Verknüpfte Veranstaltungen</target>
|
||||||
|
|
|
@ -12,6 +12,12 @@
|
||||||
<trans-unit id="tx_events_domain_model_date.end">
|
<trans-unit id="tx_events_domain_model_date.end">
|
||||||
<source>End</source>
|
<source>End</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
<trans-unit id="tx_events_domain_model_date.canceled">
|
||||||
|
<source>Canceled?</source>
|
||||||
|
</trans-unit>
|
||||||
|
<trans-unit id="tx_events_domain_model_date.canceled.yes">
|
||||||
|
<source>Canceled</source>
|
||||||
|
</trans-unit>
|
||||||
<trans-unit id="tx_events_domain_model_date.event">
|
<trans-unit id="tx_events_domain_model_date.event">
|
||||||
<source>Associated event</source>
|
<source>Associated event</source>
|
||||||
</trans-unit>
|
</trans-unit>
|
||||||
|
|
|
@ -70,6 +70,7 @@ CREATE TABLE tx_events_domain_model_date (
|
||||||
event int(11) unsigned DEFAULT '0' NOT NULL,
|
event int(11) unsigned DEFAULT '0' NOT NULL,
|
||||||
start int(11) DEFAULT NULL,
|
start int(11) DEFAULT NULL,
|
||||||
end int(11) DEFAULT NULL,
|
end int(11) DEFAULT NULL,
|
||||||
|
canceled int(11) NOT NULL DEFAULT 0,
|
||||||
KEY event (event),
|
KEY event (event),
|
||||||
KEY dataHandler (event, t3ver_wsid, pid)
|
KEY dataHandler (event, t3ver_wsid, pid)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue