<< | Index | >>
Link
Update
def analysis if group_cd = @session.user_input(:group) and group = @session.app.analysis_group(group_cd) and position = group.position(@session.user_input(:position)) State::Analysis::Position.new(@session, position) end end
EVENTS = [ :analysis, ... STRINGS = [ :group, :position,
def description(model)
link.href = @lookandfeel._event_url(:analysis, [:group, model.groupcd, :position, model.poscd]) if model.is_a?(ODDB::Analysis::Position)
Update
def analysis if group_cd = @session.user_input(:group) and group = @session.app.analysis_group(group_cd) if position = group.position(@session.user_input(:position)) State::Analysis::Position.new(@session, position)else
State::Analysis::Group.new(@session, group)
end
end end
def description(model, key = :description)
link.href = @lookandfeel._event_url(:analysis, [:group, model.groupcd, :position, model.poscd])
Update
class PointerSteps < ODDB::View::PointerSteps
def pointer_descr(model, session=@session)
event = :analysis
link = PointerLink.new(:pointer_descr, model, @session, self)
link.href = @lookandfeel._event_url(event, {:group => model.groupcd})
link
end
end
class Position < View::PrivateTemplate CONTENT = PositionComposite SNAPBACK_EVENT = :resultdef backtracking(model, session=@session)
ODDB::View::Analysis::PointerSteps.new(model, @session, self)
end
end
Commit
Update
def code(model, session=@session) link = PointerLink.new(:code, model, session) link.href = @lookandfeel._event_url(:analysis, {:group => model.groupcd}) link end
Note
Link
Note
Update
def doctor if oid = @session.user_input(:oid) and model = @session.app.doctor(oid) State::Doctors::Doctor.new(@session, model) end end
EVENTS = [ :doctor,
def doctor if oid = @session.user_input(:oid) and model = @session.app.doctor(oid) State::Doctors::RootDoctor.new(@session, model) end end
def name(model) #View::PointerLink.new(:name, model, @session, self)link = View::PointerLink.new(:name, model, @session, self)
link.href = @lookandfeel._event_url(:doctor, {:oid => model.oid})
link
end
Update
def vcard if oid = @session.user_input(:doctor) and doctor = @session.search_doctor(oid) State::Doctors::VCard.new(@session, doctor) end end
def search_doctor(oid) @persistent_user_input[:oid] ||= oid @app.doctor(oid) end
STRINGS = [ :doctor,
def initif pointer = @session.user_input(:pointer)
@model = pointer.resolve(@session)end
super end
def vcard(model) link = View::PointerLink.new(:vcard, model, @session, self) link.href = @lookandfeel._event_url(:vcard, {:doctor => model.oid}) link end
def vcard(model) link = View::PointerLink.new(:vcard, model, @session, self) link.href = @lookandfeel._event_url(:vcard, {:doctor => model.oid}) link end
Note
Update
def suggest_address keys = [:pointer] input = user_input(keys, keys)if pointer = input[:pointer]
if(!error?) addr = pointer.resolve(@session) if(addr.nil?) ## simulate an address addr = Address2.new if(parent = pointer.parent.resolve(@session)) addr.name = parent.fullname end addr.pointer = pointer end SuggestAddress.new(@session, addr) endelsif oid = @session.user_input(:doctor) and doctor = @session.app.doctor(oid) and addr = doctor.address(@session.user_input(:address))
SuggestAddress.new(@session, addr)
end
end
button = HtmlGrid::Button.new(:correct, model, @session, self)args = if doctor_oid = @session.persistent_user_input(:oid) and doctor = @session.search_doctor(doctor_oid) \
and address = doctor.addresses.index(model)
[
:doctor, doctor_oid,
:address, address,
:zone, @session.zone,
]
else { :pointer => model.pointer, :zone => @session.zone, } end url = @lookandfeel._event_url(:suggest_address, args)
Commit
Note
To be updated
suspend
Note
ToDo
Note
Check
ch.oddb> open('/home/masa/work/test.dat', 'w'){|out| each_substance{|k,v| out.print k, "\n" if k.to_i.to_s != v.oid.to_s}} masa@masa ~/work $ ls -l test.dat -rw-r--r-- 1 masa masa 0 28. Okt 16:43 test.dat
Note
Update
def substance if oid = @session.user_input(:oid) and substance = @session.app.substance(oid) State::Admin::TransparentLogin.new(@session, substance) end end
def substance if oid = @session.user_input(:oid) and substance = @session.app.substance(oid) State::Substances::Substance.new(@session, substance) end end
EVENTS = [ :substance,
def name(model, session)
link = View::PointerLink.new(:name, model, session, self)
link.href = @lookandfeel._event_url(:substance, {:key => model.oid })
link
end
def name(model, session)
link = View::PointerLink.new(:name, model, session, self)
link.href = @lookandfeel._event_url(:substance, {:key => model.oid })
link
end
Note(IMPORTANT
)