Commit 17cdb7f
committed
Order Condition groups by selection option
We want to display the conditions for a page on the page list in the
same order as the selection options on the page.
To do this, we get a list of selection options from the page's answer
settings, and then use this list to sort the conditions.
We turn off the filter for the call to `in_order_of` so that any extra
conditions are included, even if they aren't included in the order.
group_by preservers order when given an array so we are safe to use it
like this.
We still sort by the `goto_page_id` so that the conditions are grouped
by the page they go to and nil comes last.1 parent 8fafef8 commit 17cdb7f
2 files changed
Lines changed: 27 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
105 | 110 | | |
106 | 111 | | |
107 | 112 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
566 | 587 | | |
567 | 588 | | |
0 commit comments