<div class="ui-dialog-maxheight-scroll" style="max-height:250px">
<ul>
{foreach item="item" from=$list}
    <li 
        {if isset($item->id)}onclick="correspondence.us_attachment.save('{$item->id}');"{/if}
        class="dialog_make_text_btn ui-corner-all">
        <span class="dialog_make_btn16 ok ui-corner-all"></span>
            {if !empty($item->fee_no)}({$item->fee_no}) - {/if}
            <span style="font-weight:bold">{$item->subject}</span>
        <br />
        {if isset($item->date)}{$item->date->us_date()}{/if}{if isset($item->address_name)} - {$item->address_name}{/if}
    </li>
{/foreach}
</ul>
</div>

<div class="ui-dialog-maxheight-scroll" style="max-height:150px; margin-top:15px;">
    <h4>{$i.correspondence_selected_us_attachments}</h4>
    <hr />
    <ul>
        {foreach item="attachment" from=$attachments}
             <li class="dialog_make_text_btn ui-corner-all" onclick="basicForm.selectable_row.unselect_from_dlg('correspondence', '{$attachment->id}', this);">
                <span class="dialog_make_btn16 delete ui-corner-all"></span>
                    {if !empty($attachment->fee_no)}({$attachment->fee_no}) - {/if}
                    <span style="font-weight:bold">{$attachment->subject}</span>
                <br />
                {if isset($attachment->date)}{$attachment->date->us_date()}{/if} - {$attachment->address_name}
             </li>
        {/foreach}         
    </ul>    
</div>