liquid_feedback_frontend
diff model/draft.lua @ 0:3bfb2fcf7ab9
Version alpha1
author | bsw/jbe |
---|---|
date | Wed Nov 18 12:00:00 2009 +0100 (2009-11-18) |
parents | |
children | 134fce4bede3 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/model/draft.lua Wed Nov 18 12:00:00 2009 +0100 1.3 @@ -0,0 +1,24 @@ 1.4 +Draft = mondelefant.new_class() 1.5 +Draft.table = 'draft' 1.6 + 1.7 +Draft:add_reference{ 1.8 + mode = 'm1', 1.9 + to = "Initiative", 1.10 + this_key = 'initiative_id', 1.11 + that_key = 'id', 1.12 + ref = 'initiative', 1.13 +} 1.14 + 1.15 +Draft:add_reference{ 1.16 + mode = 'm1', 1.17 + to = "Member", 1.18 + this_key = 'author_id', 1.19 + that_key = 'id', 1.20 + ref = 'author', 1.21 +} 1.22 + 1.23 +-- reference to supporter probably not needed 1.24 + 1.25 +function Draft.object_get:author_name() 1.26 + return self.author and self.author.name or _"Unknown author" 1.27 +end