module Oxen module AccountsHelper def invited_user? user # "blue-grey lighten-2" user.invitation_token.nil? ? "" : "invited_user" end def build_link_from_array arr link_to arr[0], arr[1] end def show_printservers account links = account.printservers.collect do |printserver| port = printserver.port.to_i+2000 port = "631" printgateway = "http://10.0.0.142" link_to "#{printgateway}:#{port}", data_action: "new_get_window", target: "_blank", alt: "#{printserver.lokation}" do content_tag :i, 'print', class: 'material-icons small pink-text lighten-4', title: "#{printserver.lokation}", alt: "#{printserver.lokation}" end end.join( " ").html_safe rescue " " end end end