{{#if list.length}}
<table class="ordinary full-width dns-records">
<thead>
    <tr>
        <td data-id="host">
            {{i18n "dns.prop.host"}}
        </td>
        <td data-id="type">
            {{i18n "dns.prop.type"}}
        </td>
        <td data-id="content">
            {{i18n "dns.prop.content"}}
        </td>
        <td data-id="priority">
            {{i18n "dns.prop.priority"}}
        </td>
        <td data-id="ttl">
            {{i18n "dns.prop.ttl"}}
        </td>
        <td data-id="actions"></td>
    </tr>
</thead>
<tbody>
{{#each list}}

<tr>
    <td data-id="host">
        {{this.name}}
    </td>
    <td data-id="type">
        {{this.type}}
    </td>
    <td data-id="content">
        {{#is this.type "TXT"}}
        <span class="breakable">{{this._content}}</span>
        {{else}}
        {{this._content}}
        {{/is}}
    </td>
    <td data-id="priority">
        {{this._priority}}
    </td>
    <td data-id="ttl">
        {{this.ttl}}
    </td>
    <td data-id="actions">
        <label class="link" for="edit_record_{{this.id}}">{{i18n "dns.action.edit_record"}}</label>
        <div data-element="popup_form">
            <input type="radio" name="action" id="edit_record_{{this.id}}_canceled">
            <input type="radio" name="action" id="edit_record_{{this.id}}">
            {{> forms.dns.edit record=this Layout=../Layout}}
        </div>
        <label class="link" for="remove_record_{{this.id}}">{{i18n "dns.action.remove_record"}}</label>
        <div data-element="popup_form">
            <input type="radio" name="action" id="remove_record_{{this.id}}_canceled">
            <input type="radio" name="action" id="remove_record_{{this.id}}">
            {{> forms.dns.remove record=this Layout=../Layout}}
        </div>
    </td>
</tr>
{{/each}}
</tbody>
<tbody>
<tr>
    <td colspan="6" data-id="add_record">
        <label for="add_record">
            <span>{{i18n "dns.action.add_record"}}</span>
        </label>
        <div data-element="popup_form" class="loose">
            <input type="radio" name="action" id="add_record_canceled">
            <input type="radio" name="action" id="add_record">
            {{> forms.dns.edit Layout=Layout}}
        </div>
    </td>
</tr>
</tbody>
</table>
{{else}}
<div class="blank-list">{{i18n "dns.no_records"}}</div>
{{> dns_blank_actions}}
{{/if}}
