bsw/jbe@0: Draft = mondelefant.new_class() bsw/jbe@0: Draft.table = 'draft' bsw/jbe@0: bsw/jbe@0: Draft:add_reference{ bsw/jbe@0: mode = 'm1', bsw/jbe@0: to = "Initiative", bsw/jbe@0: this_key = 'initiative_id', bsw/jbe@0: that_key = 'id', bsw/jbe@0: ref = 'initiative', bsw/jbe@0: } bsw/jbe@0: bsw/jbe@0: Draft:add_reference{ bsw/jbe@0: mode = 'm1', bsw/jbe@0: to = "Member", bsw/jbe@0: this_key = 'author_id', bsw/jbe@0: that_key = 'id', bsw/jbe@0: ref = 'author', bsw/jbe@0: } bsw/jbe@0: bsw/jbe@0: -- reference to supporter probably not needed bsw/jbe@0: bsw/jbe@0: function Draft.object_get:author_name() bsw/jbe@0: return self.author and self.author.name or _"Unknown author" bsw/jbe@0: end