liquid_feedback_frontend

annotate model/draft.lua @ 1169:112a3add1637

Pass memory_limit configuration to listen() and changed max fork limit to 128
author bsw
date Tue Mar 24 20:02:30 2015 +0100 (2015-03-24)
parents 23c98752e697
children 24f4c23f76ff
rev   line source
bsw/jbe@0 1 Draft = mondelefant.new_class()
bsw/jbe@0 2 Draft.table = 'draft'
bsw/jbe@0 3
bsw@81 4 -- Many drafts belonging to an initiative
bsw/jbe@0 5 Draft:add_reference{
bsw/jbe@0 6 mode = 'm1',
bsw/jbe@0 7 to = "Initiative",
bsw/jbe@0 8 this_key = 'initiative_id',
bsw/jbe@0 9 that_key = 'id',
bsw/jbe@0 10 ref = 'initiative',
bsw/jbe@0 11 }
bsw/jbe@0 12
bsw@81 13 -- Many drafts are authored by a member
bsw/jbe@0 14 Draft:add_reference{
bsw/jbe@0 15 mode = 'm1',
bsw/jbe@0 16 to = "Member",
bsw/jbe@0 17 this_key = 'author_id',
bsw/jbe@0 18 that_key = 'id',
bsw/jbe@0 19 ref = 'author',
bsw/jbe@0 20 }
bsw/jbe@0 21
bsw/jbe@0 22 function Draft.object_get:author_name()
bsw/jbe@0 23 return self.author and self.author.name or _"Unknown author"
bsw/jbe@0 24 end
bsw@81 25
bsw@279 26 model.has_rendered_content(Draft, RenderedDraft)

Impressum / About Us