liquid_feedback_frontend
view model/vote.lua @ 210:2c422bcb79de
Added tag beta31 for changeset bfd8d88f72fc
- Added support to lock inactive member
- Added esperanto translations for new phrases
- Improved and corrected some esperanto phrases
- Display delegation warnings only for open issues
- Refactored code: admin, area, contact and delegation module
- Translated admin menu
- Added policy editor to admin area
- Save and display last login date
- Small fixes
- Added support to lock inactive member
- Added esperanto translations for new phrases
- Improved and corrected some esperanto phrases
- Display delegation warnings only for open issues
- Refactored code: admin, area, contact and delegation module
- Translated admin menu
- Added policy editor to admin area
- Save and display last login date
- Small fixes
| author | bsw | 
|---|---|
| date | Sat Feb 05 20:01:09 2011 +0100 (2011-02-05) | 
| parents | afd9f769c7ae | 
| children | 
 line source
     1 Vote = mondelefant.new_class()
     2 Vote.table = 'vote'
     3 Vote.primary_key = { "initiative_id", "member_id" }
     5 Vote:add_reference{
     6   mode          = 'm1',
     7   to            = "Issue",
     8   this_key      = 'issue_id',
     9   that_key      = 'id',
    10   ref           = 'issue',
    11 }
    13 Vote:add_reference{
    14   mode          = 'm1',
    15   to            = "Initiative",
    16   this_key      = 'initiative_id',
    17   that_key      = 'id',
    18   ref           = 'initiative',
    19 }
    21 Vote:add_reference{
    22   mode          = 'm1',
    23   to            = "Member",
    24   this_key      = 'author_id',
    25   that_key      = 'id',
    26   ref           = 'author',
    27 }
    29 function Vote:by_pk(initiative_id, member_id)
    30   return self:new_selector()
    31     :add_where{ "initiative_id = ? AND member_id = ?", initiative_id, member_id }
    32     :optional_object_mode()
    33     :exec()
    34 end
