liqd / adhocracy

Adhocracy is a policy drafting and decision making software for distributed groups and open institutions.
GNU Affero General Public License v3.0
150 stars 37 forks source link

refactor default proposal sort #868

Closed xi closed 10 years ago

xi commented 10 years ago

I just noticed that I missed some things while doing #860: There are actually quite some factors that influence the default proposal pager sorting. Users con configure an individual default and is behavior. So I refactored the code to not ignore those factors.

I also changed the code so that adhocracy.listings.instance_proposal.sorting does not only influence the proposal index page but all proposal pagers (e.g. the one from #865).

Finally I changed the user profile settings so that one deselect a default proposal sorting. user.proposal_sort_order is actually None by default. But once set, it could not be unset from the UI.

We should remember when testing this feature that adhocracy.listings.instance_proposal.sorting can be overwritten by user specific settings.

nidico commented 10 years ago

Apart from the issue above this looks good.