Class: ODDB::View::Drugs::SequenceList

Inherits:
HtmlGrid::List show all
Includes:
AdditionalInformation, AlphaHeader, LookandfeelComponents, ResultColors
Defined in:
src/view/drugs/sequences.rb

Constant Summary

COMPONENTS =
{ }
DEFAULT_CLASS =
HtmlGrid::Value
CSS_CLASS =
'composite'
CSS_KEYMAP =
{
  :fachinfo       => 'list',
  :compositions   => 'list',
  :google_search  => 'list bold right',
  :iksnr          => 'small',
  :name_base      => 'list big',
  :notify         => 'list bold right',
  :patinfo        => 'list',
}
CSS_HEAD_KEYMAP =
{}
CSS_MAP =
{}
COMPONENT_CSS_MAP =
{
  [0,0]   => 'small',
}
SORT_DEFAULT =
false
SORT_HEADER =
false
SYMBOL_MAP =
{
  :iksnr  => PointerLink,
}
LEGACY_INTERFACE =
false

Constants included from AlphaHeader

EMPTY_LIST_KEY

Constants inherited from HtmlGrid::List

BACKGROUND_SUFFIX

Instance Method Summary (collapse)

Methods included from LookandfeelComponents

#reorganize_components

Methods included from AdditionalInformation

#_fachinfo, #atc_ddd_link, #atc_description, #comarketing, #complementary_type, #compositions, #ddd_price, #deductible, #fachinfo, #feedback, #google_search, #ikscat, #limitation_link, #limitation_text, #minifi, #narcotic, #notify, #patent, #patinfo, #qty_unit, #square, #twitter_share

Methods included from PartSize

#comparable_size, #part_size

Methods included from AtcDddLink

#atc_ddd_link

Instance Method Details

- (Object) compose_header(offset = [0,0])



65
66
67
68
69
70
71
72
73
74
75
76
# File 'src/view/drugs/sequences.rb', line 65

def compose_header(offset=[0,0])
  offset = super
  unless(@model.empty?)
    @grid.add(OffsetPager.new(@session.state.pages, @session, self, 
                              :sequences, {:range => @session.state.range}), 
                              *offset)
    @grid.set_colspan(offset.at(0), offset.at(1), full_colspan)
    @grid.add_style('tab', *offset)
    offset = resolve_offset(offset, self::class::OFFSET_STEP)
  end
  offset
end

- (Object) init



61
62
63
64
# File 'src/view/drugs/sequences.rb', line 61

def init
  reorganize_components(:sequence_list_components)
  super
end

- (Object) name_base(model)



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'src/view/drugs/sequences.rb', line 77

def name_base(model)
  link = HtmlGrid::Link.new(:name_base, model, @session, self)
  name = model.name_base
  link.value = name
  args = {
    'search_query' => name.gsub('/', '%2F'),
  }
  if @lookandfeel.disabled?(:best_result)
    link.href = @lookandfeel._event_url(:search, args)
  else
    link.href = @lookandfeel._event_url(:search, args, "best_result")
  end
  link.css_class = 'big' << resolve_suffix(model)
  link
end