<h1>Konferencja - Rejestracja</h1>	
{assign var=registrationYes value='registration_yes'|translate}
{assign var=registrationNo value='registration_no'|translate}
{assign var=registrationMissing value='registration_missing'|translate}
{assign var=registrationParticipationFull value='registration_participation_full'|translate}
{assign var=registrationParticipationLodging value='registration_participation_one_day_lodging'|translate}
{assign var=registrationParticipationNoLodging value='registration_participation_one_day_no_lodging'|translate}
{assign var=registrationDietStandardShort value='registration_diet_standard_short'|translate}
{assign var=registrationDietSpecialShort value='registration_diet_special_short'|translate}

{dropDownContainer title='Zgłoszenia Rejestracji'}
{assign var="display" value=""}
{if $location == 2}
  {assign var="display" value='style="display: none;"'}
{/if}

<table cellspacing="0" cellpadding="0" border="0">
	<tr class="selAllRow">
		{*<td class="cornerTop"></td><td colspan="6"><a href="#">Zaznacz wszystkie</a> <a href="#">usuń</a>
		</td>*}
	</tr>
	<tr>
	{*<td class="selAll">&nbsp;</td> *}
	<th><div style="float:left; width:100%">Lp.<div class="sort"><a class="ascendingAct" href="#">&nbsp;</a><a class="descending" href="#">&nbsp;</a></div></div></th>
	<th>Imię</th>					
	<th>Nazwisko</th>					
	<th>{'registration_participant_data'|translate}</th>					
	<th>{'registration_institution_data'|translate}</th>					
	<th>{'registration_presentation_data'|translate}</th>					
	<th {$display}>{'registration_amount_information'|translate}</th>					
	<th>{'registration_consents_expressed'|translate}</th>					
	<th {$display}>{'registration_payment_status'|translate}</th>					
    <th class="noSort">&nbsp;</div></th>
	</tr>
	{assign var=x value=0}
	{foreach from=$arrayObj item=obj}
	{assign var=x value=$x+1}
	{assign var=id value=$obj->GetId()}
	{assign var=arrayFee value=$obj->getFeeFullUnserialize()}
	{assign var=discPrice value=$arrayFee['disc']}
	<tr>
		{*<td class="selAll"><input name="Checkbox1" type="checkbox" /></td> *}
		<td>{$x}</td>
		<td>{$obj->GetName()}</td>
		<td>{$obj->GetSurname()}</td>
		<td>Tytuł/stop. naukowy:{$obj->getDegree()}</br>
            Stanowisko: {$obj->getPosition()}</br>
            Telefon: {$obj->getPhone()}</br>
            Fax: {$obj->getFax()}</br>
            Email: {$obj->getEmail()}</br></td>
		<td >Instytucja: {$obj->getInstitution()}</br>
            Ulica i numer: {$obj->getAddress()}</br>
            Kod pocztowy: {$obj->getPostCode()}</br>
            Miejscowość: {$obj->getCity()}</br>
            NIP Instytucji: {$obj->getNip()}</br>
            Dodatkowe informacje: {$obj->getAdditionalInfo()}</br></td>
		<td>Referat: {$obj->getReferat()|replace:1:$registrationYes|replace:0:$registrationNo|replace:2:$registrationNo}</br>
            Poster: {$obj->getPoster()|replace:1:$registrationYes|replace:0:$registrationNo|replace:2:$registrationNo}
            <p>{'registration_topic'|translate}: {$obj->getMessage()|default:$registrationMissing}</p>
            <p>{'registration_author'|translate}: {$obj->getAutor()|default:$registrationMissing}</p>
            <p>{'registration_participation_type'|translate}: {$obj->getParticipationOption()|replace:'full':$registrationParticipationFull|replace:'one_day_lodging':$registrationParticipationLodging|replace:'one_day_no_lodging':$registrationParticipationNoLodging|default:$registrationMissing}</p>
            <p>{'registration_days'|translate}: {if $obj->getParticipationDays()}{$obj->getParticipationDays()}{elseif $obj->GetFeeOneDay()}{$obj->GetFeeOneDay()}{else}{$registrationMissing}{/if}</p>
            <p>{'registration_diet'|translate}: {$obj->getDiet()|replace:1:$registrationDietStandardShort|replace:2:$registrationDietSpecialShort|default:$registrationMissing} {if $obj->getDietSpecial()}- {$obj->getDietSpecial()}{/if}</p>
        </td>
		<td {$display}>{'registration_selected_options'|translate}:</br>
          {if $discPrice == 2 || $obj->getDateAdd() > '2024-10-11 00:00:00'}

          {'registration_fee_normal_2026'|translate}
          {else}
          {'registration_fee_discount_2026'|translate}
          {/if} 
          <ul>
              {foreach $arrayObjParameters as $objParam}
                  {if in_array($objParam->GetId(),$arrayFee)} 
                    {if $discPrice == 2 || $obj->getDateAdd() > '2024-10-11 00:00:00'}
                      <li>{$objParam->GetName()} {if $objParam->GetId() eq 5}({$obj->GetFeeOneDay()}){/if}</br>
                          {'registration_net_price'|translate}: {$objParam->GetPrice()|number_format:2:",":" "} PLN</br>
                          {'registration_gross_price'|translate}: {assign var="vat" value=$objParam->GetPrice()*1.23}{$vat|number_format:2:",":" "} PLN</br>
                      </li>
                    {else}
                      <li>{$objParam->GetName()} {if $objParam->GetId() eq 5}({$obj->GetFeeOneDay()}){/if}</br>
                          {'registration_net_price_no_vat'|translate}: {$objParam->GetPriceProm()|number_format:2:",":" "} PLN</br>
                          {'registration_gross_price_vat'|translate}: {assign var="vat" value=$objParam->GetPriceProm()*1.23}{$vat|number_format:2:",":" "} PLN</br>
                      </li>
                    {/if} 
                  {/if} 
              {/foreach}
              <h3>{'registration_total_to_pay'|translate}:</h3>
              {assign var="resultPrice" value=$obj->getPrice()}
              {'registration_net_price'|translate}: {$resultPrice|number_format:2:",":" "} PLN</br>
              {'registration_gross_price'|translate}: {assign var="resultPriceVat" value=$resultPrice*1.23}{$resultPriceVat|number_format:2:",":" "} PLN</br>


          </ul>
        </td>
		<td>{'registration_consent_data'|translate}: {$obj->GetAgree1()|replace:1:$registrationYes|replace:0:$registrationNo} </br>
            {'registration_consent_image'|translate}: {$obj->GetAgree2()|replace:1:$registrationYes|replace:0:$registrationNo}
        </td>
		<td {$display}>{$obj->GetStatus()|replace:2:$registrationYes|replace:1:$registrationNo}</td>
			<td style="width:15px">
			{*<a href="{url Calc=Edit id=$id}" class="edit">edytuj</a><a href="{url Calc=Delete id=$id}" class="delete">usuń</a>*}
                        <a href="{url Calc=RegEdit id=$id}" class="edit">{'registration_edit'|translate}</a>
                        <a href="{url Calc=RegDelete id=$id location=1}" onclick="{literal}if (confirm('Czy napewno usunąć ten element?')) { } else {return false;}{/literal}"  class="delete">{'registration_delete'|translate}</a>
		</td>
	</tr>
	{/foreach}
	<tr class="selAllRow">
			{*<td class="cornerBottom"></td><td colspan="6"><a href="#">Zaznacz wszystkie</a><a href="#">usuń</a>
			
			<div class="pager"><div class="perpage">wyświetl:<br/><select id="perpage" class="tiny " name="#"><option>10</option><option>25</option><option>50</option><option>100</option></select></div><a href="#" class="prvnext">&laquo; poprzednia</a><a href="#">1</a><a class="active" href="#">2</a><a href="#">3</a>...<a href="#">50</a><a href="#">51</a><a href="#">52</a>...<a href="#">100</a><a class="prvnext" href="#">następna &raquo;</a></div></td> *}
	</tr>

</table>

{/dropDownContainer}
