mirror of
https://github.com/werkraum-media/events.git
synced 2024-11-21 22:56: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;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $canceled = false;
|
||||
|
||||
/**
|
||||
* @var \Wrm\Events\Domain\Model\Event
|
||||
*/
|
||||
|
@ -64,6 +69,11 @@ class Date extends AbstractEntity
|
|||
$this->end = $end;
|
||||
}
|
||||
|
||||
public function isCanceled(): bool
|
||||
{
|
||||
return $this->canceled;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Event
|
||||
*/
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_date.xlf:tx_events_domain_model_date',
|
||||
'label' => 'start',
|
||||
'label_alt' => 'end, canceled',
|
||||
'label_alt_force' => true,
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'cruser_id' => 'cruser_id',
|
||||
|
@ -20,7 +23,7 @@ return [
|
|||
'iconfile' => 'EXT:events/Resources/Public/Icons/tx_events_domain_model_date.gif'
|
||||
],
|
||||
'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' => [
|
||||
'sys_language_uid' => [
|
||||
|
@ -136,6 +139,18 @@ return [
|
|||
'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(
|
||||
'exclude' => 1,
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:events/Resources/Private/Language/locallang_csh_event.xlf:tx_events_domain_model_event',
|
||||
'label' => 'title',
|
||||
'thumbnail' => 'images',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'cruser_id' => 'cruser_id',
|
||||
|
|
|
@ -1,24 +1,32 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<xliff version="1.0">
|
||||
<file source-language="en" datatype="plaintext" original="messages" date="2019-04-03T12:11:11Z" product-name="tx_events">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="tx_events_domain_model_date">
|
||||
<source>Date</source>
|
||||
<target>Termin</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.start">
|
||||
<source>Start</source>
|
||||
<target>Beginn</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.end">
|
||||
<source>End</source>
|
||||
<target>Ende</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.event">
|
||||
<source>Associated event</source>
|
||||
<target>Verknüpfte Veranstaltungen</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
<file source-language="en" datatype="plaintext" original="messages" date="2019-04-03T12:11:11Z" product-name="tx_events">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="tx_events_domain_model_date">
|
||||
<source>Date</source>
|
||||
<target>Termin</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.start">
|
||||
<source>Start</source>
|
||||
<target>Beginn</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.end">
|
||||
<source>End</source>
|
||||
<target>Ende</target>
|
||||
</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">
|
||||
<source>Associated event</source>
|
||||
<target>Verknüpfte Veranstaltungen</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
|
|
|
@ -1,20 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<xliff version="1.0">
|
||||
<file source-language="en" datatype="plaintext" original="messages" date="2019-04-03T12:11:11Z" product-name="tx_events">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="tx_events_domain_model_date">
|
||||
<source>Date</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.start">
|
||||
<source>Start</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.end">
|
||||
<source>End</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.event">
|
||||
<source>Associated event</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
<file source-language="en" datatype="plaintext" original="messages" date="2019-04-03T12:11:11Z" product-name="tx_events">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="tx_events_domain_model_date">
|
||||
<source>Date</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.start">
|
||||
<source>Start</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_events_domain_model_date.end">
|
||||
<source>End</source>
|
||||
</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">
|
||||
<source>Associated event</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
|
|
|
@ -70,6 +70,7 @@ CREATE TABLE tx_events_domain_model_date (
|
|||
event int(11) unsigned DEFAULT '0' NOT NULL,
|
||||
start int(11) DEFAULT NULL,
|
||||
end int(11) DEFAULT NULL,
|
||||
canceled int(11) NOT NULL DEFAULT 0,
|
||||
KEY event (event),
|
||||
KEY dataHandler (event, t3ver_wsid, pid)
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue