liquid_feedback_frontend
changeset 957:f9f3b3edb121
Ordering of initiatives by harmonic weight
author | bsw |
---|---|
date | Sat Feb 02 18:17:34 2013 +0100 (2013-02-02) |
parents | 0b635d6bfcae |
children | fc8ae2b4c2c6 |
files | app/main/event/_list.lua model/issue.lua |
line diff
1.1 --- a/app/main/event/_list.lua Sat Feb 02 18:09:37 2013 +0100 1.2 +++ b/app/main/event/_list.lua Sat Feb 02 18:17:34 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.supporter_count DESC") 1.8 + :add_order_by("initiative.rank, initiative.harmonic_weight DESC, id") 1.9 execute.view{ module = "initiative", view = "_list", params = { 1.10 issue = event.issue, 1.11 initiatives_selector = initiatives_selector, 1.12 @@ -224,4 +224,4 @@ 1.13 end 1.14 1.15 1.16 -ui.filters(filters) 1.17 \ No newline at end of file 1.18 +ui.filters(filters)
2.1 --- a/model/issue.lua Sat Feb 02 18:09:37 2013 +0100 2.2 +++ b/model/issue.lua Sat Feb 02 18:17:34 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.supporter_count DESC, id' 2.8 + default_order = 'initiative.rank, initiative.harmonic_weight DESC, id' 2.9 } 2.10 2.11 Issue:add_reference{