	{dropDownContainer title="Lista"}
	<div>
		<table width="100%" cellspacing="0" cellpadding="5" border="0" class="frameTableForm tableContetntWhite">
			<tbody>
			<tr>
				<td>Tytuł:</td>
				<td>
				<input name="search" id="search" onkeyup="GetTableContent('{url Product=AjaxList}', $('#search').val(), $('#idCategorySelected').val(), $('#publicationList').val(), $('#newList').val(), $('#saleList').val(), $('#limitedList').val());" />
				</td>
			
				<td>piętro</td>
					<td>
					<select name="idCategorySelected" id="idCategorySelected" onchange="GetTableContent('{url Product=AjaxList}', $('#search').val(), $('#idCategorySelected').val(), $('#publicationList').val(), $('#newList').val(), $('#saleList').val(), $('#limitedList').val());">
											<option value="-1">
											Wszystkie										
											</option>
										{foreach from=$arrayStructureProductCategory item=productCategory key=idProductCategory}
											<option value="{$productCategory->GetId()}" {*if $productCategory->GetId() == $idCategorySelected}selected{/if*}>
												{$productCategory->GetName()}											
											</option>
											{if $productCategory->GetHaveChildren()}
											{foreach from=$productCategory->GetArrayChildren() item=subProductCategory key=idSubProductCategory}
											<option value="{$subProductCategory->GetId()}" {*if $subProductCategory->GetId() == $idCategorySelected}selected{/if*}>
												&nbsp;->&nbsp;{$subProductCategory->GetName()}										
											</option>
											{/foreach}
											{/if}
											{/foreach}
										</select>
					
					</td>
					
				
				<td>Publikacja:</td>
				<td>
				<select name="publicationList" id="publicationList" onchange="GetTableContent('{url Product=AjaxList}', $('#search').val(), $('#idCategorySelected').val(), $('#publicationList').val(), $('#newList').val(), $('#saleList').val(), $('#limitedList').val());">
					<option value="all">
					Wszystkie										
					</option>
					<option value="1">
					Tak										
					</option>
					<option value="0">
					Nie										
					</option>
				</select>
				{*<input name="publicationList" type="checkbox" id="publicationList" value="1" onclick="GetTableContent('{url Product=AjaxList}', $('#search').val(), $('#idCategorySelected').val(), $('#publicationList').attr('checked'));" />*}
				</td>
				</tr>
				{*
				<tr>
				<td>&nbsp;</td>
				<td>
				&nbsp;
				</td>
			
				<td>&nbsp;</td>
					<td>
					&nbsp;
					
					</td>
					
				
				<td>Nowość:</td>
				<td>
				<select name="newList" id="newList" onchange="GetTableContent('{url Product=AjaxList}', $('#search').val(), $('#idCategorySelected').val(), $('#publicationList').val(), $('#newList').val(), $('#saleList').val(), $('#limitedList').val());">
					<option value="all">
					Wszystkie										
					</option>
					<option value="1">
					Tak										
					</option>
					<option value="0">
					Nie										
					</option>
				</select>
				</td>
				</tr>
				<tr>
				<td>&nbsp;</td>
				<td>
				&nbsp;
				</td>
			
				<td>&nbsp;</td>
					<td>
					&nbsp;
					
					</td>
					
				
				<td>Promocja:</td>
				<td>
				<select name="saleList" id="saleList" onchange="GetTableContent('{url Product=AjaxList}', $('#search').val(), $('#idCategorySelected').val(), $('#publicationList').val(), $('#newList').val(), $('#saleList').val(), $('#limitedList').val());">
					<option value="all">
					Wszystkie										
					</option>
					<option value="1">
					Tak										
					</option>
					<option value="0">
					Nie										
					</option>
				</select>
				
				</td>
				</tr>
				<tr>
				<td>&nbsp;</td>
				<td>
				&nbsp;
				</td>
			
				<td>&nbsp;</td>
					<td>
					&nbsp;
					
					</td>
					
				
				<td>Wyprzedaż:</td>
				<td>
				<select name="limitedList" id="limitedList" onchange="GetTableContent('{url Product=AjaxList}', $('#search').val(), $('#idCategorySelected').val(), $('#publicationList').val(), $('#newList').val(), $('#saleList').val(), $('#limitedList').val());">
					<option value="all">
					Wszystkie										
					</option>
					<option value="1">
					Tak										
					</option>
					<option value="0">
					Nie										
					</option>
				</select>
				<input name="publicationList" type="checkbox" id="publicationList" value="1" onclick="GetTableContent('{url Product=AjaxList}', $('#search').val(), $('#idCategorySelected').val(), $('#publicationList').attr('checked'));" />
				</td>
				</tr>
				*}
			</tbody>
		</table>
	</div>
	<div id="tableContent">
			<table width="100%" class="datagrid" id="selAllList" cellpadding="4" cellspacing="1" border="0">
				<tr class="selAllRow">
					<td class="cornerTop"></td><td colspan="6"><a href="#" onclick="DeleteProduct('{url Product=AjaxDeleteChecked}', ''); return false;">usuń</a>{*<a href="#" id="selectall" class="selectall" onclick="SelectAll();">Zaznacz wszystkie</a>*)nbn <a href="#">usuń</a> {*<a href="#">publikuj</a><a href="#">nie publikuj</a>*}
					</td>
				</tr>
				<tr>
				<td class="selAll">&nbsp;</td>
					<th>nr</th>
					<th>nazwa</th>
					<th>data publikacji</th>
					<th>publikacja</th>
					<th>status</th>
					<th>plik</th>
					<th width="60">
						<a href="{url Product=Add}" {if isset($add)}onclick="alert('Aby dodać wpis, proszę zapisać element do struktury');  return false;" {/if}><img src="{$urlStatic}/image/Admin/iconAdd.gif" alt="Dodaj" title="Dodaj" border="0"/></a>
					</th>
				</tr>
				{if !isset($add)}
				{assign var=x value=1}
				{foreach from=$arrayObj item=obj name=obj}
					{assign var=objFile value=$obj->GetFile()}
					<tr {if $x==1}{assign var=x value=0}{else}{assign var=x value=1}class="even"{/if} id="row_{$obj->GetId()}">
					<td class="selAll"><input name="deleteList[{$obj->GetId()}]" type="checkbox" value="{$obj->GetId()}" class="tf" /></td>
						<td>{$obj->GetAmount()}</td>
						<td>{$obj->GetName()}</td>
						<td>{$obj->GetDate()}</td>
						<td id="publicationList{$obj->GetId()}"><a href="#" title="zmień" onclick="SetPublication('{url Product=AjaxPublication}', '{$obj->GetId()}', {$obj->GetPublication()}); return false;">{$obj->GetPublication()|replace:"0":"Nie"|replace:"1":"Tak"}</a></td>
						<td>{$obj->GetAvailable()|replace:"0":"sprzedane"|replace:"1":"wolne"|replace:"2":"rezerwacja"}</td>
						<td>{if is_object($objFile)}{$objFile->GetName()}{else}brak{/if}</td>
						<td style="text-align: center;">
							<a href="{url Product=Edit idProduct=$obj->GetId() idElement=$idElement}"><img src="{$urlStatic}/image/Admin/iconEdit.gif" alt="Edytuj" title="Edytuj" border="0"/></a> |
							<a href="#" onclick="checkLang({$idElement},'{url Product=AjaxCeackLang idProduct=$obj->GetId() idElement=$idElement}', '{url Product=Delete idProduct=$obj->GetId() idElement=$idElement}'); return false;"><img src="{$urlStatic}/image/Admin/iconDelete.gif" alt="Usuń" title="Usuń" border="0"/></a>
						</td>
					</tr>

					{if $smarty.foreach.obj.last}
					
					<tr class="selAllRow">
								<td class="cornerBottom"></td><td colspan="6">{*<a href="#">Zaznacz wszystkie</a>*}<a href="#" onclick="DeleteProduct('{url Product=AjaxDeleteChecked}', ''); return false;">usuń</a> {*<a href="#">publikuj</a> <a href="#">nie publikuj</a>*} 
					</tr>
						<tr>
							<td colspan="10" class="selAllRow" >
								<div class="paging">
									{insertPagination _class='pager'}
								</div>
							</td>
						</tr>
					{/if}
				{foreachelse}
					{if !isset($searchString) || $searchString == ""}
						<tr>
							<td colspan="5" style="text-align: center;">Brak zdefiniowanych mieszkań. <br/> Aby dodać kliknij link 'dodaj'.</td>
						</tr>
					{/if}
				{/foreach}
				{else}
					<tr>
						<td colspan="5" style="text-align: center;">Aby dodać wpis, proszę zapisać element do struktury.</td>
					</tr>
				{/if}
			</table>
		</div>
	{/dropDownContainer}