{extends file=$smarty.const.SMARTY_LAYOUT_CONTENT_LIST_TABLE_CURRENT_DATA}

{block name="record-id"}{$rowFields['key']}{/block}

{block name="listing-tr-extraData" append}data-idDocument="{$rowFields['idDocument']}"{/block}

{block name="listing-td-content-sender" append}
	{if $rowFields['readReceipt']}
		<span class="grey right">
			[{$lang['index']['extraInfo']['sendWithConfirmation']}]
		</span>
	{/if}
{/block}

{block name="listing-td-content-recipient"}
	{foreach $rowFields['to'] as $address}
		<div>
			{$lang['index']['extraInfo']['to']}: <a href="mailto:{$address}" class="link">{$address}</a>
		</div>
	{/foreach}

	{if $rowFields['cc']}
		{foreach $rowFields['cc'] as $address}
			<div>
				{$lang['index']['extraInfo']['cc']}: <a href="mailto:{$address}" class="link">{$address}</a>
			</div>
		{/foreach}
	{/if}

	{if $rowFields['bcc']}
		<div>
			{$lang['index']['extraInfo']['bcc']}: {$_LANG['yes']}
		</div>
	{/if}
{/block}

{block name="listing-td-content-attachments"}
	{foreach $rowFields['genDocs'] as $doc}
		{$doc}{if !$doc@last},{/if}
	{/foreach}

	{if $rowFields['uplDocs']}
		<div class="italic grey">{$lang['index']['extraInfo']['externalDocs']}:
			{foreach $rowFields['uplDocs'] as $docFileDisk => $docFileDetails}
				{if $docFileDetails['fileExists']}
					<a class="link fileExists" href="#;" data-idfile="{$docFileDisk}">
						<span class="content exist">{$docFileDetails['fileName']};</span>
					</a>
				{else}
					<a class="link" onclick="alert('{$lang['index']['extraInfo']['noFileToDownload']}');">
						<span class="content notExist">{$docFileDetails['fileName']};</span>
					</a>
				{/if}
			{/foreach}
		</div>
	{/if}
{/block}

{block name="listing-td-content-subject" append}
	<div tooltip="{$rowFields['body']|htmlClean}" class="help italic grey">
		{$lang['index']['extraInfo']['seeEmailBody']}
	</div>
{/block}

{block name="listing-td-content-sendTime"}
	{$rowFields['sendTime']|dateTimeFormat:'dateWithHMS'}
{/block}

