<table class="table table-striped table-hover table-condensed table-hover" id="settings_printerProfiles_profiles" data-bind="visible: printerProfiles.profiles.items().length > 0" style="display: none">
    <thead>
    <tr>
        <th class="settings_printerProfiles_profiles_name">{{ _('Name') }}</th>
        <th class="settings_printerProfiles_profiles_model">{{ _('Model') }}</th>
        <th class="settings_printerProfiles_profiles_action">{{ _('Action') }}</th>
    </tr>
    </thead>
    <tbody data-bind="foreach: printerProfiles.profiles.paginatedItems">
    <tr data-bind="attr: {title: name}">
        <td class="settings_printerProfiles_profiles_name"><span class="fas fa-star" data-bind="invisible: !isdefault()"></span> <span data-bind="text: name, style: { 'font-weight': iscurrent() ? 'bold' : 'normal' }"></span></td>
        <td class="settings_printerProfiles_profiles_model" data-bind="text: model"></td>
        <td class="settings_printerProfiles_profiles_action">
            <a href="#" class="fas fa-star" title="{{ _('Set as default profile')|edq }}" data-bind="click: function() { if ($root.printerProfiles.canMakeDefault($data) && !$root.printerProfiles.requestInProgress()) { $root.printerProfiles.makeDefault($data); } }, css: {disabled: !$root.printerProfiles.canMakeDefault($data) || $root.printerProfiles.requestInProgress()}, enabled: $root.printerProfile.canMakeDefault($data) && !$root.printerProfiles.requestInProgress()"></a>&nbsp;|&nbsp;<a href="#" class="fas fa-pencil-alt" title="{{ _('Edit Profile')|edq }}" data-bind="click: function() { if (!$root.printerProfiles.requestInProgress()) { $root.printerProfiles.showEditProfileDialog($data); } }, css: {disabled: $root.printerProfiles.requestInProgress()}, enabled: !$root.printerProfiles.requestInProgress()"></a>&nbsp;|&nbsp;<a href="#" class="far fa-trash-alt" title="{{ _('Delete Profile')|edq }}" data-bind="click: function() { if ($root.printerProfiles.canRemove($data) && !$root.printerProfiles.requestInProgress()) { $root.printerProfiles.removeProfile($data); } }, css: {disabled: !$root.printerProfiles.canRemove($data) || $root.printerProfiles.requestInProgress()}, enabled: $root.printerProfiles.canRemove($data) && !$root.printerProfiles.requestInProgress()"></a>
        </td>
    </tr>
    </tbody>
</table>

<div class="pagination pagination-mini pagination-centered">
    <ul>
        <li data-bind="css: {disabled: printerProfiles.profiles.currentPage() === 0}"><a href="#" data-bind="click: printerProfiles.profiles.prevPage">«</a></li>
    </ul>
    <ul data-bind="foreach: printerProfiles.profiles.pages">
        <li data-bind="css: { active: $data.number === $root.printerProfiles.profiles.currentPage(), disabled: $data.number === -1 }"><a href="#" data-bind="text: $data.text, click: function() { $root.printerProfiles.profiles.changePage($data.number); }"></a></li>
    </ul>
    <ul>
        <li data-bind="css: {disabled: printerProfiles.profiles.currentPage() === printerProfiles.profiles.lastPage()}"><a href="#" data-bind="click: printerProfiles.profiles.nextPage">»</a></li>
    </ul>
</div>
