blob: 199d077087dc5a4073e1c714cca00a3a678ae5e1 [file] [log] [blame]
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_action_menu/cr_action_menu.html">
<link rel="import" href="chrome://resources/cr_elements/cr_icon_button/cr_icon_button.html">
<link rel="import" href="chrome://resources/cr_elements/icons.html">
<link rel="import" href="cups_printer_dialog_util.html">
<link rel="import" href="cups_printers_browser_proxy.html">
<link rel="import" href="../settings_shared_css.html">
<dom-module id="settings-cups-printers-list">
<template>
<style include="settings-shared">
.printer-name {
flex: 1;
}
</style>
<cr-action-menu role-description="$i18n{menu}">
<button class="dropdown-item" on-click="onEditTap_">
$i18n{editPrinter}
</button>
<button class="dropdown-item" on-click="onRemoveTap_">
$i18n{removePrinter}
</button>
</cr-action-menu>
<div class="list-frame vertical-list">
<template is="dom-repeat" items="[[printers]]"
filter="[[filterPrinter_(searchTerm)]]"
sort="sort_">
<div class="list-item">
<div class="printer-name text-elide">[[item.printerName]]</div>
<!--TODO(xdai): Add icon for enterprise CUPS printer. -->
<cr-icon-button class="icon-more-vert" on-click="onOpenActionMenuTap_"
title="$i18n{moreActions}"></cr-icon-button>
</div>
</template>
</div>
</template>
<script src="cups_printers_list.js"></script>
</dom-module>