<< | Index | >>
suspend
Replace link
Note
Access
Commit
Link
Note
/home/masa/ywesee/oddb.org/src/view/address.rb:67: warning: Object#type is deprecated; use Object#class /home/masa/ywesee/oddb.org/src/view/address.rb:122: warning: Object#type is deprecated; use Object#class
Access
Note
module ODDB
module State
module Admin
class AddressSuggestion < Global
def init
if(pointer = @model.address_pointer)
addr = pointer.resolve(@session)
if(addr.nil?)
addr = Address2.new
addr.pointer = pointer
end
@active_address = AddressWrapper.new(addr)
parent = pointer.parent.resolve(@session)
select_zone(parent)
@active_address.email_suggestion = parent.email
end
super
end
suspend
Link
Note (IMPORTANT
)
ch.oddb> galenic_group('890150').oid -> 890150 ch.oddb> galenic_group('890150').odba_id -> 890150 ch.oddb> galenic_group('5').oid -> 5 ch.oddb> galenic_group('5').odba_id -> 3790
Update
def galenic_group
if oid = @session.user_input(:oid) and model = @session.app.galenic_group(oid)
if @session.allowed?('edit', 'org.oddb.model.!galenic_group.*')
ODDB::State::Admin::GalenicGroup.new(@session, model)
else
ODDB::State::Admin::TransparentLogin.new(@session, model)
end
end
end
def oid(model, session) link = View::PointerLink.new(:oid, model, session) link.href = @lookandfeel._event_url(:galenic_group, {:oid => model.oid}) link end def description(model, session) link = View::PointerLink.new(:description, model, session) link.href = @lookandfeel._event_url(:galenic_group, {:oid => model.oid}) link end
Access
Galenic Form link
Update
def galenic_group if oid = @session.user_input(:oid) and model = @session.app.galenic_group(oid) if @session.allowed?('edit', 'org.oddb.model.!galenic_group.*') ODDB::State::Admin::GalenicGroup.new(@session, model) else ODDB::State::Admin::TransparentLogin.new(@session, model) end end end def galenic_form if group_oid = @session.user_input(:goid) and group = @session.app.galenic_group(group_oid) and model = group.galenic_form(@session.user_input(:foid)) if @session.allowed?('edit', 'org.oddb.model.!galenic_group.*') ODDB::State::Admin::GalenicForm.new(@session, model) else ODDB::State::Admin::TransparentLogin.new(@session, model) end end end
EVENTS = [ :galenic_form, :galenic_group, STRINGS = [ :foid, :goid,
def oid(model, session) link = View::PointerLink.new(:oid, model, session) link.href = @lookandfeel._event_url(:galenic_form, [:goid, model.galenic_group.oid, :foid, model.oid]) link end def description(model, session) link = View::PointerLink.new(:description, model, session) link.href = @lookandfeel._event_url(:galenic_form, [:goid, model.galenic_group.oid, :foid, model.oid]) link end
def oid(model, session) link = View::PointerLink.new(:oid, model, session) link.href = @lookandfeel._event_url(:galenic_group, {:oid => model.oid}) link end def description(model, session) link = View::PointerLink.new(:description, model, session) link.href = @lookandfeel._event_url(:galenic_group, {:oid => model.oid}) link end
Access
Commit
Link
Update
def commercial_form if oid = @session.user_input(:oid) and model = @session.app.commercial_form(oid) ODDB::State::Admin::TransparentLogin.new(@session, model) end end
def commercial_form if oid = @session.user_input(:oid) and model = @session.app.commercial_form(oid) ODDB::State::Admin::CommercialForm.new(@session, model) end end
Access
Commit
Link
Update
def indication if oid = @session.user_input(:oid) and model = @session.app.indication(oid) ODDB::State::Admin::TransparentLogin.new(@session, model) end end
EVENTS = [ :indication,
def indication if oid = @session.user_input(:oid) and model = @session.app.indication(oid) State::Admin::Indication.new(@session, model) end end
def description(model, session) link = View::PointerLink.new(:description, model, session) link.href = @lookandfeel._event_url(:indication, {:oid => model.oid}) link end
Access
Commit
Link
Commit