liquid_feedback_frontend
view model/policy.lua @ 934:39cf8f1304a7
Added seconds to time format
author | bsw |
---|---|
date | Sun Nov 04 18:47:36 2012 +0100 (2012-11-04) |
parents | f3d6d08b0125 |
children | bbe07befa4e4 |
line source
1 Policy = mondelefant.new_class()
2 Policy.table = 'policy'
4 Policy:add_reference{
5 mode = '1m',
6 to = "Issue",
7 this_key = 'id',
8 that_key = 'policy_id',
9 ref = 'issues',
10 back_ref = 'policy'
11 }
13 function Policy:build_selector(args)
14 local selector = self:new_selector()
15 if args.active ~= nil then
16 selector:add_where{ "active = ?", args.active }
17 end
18 selector:add_order_by("index")
19 return selector
20 end
22 function Policy.object_get:free_timeable()
23 if self.discussion_time == nil and self.verification_time == nil and self.voting_time == nil then
24 return true
25 end
26 return false
27 end