Sha256: 71ca2cff028ea2366d3fc09629e486ffd3994dcfb1e9f8a798e37e4dbf585661

Contents?: true

Size: 789 Bytes

Versions: 10

Compression:

Stored size: 789 Bytes

Contents

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
oxen_account-0.4.12 app/helpers/oxen/accounts_helper.rb
oxen_account-0.4.11 app/helpers/oxen/accounts_helper.rb
oxen_account-0.4.9 app/helpers/oxen/accounts_helper.rb
oxen_account-0.4.8 app/helpers/oxen/accounts_helper.rb
oxen_account-0.4.7 app/helpers/oxen/accounts_helper.rb
oxen_account-0.4.1 app/helpers/oxen/accounts_helper.rb
oxen_account-0.3.4 app/helpers/oxen/accounts_helper.rb
oxen_account-0.3.3 app/helpers/oxen/accounts_helper.rb
oxen_account-0.3.2 app/helpers/oxen/accounts_helper.rb
oxen_account-0.3.1 app/helpers/oxen/accounts_helper.rb