Module: Oxen::AccountsHelper

Defined in:
app/helpers/oxen/accounts_helper.rb

Instance Method Summary collapse

Instance Method Details



8
9
10
# File 'app/helpers/oxen/accounts_helper.rb', line 8

def build_link_from_array arr
  link_to arr[0], arr[1]
end

#invited_user?(user) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
6
# File 'app/helpers/oxen/accounts_helper.rb', line 3

def invited_user? user
  # "blue-grey lighten-2"
  user.invitation_token.nil? ? "" : "invited_user"
end

#show_printservers(account) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
# File 'app/helpers/oxen/accounts_helper.rb', line 12

def show_printservers 
  links = .printservers.collect do |printserver|
    port = printserver.port.to_i+40000
    printgateway = "https://printserver.dk"
    link_to "#{printgateway}:#{port}", data_action: "new_get_window", target: "_blank", alt: "#{printserver.lokation}" do
       :i, 'print', class: 'material-icons small pink-text lighten-4', title: "#{printserver.lokation}", alt: "#{printserver.lokation}"
    end
  end.join( " ").html_safe
rescue
  " "
end