# Module configuration
module.tx_t3eventsreservation {
	persistence {
		storagePid = {$module.tx_t3eventsreservation.persistence.storagePid}
	}

	view {
		# templateRootPath settings is necessary for notification templates!
		templateRootPath = {$plugin.tx_t3eventsreservation.view.templateRootPath}
		templateRootPaths {
			10 = {$module.tx_t3events.view.templateRootPaths.10}
			20 = {$module.tx_t3eventsreservation.view.templateRootPaths.10}
		}
		partialRootPaths {
			10 = {$module.tx_t3events.view.partialRootPaths.10}
			20 = {$module.tx_t3eventsreservation.view.partialRootPaths.10}
		}
		layoutRootPaths {
			10 = {$module.tx_t3events.view.layoutRootPaths.10}
			20 = {$module.tx_t3eventsreservation.view.layoutRootPaths.10}
		}
	}

	settings {
		#common.searchForm.debug = 1
		lesson {
			list {
				maxItems = 99999
			}
		}
		participant {
			download {
				maxItems = 99999
				fileName {
					field = reservation.lesson.event.headline
					default = teilnehmer
				}
			}

			list {
				maxItems = 99999
				filter {
					genre =
					eventType =
					audience =
					category =
					periods =
					venue =
				}
				paginate {
					itemsPerPage = 25
					insertBelow = 0
					insertAbove = 1
				}
			}
			search {
				showSubjectField = true
				fields = name,firstName,lastName,reservation.lesson.event.headline
			}
		}

		bookings {
			list {
				maxItems = 99999
				order = lesson.date|asc,lesson.uid|desc
				filter {
					genre =
					audience =
					venue =
					eventType =
					periods =
				}
				paginate {
					itemsPerPage = 25
					insertBelow = 0
					insertAbove = 1
					recordsLabel = Reservations
				}
			}

			search {
				showSubjectField = true
				fields = lesson.event.headline
				categoryConjunction = AND
			}

			cancel {
				byOrganizer {
					confirm {
						sendNotification = 1
						fromEmail = {$plugin.tx_t3eventsreservation.settings.reservation.default.fromEmail}
						subject = Ihr Veranstaltungstermin wurde abgesagt
						templateFileName = ByOrganizer
					}
				}

				withCosts {
					confirm {
						sendNotification = 1
						fromEmail = {$plugin.tx_t3eventsreservation.settings.reservation.default.fromEmail}
						subject = Reservierung kostenpflichtig storniert
						templateFileName = WithCosts
					}
				}

				noCharge {
					confirm {
						sendNotification = 1
						fromEmail = {$plugin.tx_t3eventsreservation.settings.reservation.default.fromEmail}
						subject = Reservierung kostenfrei storniert
						templateFileName = NoCharge
					}
				}
			}

			removeParticipant {
				byOrganizer {
					confirm {
						sendNotification = 1
						fromEmail = {$plugin.tx_t3eventsreservation.settings.reservation.default.fromEmail}
						subject = Reservierung für einen Teilnehmer storniert
						templateFileName = ByOrganizer
					}
				}

				withCosts {
					confirm {
						sendNotification = 1
						fromEmail = {$plugin.tx_t3eventsreservation.settings.reservation.default.fromEmail}
						subject = Reservierung für einen Teilnehmer kostenpflichtig storniert
						templateFileName = WithCosts
					}
				}

				noCharge {
					confirm {
						sendNotification = 1
						fromEmail = {$plugin.tx_t3eventsreservation.settings.reservation.default.fromEmail}
						subject = Reservierung für einen Teilnehmer kostenfrei storniert
						templateFileName = NoCharge
					}
				}
			}

			notify {
				fromEmail = {$plugin.tx_t3eventscourse.settings.reservation.default.fromEmail}
			}
		}
	}
}

lib.plugin.eventReservationPi1 = COA_INT
lib.plugin.eventReservationPi1 < tt_content.list.20.t3eventsreservation_pi1
lib.plugin.eventReservationAjax = PAGE
lib.plugin.eventReservationAjax {
	typeNum = 1452365941
	10 < tt_content.list.20.t3eventsreservation_pi1
	config {
		disableAllHeaderCode = 1
		xhtml_cleaning = 0
		admPanel = 0
		debug = 0
		no_cache = 1
	}
}
