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
267 268 269 270 271 272 273 274 |
# File 'lib/oddb/html/view/drugs/admin/sequence.rb', line 267 def name(model) lang = @session.language name = [model.cascading_name(lang)] if(company = model.company) name.push(' - ', company.name.send(lang)) end name end |
#packages(model) ⇒ Object
275 276 277 |
# File 'lib/oddb/html/view/drugs/admin/sequence.rb', line 275 def packages(model) Packages.new(model.packages, @session, self) if(@model.saved?) end |
#snapback(model) ⇒ Object
278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/oddb/html/view/drugs/admin/sequence.rb', line 278 def snapback(model) div = @lookandfeel.lookup(:breadcrumb_divider) steps = [ super ] if product = model.product prd = HtmlGrid::Link.new(:product, model, @session, self) prd.href = @lookandfeel._event_url(:product, :uid => product.uid) steps.push div, prd end steps.push div, @lookandfeel.lookup(:sequence_details_for, model.cascading_name(@session.language)) end |