Class: ODDB::View::Admin::OrphanedLanguagesList

Inherits:
HtmlGrid::List show all
Defined in:
src/view/admin/orphaned_languages.rb

Constant Summary

OMIT_HEADER =
true
COMPONENTS =
{
  [0,0] =>  :language,
  [2,0] =>  :name,
  [3,0] =>  :preview,
}
COMPONENT_CSS_MAP =
{
  [3,0]   => 'small',
}
SORT_DEFAULT =
:language

Constants inherited from HtmlGrid::List

BACKGROUND_SUFFIX

Instance Method Summary (collapse)

Instance Method Details

- (Object) language(model, session)



18
19
20
# File 'src/view/admin/orphaned_languages.rb', line 18

def language(model, session)
  @lookandfeel.lookup(model.language) 
end

- (Object) name(model, session)



21
22
23
24
25
26
27
# File 'src/view/admin/orphaned_languages.rb', line 21

def name(model, session)
  begin
    model.document.name
  rescue RuntimeError => e
    e.message
  end
end

- (Object) preview(model, session)



28
29
30
31
32
33
34
35
36
37
38
# File 'src/view/admin/orphaned_languages.rb', line 28

def preview(model, session)
  link = HtmlGrid::PopupLink.new(:preview, model, session, self)
  args = {
    "language_select" => model.language,
  }
  if(@container.respond_to? :list_index)
    args.store("index", @container.list_index)
  end
  link.href = @lookandfeel.event_url(:preview, args)
  link
end