liquid_feedback_frontend
annotate model/unit.lua @ 251:cb2380e08bb5
Show currently active delegation in delegation boxes
author | Ingo Bormuth <mail@ibormuth.de> |
---|---|
date | Fri Dec 30 03:59:04 2011 +0100 (2011-12-30) |
parents | 6725c13b6ce0 |
children | b77e6a17ca77 |
rev | line source |
---|---|
bsw@241 | 1 Unit = mondelefant.new_class() |
bsw@241 | 2 Unit.table = 'unit' |
bsw@241 | 3 |
bsw@241 | 4 Unit:add_reference{ |
bsw@241 | 5 mode = '1m', |
bsw@241 | 6 to = "Area", |
bsw@241 | 7 this_key = 'id', |
bsw@241 | 8 that_key = 'unit_id', |
bsw@241 | 9 ref = 'areas', |
bsw@241 | 10 back_ref = 'unit' |
bsw@241 | 11 } |
bsw@241 | 12 |
bsw@241 | 13 function Unit:get_flattened_tree() |
bsw@241 | 14 -- TODO implement |
bsw@241 | 15 |
bsw@241 | 16 return Unit:new_selector():exec() |
bsw@241 | 17 end |