liquid_feedback_frontend

changeset 962:dfc7b75189ed

Use "admitted" flag as primary sort key for initiatives
author bsw
date Fri Feb 08 18:53:58 2013 +0100 (2013-02-08)
parents 2141aef04ad7
children 03b0ac783fe0
files app/main/event/_list.lua model/issue.lua
line diff
     1.1 --- a/app/main/event/_list.lua	Thu Feb 07 23:48:50 2013 +0100
     1.2 +++ b/app/main/event/_list.lua	Fri Feb 08 18:53:58 2013 +0100
     1.3 @@ -166,7 +166,7 @@
     1.4            if not event.initiative_id then
     1.5              local initiatives_selector = Initiative:new_selector()
     1.6                :add_where{ "initiative.issue_id = ?", event.issue_id }
     1.7 -              :add_order_by("initiative.rank, initiative.harmonic_weight DESC NULLS LAST, id")
     1.8 +              :add_order_by("initiative.admitted DESC, initiative.rank, initiative.harmonic_weight DESC NULLS LAST, id")
     1.9              execute.view{ module = "initiative", view = "_list", params = { 
    1.10                issue = event.issue,
    1.11                initiatives_selector = initiatives_selector,
     2.1 --- a/model/issue.lua	Thu Feb 07 23:48:50 2013 +0100
     2.2 +++ b/model/issue.lua	Fri Feb 08 18:53:58 2013 +0100
     2.3 @@ -37,7 +37,7 @@
     2.4    that_key      = 'issue_id',
     2.5    ref           = 'initiatives',
     2.6    back_ref      = 'issue',
     2.7 -  default_order = 'initiative.rank, initiative.harmonic_weight DESC NULLS LAST, id'
     2.8 +  default_order = 'initiative.admitted DESC, initiative.rank, initiative.harmonic_weight DESC NULLS LAST, id'
     2.9  }
    2.10  
    2.11  Issue:add_reference{

Impressum / About Us