{{> common_header}}

<div class="layout-body">

    {{> org_title org=Layout.org}}

    <h2>{{i18n "org_licenses.licenses_history" slug=(i18n "service_details.name." Layout.slug)}}</h2>

    {{#if Layout.org.licenses.length}}
        <table class="ordinary full-width licenses-list" width="100%">
            <thead>
                <tr>
                    <td data-id="date">{{i18n "org_licenses.head.date"}}</td>
                    <td data-id="users">{{i18n "org_licenses.head.users"}}</td>
                    <td data-id="added">{{i18n "org_licenses.head.added"}}</td>
                    <td data-id="deleted">{{i18n "org_licenses.head.removed"}}</td>
                </tr>
            </thead>
            <tbody>
                {{#each Layout.org.licenses as |record|}}
                    <tr>
                        <td data-id="date">{{record.date}}</td>
                        <td data-id="list">
                            {{> users_cut users=record.users type="all" switcherKey="org_licenses.count.total"}}
                        </td>
                        <td data-id="added">
                            {{> users_cut users=record.added type="added" switcherKey="org_licenses.count.added"}}
                        </td>
                        <td data-id="deleted">
                            {{> users_cut users=record.deleted type="removed" switcherKey="org_licenses.count.removed"}}
                        </td>
                    </tr>
                {{/each}}
            </tbody>
        </table>
    {{else}}
        <div class="blank-list">{{i18n "common.no_data"}}</div>
    {{/if}}
</div>
