Class: ODDB::Html::View::Drugs::Admin::SequenceComposite
- Inherits:
-
HtmlGrid::DivComposite
- Object
- HtmlGrid::DivComposite
- ODDB::Html::View::Drugs::Admin::SequenceComposite
- Includes:
- Snapback
- Defined in:
- lib/oddb/html/view/drugs/admin/sequence.rb
Constant Summary collapse
- COMPONENTS =
{ [0,0] => :snapback, [0,1] => InlineSearch, [0,2] => :name, [0,3] => SequenceForm, [0,4] => "packages_admin", [0,5] => :packages, }
- CSS_ID_MAP =
[ 'snapback', 'result-search', 'title' ]
- CSS_MAP =
{ 0 => 'before-searchbar', 4 => 'divider' }
Instance Method Summary collapse
Instance Method Details
#name(model) ⇒ Object
278 279 280 281 282 283 284 |
# File 'lib/oddb/html/view/drugs/admin/sequence.rb', line 278 def name(model) name = [model.name] if(company = model.company) name.push(' - ', company.name) end name end |
#packages(model) ⇒ Object
285 286 287 |
# File 'lib/oddb/html/view/drugs/admin/sequence.rb', line 285 def packages(model) Packages.new(model.packages, @session, self) if(@model.saved?) end |
#snapback(model) ⇒ Object
288 289 290 291 292 293 294 295 |
# File 'lib/oddb/html/view/drugs/admin/sequence.rb', line 288 def snapback(model) div = @lookandfeel.lookup(:breadcrumb_divider) prd = HtmlGrid::Link.new(:product, model, @session, self) prd.href = @lookandfeel._event_url(:product, :uid => model.product.uid) [ super, div, prd, div, @lookandfeel.lookup(:sequence_details_for, model.name.send(@session.language)) ] end |