<template name="serverInformationList">
    {{#form api=instance.api}}
        <table id="tblServer" class="table">
            <thead>
                <tr>
                    <th>Name</th>
                    <th>Type</th>
                    <th class="text-right">Actions</th>
                </tr>
            </thead>
            <tbody>
                {{#each server in servers}}
                    <tr>
                        <td>{{server.name}}</td>
                        <td>{{server.type}}</td>
                        <td class="text-right">
                            <div class="btn-group" role="group" aria-label="Actions">
                                {{#button class='btn btn-sm btn-default' action='use' params=server title='Use this server' disabled=(isActive server)}}
                                    {{#if isActive server}}
                                        <i class="fa fa-check-square-o"></i>
                                    {{else}}
                                        <i class="fa fa-square-o"></i>
                                    {{/if}}
                                {{/button}}
                                {{#button class='btn btn-sm btn-default' action='edit' params=server title='Edit' disabled=(eq server.origin 'json')}}
                                    <i class="fa fa-pencil"></i>
                                {{/button}}
                                {{#button class='btn btn-sm btn-danger' action='delete' params=server title='Remove' disabled=(eq server.origin 'json')}}
                                    <i class="fa fa-trash"></i>
                                {{/button}}
                            </div>
                        </td>
                    </tr>
                {{else}}
                    <tr>
                        <td class="text-center" colspan="3">No servers found</td>
                    </tr>
                {{/each}}
            </tbody>
        </table>
        {{#button class='btn btn-sm btn-default' action='add'}}
            <i class="fa fa-plus"></i> Add a new server
        {{/button}}
    {{/form}}
</template>
