Module: NamespacesHelper

Defined in:
app/helpers/namespaces_helper.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) namespace_from_identifier_tag(identifier)



17
18
19
20
21
22
23
# File 'app/helpers/namespaces_helper.rb', line 17

def namespace_from_identifier_tag(identifier)
  if identifier.respond_to?(:namespace)
    namespace_tag(identifier.namespace)
  else
    nil
  end
end


8
9
10
11
# File 'app/helpers/namespaces_helper.rb', line 8

def namespace_link(namespace)
  return nil if namespace.nil?
  link_to(namespace_tag(namespace).html_safe, namespace)
end

- (Object) namespace_select_tag(namespace_element)



25
26
27
# File 'app/helpers/namespaces_helper.rb', line 25

def namespace_select_tag(namespace_element)
  select_tag(namespace_element, options_for_select(Namespace.pluck(:short_name).uniq), prompt: 'Select a namespace')
end

- (Object) namespace_tag(namespace)



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

def namespace_tag(namespace)
  return nil if namespace.nil?
  namespace.name
end

- (Object) namespaces_search_form



13
14
15
# File 'app/helpers/namespaces_helper.rb', line 13

def namespaces_search_form
  render('/namespaces/quick_search_form')
end