<?php

namespace DataView;

class AufgabeProperty_parent {
  
  

  
  

    // --- Statische Methoden ---
  
  public static function renderTabTableAction($id) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
     ?><div class='fop-dv-buttonbar'><?php if((!\FOP\User::getIsGuest())) { ?><a class="mdl-button mdl-js-button mdl-button--raised mdl-button--colored" onclick="var self = this; $.get(reloadaufgabeProperty_parent({action: 'open', fop_table: 'aufgabeProperty', fop_id: '_', fop_from: location.href}, true)).then(function () { open_url(self.href, false);}); return false;" href="<?php echo htmlentities(\TablesRouter\AufgabeProperty::createURL2(['from' => \FOP\Util::getBackUrl(), 'column_parent' => $id])); ?>"><i class="material-icons">add</i> <?php echo(sprintf(_('create %s'), _('Eigenschaft'))); ?></a><?php } ?></div><?php 
								\FOP\User::getIsGuest();
								$itemheight = 32;
								$itemsperpage = ceil(1080 / $itemheight * 0.8);
								$page = (isset($_GET['page_aufgabeProperty_parent']) ? intval($_GET['page_aufgabeProperty_parent']) : 0);
								$addlines = (isset($_GET['addlines_aufgabeProperty_parent']) ? intval($_GET['addlines_aufgabeProperty_parent']) : 0);
								$firstitem = $page * $itemsperpage;
								$sqladdon = ' LIMIT ' . ($itemsperpage * 2) . ' OFFSET ' . ($firstitem);
								$data = self::getData($sqladdon, $_GET, $id);
								$arr = $data["items"];
								$itemcount = $data["itemcount"];
								$lastPage = ceil($itemcount/$itemsperpage-1);
								// calculate width of first column: 67px + 32px for each shortcut
								$firstColumnWidth = 66 + 34 + 34;
								$additionalLines = 0;

									// Spaltenliste zuerst aufbauen, damit sie noch umsortiert werden kann
									$order = 1000;
									$columns = [];
									
										if(true){
											$col = [
												'id' => 'type',
												'desc' => _('Eigenschaft'),
												'order' => ++$order,
												'width' => 180, // default value
												'collapsed' => 0

											];
											$columns['type'] = $col;
										}
									
										if(true){
											$col = [
												'id' => 'textValue',
												'desc' => _('Text'),
												'order' => ++$order,
												'width' => 180, // default value
												'collapsed' => 0

											];
											$columns['textValue'] = $col;
										}
									
										if(true){
											$col = [
												'id' => 'dateValue',
												'desc' => _('Datum'),
												'order' => ++$order,
												'width' => 100, // default value
												'collapsed' => 0

											];
											$columns['dateValue'] = $col;
										}
									
										if(true){
											$col = [
												'id' => 'doubleValue',
												'desc' => _('Zahl'),
												'order' => ++$order,
												'width' => 60, // default value
												'collapsed' => 0

											];
											$columns['doubleValue'] = $col;
										}
									
										if(true){
											$col = [
												'id' => 'htmlValue',
												'desc' => _('Großer Text'),
												'order' => ++$order,
												'width' => 180, // default value
												'collapsed' => 0

											];
											$columns['htmlValue'] = $col;
										}
									
										if(true){
											$col = [
												'id' => 'aufgabePropertyDropdown2Value',
												'desc' => _('Auswahl'),
												'order' => ++$order,
												'width' => 180, // default value
												'collapsed' => 0

											];
											$columns['aufgabePropertyDropdown2Value'] = $col;
										}
									

									// gespeicherte Spaltenanordnung
									foreach (\FOP\Database::query('SELECT * FROM fop_dataview WHERE '.qi('user').' = ' . \FOP\Database::quote(\FOP\User::getID()) . ' AND dataview = ' . \FOP\Database::quote('aufgabeProperty_parent'))->fetchAll(\PDO::FETCH_ASSOC) AS $column => $c) {
										if (isset($columns[$c['column']])) {
											$columns[$c['column']]['order'] = $c['order']; // order, width, collapsed
											$columns[$c['column']]['width'] = $c['width']; // order, width, collapsed
											$columns[$c['column']]['collapsed'] = $c['collapsed']; // order, width, collapsed
										}
									}

									// DOM vor-rendern
									
										
										if(true){
											ob_start();
											?><div class="fop-table-column overlay"
												data-column='type'
												data-order='<?php echo intval($columns['type']['order']); ?>'
												data-width='<?php echo intval($columns['type']['width']); ?>'
												data-collapsed='<?php echo intval($columns['type']['collapsed']); ?>'
												style='width: <?php echo intval($columns['type']['width']); ?>px; <?php if ($columns['type']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
												<span class='title' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadaufgabeProperty_parent(); 
		}});
		
		win.append(getfilter_aufgabeProperty_parent_typeListMultiFilter()); win.find('input').first().focus();
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_aufgabeProperty_parent'] == 'type ASC') {
			query['sort_aufgabeProperty_parent'] = 'type DESC';
		 } else if (query['sort_aufgabeProperty_parent'] == 'type DESC') {
		 	delete query['sort_aufgabeProperty_parent'];
		 } else {
			query['sort_aufgabeProperty_parent'] = 'type ASC';
		 }
		 reloadaufgabeProperty_parent();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	">
													<span class='title-title' title='<?php echo(_('Eigenschaft')); ?>'><?php echo(_('Eigenschaft')); ?></span>
													<?php // sort indicator
														if (isset($_GET['sort_aufgabeProperty_parent']) && $_GET['sort_aufgabeProperty_parent'] == 'type ASC') {
															?><i class='material-icons fop-small'>keyboard_arrow_down</i><?php
														} else if (isset($_GET['sort_aufgabeProperty_parent']) && $_GET['sort_aufgabeProperty_parent'] == 'type DESC') {
															?><i class='material-icons fop-small'>keyboard_arrow_up</i><?php
														}
														if (isset($_GET['range_min_aufgabeProperty_parent_type']) || isset($_GET['range_max_aufgabeProperty_parent_type']) || isset($_GET['deps_aufgabeProperty_parent_type']) || isset($_GET['fullsearch_aufgabeProperty_parent_type']) || isset($_GET['dynamic_aufgabeProperty_parent_type']) || isset($_GET['search_aufgabeProperty_parent_type']) || isset($_GET['searchnot_aufgabeProperty_parent_type']) || isset($_GET['filter_aufgabeProperty_parent_type'])) {
															// filter indicator
															?><i class='material-icons fop-small'>filter_list</i><?php
														}
														// search indicator
														?><i class='material-icons fop-small'>search</i>
													</span>
												<div class='fop-column-handle'></div>
											</div><?php
											$columns['type']['header'] = ob_get_contents(); ob_end_clean();
											$columns['type']['render'] = function ($item) use (&$columns, $itemheight) {
												// Render-Callback für eine Zelle
												?><div class='fop-table-column'
													style='width: <?php echo intval($columns['type']['width']); ?>px; <?php if ($columns['type']['collapsed'] == 1) { echo ' display: none;'; } ?> height: <?php echo $itemheight; ?>px; ' data-column='type'><?php
	
	call_user_func(function () use ($item) {
	$id = $item['type'];
	$val = $item['type::description'];
	$canView = $item['type::canView'];
	if ($val !== null) {
		if ($canView) echo "<a tabindex=\"-1\" class=\"mdl-button mdl-button-small tbl-link\" data-tbl=\"aufgabePropertyType\" data-id=\"".htmlentities($id)."\" onclick=\"event.stopPropagation(); event.preventDefault(); open_url(this.href, false);\" href=\"" . \TablesRouter\AufgabePropertyType::viewURL($id, ['from' => \FOP\Util::getBackURL()]) . "\">(…)</a>";echo htmlentities($val);
	} else {
		echo htmlentities(_('') ?: '-');
	}
	});
	
?>
</div><?php
											};
											$columns['type']['renderSum'] = function ($item) use (&$columns) {
												// Render-Callback Summe
												?><div class='fop-table-column fop-table-column-aggregate'
													data-column='type'
													data-order='<?php echo intval($columns['type']['order']); ?>'
													data-width='<?php echo intval($columns['type']['width']); ?>'
													data-collapsed='<?php echo intval($columns['type']['collapsed']); ?>'
													style='width: <?php echo intval($columns['type']['width']); ?>px; <?php if ($columns['type']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
													</div><?php
											};
										}
										
									
										
										if(true){
											ob_start();
											?><div class="fop-table-column overlay"
												data-column='textValue'
												data-order='<?php echo intval($columns['textValue']['order']); ?>'
												data-width='<?php echo intval($columns['textValue']['width']); ?>'
												data-collapsed='<?php echo intval($columns['textValue']['collapsed']); ?>'
												style='width: <?php echo intval($columns['textValue']['width']); ?>px; <?php if ($columns['textValue']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
												<span class='title' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadaufgabeProperty_parent(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_aufgabeProperty_parent_textValue'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_aufgabeProperty_parent_textValue'] = text.val(); } else { delete query['search_aufgabeProperty_parent_textValue']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_aufgabeProperty_parent').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_aufgabeProperty_parent_textValue'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_aufgabeProperty_parent_textValue'] = text2.val(); } else { delete query['searchnot_aufgabeProperty_parent_textValue']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_aufgabeProperty_parent').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_aufgabeProperty_parent'] == 'textValue ASC') {
			query['sort_aufgabeProperty_parent'] = 'textValue DESC';
		 } else if (query['sort_aufgabeProperty_parent'] == 'textValue DESC') {
		 	delete query['sort_aufgabeProperty_parent'];
		 } else {
			query['sort_aufgabeProperty_parent'] = 'textValue ASC';
		 }
		 reloadaufgabeProperty_parent();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	">
													<span class='title-title' title='<?php echo(_('Text')); ?>'><?php echo(_('Text')); ?></span>
													<?php // sort indicator
														if (isset($_GET['sort_aufgabeProperty_parent']) && $_GET['sort_aufgabeProperty_parent'] == 'textValue ASC') {
															?><i class='material-icons fop-small'>keyboard_arrow_down</i><?php
														} else if (isset($_GET['sort_aufgabeProperty_parent']) && $_GET['sort_aufgabeProperty_parent'] == 'textValue DESC') {
															?><i class='material-icons fop-small'>keyboard_arrow_up</i><?php
														}
														if (isset($_GET['range_min_aufgabeProperty_parent_textValue']) || isset($_GET['range_max_aufgabeProperty_parent_textValue']) || isset($_GET['deps_aufgabeProperty_parent_textValue']) || isset($_GET['fullsearch_aufgabeProperty_parent_textValue']) || isset($_GET['dynamic_aufgabeProperty_parent_textValue']) || isset($_GET['search_aufgabeProperty_parent_textValue']) || isset($_GET['searchnot_aufgabeProperty_parent_textValue']) || isset($_GET['filter_aufgabeProperty_parent_textValue'])) {
															// filter indicator
															?><i class='material-icons fop-small'>filter_list</i><?php
														}
														// search indicator
														?><i class='material-icons fop-small'>search</i>
													</span>
												<div class='fop-column-handle'></div>
											</div><?php
											$columns['textValue']['header'] = ob_get_contents(); ob_end_clean();
											$columns['textValue']['render'] = function ($item) use (&$columns, $itemheight) {
												// Render-Callback für eine Zelle
												?><div class='fop-table-column'
													style='width: <?php echo intval($columns['textValue']['width']); ?>px; <?php if ($columns['textValue']['collapsed'] == 1) { echo ' display: none;'; } ?> height: <?php echo $itemheight; ?>px; <?php if (($item['textValue::vis'] ?? '0') == '0') { echo 'visibility: hidden;'; } ?>cursor: text;' data-column='textValue' onclick='
															event.preventDefault();
															event.stopPropagation();
															var div = get_overlay(this, function () {
																// submit the form in overlay
																div.find(&apos;form&apos;).submit();
															});
															$.get(&apos;Tables/AufgabeProperty/textValueEdit?id=&apos; + <?php echo json_encode($item['ID']); ?>).then(function (html) {
																div.html(html);
																var iframe = div.find(&apos;iframe&apos;)[0];
																if (iframe) iframe.onload = function () {
																	this.onload = function () {
																		div.close();
																		reloadaufgabeProperty_parent();
																	}
																};
																div.find(&apos;input[type=text], input[type=checkbox], textarea&apos;).select().focus().keydown(function (event) {
																	if ([13/*, 37, 39, 38, 40*/, 9].includes(event.keyCode)) { // ENTER, left, right, up, down, tab
																		$(this).closest(&apos;form&apos;).submit();
																		event.preventDefault();
																		event.stopPropagation();
																	}
																});
															});
															div.text(&apos;🗘&apos;);
															return true;'><span class='overflow-text' title="<?php echo htmlentities($item['textValue']); ?>"><?php echo htmlentities($item['textValue']); ?></span></div><?php
											};
											$columns['textValue']['renderSum'] = function ($item) use (&$columns) {
												// Render-Callback Summe
												?><div class='fop-table-column fop-table-column-aggregate'
													data-column='textValue'
													data-order='<?php echo intval($columns['textValue']['order']); ?>'
													data-width='<?php echo intval($columns['textValue']['width']); ?>'
													data-collapsed='<?php echo intval($columns['textValue']['collapsed']); ?>'
													style='width: <?php echo intval($columns['textValue']['width']); ?>px; <?php if ($columns['textValue']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
													</div><?php
											};
										}
										
									
										
										if(true){
											ob_start();
											?><div class="fop-table-column overlay"
												data-column='dateValue'
												data-order='<?php echo intval($columns['dateValue']['order']); ?>'
												data-width='<?php echo intval($columns['dateValue']['width']); ?>'
												data-collapsed='<?php echo intval($columns['dateValue']['collapsed']); ?>'
												style='width: <?php echo intval($columns['dateValue']['width']); ?>px; <?php if ($columns['dateValue']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
												<span class='title' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadaufgabeProperty_parent(); 
		}}, 600);
		date_filter(win, 'aufgabeProperty_parent', 'dateValue', <?php echo htmlentities(json_encode(_('period'))); ?>, <?php echo htmlentities(json_encode(\FOP\I18n::getShortLocale())); ?>, <?php echo htmlentities(json_encode(_('dateformat_moment'))); ?>, function() { reloadaufgabeProperty_parent();  reloadaufgabeProperty_parent(); });
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_aufgabeProperty_parent'] == 'dateValue ASC') {
			query['sort_aufgabeProperty_parent'] = 'dateValue DESC';
		 } else if (query['sort_aufgabeProperty_parent'] == 'dateValue DESC') {
		 	delete query['sort_aufgabeProperty_parent'];
		 } else {
			query['sort_aufgabeProperty_parent'] = 'dateValue ASC';
		 }
		 reloadaufgabeProperty_parent();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	">
													<span class='title-title' title='<?php echo(_('Datum')); ?>'><?php echo(_('Datum')); ?></span>
													<?php // sort indicator
														if (isset($_GET['sort_aufgabeProperty_parent']) && $_GET['sort_aufgabeProperty_parent'] == 'dateValue ASC') {
															?><i class='material-icons fop-small'>keyboard_arrow_down</i><?php
														} else if (isset($_GET['sort_aufgabeProperty_parent']) && $_GET['sort_aufgabeProperty_parent'] == 'dateValue DESC') {
															?><i class='material-icons fop-small'>keyboard_arrow_up</i><?php
														}
														if (isset($_GET['range_min_aufgabeProperty_parent_dateValue']) || isset($_GET['range_max_aufgabeProperty_parent_dateValue']) || isset($_GET['deps_aufgabeProperty_parent_dateValue']) || isset($_GET['fullsearch_aufgabeProperty_parent_dateValue']) || isset($_GET['dynamic_aufgabeProperty_parent_dateValue']) || isset($_GET['search_aufgabeProperty_parent_dateValue']) || isset($_GET['searchnot_aufgabeProperty_parent_dateValue']) || isset($_GET['filter_aufgabeProperty_parent_dateValue'])) {
															// filter indicator
															?><i class='material-icons fop-small'>filter_list</i><?php
														}
														// search indicator
														?><i class='material-icons fop-small'>search</i>
													</span>
												<div class='fop-column-handle'></div>
											</div><?php
											$columns['dateValue']['header'] = ob_get_contents(); ob_end_clean();
											$columns['dateValue']['render'] = function ($item) use (&$columns, $itemheight) {
												// Render-Callback für eine Zelle
												?><div class='fop-table-column'
													style='width: <?php echo intval($columns['dateValue']['width']); ?>px; <?php if ($columns['dateValue']['collapsed'] == 1) { echo ' display: none;'; } ?> height: <?php echo $itemheight; ?>px; <?php if (($item['dateValue::vis'] ?? '0') == '0') { echo 'visibility: hidden;'; } ?>cursor: text;' data-column='dateValue' onclick='
															event.preventDefault();
															event.stopPropagation();
															var div = get_overlay(this, function () {
																// submit the form in overlay
																div.find(&apos;form&apos;).submit();
															});
															$.get(&apos;Tables/AufgabeProperty/dateValueEdit?id=&apos; + <?php echo json_encode($item['ID']); ?>).then(function (html) {
																div.html(html);
																var iframe = div.find(&apos;iframe&apos;)[0];
																if (iframe) iframe.onload = function () {
																	this.onload = function () {
																		div.close();
																		reloadaufgabeProperty_parent();
																	}
																};
																div.find(&apos;input[type=text], input[type=checkbox], textarea&apos;).select().focus().keydown(function (event) {
																	if ([13/*, 37, 39, 38, 40*/, 9].includes(event.keyCode)) { // ENTER, left, right, up, down, tab
																		$(this).closest(&apos;form&apos;).submit();
																		event.preventDefault();
																		event.stopPropagation();
																	}
																});
															});
															div.text(&apos;🗘&apos;);
															return true;'><span class='overflow-text' title="<?php echo htmlentities(($item['dateValue']) ? strftime(_('dateformat_php2'), intval($item['dateValue'])) : ''); ?>"><?php echo htmlentities(($item['dateValue']) ? strftime(_('dateformat_php2'), intval($item['dateValue'])) : ''); ?></span></div><?php
											};
											$columns['dateValue']['renderSum'] = function ($item) use (&$columns) {
												// Render-Callback Summe
												?><div class='fop-table-column fop-table-column-aggregate'
													data-column='dateValue'
													data-order='<?php echo intval($columns['dateValue']['order']); ?>'
													data-width='<?php echo intval($columns['dateValue']['width']); ?>'
													data-collapsed='<?php echo intval($columns['dateValue']['collapsed']); ?>'
													style='width: <?php echo intval($columns['dateValue']['width']); ?>px; <?php if ($columns['dateValue']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
													</div><?php
											};
										}
										
									
										
										if(true){
											ob_start();
											?><div class="fop-table-column overlay"
												data-column='doubleValue'
												data-order='<?php echo intval($columns['doubleValue']['order']); ?>'
												data-width='<?php echo intval($columns['doubleValue']['width']); ?>'
												data-collapsed='<?php echo intval($columns['doubleValue']['collapsed']); ?>'
												style='width: <?php echo intval($columns['doubleValue']['width']); ?>px; <?php if ($columns['doubleValue']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
												<span class='title' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadaufgabeProperty_parent(); 
		}});
		var von, bis; win.append('<div class=\'fop-floatsorter\'>' + window.i18n_von + '</div>').append(von = $('<input type=\'number\' step=\'any\'><br>').val(query['range_min_aufgabeProperty_parent_doubleValue']).on('change keyup paste', function () { query['range_min_aufgabeProperty_parent_doubleValue'] = von.val(); delete query['page_aufgabeProperty_parent']; changed = true; }))
.append('<div>' + window.i18n_bis + '</div>').append(bis = $('<input type=\'number\' step=\'any\'>').val(query['range_max_aufgabeProperty_parent_doubleValue']).on('change keyup paste', function () { query['range_max_aufgabeProperty_parent_doubleValue'] = bis.val(); delete query['page_aufgabeProperty_parent']; changed = true; }))
; von.focus(); von.select();
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_aufgabeProperty_parent'] == 'doubleValue ASC') {
			query['sort_aufgabeProperty_parent'] = 'doubleValue DESC';
		 } else if (query['sort_aufgabeProperty_parent'] == 'doubleValue DESC') {
		 	delete query['sort_aufgabeProperty_parent'];
		 } else {
			query['sort_aufgabeProperty_parent'] = 'doubleValue ASC';
		 }
		 reloadaufgabeProperty_parent();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	" style='text-align: right;'>
													<span class='title-title' title='<?php echo(_('Zahl')); ?>'><?php echo(_('Zahl')); ?></span>
													<?php // sort indicator
														if (isset($_GET['sort_aufgabeProperty_parent']) && $_GET['sort_aufgabeProperty_parent'] == 'doubleValue ASC') {
															?><i class='material-icons fop-small'>keyboard_arrow_down</i><?php
														} else if (isset($_GET['sort_aufgabeProperty_parent']) && $_GET['sort_aufgabeProperty_parent'] == 'doubleValue DESC') {
															?><i class='material-icons fop-small'>keyboard_arrow_up</i><?php
														}
														if (isset($_GET['range_min_aufgabeProperty_parent_doubleValue']) || isset($_GET['range_max_aufgabeProperty_parent_doubleValue']) || isset($_GET['deps_aufgabeProperty_parent_doubleValue']) || isset($_GET['fullsearch_aufgabeProperty_parent_doubleValue']) || isset($_GET['dynamic_aufgabeProperty_parent_doubleValue']) || isset($_GET['search_aufgabeProperty_parent_doubleValue']) || isset($_GET['searchnot_aufgabeProperty_parent_doubleValue']) || isset($_GET['filter_aufgabeProperty_parent_doubleValue'])) {
															// filter indicator
															?><i class='material-icons fop-small'>filter_list</i><?php
														}
														// search indicator
														?><i class='material-icons fop-small'>search</i>
													</span>
												<div class='fop-column-handle'></div>
											</div><?php
											$columns['doubleValue']['header'] = ob_get_contents(); ob_end_clean();
											$columns['doubleValue']['render'] = function ($item) use (&$columns, $itemheight) {
												// Render-Callback für eine Zelle
												?><div class='fop-table-column'
													style='width: <?php echo intval($columns['doubleValue']['width']); ?>px; <?php if ($columns['doubleValue']['collapsed'] == 1) { echo ' display: none;'; } ?> height: <?php echo $itemheight; ?>px; <?php if (($item['doubleValue::vis'] ?? '0') == '0') { echo 'visibility: hidden;'; } ?>cursor: text;' data-column='doubleValue' onclick='
															event.preventDefault();
															event.stopPropagation();
															var div = get_overlay(this, function () {
																// submit the form in overlay
																div.find(&apos;form&apos;).submit();
															});
															$.get(&apos;Tables/AufgabeProperty/doubleValueEdit?id=&apos; + <?php echo json_encode($item['ID']); ?>).then(function (html) {
																div.html(html);
																var iframe = div.find(&apos;iframe&apos;)[0];
																if (iframe) iframe.onload = function () {
																	this.onload = function () {
																		div.close();
																		reloadaufgabeProperty_parent();
																	}
																};
																div.find(&apos;input[type=text], input[type=checkbox], textarea&apos;).select().focus().keydown(function (event) {
																	if ([13/*, 37, 39, 38, 40*/, 9].includes(event.keyCode)) { // ENTER, left, right, up, down, tab
																		$(this).closest(&apos;form&apos;).submit();
																		event.preventDefault();
																		event.stopPropagation();
																	}
																});
															});
															div.text(&apos;🗘&apos;);
															return true;'><span style="white-space: nowrap; width: 100%; display: inline-block; text-align: right;"><?php echo htmlentities(\Types\Double::print($item['doubleValue'])); ?>
	</span></div><?php
											};
											$columns['doubleValue']['renderSum'] = function ($item) use (&$columns) {
												// Render-Callback Summe
												?><div class='fop-table-column fop-table-column-aggregate'
													data-column='doubleValue'
													data-order='<?php echo intval($columns['doubleValue']['order']); ?>'
													data-width='<?php echo intval($columns['doubleValue']['width']); ?>'
													data-collapsed='<?php echo intval($columns['doubleValue']['collapsed']); ?>'
													style='width: <?php echo intval($columns['doubleValue']['width']); ?>px; <?php if ($columns['doubleValue']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
													</div><?php
											};
										}
										
									
										
										if(true){
											ob_start();
											?><div class="fop-table-column overlay"
												data-column='htmlValue'
												data-order='<?php echo intval($columns['htmlValue']['order']); ?>'
												data-width='<?php echo intval($columns['htmlValue']['width']); ?>'
												data-collapsed='<?php echo intval($columns['htmlValue']['collapsed']); ?>'
												style='width: <?php echo intval($columns['htmlValue']['width']); ?>px; <?php if ($columns['htmlValue']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
												<span class='title' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadaufgabeProperty_parent(); 
		}});
		
		var el = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label fop-floatsorter\' style=\'width: calc(100% - 42px);\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(_('search')); ?></label></div>');
		win.append(el);
		var text = el.find('input');
		text.val(query['search_aufgabeProperty_parent_htmlValue'])
		text.on('change keyup paste', function () { if (text.val()) { query['search_aufgabeProperty_parent_htmlValue'] = text.val(); } else { delete query['search_aufgabeProperty_parent_htmlValue']; } changed = true; });
		text.focus();
		text.select();
		text.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_aufgabeProperty_parent').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});

		var el2 = $('<div class=\'mdl-textfield mdl-js-textfield mdl-textfield--floating-label\'><input class=\'mdl-textfield__input\' style=\'display: inline-block;\' type=\'text\'><label class=\'mdl-textfield__input\'><?php echo(htmlentities(htmlentities(_('filter_contains_not')))); ?></label></div>');
		win.append(el2);
		var text2 = el2.find('input');
		text2.val(query['searchnot_aufgabeProperty_parent_htmlValue'])
		text2.on('change keyup paste', function () { if (text2.val()) { query['searchnot_aufgabeProperty_parent_htmlValue'] = text2.val(); } else { delete query['searchnot_aufgabeProperty_parent_htmlValue']; } changed = true; });
		text2.keydown(function (event) {if ((event.keyCode || event.which) == 13) {$('#table_aufgabeProperty_parent').find('.fop-table-row:first').click();} if (event.key === 'Escape') { win.close(); }});
	
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_aufgabeProperty_parent'] == 'htmlValue ASC') {
			query['sort_aufgabeProperty_parent'] = 'htmlValue DESC';
		 } else if (query['sort_aufgabeProperty_parent'] == 'htmlValue DESC') {
		 	delete query['sort_aufgabeProperty_parent'];
		 } else {
			query['sort_aufgabeProperty_parent'] = 'htmlValue ASC';
		 }
		 reloadaufgabeProperty_parent();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	">
													<span class='title-title' title='<?php echo(_('Großer Text')); ?>'><?php echo(_('Großer Text')); ?></span>
													<?php // sort indicator
														if (isset($_GET['sort_aufgabeProperty_parent']) && $_GET['sort_aufgabeProperty_parent'] == 'htmlValue ASC') {
															?><i class='material-icons fop-small'>keyboard_arrow_down</i><?php
														} else if (isset($_GET['sort_aufgabeProperty_parent']) && $_GET['sort_aufgabeProperty_parent'] == 'htmlValue DESC') {
															?><i class='material-icons fop-small'>keyboard_arrow_up</i><?php
														}
														if (isset($_GET['range_min_aufgabeProperty_parent_htmlValue']) || isset($_GET['range_max_aufgabeProperty_parent_htmlValue']) || isset($_GET['deps_aufgabeProperty_parent_htmlValue']) || isset($_GET['fullsearch_aufgabeProperty_parent_htmlValue']) || isset($_GET['dynamic_aufgabeProperty_parent_htmlValue']) || isset($_GET['search_aufgabeProperty_parent_htmlValue']) || isset($_GET['searchnot_aufgabeProperty_parent_htmlValue']) || isset($_GET['filter_aufgabeProperty_parent_htmlValue'])) {
															// filter indicator
															?><i class='material-icons fop-small'>filter_list</i><?php
														}
														// search indicator
														?><i class='material-icons fop-small'>search</i>
													</span>
												<div class='fop-column-handle'></div>
											</div><?php
											$columns['htmlValue']['header'] = ob_get_contents(); ob_end_clean();
											$columns['htmlValue']['render'] = function ($item) use (&$columns, $itemheight) {
												// Render-Callback für eine Zelle
												?><div class='fop-table-column'
													style='width: <?php echo intval($columns['htmlValue']['width']); ?>px; <?php if ($columns['htmlValue']['collapsed'] == 1) { echo ' display: none;'; } ?> height: <?php echo $itemheight; ?>px; <?php if (($item['htmlValue::vis'] ?? '0') == '0') { echo 'visibility: hidden;'; } ?>cursor: text;' data-column='htmlValue' onclick='
															event.preventDefault();
															event.stopPropagation();
															var div = get_overlay(this, function () {
																// submit the form in overlay
																div.find(&apos;form&apos;).submit();
															});
															$.get(&apos;Tables/AufgabeProperty/htmlValueEdit?id=&apos; + <?php echo json_encode($item['ID']); ?>).then(function (html) {
																div.html(html);
																var iframe = div.find(&apos;iframe&apos;)[0];
																if (iframe) iframe.onload = function () {
																	this.onload = function () {
																		div.close();
																		reloadaufgabeProperty_parent();
																	}
																};
																div.find(&apos;input[type=text], input[type=checkbox], textarea&apos;).select().focus().keydown(function (event) {
																	if ([13/*, 37, 39, 38, 40*/, 9].includes(event.keyCode)) { // ENTER, left, right, up, down, tab
																		$(this).closest(&apos;form&apos;).submit();
																		event.preventDefault();
																		event.stopPropagation();
																	}
																});
															});
															div.text(&apos;🗘&apos;);
															return true;'><?php 
	$html = preg_replace('/^<!DOCTYPE.+?>/m', '', \FOP\Sanitizers::htmlentities_decode($item['htmlValue'])); ?>
	<span style="display: block;" onmouseenter='handleHTMLOverlay(event, &apos;#overlayFormhtmlValue<?php echo htmlentities($item['ID'] ?? 'fail'); ?>&apos;);' onmouseleave='handleHTMLOverlayFade(event, &apos;#overlayFormhtmlValue<?php echo htmlentities($item['ID'] ?? 'fail'); ?>&apos;);' ng-non-bindable><?php echo htmlentities(mb_substr(preg_replace('/[ \t\r\n]+/', ' ', strip_tags(preg_replace('/<style.*?\/style>/s', '', html_entity_decode($item['htmlValue'])))), 0, 50) . (strlen(preg_replace('/[ \t\r\n]+/', ' ', strip_tags(preg_replace('/<style.*?\/style>/s', '', html_entity_decode($item['htmlValue']))))) >= 50 ? '...' : ''));  ?></span>
	<div class="overlay-iframe" id="overlayFormhtmlValue<?php echo $item['ID'] ?? 'fail'; ?>">
		<div class="iframe-container" id="iframecontainer">
			<?php echo \FOP\Util::SanitizeUserHtml($html); ?>
		</div>
	</div>
</div><?php
											};
											$columns['htmlValue']['renderSum'] = function ($item) use (&$columns) {
												// Render-Callback Summe
												?><div class='fop-table-column fop-table-column-aggregate'
													data-column='htmlValue'
													data-order='<?php echo intval($columns['htmlValue']['order']); ?>'
													data-width='<?php echo intval($columns['htmlValue']['width']); ?>'
													data-collapsed='<?php echo intval($columns['htmlValue']['collapsed']); ?>'
													style='width: <?php echo intval($columns['htmlValue']['width']); ?>px; <?php if ($columns['htmlValue']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
													</div><?php
											};
										}
										
									
										
										if(true){
											ob_start();
											?><div class="fop-table-column overlay"
												data-column='aufgabePropertyDropdown2Value'
												data-order='<?php echo intval($columns['aufgabePropertyDropdown2Value']['order']); ?>'
												data-width='<?php echo intval($columns['aufgabePropertyDropdown2Value']['width']); ?>'
												data-collapsed='<?php echo intval($columns['aufgabePropertyDropdown2Value']['collapsed']); ?>'
												style='width: <?php echo intval($columns['aufgabePropertyDropdown2Value']['width']); ?>px; <?php if ($columns['aufgabePropertyDropdown2Value']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
												<span class='title' onclick="
		var changed = false, win = dropDownFixPosition($(this), null, function() { if (changed) {
			
			reloadaufgabeProperty_parent(); 
		}});
		
		win.append(getfilter_aufgabeProperty_parent_aufgabePropertyDropdown2ValueListMultiFilter()); win.find('input').first().focus();
	var icon, sortbtn	= $('<a class=\'mdl-button mdl-js-button mdl-button--icon mdl-button--colored\' style=\'display: inline-block;\'></a>')
		.append(icon = $('<i class=\'material-icons\'></i>').text('unfold_more'))
		.click(function() {
		 if (query['sort_aufgabeProperty_parent'] == 'aufgabePropertyDropdown2Value ASC') {
			query['sort_aufgabeProperty_parent'] = 'aufgabePropertyDropdown2Value DESC';
		 } else if (query['sort_aufgabeProperty_parent'] == 'aufgabePropertyDropdown2Value DESC') {
		 	delete query['sort_aufgabeProperty_parent'];
		 } else {
			query['sort_aufgabeProperty_parent'] = 'aufgabePropertyDropdown2Value ASC';
		 }
		 reloadaufgabeProperty_parent();
		 return false;
	});
	if (win.children().first().hasClass('fop-floatsorter')) {
		// floating layout
		win.prepend(sortbtn.css({float: 'right', margin: '0px'}));
	} else {
		// append to the end
		win.append(sortbtn);
	}
		return false;
	">
													<span class='title-title' title='<?php echo(_('Auswahl')); ?>'><?php echo(_('Auswahl')); ?></span>
													<?php // sort indicator
														if (isset($_GET['sort_aufgabeProperty_parent']) && $_GET['sort_aufgabeProperty_parent'] == 'aufgabePropertyDropdown2Value ASC') {
															?><i class='material-icons fop-small'>keyboard_arrow_down</i><?php
														} else if (isset($_GET['sort_aufgabeProperty_parent']) && $_GET['sort_aufgabeProperty_parent'] == 'aufgabePropertyDropdown2Value DESC') {
															?><i class='material-icons fop-small'>keyboard_arrow_up</i><?php
														}
														if (isset($_GET['range_min_aufgabeProperty_parent_aufgabePropertyDropdown2Value']) || isset($_GET['range_max_aufgabeProperty_parent_aufgabePropertyDropdown2Value']) || isset($_GET['deps_aufgabeProperty_parent_aufgabePropertyDropdown2Value']) || isset($_GET['fullsearch_aufgabeProperty_parent_aufgabePropertyDropdown2Value']) || isset($_GET['dynamic_aufgabeProperty_parent_aufgabePropertyDropdown2Value']) || isset($_GET['search_aufgabeProperty_parent_aufgabePropertyDropdown2Value']) || isset($_GET['searchnot_aufgabeProperty_parent_aufgabePropertyDropdown2Value']) || isset($_GET['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value'])) {
															// filter indicator
															?><i class='material-icons fop-small'>filter_list</i><?php
														}
														// search indicator
														?><i class='material-icons fop-small'>search</i>
													</span>
												<div class='fop-column-handle'></div>
											</div><?php
											$columns['aufgabePropertyDropdown2Value']['header'] = ob_get_contents(); ob_end_clean();
											$columns['aufgabePropertyDropdown2Value']['render'] = function ($item) use (&$columns, $itemheight) {
												// Render-Callback für eine Zelle
												?><div class='fop-table-column'
													style='width: <?php echo intval($columns['aufgabePropertyDropdown2Value']['width']); ?>px; <?php if ($columns['aufgabePropertyDropdown2Value']['collapsed'] == 1) { echo ' display: none;'; } ?> height: <?php echo $itemheight; ?>px; <?php if (($item['aufgabePropertyDropdown2Value::vis'] ?? '0') == '0') { echo 'visibility: hidden;'; } ?><?php if ((\FOP\Util::FalseToNull(\FOP\Database::query('SELECT (CONCAT('.qi('3gAZkjB6').'.'.qi('color').', \'22\')) FROM '.qi('aufgabePropertyDropdown').' '.qi('3gAZkjB6').' WHERE '.qi('3gAZkjB6').'.'.qi('ID').' = ' . \FOP\Database::quote($item['aufgabePropertyDropdown2Value']) . '')->fetchColumn()))) { echo 'background: ' . htmlentities((\FOP\Util::FalseToNull(\FOP\Database::query('SELECT (CONCAT('.qi('3gAZkjB6').'.'.qi('color').', \'22\')) FROM '.qi('aufgabePropertyDropdown').' '.qi('3gAZkjB6').' WHERE '.qi('3gAZkjB6').'.'.qi('ID').' = ' . \FOP\Database::quote($item['aufgabePropertyDropdown2Value']) . '')->fetchColumn()))) . '!important;'; } ?>cursor: text;' data-column='aufgabePropertyDropdown2Value' onclick='
															event.preventDefault();
															event.stopPropagation();
															var div = get_overlay(this, function () {
																// submit the form in overlay
																div.find(&apos;form&apos;).submit();
															});
															$.get(&apos;Tables/AufgabeProperty/aufgabePropertyDropdown2ValueEdit?id=&apos; + <?php echo json_encode($item['ID']); ?>).then(function (html) {
																div.html(html);
																var iframe = div.find(&apos;iframe&apos;)[0];
																if (iframe) iframe.onload = function () {
																	this.onload = function () {
																		div.close();
																		reloadaufgabeProperty_parent();
																	}
																};
																div.find(&apos;input[type=text], input[type=checkbox], textarea&apos;).select().focus().keydown(function (event) {
																	if ([13/*, 37, 39, 38, 40*/, 9].includes(event.keyCode)) { // ENTER, left, right, up, down, tab
																		$(this).closest(&apos;form&apos;).submit();
																		event.preventDefault();
																		event.stopPropagation();
																	}
																});
															});
															div.text(&apos;🗘&apos;);
															return true;'><?php
	
	call_user_func(function () use ($item) {
	$id = $item['aufgabePropertyDropdown2Value'];
	$val = $item['aufgabePropertyDropdown2Value::description'];
	$canView = $item['aufgabePropertyDropdown2Value::canView'];
	if ($val !== null) {
		if ($canView) echo "<a tabindex=\"-1\" class=\"mdl-button mdl-button-small tbl-link\" data-tbl=\"aufgabePropertyDropdown\" data-id=\"".htmlentities($id)."\" onclick=\"event.stopPropagation(); event.preventDefault(); open_url(this.href, false);\" href=\"" . \TablesRouter\AufgabePropertyDropdown::viewURL($id, ['from' => \FOP\Util::getBackURL()]) . "\">(…)</a>";echo htmlentities($val);
	} else {
		echo htmlentities(_('-') ?: '-');
	}
	});
	
?>
</div><?php
											};
											$columns['aufgabePropertyDropdown2Value']['renderSum'] = function ($item) use (&$columns) {
												// Render-Callback Summe
												?><div class='fop-table-column fop-table-column-aggregate'
													data-column='aufgabePropertyDropdown2Value'
													data-order='<?php echo intval($columns['aufgabePropertyDropdown2Value']['order']); ?>'
													data-width='<?php echo intval($columns['aufgabePropertyDropdown2Value']['width']); ?>'
													data-collapsed='<?php echo intval($columns['aufgabePropertyDropdown2Value']['collapsed']); ?>'
													style='width: <?php echo intval($columns['aufgabePropertyDropdown2Value']['width']); ?>px; <?php if ($columns['aufgabePropertyDropdown2Value']['collapsed'] == 1) { echo ' display: none;'; } ?>'>
													</div><?php
											};
										}
										
									

									// sort by order
									uasort($columns, function ($a, $b) {
										return $a['order'] - $b['order'];
									});
									?>
									<style type='text/css'>
										#aufgabeProperty_parent-table .fop-table-header {
											height: <?php echo 32; ?>px;
										}
										#aufgabeProperty_parent-table .fop-table-header .fop-table-column .title,
										#aufgabeProperty_parent-table .fop-column-handle,
										#aufgabeProperty_parent-table .fop-table-row,
										#aufgabeProperty_parent-table .fop-table-row .fop-table-column,
										#aufgabeProperty_parent-table .fop-table-column-multicontrol,
										#aufgabeProperty_parent-table .fop-filter-button {
											height: 32px;
											line-height: 32px;
										}
										</style>
											<div class="fop-table" data-table-id="aufgabeProperty_parent">
											<div class="fop-legend"></div>
											<div class="fop-filter-string-wrapper"><div class="fop-filter-string"><label>Filter:</label> <span><?php echo self::getFilterHTML($_GET); ?></span></div></div>
											
											<?php if (isset($_GET['select'])) { echo '<br>'; } ?>
											<div class="fop-table-header">
											<?php if (!isset($_GET['select'])) { ?>
												<div class="fop-table-column noprint" style="width: <?php echo json_encode($firstColumnWidth); ?>px;">
													
													<div class="fop-table-column-multicontrol">
													<label class="mdl-checkbox mdl-js-checkbox"  style='width: auto;' for="aufgabeProperty_parent__all-checkbox">
														<input class="mdl-checkbox__input" id="aufgabeProperty_parent__all-checkbox" type="checkbox" onchange="checkaufgabeProperty_parent('all', 'ID', this.checked);">
														</label>
														<button type="button" class="mdl-button mdl-js-button mdl-button--icon aufgabeProperty_parent__mass-action" style='visibility: hidden;' onclick="$.get('DataView/AufgabeProperty_parent/permissions?id=' + checkaufgabeProperty_parent(null, 'ID'), function (data) { for (var method in data) if (method != '__cnt') { var btn = $('[data-interaction-name=&quot;' + method + '&quot;]'); if (data[method] >= 1) btn.show(); else btn.hide(); btn.find('.cnt').text(data[method]); }; }); dropDownFixPosition($(this), $(this).next())">
															<i class="material-icons">more_vert</i>
														</button>
														<ul class="mdl-list mdl-card mdl-shadow--4dp fop-scroll-menu">
															<?php
		if(true) { ?>
			<span class="mdl-list__item mdl-button">
				<span class="mdl-list__item mdl-button" data-interaction-name="filterall" style="margin-right:auto; text-align:left;"
					onclick="for (key in query) if (key.indexOf('range_min_aufgabeProperty_parent_') == 0 || key.indexOf('range_max_aufgabeProperty_parent_') == 0 || key.indexOf('deps_aufgabeProperty_parent_') == 0 || key.indexOf('fullsearch_aufgabeProperty_parent_') == 0 || key.indexOf('dynamic_aufgabeProperty_parent_') == 0 || key.indexOf('search_aufgabeProperty_parent_') == 0 || key.indexOf('searchnot_aufgabeProperty_parent_') == 0 || key.indexOf('filter_aufgabeProperty_parent_') == 0) delete query[key]; reloadaufgabeProperty_parent(); $(this).closest('.overlay').click(); return false;">
					<span style="float:left;"><i class="material-icons">list</i></span><span class="fop-menu-caption" title="<?php echo(_('view all elements')); ?>"><?php echo(_('view all elements')); ?> 
					</span>
				</span>
			</span>
		<?php } ?><?php
		if(true) { ?>
			<span class="mdl-list__item mdl-button">
				<span class="mdl-list__item mdl-button" data-interaction-name="filteronly" style="margin-right:auto; text-align:left;"
					onclick="query['filter_aufgabeProperty_parent_ID'] = checkaufgabeProperty_parent(null, 'ID'); delete query['page_aufgabeProperty_parent']; reloadaufgabeProperty_parent(); $(this).closest('.overlay').click(); return false;">
					<span style="float:left;"><i class="material-icons">arrow_forward</i></span><span class="fop-menu-caption" title="<?php echo(_('view only these elements')); ?>"><?php echo(_('view only these elements')); ?> (<span class='cnt'></span>)
					</span>
				</span>
			</span>
		<?php } ?><?php
		if(true) { ?>
			<span class="mdl-list__item mdl-button">
				<span class="mdl-list__item mdl-button" data-interaction-name="filterrange" style="margin-right:auto; text-align:left;"
					onclick="
		var ticks = new IDList(checkaufgabeProperty_parent(null, 'ID'));
		var range = prompt('Bitte geben Sie den Bereich ein', '1-' + ticks.count());
		var newticks = new IDList();
		if (range) {
			range = range.split('-');
			if (range.length == 1) {
				range.push(range[0]);
			}
			var skip = (range[0] || 1) - 1;
			var take = (range[1] || Infinity) - skip;
			for (var item of ticks.all()) {
				if (skip > 0) {
					skip--;
				} else if (take > 0) {
					newticks.push(item);
					take--;
				} else break;
			}
			checkaufgabeProperty_parent(newticks, 'ID', 'set');
		} $(this).closest('.overlay').click(); return false;">
					<span style="float:left;"><i class="material-icons">colorize</i></span><span class="fop-menu-caption" title="<?php echo(_('limit range')); ?>"><?php echo(_('limit range')); ?> (<span class='cnt'></span>)
					</span>
				</span>
			</span>
		<?php } ?><?php
		if(true && (!\FOP\User::getIsGuest())) { ?>
			<span class="mdl-list__item mdl-button">
				<span class="mdl-list__item mdl-button" data-interaction-name="delete" style="margin-right:auto; text-align:left;"
					onclick="if(!confirm(<?php echo htmlentities(json_encode(_('confirmdelete'))); ?>)) return;$.get('Tables/AufgabeProperty/delete?ajax&from=<?php echo urlencode(\FOP\Util::getBackUrl()); ?>&id=' + escape(checkaufgabeProperty_parent(null, 'ID'))).then(function () { reloadaufgabeProperty_parent(); }, function (err) { if (err.responseText.startsWith('http')) { window.location.href = err.responseText; } else {alert(err.responseText); }}); $(this).closest('.overlay').click(); return false;">
					<span style="float:left;"><i class="material-icons">delete</i></span><span class="fop-menu-caption" title="<?php echo(_('delete')); ?>"><?php echo(_('delete')); ?> (<span class='cnt'></span>)
					</span>
				</span>
			</span>
		<?php } ?>
														</ul>
														<!-- column hide -->
														<button type="button" class="mdl-button mdl-js-button mdl-button--icon" onclick="dropDownFixPosition($(this), $(this).next())">
															<i class="material-icons">visibility</i>
														</button>
														<ul class="mdl-list mdl-card mdl-shadow--4dp fop-scroll-menu">
															<?php foreach ($columns AS $col) { ?>
																<li class="mdl-list__item mdl-button" onclick="
																	var isVisible = this.firstElementChild.innerText !== 'clear';
																	this.firstElementChild.innerText = isVisible ? 'clear' : 'visibility'; // switch icon
																	tableColumnVisibility('aufgabeProperty_parent', <?php echo htmlentities(json_encode($col['id'])); ?>, !isVisible); // the rest is up to a helper function in layout/tables.fop
																	">
																	<i class="material-icons"><?php if ($col['collapsed']) { echo 'clear'; } else { echo 'visibility'; }?></i>
																	<?php echo htmlentities($col['desc']); ?>
																</li>
															<?php } ?>
															<li class="mdl-list__item mdl-button" onclick="
																$.get('FOP/Index/dataview?data='+encodeURIComponent(JSON.stringify({dataview: 'aufgabeProperty_parent', reset: true}))).then(function () { location.reload(); });
																">
																<i class="material-icons">refresh</i>
																<?php echo _('reset all'); ?>
															</li>
														</ul>
													</div>
												</div><?php }
												
												foreach ($columns AS $col) {
													// Spalten-Überschrift rendern
													echo $col['header'];
												} ?>
											 </div>
											
											<div class="fop-table-body" id="table_aufgabeProperty_parent" <?php \EasyEditor\Navigation::printScroll('dv.AufgabeProperty_parent', '/* scroll horiz */ this.previousElementSibling.firstElementChild.style.marginLeft = \'-\' + this.scrollLeft + \'px\';
												/* scroll verti */
												var self = this;
												if (window.DataViewScrollReloadTimeout) clearTimeout(window.DataViewScrollReloadTimeout);
												window.DataViewScrollReloadTimeout = setTimeout(function () {
													var currentPage = parseInt(query[\'page_aufgabeProperty_parent\'] || 0);
													var paddingTop = parseInt( self.lastElementChild.style.paddingTop, 10);
													var wantedPage = Math.max(0, currentPage + Math.floor((self.scrollTop - paddingTop) / ' . ($itemheight * $itemsperpage) . '));
													if (wantedPage != currentPage) {
														query[\'page_aufgabeProperty_parent\'] = wantedPage;
														reloadaufgabeProperty_parent(undefined, undefined, true);
													}
												}, 50);
											'); ?>>
												<div class="fop-table-body-inner" style="min-height: <?php echo 12 + $itemheight * ($itemcount + $additionalLines); ?>px; padding-top: <?php echo $itemheight * $itemsperpage * $page; ?>px;">
												<?php foreach($arr as $itempos => $item) {
													?>
													<div class="fop-table-row" style="" data-aufgabeProperty-id="<?php echo htmlentities($item['ID']); ?>">

													<?php if (!isset($_GET['select'])) { ?>
													<div class='fop-table-column noprint' style="width: <?php echo json_encode($firstColumnWidth); ?>px;" onclick="$(this).find('input[type=checkbox]').first().click(); event.stopPropagation();">
													<label onclick="event.stopPropagation();" class="mdl-checkbox mdl-js-checkbox aufgabeProperty_parent__checkbox aufgabeProperty_parent__checkbox aufgabeProperty_parent__checkbox-ID-<?php echo htmlentities($item['ID']); ?>" style="width: auto;" for="aufgabeProperty_parent__<?php echo htmlentities($itempos); ?>-checkbox">
													<input class="mdl-checkbox__input" id="aufgabeProperty_parent__<?php echo htmlentities($itempos); ?>-checkbox" type="checkbox" onchange="<?php if (isset($item['ID'])) echo 'checkaufgabeProperty_parent(' . htmlentities(json_encode($item['ID'])) . ', \'ID\', this.checked); ' ?>">
													</label><button type="button" class="mdl-button mdl-js-button mdl-button--icon aufgabeProperty_parent__action" onclick="
														event.stopPropagation();
														dropDownFixPosition($(this), $(this).next());
														">
														<i class="material-icons">more_vert</i>
													</button><ul class="mdl-list mdl-card mdl-shadow--4dp fop-scroll-menu" id="fop-scroll-menu-aufgabeProperty_parent-action-<?php echo $item['ID'] ?? 0; ?>">
														<?php
		if(isset($item['ID']) && $item['operation::view'] && $item['operation::edit']) { ?>
			<a class="mdl-list__item mdl-button" data-interaction-name="edit" style="margin-right:auto; text-align:left;" href="<?php echo htmlentities(\TablesRouter\AufgabeProperty::editURL($item['ID'], ['from' => \FOP\Util::getBackUrl()])); ?>"
				onclick="   
					open_url(this.href, false);
					$(this).closest('.overlay').click();
					return false;">
				<span><i class="material-icons">edit</i></span><span class="fop-menu-caption" title="<?php echo(_('edit')); ?>"><?php echo(_('edit')); ?></span>
			</a>
		<?php } ?><?php
		if(isset($item['ID']) && $item['operation::delete']) { ?>
			<a class="mdl-list__item mdl-button" data-interaction-name="delete" style="margin-right:auto; text-align:left;" href="#"
				onclick="if(!confirm(<?php echo htmlentities(json_encode(_('confirmdelete'))); ?>)) return false;   $.get('Tables/AufgabeProperty/delete?ajax&id=<?php echo htmlentities($item['ID']);?>&from=<?php echo htmlentities(\FOP\Util::getBackUrl());?>').then(function () { reloadaufgabeProperty_parent(); }, function (err) { if (err.responseText.startsWith('http')) { window.location.href = err.responseText; } else {alert(err.responseText); }}); $(this).closest('.overlay').click(); return false;
					open_url(this.href, false);
					$(this).closest('.overlay').click();
					return false;">
				<span><i class="material-icons">delete</i></span><span class="fop-menu-caption" title="<?php echo(_('delete')); ?>"><?php echo(_('delete')); ?></span>
			</a>
		<?php } ?>
													</ul><?php
		if(isset($item['ID']) && $item['operation::view'] && $item['operation::edit']) {
			?><a class="mdl-button mdl-js-button mdl-button--icon tbl-link" data-tbl="aufgabeProperty" data-id="<?php echo htmlentities($item['ID']); ?>" data-interaction-name="edit" href="<?php echo htmlentities(\TablesRouter\AufgabeProperty::editURL($item['ID'], ['from' => \FOP\Util::getBackUrl()])); ?>"
				onclick="event.stopPropagation();    reloadaufgabeProperty_parent();
					$(this).closest('.overlay').click();
					if (this.href != '#') {
						open_url(this.href, false);
					}
					event.preventDefault();"
				title="<?php echo(_('edit')); ?>">
				<i class="material-icons">edit</i>
			</a><?php } ?>
													</div><?php } ?><?php
													
													foreach ($columns AS $col) {
														$col['render']($item);
													}
													?></div>
												 <?php }?>

													</div>
												</div>

												
												
												</div><?php
												
	
    
  }

  public static function renderScript($id) { 
    
    
    // --- BLOCK: main ---
    
								\FOP\I18n::ensureIsLoaded();
								?>
								<script type="text/javascript">
									
    function changefilter_aufgabeProperty_parent_aufgabePropertyDropdown2ValueListMultiFilter(val, cb) {
		  if (val) {
			  querySet('filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value', val, cb.checked);
		  } else {
			  delete query['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value'];
		  }reloadaufgabeProperty_parent();
        
    }

		var i7356b317c112dc91e60ee65370be34cd433905d8d89118dc6180848fc291042etimeout = null;
		function changefilter_aufgabeProperty_parent_aufgabePropertyDropdown2ValueSearchFilter(val, callback) {
			if(i7356b317c112dc91e60ee65370be34cd433905d8d89118dc6180848fc291042etimeout) clearTimeout(i7356b317c112dc91e60ee65370be34cd433905d8d89118dc6180848fc291042etimeout);

			i7356b317c112dc91e60ee65370be34cd433905d8d89118dc6180848fc291042etimeout = setTimeout(function() {
				$.getJSON(reloadaufgabeProperty_parent({action: 'getfilter_aufgabeProperty_parent_aufgabePropertyDropdown2ValueItemsByString', 'fstr': val}, true), function(r) {
					callback(r);
					query['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value_orig'] = val;
				});
			}, 300);
		}

	function getfilter_aufgabeProperty_parent_aufgabePropertyDropdown2ValueListMultiFilter() {
		var gui = $("<div class='fop-floatsorter'></div>");
		// TODO: usability #1866 auf ajax warten bevor ENTER behandelt wird
		var fstr = <?php echo(isset($_GET['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value_orig']) ? json_encode($_GET['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value_orig']) : '""') ?>;
		var search = $('<div class="mdl-textfield mdl-js-textfield">' + 
			'<input value="" class="mdl-textfield__input" id="7356b317c112dc91e60ee65370be34cd433905d8d89118dc6180848fc291042e" type="text">' +
			'<label class="mdl-textfield__label" for="7356b317c112dc91e60ee65370be34cd433905d8d89118dc6180848fc291042e">Filter...</label>' +
			'</div>');
		search.find('input').val(fstr).keyup(function (event) {
			var self = this;
			if ((event.keyCode || e.which) == 13) {
				var hasChecked = false;
				if (this.value) {
					// search value + tick all search results
					checkboxes.find('input').each(function (i, inp) {
						if (!inp.checked && $(inp).data('value')) {
							inp.checked = true;
							querySet('filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value', $(inp).data('value'), true);
							hasChecked = true;
						}
					});
				} else {
					// untick all
					search.find('input').val('');
					query['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value_orig'] = '';
					delete query['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value'];
					reload('', items);
					hasChecked = true;
				}
				if (hasChecked) {reloadaufgabeProperty_parent();
					
				} else {
					$('#table_aufgabeProperty_parent').find('.fop-table-row:first').click();
				}
			} else {
				changefilter_aufgabeProperty_parent_aufgabePropertyDropdown2ValueSearchFilter(this.value, function (result) {
					reload(self.value, result);
				});
			}
		});
		gui.append(search);

		var checkboxes = $("<div></div>").css({maxHeight: '200px', overflow: 'auto'});
		var items = <?php
			// TODO: deps-Variable füllen mit DV-Parametern vom DataView id
			echo json_encode(\DataView\AufgabeProperty_parent::getfilter_aufgabeProperty_parent_aufgabePropertyDropdown2ValueItemsByStringAction('', $id));
		?>;

		function reload(fstr, items) {
			// rerender checkbox list
			checkboxes.empty();
			checkboxes.append($('<i style="cursor: pointer;"><?php echo _('show all'); ?></i>').click(function () {
				search.find('input').val('');
				query['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value_orig'] = '';
				delete query['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value'];
				reload('', items);reloadaufgabeProperty_parent();
				
			})).append('<br/>');
			// NULL-Wert auch suchbar #2057 (kommt als ID=0 an, muss für die idlist in _null geändert werden)
			for (var i = 0; i < items.length; i++) {
				let value = (items[i].ID === '0' ? '_null' : items[i].ID);
				let descr = items[i].description;
				let checked = querySet('filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value', value);
				if (!fstr || checked || descr.toLowerCase().includes(fstr.toLowerCase())) {
					checkboxes.append($('<input type=\'checkbox\'  onclick=\'changefilter_aufgabeProperty_parent_aufgabePropertyDropdown2ValueListMultiFilter("' + value + '", this)\' ' + (checked ? ' checked>': '> ')).data('value', value)).append($('<span></span>').text(descr).prepend('&nbsp;')).append('<br/>');
				}
			 }
		}
		reload(fstr, items);
		gui.append(checkboxes);

		return gui;
	}
    function changefilter_aufgabeProperty_parent_typeListMultiFilter(val, cb) {
		  if (val) {
			  querySet('filter_aufgabeProperty_parent_type', val, cb.checked);
		  } else {
			  delete query['filter_aufgabeProperty_parent_type'];
		  }reloadaufgabeProperty_parent();
        
    }

		var i5a86d092ae5817a0493f543cda98885900c8f0b0b2f4424eb9d12b1a041b1a26timeout = null;
		function changefilter_aufgabeProperty_parent_typeSearchFilter(val, callback) {
			if(i5a86d092ae5817a0493f543cda98885900c8f0b0b2f4424eb9d12b1a041b1a26timeout) clearTimeout(i5a86d092ae5817a0493f543cda98885900c8f0b0b2f4424eb9d12b1a041b1a26timeout);

			i5a86d092ae5817a0493f543cda98885900c8f0b0b2f4424eb9d12b1a041b1a26timeout = setTimeout(function() {
				$.getJSON(reloadaufgabeProperty_parent({action: 'getfilter_aufgabeProperty_parent_typeItemsByString', 'fstr': val}, true), function(r) {
					callback(r);
					query['filter_aufgabeProperty_parent_type_orig'] = val;
				});
			}, 300);
		}

	function getfilter_aufgabeProperty_parent_typeListMultiFilter() {
		var gui = $("<div class='fop-floatsorter'></div>");
		// TODO: usability #1866 auf ajax warten bevor ENTER behandelt wird
		var fstr = <?php echo(isset($_GET['filter_aufgabeProperty_parent_type_orig']) ? json_encode($_GET['filter_aufgabeProperty_parent_type_orig']) : '""') ?>;
		var search = $('<div class="mdl-textfield mdl-js-textfield">' + 
			'<input value="" class="mdl-textfield__input" id="5a86d092ae5817a0493f543cda98885900c8f0b0b2f4424eb9d12b1a041b1a26" type="text">' +
			'<label class="mdl-textfield__label" for="5a86d092ae5817a0493f543cda98885900c8f0b0b2f4424eb9d12b1a041b1a26">Filter...</label>' +
			'</div>');
		search.find('input').val(fstr).keyup(function (event) {
			var self = this;
			if ((event.keyCode || e.which) == 13) {
				var hasChecked = false;
				if (this.value) {
					// search value + tick all search results
					checkboxes.find('input').each(function (i, inp) {
						if (!inp.checked && $(inp).data('value')) {
							inp.checked = true;
							querySet('filter_aufgabeProperty_parent_type', $(inp).data('value'), true);
							hasChecked = true;
						}
					});
				} else {
					// untick all
					search.find('input').val('');
					query['filter_aufgabeProperty_parent_type_orig'] = '';
					delete query['filter_aufgabeProperty_parent_type'];
					reload('', items);
					hasChecked = true;
				}
				if (hasChecked) {reloadaufgabeProperty_parent();
					
				} else {
					$('#table_aufgabeProperty_parent').find('.fop-table-row:first').click();
				}
			} else {
				changefilter_aufgabeProperty_parent_typeSearchFilter(this.value, function (result) {
					reload(self.value, result);
				});
			}
		});
		gui.append(search);

		var checkboxes = $("<div></div>").css({maxHeight: '200px', overflow: 'auto'});
		var items = <?php
			// TODO: deps-Variable füllen mit DV-Parametern vom DataView id
			echo json_encode(\DataView\AufgabeProperty_parent::getfilter_aufgabeProperty_parent_typeItemsByStringAction('', $id));
		?>;

		function reload(fstr, items) {
			// rerender checkbox list
			checkboxes.empty();
			checkboxes.append($('<i style="cursor: pointer;"><?php echo _('show all'); ?></i>').click(function () {
				search.find('input').val('');
				query['filter_aufgabeProperty_parent_type_orig'] = '';
				delete query['filter_aufgabeProperty_parent_type'];
				reload('', items);reloadaufgabeProperty_parent();
				
			})).append('<br/>');
			// NULL-Wert auch suchbar #2057 (kommt als ID=0 an, muss für die idlist in _null geändert werden)
			for (var i = 0; i < items.length; i++) {
				let value = (items[i].ID === '0' ? '_null' : items[i].ID);
				let descr = items[i].description;
				let checked = querySet('filter_aufgabeProperty_parent_type', value);
				if (!fstr || checked || descr.toLowerCase().includes(fstr.toLowerCase())) {
					checkboxes.append($('<input type=\'checkbox\'  onclick=\'changefilter_aufgabeProperty_parent_typeListMultiFilter("' + value + '", this)\' ' + (checked ? ' checked>': '> ')).data('value', value)).append($('<span></span>').text(descr).prepend('&nbsp;')).append('<br/>');
				}
			 }
		}
		reload(fstr, items);
		gui.append(checkboxes);

		return gui;
	}
    function changefilter_aufgabeProperty_parent_parentListMultiFilter(val, cb) {
		  if (val) {
			  querySet('filter_aufgabeProperty_parent_parent', val, cb.checked);
		  } else {
			  delete query['filter_aufgabeProperty_parent_parent'];
		  }reloadaufgabeProperty_parent();
        
    }

		var ic9e7cdb24bf86757540544c99e0f712fbbf6c6fbde5d49147ae9deef213e5c3btimeout = null;
		function changefilter_aufgabeProperty_parent_parentSearchFilter(val, callback) {
			if(ic9e7cdb24bf86757540544c99e0f712fbbf6c6fbde5d49147ae9deef213e5c3btimeout) clearTimeout(ic9e7cdb24bf86757540544c99e0f712fbbf6c6fbde5d49147ae9deef213e5c3btimeout);

			ic9e7cdb24bf86757540544c99e0f712fbbf6c6fbde5d49147ae9deef213e5c3btimeout = setTimeout(function() {
				$.getJSON(reloadaufgabeProperty_parent({action: 'getfilter_aufgabeProperty_parent_parentItemsByString', 'fstr': val}, true), function(r) {
					callback(r);
					query['filter_aufgabeProperty_parent_parent_orig'] = val;
				});
			}, 300);
		}

	function getfilter_aufgabeProperty_parent_parentListMultiFilter() {
		var gui = $("<div class='fop-floatsorter'></div>");
		// TODO: usability #1866 auf ajax warten bevor ENTER behandelt wird
		var fstr = <?php echo(isset($_GET['filter_aufgabeProperty_parent_parent_orig']) ? json_encode($_GET['filter_aufgabeProperty_parent_parent_orig']) : '""') ?>;
		var search = $('<div class="mdl-textfield mdl-js-textfield">' + 
			'<input value="" class="mdl-textfield__input" id="c9e7cdb24bf86757540544c99e0f712fbbf6c6fbde5d49147ae9deef213e5c3b" type="text">' +
			'<label class="mdl-textfield__label" for="c9e7cdb24bf86757540544c99e0f712fbbf6c6fbde5d49147ae9deef213e5c3b">Filter...</label>' +
			'</div>');
		search.find('input').val(fstr).keyup(function (event) {
			var self = this;
			if ((event.keyCode || e.which) == 13) {
				var hasChecked = false;
				if (this.value) {
					// search value + tick all search results
					checkboxes.find('input').each(function (i, inp) {
						if (!inp.checked && $(inp).data('value')) {
							inp.checked = true;
							querySet('filter_aufgabeProperty_parent_parent', $(inp).data('value'), true);
							hasChecked = true;
						}
					});
				} else {
					// untick all
					search.find('input').val('');
					query['filter_aufgabeProperty_parent_parent_orig'] = '';
					delete query['filter_aufgabeProperty_parent_parent'];
					reload('', items);
					hasChecked = true;
				}
				if (hasChecked) {reloadaufgabeProperty_parent();
					
				} else {
					$('#table_aufgabeProperty_parent').find('.fop-table-row:first').click();
				}
			} else {
				changefilter_aufgabeProperty_parent_parentSearchFilter(this.value, function (result) {
					reload(self.value, result);
				});
			}
		});
		gui.append(search);

		var checkboxes = $("<div></div>").css({maxHeight: '200px', overflow: 'auto'});
		var items = <?php
			// TODO: deps-Variable füllen mit DV-Parametern vom DataView id
			echo json_encode(\DataView\AufgabeProperty_parent::getfilter_aufgabeProperty_parent_parentItemsByStringAction('', $id));
		?>;

		function reload(fstr, items) {
			// rerender checkbox list
			checkboxes.empty();
			checkboxes.append($('<i style="cursor: pointer;"><?php echo _('show all'); ?></i>').click(function () {
				search.find('input').val('');
				query['filter_aufgabeProperty_parent_parent_orig'] = '';
				delete query['filter_aufgabeProperty_parent_parent'];
				reload('', items);reloadaufgabeProperty_parent();
				
			})).append('<br/>');
			// NULL-Wert auch suchbar #2057 (kommt als ID=0 an, muss für die idlist in _null geändert werden)
			for (var i = 0; i < items.length; i++) {
				let value = (items[i].ID === '0' ? '_null' : items[i].ID);
				let descr = items[i].description;
				let checked = querySet('filter_aufgabeProperty_parent_parent', value);
				if (!fstr || checked || descr.toLowerCase().includes(fstr.toLowerCase())) {
					checkboxes.append($('<input type=\'checkbox\'  onclick=\'changefilter_aufgabeProperty_parent_parentListMultiFilter("' + value + '", this)\' ' + (checked ? ' checked>': '> ')).data('value', value)).append($('<span></span>').text(descr).prepend('&nbsp;')).append('<br/>');
				}
			 }
		}
		reload(fstr, items);
		gui.append(checkboxes);

		return gui;
	}
									
    function changefilter_aufgabeProperty_parent_aufgabePropertyDropdown2ValueListMultiFilter(val, cb) {
		  if (val) {
			  querySet('filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value', val, cb.checked);
		  } else {
			  delete query['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value'];
		  }reloadaufgabeProperty_parent();
        
    }

		var i7356b317c112dc91e60ee65370be34cd433905d8d89118dc6180848fc291042etimeout = null;
		function changefilter_aufgabeProperty_parent_aufgabePropertyDropdown2ValueSearchFilter(val, callback) {
			if(i7356b317c112dc91e60ee65370be34cd433905d8d89118dc6180848fc291042etimeout) clearTimeout(i7356b317c112dc91e60ee65370be34cd433905d8d89118dc6180848fc291042etimeout);

			i7356b317c112dc91e60ee65370be34cd433905d8d89118dc6180848fc291042etimeout = setTimeout(function() {
				$.getJSON(reloadaufgabeProperty_parent({action: 'getfilter_aufgabeProperty_parent_aufgabePropertyDropdown2ValueItemsByString', 'fstr': val}, true), function(r) {
					callback(r);
					query['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value_orig'] = val;
				});
			}, 300);
		}

	function getfilter_aufgabeProperty_parent_aufgabePropertyDropdown2ValueListMultiFilter() {
		var gui = $("<div class='fop-floatsorter'></div>");
		// TODO: usability #1866 auf ajax warten bevor ENTER behandelt wird
		var fstr = <?php echo(isset($_GET['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value_orig']) ? json_encode($_GET['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value_orig']) : '""') ?>;
		var search = $('<div class="mdl-textfield mdl-js-textfield">' + 
			'<input value="" class="mdl-textfield__input" id="7356b317c112dc91e60ee65370be34cd433905d8d89118dc6180848fc291042e" type="text">' +
			'<label class="mdl-textfield__label" for="7356b317c112dc91e60ee65370be34cd433905d8d89118dc6180848fc291042e">Filter...</label>' +
			'</div>');
		search.find('input').val(fstr).keyup(function (event) {
			var self = this;
			if ((event.keyCode || e.which) == 13) {
				var hasChecked = false;
				if (this.value) {
					// search value + tick all search results
					checkboxes.find('input').each(function (i, inp) {
						if (!inp.checked && $(inp).data('value')) {
							inp.checked = true;
							querySet('filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value', $(inp).data('value'), true);
							hasChecked = true;
						}
					});
				} else {
					// untick all
					search.find('input').val('');
					query['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value_orig'] = '';
					delete query['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value'];
					reload('', items);
					hasChecked = true;
				}
				if (hasChecked) {reloadaufgabeProperty_parent();
					
				} else {
					$('#table_aufgabeProperty_parent').find('.fop-table-row:first').click();
				}
			} else {
				changefilter_aufgabeProperty_parent_aufgabePropertyDropdown2ValueSearchFilter(this.value, function (result) {
					reload(self.value, result);
				});
			}
		});
		gui.append(search);

		var checkboxes = $("<div></div>").css({maxHeight: '200px', overflow: 'auto'});
		var items = <?php
			// TODO: deps-Variable füllen mit DV-Parametern vom DataView id
			echo json_encode(\DataView\AufgabeProperty_parent::getfilter_aufgabeProperty_parent_aufgabePropertyDropdown2ValueItemsByStringAction('', $id));
		?>;

		function reload(fstr, items) {
			// rerender checkbox list
			checkboxes.empty();
			checkboxes.append($('<i style="cursor: pointer;"><?php echo _('show all'); ?></i>').click(function () {
				search.find('input').val('');
				query['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value_orig'] = '';
				delete query['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value'];
				reload('', items);reloadaufgabeProperty_parent();
				
			})).append('<br/>');
			// NULL-Wert auch suchbar #2057 (kommt als ID=0 an, muss für die idlist in _null geändert werden)
			for (var i = 0; i < items.length; i++) {
				let value = (items[i].ID === '0' ? '_null' : items[i].ID);
				let descr = items[i].description;
				let checked = querySet('filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value', value);
				if (!fstr || checked || descr.toLowerCase().includes(fstr.toLowerCase())) {
					checkboxes.append($('<input type=\'checkbox\'  onclick=\'changefilter_aufgabeProperty_parent_aufgabePropertyDropdown2ValueListMultiFilter("' + value + '", this)\' ' + (checked ? ' checked>': '> ')).data('value', value)).append($('<span></span>').text(descr).prepend('&nbsp;')).append('<br/>');
				}
			 }
		}
		reload(fstr, items);
		gui.append(checkboxes);

		return gui;
	}
    function changefilter_aufgabeProperty_parent_typeListMultiFilter(val, cb) {
		  if (val) {
			  querySet('filter_aufgabeProperty_parent_type', val, cb.checked);
		  } else {
			  delete query['filter_aufgabeProperty_parent_type'];
		  }reloadaufgabeProperty_parent();
        
    }

		var i5a86d092ae5817a0493f543cda98885900c8f0b0b2f4424eb9d12b1a041b1a26timeout = null;
		function changefilter_aufgabeProperty_parent_typeSearchFilter(val, callback) {
			if(i5a86d092ae5817a0493f543cda98885900c8f0b0b2f4424eb9d12b1a041b1a26timeout) clearTimeout(i5a86d092ae5817a0493f543cda98885900c8f0b0b2f4424eb9d12b1a041b1a26timeout);

			i5a86d092ae5817a0493f543cda98885900c8f0b0b2f4424eb9d12b1a041b1a26timeout = setTimeout(function() {
				$.getJSON(reloadaufgabeProperty_parent({action: 'getfilter_aufgabeProperty_parent_typeItemsByString', 'fstr': val}, true), function(r) {
					callback(r);
					query['filter_aufgabeProperty_parent_type_orig'] = val;
				});
			}, 300);
		}

	function getfilter_aufgabeProperty_parent_typeListMultiFilter() {
		var gui = $("<div class='fop-floatsorter'></div>");
		// TODO: usability #1866 auf ajax warten bevor ENTER behandelt wird
		var fstr = <?php echo(isset($_GET['filter_aufgabeProperty_parent_type_orig']) ? json_encode($_GET['filter_aufgabeProperty_parent_type_orig']) : '""') ?>;
		var search = $('<div class="mdl-textfield mdl-js-textfield">' + 
			'<input value="" class="mdl-textfield__input" id="5a86d092ae5817a0493f543cda98885900c8f0b0b2f4424eb9d12b1a041b1a26" type="text">' +
			'<label class="mdl-textfield__label" for="5a86d092ae5817a0493f543cda98885900c8f0b0b2f4424eb9d12b1a041b1a26">Filter...</label>' +
			'</div>');
		search.find('input').val(fstr).keyup(function (event) {
			var self = this;
			if ((event.keyCode || e.which) == 13) {
				var hasChecked = false;
				if (this.value) {
					// search value + tick all search results
					checkboxes.find('input').each(function (i, inp) {
						if (!inp.checked && $(inp).data('value')) {
							inp.checked = true;
							querySet('filter_aufgabeProperty_parent_type', $(inp).data('value'), true);
							hasChecked = true;
						}
					});
				} else {
					// untick all
					search.find('input').val('');
					query['filter_aufgabeProperty_parent_type_orig'] = '';
					delete query['filter_aufgabeProperty_parent_type'];
					reload('', items);
					hasChecked = true;
				}
				if (hasChecked) {reloadaufgabeProperty_parent();
					
				} else {
					$('#table_aufgabeProperty_parent').find('.fop-table-row:first').click();
				}
			} else {
				changefilter_aufgabeProperty_parent_typeSearchFilter(this.value, function (result) {
					reload(self.value, result);
				});
			}
		});
		gui.append(search);

		var checkboxes = $("<div></div>").css({maxHeight: '200px', overflow: 'auto'});
		var items = <?php
			// TODO: deps-Variable füllen mit DV-Parametern vom DataView id
			echo json_encode(\DataView\AufgabeProperty_parent::getfilter_aufgabeProperty_parent_typeItemsByStringAction('', $id));
		?>;

		function reload(fstr, items) {
			// rerender checkbox list
			checkboxes.empty();
			checkboxes.append($('<i style="cursor: pointer;"><?php echo _('show all'); ?></i>').click(function () {
				search.find('input').val('');
				query['filter_aufgabeProperty_parent_type_orig'] = '';
				delete query['filter_aufgabeProperty_parent_type'];
				reload('', items);reloadaufgabeProperty_parent();
				
			})).append('<br/>');
			// NULL-Wert auch suchbar #2057 (kommt als ID=0 an, muss für die idlist in _null geändert werden)
			for (var i = 0; i < items.length; i++) {
				let value = (items[i].ID === '0' ? '_null' : items[i].ID);
				let descr = items[i].description;
				let checked = querySet('filter_aufgabeProperty_parent_type', value);
				if (!fstr || checked || descr.toLowerCase().includes(fstr.toLowerCase())) {
					checkboxes.append($('<input type=\'checkbox\'  onclick=\'changefilter_aufgabeProperty_parent_typeListMultiFilter("' + value + '", this)\' ' + (checked ? ' checked>': '> ')).data('value', value)).append($('<span></span>').text(descr).prepend('&nbsp;')).append('<br/>');
				}
			 }
		}
		reload(fstr, items);
		gui.append(checkboxes);

		return gui;
	}
    function changefilter_aufgabeProperty_parent_parentListMultiFilter(val, cb) {
		  if (val) {
			  querySet('filter_aufgabeProperty_parent_parent', val, cb.checked);
		  } else {
			  delete query['filter_aufgabeProperty_parent_parent'];
		  }reloadaufgabeProperty_parent();
        
    }

		var ic9e7cdb24bf86757540544c99e0f712fbbf6c6fbde5d49147ae9deef213e5c3btimeout = null;
		function changefilter_aufgabeProperty_parent_parentSearchFilter(val, callback) {
			if(ic9e7cdb24bf86757540544c99e0f712fbbf6c6fbde5d49147ae9deef213e5c3btimeout) clearTimeout(ic9e7cdb24bf86757540544c99e0f712fbbf6c6fbde5d49147ae9deef213e5c3btimeout);

			ic9e7cdb24bf86757540544c99e0f712fbbf6c6fbde5d49147ae9deef213e5c3btimeout = setTimeout(function() {
				$.getJSON(reloadaufgabeProperty_parent({action: 'getfilter_aufgabeProperty_parent_parentItemsByString', 'fstr': val}, true), function(r) {
					callback(r);
					query['filter_aufgabeProperty_parent_parent_orig'] = val;
				});
			}, 300);
		}

	function getfilter_aufgabeProperty_parent_parentListMultiFilter() {
		var gui = $("<div class='fop-floatsorter'></div>");
		// TODO: usability #1866 auf ajax warten bevor ENTER behandelt wird
		var fstr = <?php echo(isset($_GET['filter_aufgabeProperty_parent_parent_orig']) ? json_encode($_GET['filter_aufgabeProperty_parent_parent_orig']) : '""') ?>;
		var search = $('<div class="mdl-textfield mdl-js-textfield">' + 
			'<input value="" class="mdl-textfield__input" id="c9e7cdb24bf86757540544c99e0f712fbbf6c6fbde5d49147ae9deef213e5c3b" type="text">' +
			'<label class="mdl-textfield__label" for="c9e7cdb24bf86757540544c99e0f712fbbf6c6fbde5d49147ae9deef213e5c3b">Filter...</label>' +
			'</div>');
		search.find('input').val(fstr).keyup(function (event) {
			var self = this;
			if ((event.keyCode || e.which) == 13) {
				var hasChecked = false;
				if (this.value) {
					// search value + tick all search results
					checkboxes.find('input').each(function (i, inp) {
						if (!inp.checked && $(inp).data('value')) {
							inp.checked = true;
							querySet('filter_aufgabeProperty_parent_parent', $(inp).data('value'), true);
							hasChecked = true;
						}
					});
				} else {
					// untick all
					search.find('input').val('');
					query['filter_aufgabeProperty_parent_parent_orig'] = '';
					delete query['filter_aufgabeProperty_parent_parent'];
					reload('', items);
					hasChecked = true;
				}
				if (hasChecked) {reloadaufgabeProperty_parent();
					
				} else {
					$('#table_aufgabeProperty_parent').find('.fop-table-row:first').click();
				}
			} else {
				changefilter_aufgabeProperty_parent_parentSearchFilter(this.value, function (result) {
					reload(self.value, result);
				});
			}
		});
		gui.append(search);

		var checkboxes = $("<div></div>").css({maxHeight: '200px', overflow: 'auto'});
		var items = <?php
			// TODO: deps-Variable füllen mit DV-Parametern vom DataView id
			echo json_encode(\DataView\AufgabeProperty_parent::getfilter_aufgabeProperty_parent_parentItemsByStringAction('', $id));
		?>;

		function reload(fstr, items) {
			// rerender checkbox list
			checkboxes.empty();
			checkboxes.append($('<i style="cursor: pointer;"><?php echo _('show all'); ?></i>').click(function () {
				search.find('input').val('');
				query['filter_aufgabeProperty_parent_parent_orig'] = '';
				delete query['filter_aufgabeProperty_parent_parent'];
				reload('', items);reloadaufgabeProperty_parent();
				
			})).append('<br/>');
			// NULL-Wert auch suchbar #2057 (kommt als ID=0 an, muss für die idlist in _null geändert werden)
			for (var i = 0; i < items.length; i++) {
				let value = (items[i].ID === '0' ? '_null' : items[i].ID);
				let descr = items[i].description;
				let checked = querySet('filter_aufgabeProperty_parent_parent', value);
				if (!fstr || checked || descr.toLowerCase().includes(fstr.toLowerCase())) {
					checkboxes.append($('<input type=\'checkbox\'  onclick=\'changefilter_aufgabeProperty_parent_parentListMultiFilter("' + value + '", this)\' ' + (checked ? ' checked>': '> ')).data('value', value)).append($('<span></span>').text(descr).prepend('&nbsp;')).append('<br/>');
				}
			 }
		}
		reload(fstr, items);
		gui.append(checkboxes);

		return gui;
	}
									function updateNumberaufgabeProperty_parent(col) {
										//var checklist = window.DataViewChecked['aufgabeProperty_parent'][col];
										//if (checklist.id) {
											// checklist is online
											// TODO: check if cache is alive, otherwise reload from ajax, delay execution and return now
											//checklist.ranges = [[1,10000000]]; // mostly we use indirect idlists to tick all marks; so this is an approximation
										//}
										// checkboxes aktualisieren
										if (window.DataViewChecked && window.DataViewChecked['aufgabeProperty_parent'] && window.DataViewChecked['aufgabeProperty_parent'][col].ranges.length > 0) {
											$('.aufgabeProperty_parent__mass-action').css('visibility', 'visible');
											$('.aufgabeProperty_parent__action').css('visibility', 'hidden');
										} else {
											$('.aufgabeProperty_parent__mass-action').css('visibility', 'hidden');
											$('.aufgabeProperty_parent__action').css('visibility', 'visible');
										}
										$('.aufgabeProperty_parent__checkbox').each(function (idx, x) {
											for (var cssclass of x.classList) {
												if (cssclass.startsWith('aufgabeProperty_parent__checkbox-'+col+'-')) {
													var my_id = cssclass.substr(('aufgabeProperty_parent__checkbox-'+col+'-').length);
													if (window.DataViewChecked) {
														x.MaterialCheckbox[checklist.has(my_id) ? 'check' : 'uncheck']();
													}
												}
											}
										});
									}
									function reloadaufgabeProperty_parent (params, returnUrl, onlyScroll, addPadding = 0) {
										// copy query
										let nq = JSON.parse(JSON.stringify(query));
										nq['parent_request'] = <?php echo json_encode(strtok(\FOP\Util::getBackUrl(), '?')); ?>;
										<?php if (isset($_GET['select'])) { ?>nq['select'] = 'select';<?php } ?>
										nq["id"] = <?php echo json_encode($id); ?>; 
										if (params) {
											for (var i in params) nq[i] = params[i];
											var action = nq['action'];
											delete nq['action'];
											let querystr = "DataView/AufgabeProperty_parent/" + action + "?" + Object.keys(nq).map(function(k){ return k + "=" +  encodeURIComponent(nq[k]); }).join("&");
											// direkt aufrufen (ist wohl ein Download oder so)
											if (returnUrl) return querystr;
											window.location.href = querystr;
										} else {
											let querystr;
											
											
											<?php if ((!\FOP\User::getIsGuest()) && (!\FOP\User::getIsGuest())) { ?>
											delete nq['action'];
											querystr = "DataView/AufgabeProperty_parent/renderTabTable?" + Object.keys(nq).map(function(k){ return k + "=" +  encodeURIComponent(nq[k]); }).join("&");
											// per Ajax laden
											if(!$("#aufgabeProperty_parent-table")?.parent()?.parent()?.hasClass('fop-form-feature-collapsed') || $("#aufgabeProperty_parent-table")?.parent()?.parent()?.hasClass('fop-form-feature-mode-area')) {
											$.get(querystr, function(data){
												var tab = $("#aufgabeProperty_parent-table");
												var top = tab.find('.fop-table-body-inner');
												var el;
												if (onlyScroll && (el = $('<div class="tabcontent">' + data + '</div>').find('.fop-table-body-inner'))) {
													// nur Scroll-Bereich ersetzen
													var paddingTop = parseInt(el.css('paddingTop') || '0px', 10);
													var minHeight = parseInt(el.css('minHeight'), 10)
													paddingTop += addPadding;
													minHeight += addPadding;
													top.css({paddingTop: paddingTop.toString()+'px', minHeight: minHeight.toString()+'px'}); // Offset
													el = el.children();
													top.empty();
													top.append(el);
													el = top; // top-upgrade doppelt machen, dadurch vermeiden wir das Array-upgrade => Performance
												} else {
													// gesamten Tab ersetzen
													tab.children().remove();
													el = tab.html('<div class="tabcontent">' + data + '</div>');
												}
												try {
													for (var i = 0; i < el.length; i++) upgradeDOM(el[i]);
												} catch (e) {
													console.log(e);
												}
												upgradeTable(el.find('.fop-table .fop-table-header')); // Falls es Tabellen-Layout ist: Spalten-Order anpassen
												flushURL(); // Neue URL in Titelleiste eintragen

												// Checkbox-Auswahl ankreuzen
												updateNumberaufgabeProperty_parent('ID');
											});
											} else {
												// gesamten Tab ersetzen
												var tab = $("#aufgabeProperty_parent-table");
												tab.children().remove();
												el = tab.html('<div class="fop-lazy-reload" onclick="reloadaufgabeProperty_parent()"></div>');
											}
											<?php } ?>
											
										}
									}
									function checkaufgabeProperty_parent (id, col, checked) {
										// ID-Liste aufbauen
										if (!window.DataViewChecked) window.DataViewChecked = {};
										if (!window.DataViewChecked['aufgabeProperty_parent']) window.DataViewChecked['aufgabeProperty_parent'] = {};
										if (!window.DataViewChecked['aufgabeProperty_parent'][col]) window.DataViewChecked['aufgabeProperty_parent'][col] = new IDList();

										// Abfrage aller gecheckten IDs für eine Tabelle
										if (!id) {
											return window.DataViewChecked['aufgabeProperty_parent'][col].toString();
										}

										// check all, check id
										if (id == 'all') {
											// TODO: umbauen #1289: 'all' auch nur auf ne idlist reduzieren
											if (checked) {
												$.get(reloadaufgabeProperty_parent({action: 'getids', col: col}, true), function (ids) {
													window.DataViewChecked['aufgabeProperty_parent'][col] = new IDList(ids);
													updateNumberaufgabeProperty_parent(col);
												});
											} else {
												window.DataViewChecked['aufgabeProperty_parent'][col] = new IDList();
												updateNumberaufgabeProperty_parent(col);
											}
										} else {
											var ids = new IDList(id);
											var allcb = $('#aufgabeProperty_parent__all-checkbox');
											if (allcb[0]) {
												allcb[0].parentElement.MaterialCheckbox.uncheck(); // TODO: prüfen, ob Gruppen-CBs voll werden
											}
											if (checked == 'set') {
												window.DataViewChecked['aufgabeProperty_parent'][col] = ids;
											} else for (id of ids.all()) {
												if (checked) {
													window.DataViewChecked['aufgabeProperty_parent'][col].push(id);
												} else {
													window.DataViewChecked['aufgabeProperty_parent'][col].remove(id);
												}
											}
											updateNumberaufgabeProperty_parent(col);
										}
									}
								</script><?php

    
  }

  public static function renderSpecialFilters() { 
    
    
    // --- BLOCK: main ---
    ?>
	
	<script type"text/javascript">
		function updateSpecialFilter(param, val) {
			query[param] = val.toString();reloadaufgabeProperty_parent();
			
		}

	</script>
	<?php
	
    
  }

  public static function getSQL($params, $id) { 
    
    
    // --- BLOCK: main ---
    
								// returns a sql snippet 'FROM (...) AS t WHERE' where you can prepend your select clauses and append your ORDER LIMIT
								$sql = 'FROM (SELECT /* ID */ '.qi('ID').' AS '.qi('ID').',
									/* aufgabePropertyDropdown2Value */ '.qi('aufgabePropertyDropdown2Value').' AS '.qi('aufgabePropertyDropdown2Value').',
									/* aufgabePropertyDropdown2Value::canView */ '.qi('ref:aufgabePropertyDropdown2Value').'.'.qi('aufgabePropertyDropdown2Value:canView').' AS '.qi('aufgabePropertyDropdown2Value::canView').',
									/* aufgabePropertyDropdown2Value::description */ '.qi('ref:aufgabePropertyDropdown2Value').'.'.qi('aufgabePropertyDropdown2Value:description').' AS '.qi('aufgabePropertyDropdown2Value::description').',
									/* aufgabePropertyDropdown2Value::property */ '.qi('aufgabeProperty').'.'.qi('type').' AS '.qi('aufgabePropertyDropdown2Value::property').',
									/* aufgabePropertyDropdown2Value::vis */ (\'aufgabePropertyDropdown2\') = ((SELECT ('.qi('zxF57KrA').'.'.qi('type').') FROM '.qi('aufgabePropertyType').' '.qi('zxF57KrA').' WHERE '.qi('zxF57KrA').'.'.qi('ID').' = '.qi('aufgabeProperty').'.'.qi('type').' LIMIT 1)) AS '.qi('aufgabePropertyDropdown2Value::vis').',
									/* dateValue */ '.qi('dateValue').' AS '.qi('dateValue').',
									/* dateValue::vis */ (\'date\') = ((SELECT ('.qi('qlmkLYxD').'.'.qi('type').') FROM '.qi('aufgabePropertyType').' '.qi('qlmkLYxD').' WHERE '.qi('qlmkLYxD').'.'.qi('ID').' = '.qi('aufgabeProperty').'.'.qi('type').' LIMIT 1)) AS '.qi('dateValue::vis').',
									/* doubleValue */ '.qi('doubleValue').' AS '.qi('doubleValue').',
									/* doubleValue::vis */ (\'double\') = ((SELECT ('.qi('W8Efbkfa').'.'.qi('type').') FROM '.qi('aufgabePropertyType').' '.qi('W8Efbkfa').' WHERE '.qi('W8Efbkfa').'.'.qi('ID').' = '.qi('aufgabeProperty').'.'.qi('type').' LIMIT 1)) AS '.qi('doubleValue::vis').',
									/* htmlValue */ '.qi('htmlValue').' AS '.qi('htmlValue').',
									/* htmlValue::vis */ (\'html\') = ((SELECT ('.qi('GIuNXQJJ').'.'.qi('type').') FROM '.qi('aufgabePropertyType').' '.qi('GIuNXQJJ').' WHERE '.qi('GIuNXQJJ').'.'.qi('ID').' = '.qi('aufgabeProperty').'.'.qi('type').' LIMIT 1)) AS '.qi('htmlValue::vis').',
									/* operation::create */ '.(\FOP\User::getIsGuest() ? 'false' : 'true').' AS '.qi('operation::create').',
									/* operation::delete */ '.(\FOP\User::getIsGuest() ? 'false' : 'true').' AS '.qi('operation::delete').',
									/* operation::edit */ '.(\FOP\User::getIsGuest() ? 'false' : 'true').' AS '.qi('operation::edit').',
									/* operation::index */ ' . (!\FOP\User::getIsGuest() ? 1 : 0) . ' AS '.qi('operation::index').',
									/* operation::view */ '.(\FOP\User::getIsGuest() ? 'false' : 'true').' AS '.qi('operation::view').',
									/* parent */ '.qi('parent').' AS '.qi('parent').',
									/* parent::canView */ '.qi('ref:parent').'.'.qi('parent:canView').' AS '.qi('parent::canView').',
									/* parent::description */ '.qi('ref:parent').'.'.qi('parent:description').' AS '.qi('parent::description').',
									/* textValue */ '.qi('textValue').' AS '.qi('textValue').',
									/* textValue::vis */ (\'text\') = ((SELECT ('.qi('DesVaCQB').'.'.qi('type').') FROM '.qi('aufgabePropertyType').' '.qi('DesVaCQB').' WHERE '.qi('DesVaCQB').'.'.qi('ID').' = '.qi('aufgabeProperty').'.'.qi('type').' LIMIT 1)) AS '.qi('textValue::vis').',
									/* type */ '.qi('type').' AS '.qi('type').',
									/* type::canView */ '.qi('ref:type').'.'.qi('type:canView').' AS '.qi('type::canView').',
									/* type::description */ '.qi('ref:type').'.'.qi('type:description').' AS '.qi('type::description').',
									1
								FROM '.qi('aufgabeProperty').' '.qi('aufgabeProperty').'
								LEFT JOIN (SELECT '.qi('ID').' AS '.qi('type:ID').', '.qi('aufgabePropertyType').'.'.qi('name').' AS '.qi('type:description').', ('.(\FOP\User::getIsGuest() ? 'false' : 'true').') AS '.qi('type:canView').' FROM '.qi('aufgabePropertyType').') '.qi('ref:type').' ON '.qi('ref:type').'.'.qi('type:ID').' = '.qi('type').'
								LEFT JOIN (SELECT '.qi('ID').' AS '.qi('aufgabePropertyDropdown2Value:ID').', '.qi('aufgabePropertyDropdown').'.'.qi('name').' AS '.qi('aufgabePropertyDropdown2Value:description').', ('.(\FOP\User::getIsGuest() ? 'false' : 'true').') AS '.qi('aufgabePropertyDropdown2Value:canView').' FROM '.qi('aufgabePropertyDropdown').') '.qi('ref:aufgabePropertyDropdown2Value').' ON '.qi('ref:aufgabePropertyDropdown2Value').'.'.qi('aufgabePropertyDropdown2Value:ID').' = '.qi('aufgabePropertyDropdown2Value').'
								LEFT JOIN (SELECT '.qi('ID').' AS '.qi('parent:ID').', CONCAT(\'#\', '.qi('aufgabe').'.'.qi('ID').', \': \', '.qi('aufgabe').'.'.qi('title').') AS '.qi('parent:description').', ('.(\FOP\User::getIsGuest() ? 'false' : 'true').') AS '.qi('parent:canView').' FROM '.qi('aufgabe').') '.qi('ref:parent').' ON '.qi('ref:parent').'.'.qi('parent:ID').' = '.qi('parent').'
								WHERE ('.qi('parent').' = ' . \FOP\Database::quote($id) . ')
									AND ('.(\FOP\User::getIsGuest() ? 'false' : 'true').')) AS t
								LEFT JOIN '.qi('aufgabe').' AS '.qi('sorter-parent').' ON t.'.qi('parent').' = '.qi('sorter-parent').'.'.qi('ID').'
								LEFT JOIN '.qi('aufgabePropertyDropdown').' AS '.qi('sorter-aufgabePropertyDropdown2Value').' ON t.'.qi('aufgabePropertyDropdown2Value').' = '.qi('sorter-aufgabePropertyDropdown2Value').'.'.qi('ID').'
								LEFT JOIN '.qi('aufgabePropertyType').' AS '.qi('sorter-type').' ON t.'.qi('type').' = '.qi('sorter-type').'.'.qi('ID').'
								WHERE ' . (isset($params['range_min_aufgabeProperty_parent_doubleValue']) ? ($params['range_min_aufgabeProperty_parent_doubleValue'] !== '' && is_numeric($params['range_min_aufgabeProperty_parent_doubleValue']) ? 't.'.qi('doubleValue').' >= ' . \FOP\Database::quote($params['range_min_aufgabeProperty_parent_doubleValue']) . ' AND ' : '') : '') . 
								(isset($params['range_min_aufgabeProperty_parent_dateValue']) ? ($params['range_min_aufgabeProperty_parent_dateValue'] !== '' && is_numeric($params['range_min_aufgabeProperty_parent_dateValue']) ? 't.'.qi('dateValue').' >= ' . \FOP\Database::quote($params['range_min_aufgabeProperty_parent_dateValue']) . ' AND ' : '') : '') . 
								(isset($params['range_max_aufgabeProperty_parent_doubleValue']) ? ($params['range_max_aufgabeProperty_parent_doubleValue'] !== '' && is_numeric($params['range_max_aufgabeProperty_parent_doubleValue']) ? 't.'.qi('doubleValue').' <= ' . \FOP\Database::quote($params['range_max_aufgabeProperty_parent_doubleValue']) . ' AND ' : '') : '') . 
								(isset($params['range_max_aufgabeProperty_parent_dateValue']) ? ($params['range_max_aufgabeProperty_parent_dateValue'] !== '' && is_numeric($params['range_max_aufgabeProperty_parent_dateValue']) ? 't.'.qi('dateValue').' <= ' . \FOP\Database::quote($params['range_max_aufgabeProperty_parent_dateValue']) . ' AND ' : '') : '') . 
								(isset($params['filter_aufgabeProperty_parent_textValue']) ? ($params['filter_aufgabeProperty_parent_textValue'] !== '' ? ('(' . (new \FOP\IDList($params['filter_aufgabeProperty_parent_textValue']))->toSQL('t.'.qi('textValue').'') . ') AND ') : '') : '') . 
								(isset($params['filter_aufgabeProperty_parent_dateValue']) ? ($params['filter_aufgabeProperty_parent_dateValue'] !== '' ? ('(' . (new \FOP\IDList($params['filter_aufgabeProperty_parent_dateValue']))->toSQL('t.'.qi('dateValue').'') . ') AND ') : '') : '') . 
								(isset($params['filter_aufgabeProperty_parent_doubleValue']) ? ($params['filter_aufgabeProperty_parent_doubleValue'] !== '' ? ('(' . (new \FOP\IDList($params['filter_aufgabeProperty_parent_doubleValue']))->toSQL('t.'.qi('doubleValue').'') . ') AND ') : '') : '') . 
								(isset($params['filter_aufgabeProperty_parent_htmlValue']) ? ($params['filter_aufgabeProperty_parent_htmlValue'] !== '' ? ('(' . (new \FOP\IDList($params['filter_aufgabeProperty_parent_htmlValue']))->toSQL('t.'.qi('htmlValue').'') . ') AND ') : '') : '') . 
								(isset($params['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value']) ? ($params['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value'] !== '' ? ('(' . (new \FOP\IDList($params['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value']))->toSQL('t.'.qi('aufgabePropertyDropdown2Value').'') . ') AND ') : '') : '') . 
								(isset($params['filter_aufgabeProperty_parent_parent']) ? ($params['filter_aufgabeProperty_parent_parent'] !== '' ? ('(' . (new \FOP\IDList($params['filter_aufgabeProperty_parent_parent']))->toSQL('t.'.qi('parent').'') . ') AND ') : '') : '') . 
								(isset($params['filter_aufgabeProperty_parent_type']) ? ($params['filter_aufgabeProperty_parent_type'] !== '' ? ('(' . (new \FOP\IDList($params['filter_aufgabeProperty_parent_type']))->toSQL('t.'.qi('type').'') . ') AND ') : '') : '') . 
								(isset($params['filter_aufgabeProperty_parent_ID']) ? ($params['filter_aufgabeProperty_parent_ID'] !== '' ? ('(' . (new \FOP\IDList($params['filter_aufgabeProperty_parent_ID']))->toSQL('t.'.qi('ID').'') . ') AND ') : '') : '') . 
								(isset($params['search_aufgabeProperty_parent_textValue']) ? 't.'.qi('textValue').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_aufgabeProperty_parent_textValue'] . '%') . ' AND ' : '') . 
								(isset($params['search_aufgabeProperty_parent_htmlValue']) ? 't.'.qi('htmlValue').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_aufgabeProperty_parent_htmlValue'] . '%') . ' AND ' : '') . 
								(isset($params['searchnot_aufgabeProperty_parent_textValue']) ? 'NOT t.'.qi('textValue').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_aufgabeProperty_parent_textValue'] . '%') . ' AND ' : '') . 
								(isset($params['searchnot_aufgabeProperty_parent_htmlValue']) ? 'NOT t.'.qi('htmlValue').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['searchnot_aufgabeProperty_parent_htmlValue'] . '%') . ' AND ' : '') . 
								(isset($params['search_aufgabeProperty_parent']) ? '(' . 't.'.qi('textValue').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_aufgabeProperty_parent'] . '%') . ' OR ' . 't.'.qi('htmlValue').' '.(\FOP\Database::getDriver() == 'pgsql' ? 'ILIKE' : 'LIKE').' ' . \FOP\Database::quote('%' . $params['search_aufgabeProperty_parent'] . '%') . ') AND ' : '') . 
								'
								 TRUE ';
								return $sql;
	
    
  }

  public static function getidsAction($col, $id) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
    
			$q = \FOP\Database::query('SELECT t.'.qi($col).' '.self::getSQL($_GET, $id));
			$result = new \FOP\IDList();
			while ($item = $q->fetchColumn()) {
				$result->push($item);
			}
			die($result->toString());

    
  }

  public static function permissionsAction($id) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
    
		$ids = new \FOP\IDList($id);
		header('Content-Type: application/json');
		
		$perms = \FOP\Database::query('SELECT COUNT(*) AS __cnt, SUM(CASE (TRUE) WHEN TRUE THEN 1 ELSE 0 END) AS '.qi('filteronly').', SUM(CASE (TRUE) WHEN TRUE THEN 1 ELSE 0 END) AS '.qi('filterrange').', SUM(CASE (TRUE) WHEN TRUE THEN 1 ELSE 0 END) AS '.qi('filterall').', SUM(CASE ('.(\FOP\User::getIsGuest() ? 'false' : 'true').') WHEN TRUE THEN 1 ELSE 0 END) AS '.qi('delete').' FROM '.qi('aufgabeProperty').' WHERE ' . $ids->toSQL(qi('ID')))->fetch(\PDO::FETCH_ASSOC);
		
		return $perms;
	
    
  }

  public static function getfilter_aufgabeProperty_parent_aufgabePropertyDropdown2ValueItemsByStringAction($fstr, $id) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
    
		// Auf aktive DataView-Items einschränken
		$params = $_GET;
		unset($params['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value']);
		return \Types\AufgabePropertyDropdown2::getItems(null, -1, $fstr, ''.qi('ID').' IN (SELECT DISTINCT t.'.qi('aufgabePropertyDropdown2Value').''.self::getSQL($params, $id).')');
	

    
  }

  public static function getfilter_aufgabeProperty_parent_typeItemsByStringAction($fstr, $id) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
    
		// Auf aktive DataView-Items einschränken
		$params = $_GET;
		unset($params['filter_aufgabeProperty_parent_type']);
		return \Types\AufgabePropertyType::getItems(null, -1, $fstr, ''.qi('ID').' IN (SELECT DISTINCT t.'.qi('type').''.self::getSQL($params, $id).')');
	

    
  }

  public static function getfilter_aufgabeProperty_parent_parentItemsByStringAction($fstr, $id) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
    
		// Auf aktive DataView-Items einschränken
		$params = $_GET;
		unset($params['filter_aufgabeProperty_parent_parent']);
		return \Types\Aufgabe::getItems(null, -1, $fstr, ''.qi('ID').' IN (SELECT DISTINCT t.'.qi('parent').''.self::getSQL($params, $id).')');
	

    
  }

  public static function getData($sqladdon, $params, $id, $stream = false ) { 
    
    
    // --- BLOCK: main ---
    
								$sql = self::getSQL($params, $id);

								$order = (\FOP\Util::array_value(array(
									'parent ASC' => 'ORDER BY '.qi('sorter-parent').'.'.qi('ID').' DESC, '.qi('sorter-parent').'.'.qi('ID').' DESC, '.qi('sorter-parent').'.'.qi('ID').' DESC, '.qi('sorter-parent').'.'.qi('ID').' DESC',
									'aufgabePropertyDropdown2Value ASC' => 'ORDER BY '.qi('sorter-aufgabePropertyDropdown2Value').'.'.qi('sortableOrder').' , '.qi('sorter-aufgabePropertyDropdown2Value').'.'.qi('sortableOrder').' ',
									'type ASC' => 'ORDER BY '.qi('sorter-type').'.'.qi('sortableOrder').' , '.qi('sorter-type').'.'.qi('sortableOrder').' ',
									'parent DESC' => 'ORDER BY '.qi('sorter-parent').'.'.qi('ID').' ASC, '.qi('sorter-parent').'.'.qi('ID').' ASC, '.qi('sorter-parent').'.'.qi('ID').' ASC, '.qi('sorter-parent').'.'.qi('ID').' ASC',
									'aufgabePropertyDropdown2Value DESC' => 'ORDER BY '.qi('sorter-aufgabePropertyDropdown2Value').'.'.qi('sortableOrder').' DESC, '.qi('sorter-aufgabePropertyDropdown2Value').'.'.qi('sortableOrder').' DESC',
									'type DESC' => 'ORDER BY '.qi('sorter-type').'.'.qi('sortableOrder').' DESC, '.qi('sorter-type').'.'.qi('sortableOrder').' DESC',
									'htmlValue ASC' => 'ORDER BY t.'.qi('htmlValue').' ASC',
									'textValue ASC' => 'ORDER BY t.'.qi('textValue').' ASC',
									'doubleValue ASC' => 'ORDER BY t.'.qi('doubleValue').' ASC',
									'dateValue ASC' => 'ORDER BY t.'.qi('dateValue').' ASC',
									'htmlValue DESC' => 'ORDER BY t.'.qi('htmlValue').' DESC',
									'textValue DESC' => 'ORDER BY t.'.qi('textValue').' DESC',
									'doubleValue DESC' => 'ORDER BY t.'.qi('doubleValue').' DESC',
									'dateValue DESC' => 'ORDER BY t.'.qi('dateValue').' DESC',
									'' => ''), isset($params['sort_aufgabeProperty_parent']) ? $params['sort_aufgabeProperty_parent'] : '') ?: '');
								// wenn sqladdon bereits ein ORDER enthält, kein order aufbauen
								if (strpos($sqladdon, 'ORDER') !== false) {
									$order = '';
								}
								if ($stream) {
									// als Stream (währenddessen darf keine weitere SQL-Query laufen) für große Datenmengen und Statistiken
									$result = (function () use ($sql, $order, $sqladdon) {
										$stream = \FOP\Database::query('SELECT t.* ' . $sql . $order . $sqladdon);
										while ($item = $stream->fetch(\PDO::FETCH_ASSOC)) {
											$item['dateValue'] = intval($item['dateValue']);
											$item['doubleValue'] = \Types\Double::unpack($item['doubleValue']);
											$item['aufgabePropertyDropdown2Value'] = \FOP\Sanitizers::null_converter($item['aufgabePropertyDropdown2Value']);
											$item['parent'] = \FOP\Sanitizers::null_converter($item['parent']);
											$item['type'] = \FOP\Sanitizers::null_converter($item['type']);
											
											yield $item;
										}
									})();
								} else {
									// als RAM-Array
									$result = \FOP\Database::query('SELECT t.* ' . $sql . $order . $sqladdon);
									$arr = $result->fetchAll(\PDO::FETCH_ASSOC);
									$itemcount = count($arr);

									foreach($arr as $i => &$item){
										$item['dateValue'] = intval($item['dateValue']);
										$item['doubleValue'] = \Types\Double::unpack($item['doubleValue']);
										$item['aufgabePropertyDropdown2Value'] = \FOP\Sanitizers::null_converter($item['aufgabePropertyDropdown2Value']);
										$item['parent'] = \FOP\Sanitizers::null_converter($item['parent']);
										$item['type'] = \FOP\Sanitizers::null_converter($item['type']);
										
									}
									unset($item);

									$result = ["items" => $arr, "itemcount" => $itemcount];

									
								}

								return $result;
	
    
  }

  public static function getFilterHTML($params, $delimiter = ', ' , $showButton = true ) { 
    
    
    // --- BLOCK: main ---
    
		// Contract: ist showButton == false, sollten keine HTML-Tags im Output enthalten sein (Verwendung in Dateinamen!!)
		$filters = [];
		
	if (isset($params['range_min_aufgabeProperty_parent_doubleValue']) && isset($params['range_max_aufgabeProperty_parent_doubleValue'])) {
		array_push($filters, _('Zahl') . ': ' . (\Types\Double::print($params['range_min_aufgabeProperty_parent_doubleValue'])
	) . ' ' . _('filters_between') . ' ' . (\Types\Double::print($params['range_max_aufgabeProperty_parent_doubleValue'])
	));
	} else if (isset($params['range_min_aufgabeProperty_parent_doubleValue'])) {
		array_push($filters, _('Zahl') . ': ' . _('filters_from') . ' ' . (\Types\Double::print($params['range_min_aufgabeProperty_parent_doubleValue'])
	));
	} else if (isset($params['range_max_aufgabeProperty_parent_doubleValue'])) {
		array_push($filters, _('Zahl') . ': ' . _('filters_to') . ' ' . (\Types\Double::print($params['range_max_aufgabeProperty_parent_doubleValue'])
	));
	}
	
	if ( // Corner Case: Monat
		isset($params['range_min_aufgabeProperty_parent_dateValue'])
		&& isset($params['range_max_aufgabeProperty_parent_dateValue'])
		&& (date('d', $params['range_min_aufgabeProperty_parent_dateValue']) == '01') //check first day of month
		&& (date('d', $params['range_max_aufgabeProperty_parent_dateValue']) == date('t', $params['range_max_aufgabeProperty_parent_dateValue'])) //check last day of month
		&& (date('Y-m', $params['range_min_aufgabeProperty_parent_dateValue']) == date('Y-m', $params['range_max_aufgabeProperty_parent_dateValue'])) //check if same year and month
	) {
		array_push($filters, [
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
				query[&apos;range_min_aufgabeProperty_parent_dateValue&apos;] = &apos;'.strtotime('first day of last month', $params['range_min_aufgabeProperty_parent_dateValue']).'&apos;;
				query[&apos;range_max_aufgabeProperty_parent_dateValue&apos;] = &apos;'.strtotime('last day of last month', $params['range_min_aufgabeProperty_parent_dateValue']).'&apos;;
				reloadaufgabeProperty_parent(); ">remove_circle_outline</i>' : ''),
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
				query[&apos;range_min_aufgabeProperty_parent_dateValue&apos;] = &apos;'.strtotime('first day of next month', $params['range_min_aufgabeProperty_parent_dateValue']).'&apos;;
				query[&apos;range_max_aufgabeProperty_parent_dateValue&apos;] = &apos;'.strtotime('last day of next month', $params['range_min_aufgabeProperty_parent_dateValue']).'&apos;;
				reloadaufgabeProperty_parent(); ">add_circle_outline</i>' : ''),
			htmlentities(_('Datum') . ': ' . strftime('%B', $params['range_min_aufgabeProperty_parent_dateValue']) . ' ' . date('Y', $params['range_min_aufgabeProperty_parent_dateValue']))
		]);
	} else if ( // Corner Case: Tag
		isset($params['range_min_aufgabeProperty_parent_dateValue'])
		&& isset($params['range_max_aufgabeProperty_parent_dateValue'])
		&& (date('Y-m-d', $params['range_min_aufgabeProperty_parent_dateValue']) == (date('Y-m-d', $params['range_max_aufgabeProperty_parent_dateValue'])))
	) {
		array_push($filters, [
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
				query[&apos;range_min_aufgabeProperty_parent_dateValue&apos;] = &apos;'.strtotime('last day', $params['range_min_aufgabeProperty_parent_dateValue']).'&apos;;
				query[&apos;range_max_aufgabeProperty_parent_dateValue&apos;] = &apos;'.strtotime('last day', $params['range_min_aufgabeProperty_parent_dateValue']).'&apos;;
				reloadaufgabeProperty_parent(); ">remove_circle_outline</i>' : ''),
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
				query[&apos;range_min_aufgabeProperty_parent_dateValue&apos;] = &apos;'.strtotime('next day', $params['range_min_aufgabeProperty_parent_dateValue']).'&apos;;
				query[&apos;range_max_aufgabeProperty_parent_dateValue&apos;] = &apos;'.strtotime('next day', $params['range_min_aufgabeProperty_parent_dateValue']).'&apos;;
				reloadaufgabeProperty_parent(); ">add_circle_outline</i>' : ''),
			htmlentities(_('Datum') . ': ' . date('d.m.Y', $params['range_min_aufgabeProperty_parent_dateValue']))
		]);
	} else if ( // Corner Case: Jahr
		isset($params['range_min_aufgabeProperty_parent_dateValue'])
		&& isset($params['range_max_aufgabeProperty_parent_dateValue'])
		&& (date('Y', $params['range_min_aufgabeProperty_parent_dateValue']) == (date('Y', $params['range_max_aufgabeProperty_parent_dateValue'])))
		&& ((date('m-d', $params['range_min_aufgabeProperty_parent_dateValue']) == '01-01'))
		&& ((date('m-d', $params['range_max_aufgabeProperty_parent_dateValue']) == '12-31'))
	) {
		array_push($filters, [
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
				query[&apos;range_min_aufgabeProperty_parent_dateValue&apos;] = &apos;'.strtotime('first day of January last year', $params['range_min_aufgabeProperty_parent_dateValue']).'&apos;;
				query[&apos;range_max_aufgabeProperty_parent_dateValue&apos;] = &apos;'.strtotime('last day of December last year', $params['range_min_aufgabeProperty_parent_dateValue']).'&apos;;
				reloadaufgabeProperty_parent(); ">remove_circle_outline</i>' : ''),
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
				query[&apos;range_min_aufgabeProperty_parent_dateValue&apos;] = &apos;'.strtotime('first day of January next year', $params['range_min_aufgabeProperty_parent_dateValue']).'&apos;;
				query[&apos;range_max_aufgabeProperty_parent_dateValue&apos;] = &apos;'.strtotime('last day of December next year', $params['range_min_aufgabeProperty_parent_dateValue']).'&apos;;
				reloadaufgabeProperty_parent(); ">add_circle_outline</i>' : ''),
			htmlentities(_('Datum') . ': ' . date('Y', $params['range_min_aufgabeProperty_parent_dateValue']))
		]);
	} else if ( // Corner Case: Quartal
		isset($params['range_min_aufgabeProperty_parent_dateValue'])
		&& isset($params['range_max_aufgabeProperty_parent_dateValue'])
		&& ( (
		 ((date('m-d', $params['range_min_aufgabeProperty_parent_dateValue']) == '01-01'))
		&& ((date('m-d', $params['range_max_aufgabeProperty_parent_dateValue']) == '03-31')) )
		|| (
		 ((date('m-d', $params['range_min_aufgabeProperty_parent_dateValue']) == '04-01'))
		&& ((date('m-d', $params['range_max_aufgabeProperty_parent_dateValue']) == '06-30')) )
		|| (
		 ((date('m-d', $params['range_min_aufgabeProperty_parent_dateValue']) == '07-01'))
		&& ((date('m-d', $params['range_max_aufgabeProperty_parent_dateValue']) == '09-30')) )
		|| (
		 ((date('m-d', $params['range_min_aufgabeProperty_parent_dateValue']) == '10-01'))
		&& ((date('m-d', $params['range_max_aufgabeProperty_parent_dateValue']) == '12-31')) )
	) ) {
		array_push($filters, [
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
					query[&apos;range_min_aufgabeProperty_parent_dateValue&apos;] = &apos;'.strtotime('first day of -3 months', $params['range_min_aufgabeProperty_parent_dateValue']).'&apos;;
					query[&apos;range_max_aufgabeProperty_parent_dateValue&apos;] = &apos;'.strtotime('last day of -3 months', $params['range_max_aufgabeProperty_parent_dateValue']).'&apos;;
					reloadaufgabeProperty_parent(); ">remove_circle_outline</i>' : ''),
			($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="
				query[&apos;range_min_aufgabeProperty_parent_dateValue&apos;] = &apos;'.strtotime('first day of +3 months', $params['range_min_aufgabeProperty_parent_dateValue']).'&apos;;
				query[&apos;range_max_aufgabeProperty_parent_dateValue&apos;] = &apos;'.strtotime('last day of +3 months', $params['range_max_aufgabeProperty_parent_dateValue']).'&apos;;
				reloadaufgabeProperty_parent(); ">add_circle_outline</i>' : ''),	
			htmlentities(_('Datum') . ': Q' . (ceil((date('m', $params['range_min_aufgabeProperty_parent_dateValue']))/3)) . ' (' . date('d.m.', $params['range_min_aufgabeProperty_parent_dateValue']) . ' - ' . date('d.m.Y', $params['range_max_aufgabeProperty_parent_dateValue']) . ')')
		]);
	}
	else if (isset($params['range_min_aufgabeProperty_parent_dateValue']) && isset($params['range_max_aufgabeProperty_parent_dateValue'])) {
		array_push($filters, _('Datum') . ': ' . (($params['range_min_aufgabeProperty_parent_dateValue']) ? strftime(_('dateformat_php2'), intval($params['range_min_aufgabeProperty_parent_dateValue'])) : '') . ' ' . _('filters_between') . ' ' . (($params['range_max_aufgabeProperty_parent_dateValue']) ? strftime(_('dateformat_php2'), intval($params['range_max_aufgabeProperty_parent_dateValue'])) : ''));
	} else if (isset($params['range_min_aufgabeProperty_parent_dateValue'])) {
		array_push($filters, _('Datum') . ': ' . _('filters_from') . ' ' . (($params['range_min_aufgabeProperty_parent_dateValue']) ? strftime(_('dateformat_php2'), intval($params['range_min_aufgabeProperty_parent_dateValue'])) : ''));
	} else if (isset($params['range_max_aufgabeProperty_parent_dateValue'])) {
		array_push($filters, _('Datum') . ': ' . _('filters_to') . ' ' . (($params['range_max_aufgabeProperty_parent_dateValue']) ? strftime(_('dateformat_php2'), intval($params['range_max_aufgabeProperty_parent_dateValue'])) : ''));
	}if (isset($params['filter_aufgabeProperty_parent_textValue'])) {
		if ($params['filter_aufgabeProperty_parent_textValue'] == '_null') {
			array_push($filters, _('Text') . ': ' . 'NULL');
		} else {
			$values = [];
			foreach ((new \FOP\IDList($params['filter_aufgabeProperty_parent_textValue']))->all() AS $val) {
				$value = $val;
				if ($value) array_push($values, $value);
			}
			array_push($filters, _('Text') . ': ' . implode(', ', $values));
		}
	}if (isset($params['filter_aufgabeProperty_parent_dateValue'])) {
		if ($params['filter_aufgabeProperty_parent_dateValue'] == '_null') {
			array_push($filters, _('Datum') . ': ' . 'NULL');
		} else {
			$values = [];
			foreach ((new \FOP\IDList($params['filter_aufgabeProperty_parent_dateValue']))->all() AS $val) {
				$value = ($val) ? strftime(_('dateformat_php2'), intval($val)) : '';
				if ($value) array_push($values, $value);
			}
			array_push($filters, _('Datum') . ': ' . implode(', ', $values));
		}
	}if (isset($params['filter_aufgabeProperty_parent_doubleValue'])) {
		if ($params['filter_aufgabeProperty_parent_doubleValue'] == '_null') {
			array_push($filters, _('Zahl') . ': ' . 'NULL');
		} else {
			$values = [];
			foreach ((new \FOP\IDList($params['filter_aufgabeProperty_parent_doubleValue']))->all() AS $val) {
				$value = \Types\Double::print($val)
	;
				if ($value) array_push($values, $value);
			}
			array_push($filters, _('Zahl') . ': ' . implode(', ', $values));
		}
	}if (isset($params['filter_aufgabeProperty_parent_htmlValue'])) {
		if ($params['filter_aufgabeProperty_parent_htmlValue'] == '_null') {
			array_push($filters, _('Großer Text') . ': ' . 'NULL');
		} else {
			$values = [];
			foreach ((new \FOP\IDList($params['filter_aufgabeProperty_parent_htmlValue']))->all() AS $val) {
				$value = mb_substr(preg_replace('/[ \t\r\n]+/', ' ', strip_tags(preg_replace('/<style.*?\/style>/s', '', html_entity_decode($val)))), 0, 20) . (strlen($val) >= 20 ? '...' : '');
				if ($value) array_push($values, $value);
			}
			array_push($filters, _('Großer Text') . ': ' . implode(', ', $values));
		}
	}if (isset($params['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value'])) {
		if ($params['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value'] == '_null') {
			array_push($filters, _('Auswahl') . ': ' . _('-'));
		} else {
			$values = [];
			foreach ((new \FOP\IDList($params['filter_aufgabeProperty_parent_aufgabePropertyDropdown2Value']))->all() AS $val) {
				$value = 
  \FOP\Database::query('SELECT '.qi('aufgabePropertyDropdown').'.'.qi('name').' AS description FROM '.qi('aufgabePropertyDropdown').' WHERE '.qi('ID').' = ' . \FOP\Database::quote($val))->fetchColumn() ?: _('-')
;
				if ($value) array_push($values, $value);
			}
			array_push($filters, _('Auswahl') . ': ' . implode(', ', $values));
		}
	}if (isset($params['filter_aufgabeProperty_parent_type'])) {
		if ($params['filter_aufgabeProperty_parent_type'] == '_null') {
			array_push($filters, _('Eigenschaft') . ': ' . _(''));
		} else {
			$values = [];
			foreach ((new \FOP\IDList($params['filter_aufgabeProperty_parent_type']))->all() AS $val) {
				$value = 
  \FOP\Database::query('SELECT '.qi('aufgabePropertyType').'.'.qi('name').' AS description FROM '.qi('aufgabePropertyType').' WHERE '.qi('ID').' = ' . \FOP\Database::quote($val))->fetchColumn() ?: _('')
;
				if ($value) array_push($values, $value);
			}
			array_push($filters, _('Eigenschaft') . ': ' . implode(', ', $values));
		}
	}if (isset($params['filter_aufgabeProperty_parent_parent'])) {
		if ($params['filter_aufgabeProperty_parent_parent'] == '_null') {
			array_push($filters, _('Aufgabe') . ': ' . _(''));
		} else {
			$values = [];
			foreach ((new \FOP\IDList($params['filter_aufgabeProperty_parent_parent']))->all() AS $val) {
				$value = 
  \FOP\Database::query('SELECT CONCAT(\'#\', '.qi('aufgabe').'.'.qi('ID').', \': \', '.qi('aufgabe').'.'.qi('title').') AS description FROM '.qi('aufgabe').' WHERE '.qi('ID').' = ' . \FOP\Database::quote($val))->fetchColumn() ?: _('')
;
				if ($value) array_push($values, $value);
			}
			array_push($filters, _('Aufgabe') . ': ' . implode(', ', $values));
		}
	}if (isset($params['search_aufgabeProperty_parent_textValue'])) {
		array_push($filters, _('textValue') . ' ' . _('filter_contains') . ' ' . $params['search_aufgabeProperty_parent_textValue']);
	}if (isset($params['search_aufgabeProperty_parent_htmlValue'])) {
		array_push($filters, _('htmlValue') . ' ' . _('filter_contains') . ' ' . $params['search_aufgabeProperty_parent_htmlValue']);
	}if (isset($params['searchnot_aufgabeProperty_parent_textValue'])) {
		array_push($filters, _('textValue') . ' ' . _('filter_contains_not') . ' ' . $params['searchnot_aufgabeProperty_parent_textValue']);
	}if (isset($params['searchnot_aufgabeProperty_parent_htmlValue'])) {
		array_push($filters, _('htmlValue') . ' ' . _('filter_contains_not') . ' ' . $params['searchnot_aufgabeProperty_parent_htmlValue']);
	}
		if (count($filters)) {
			$result = implode($delimiter, array_map(function ($filter) {
				if (is_array($filter)) {
					return implode('', $filter);
				}
				return htmlentities($filter);
			}, $filters))
			// Button, um Filter zu entfernen
			. ($showButton ? '<i class="material-icons fop-small" style="cursor: pointer;" onclick="for (var q in query) {if (q.includes(\'_aufgabeProperty_parent_\')) delete query[q];} reloadaufgabeProperty_parent(); ">clear</i>' : '');
		} else {
			$result = _('no_filter');
		}
		return $result;
	
    
  }

  public static function openAction($fop_table, $fop_id, $fop_from, $id) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
    

if ($fop_table == 'aufgabeProperty') {
	\FOP\Session::setPayload('dv-aufgabeProperty', [
		'id' => 'aufgabeProperty_parent',
		'tbl' => 'aufgabeProperty',
		'idcol' => 'ID',
		'prev' => \DataViewRouter\AufgabeProperty_parent::stepURL('aufgabeProperty', 'XXX', -1),
		'next' => \DataViewRouter\AufgabeProperty_parent::stepURL('aufgabeProperty', 'XXX',  1),
		'from' => $fop_from,
		'param_id' => $id
	]);
	
	if ($fop_id == '_') return; // nur Rückreferenz setzen, nicht öffnen
	$params = [];
	if (isset($_GET['popup'])) $params['popup'] = true;
	if (isset($_GET['from'])) $params['from'] = $_GET['from'];
	$params['id'] = $fop_id;
	
	$url = \TablesRouter\AufgabeProperty::viewURL2($params);
	header('Location: ' . $url);
}

die();
    
  }

  public static function stepAction($tbl, $id, $step) { 
    
    
    // --- BLOCK: access ---
    
    // --- BLOCK: main ---
    
	$dv = \FOP\Session::getPayload('dv-'.$tbl);
	$url = $dv['from'];
	$parts = parse_url($url);
	parse_str($parts['query'], $query);
	$data = self::getData('', $query, $dv['param_id']);
	$col = $dv['idcol'];
	$ids = array_map(function ($x) use ($col) {return $x[$col];}, $data['items']);
	if (!count($ids)) {
		header('Location: ' . \FOP\Util::getCurrentBaseurl() . 'Tables/' . preg_replace('/[^a-zA-Z0-9_]/', '_', ucfirst($dv['tbl'])));
		die();
	}
	$idx = array_search($id, $ids);
	$idx += count($ids) + $step;
	$idx = $idx % count($ids);
	header('Location: ' . \FOP\Util::getCurrentBaseurl() . 'Tables/' . preg_replace('/[^a-zA-Z0-9_]/', '_', ucfirst($dv['tbl'])) . '/view?id=' . urlencode($ids[$idx]));
	die();

    
  }


  
  

  
  
}



