{{!--
/*
 * Your installation or use of this SugarCRM file is subject to the applicable
 * terms available at
 * http://support.sugarcrm.com/Resources/Master_Subscription_Agreements/.
 * If you do not agree to all of the applicable terms or do not have the
 * authority to bind the entity as an authorized representative, then do not
 * install or use this SugarCRM file.
 *
 * Copyright (C) SugarCRM Inc. All rights reserved.
 */
--}}

<table class="table">
    <thead>
        <tr>
        {{#each templateComponent.leftColumns}}
            <th{{#if name}} data-fieldname="{{name}}"{{/if}}>
                <span>
                    {{field ../templateComponent model=../model template="list-header"}}
                </span>
            </th>
        {{/each}}
            <th>
                <span>
                    {{str title templateComponent.module}}
                </span>
            </th>
        </tr>
    </thead>
    <tbody>
    {{#each collection.models}}
        <tr name="{{module}}_{{attributes.id}}" data-fieldname="{{attributes.field_name}}" class="single">
            {{#each ../templateComponent.leftColumns}}
                <td>
                    {{field ../../templateComponent model=../this template="list"}}
                </td>
            {{/each}}
            {{#each fields}}
                <td{{#if align}} class="{{align}}"{{/if}}>
                    {{field ../../templateComponent model=../this template="list"}}
                </td>
            {{/each}}
        </tr>
    {{/each}}
    </tbody>
</table>
