%tr{ id: "tr-#{printer.id}"} %td= link_to printer.name, printer %td= show_resource_delete_icon printer, '/admin/printers' - if parent? %td - if user.printers.include? printer = link_to detach_url( user,printer), class: 'attached green-text', title: t('detach_printers') do %i.material-icons layers - else = link_to attach_url( user,printer), class: 'detached red-text', title: t('attach_printers') do %i.material-icons layers_clear %td - if user.printers.preferred_printer.include? printer = link_to defer_url( user,printer), class: 'preferred green-text', ref: printer.paper, data: { id: printer.id }, title: t('defer_printers') do %i.preferred.material-icons.green-text bookmark - else = link_to prefer_url( user,printer), class: 'deferred grey-text', ref: printer.paper, data: { id: printer.id },title: t('prefer_printers') do %i.material-icons bookmark_border