{extends file=$smarty.const.SMARTY_LAYOUT_CONTENT_LIST_TABLE_CURRENT_DATA}

{block name="listing-tr-class"}
	{if !$rowFields['active']}disabled{/if}
{/block}

{block name="listing-td-content-name"}
	<span style="float:right;">
		[{$rowFields['id']}]
	</span>
	{$rowFields['name']}
{/block}

{block name="listing-td-content-pivot"}
	{$lang['pivotName'][$rowFields['pivot']]}
{/block}


{block name="listing-td-content-docNumberType"}
	<span style="float:right;">
		{if $rowFields['numberReuse']}
			[{$lang['numberReuse']['1']}]
		{else}
			[{$lang['numberReuse']['0']}]
		{/if}
	</span>
	{$lang['docNumberType'][$rowFields['docNumberType']]}
{/block}

{block name="listing-td-content-docDate"}
	{$lang['docDate'][$rowFields['docDate']]}
{/block}

{block name="listing-td-content-flags"}
	{* service types *}
	{if $rowFields['serviceTypes']}
		<div>
			{foreach $rowFields['serviceTypes'] as $serviceCode}
				{if !$serviceCode@first},{/if}
				{\App\Config\Services_Basic::getInstance()->getServiceName($serviceCode)}
			{/foreach}
		</div>
	{/if}
	{* flags *}
	{$flags=[]}
	{if $rowFields['maxGenerationCount']} {$flags[]=$lang['flags']['maxGenerationCount']} {/if}
	{if $rowFields['autoGenerateFirstCopy']} {$flags[]=$lang['flags']['autoGenerateFirstCopy']} {/if}
	{if $rowFields['printOriginalOnce']} {$flags[]=$lang['flags']['printOriginalOnce']} {/if}
	{if $rowFields['forceSameTemplate']} {$flags[]=$lang['flags']['forceSameTemplate']} {/if}
	{if $rowFields['indicateCopy']} {$flags[]=$lang['flags']['indicateCopy']} {/if}
	{if $flags}
		<div style="font-style:italic">[{$flags|join:', '}]</div>
	{/if}	
{/block}
