Exported PROPOSAL_SORTS to the controller in order to implement a default sorting order feature.
New feature: default sorting order for proposals
New feature: default sorting order for proposals 2
Merge remote branch 'upstream/develop' into feature-default-sorting-order
Feature: default sorting order
Feature: default sorting order
Move default into factory
Merge pull request #1 from phihag/feature-default-sorting-order

Move default into factory
Fixed all little issues
Fixed all small issues
Finally fixed all issues
Merge pull request #173 from yyazgan/feature-default-sorting-order

User settings: default sorting order for proposals
Rename default_sorting_order user setting into proposal_sort_order

see #173#issuecomment-11680570
Allow introduction of new permissions, without auto-assigning to groups

Previously, permissions have only been initialized once (on first call
of `setup-app`), and automatically assigned to user groups.

This is now split: If they don't exist, permissions are created on each
call of `setup-app`, but automatic assignment to user groups only
appears on first call.

That way, newly permissions are created automatically, but no new
permissions are assigned to user groups on existing installations
(purpose: think of restrictive environments, which by default disallow
most options).
Fix successor relationship in Text model

Due to a mistake in the ORM mapping, the successors (children) of Text
objects have been stored, instead of the predecessors (parents), as
expected.

As it doesn't really matter whether the successor or the predecessor is
stored, as history is always linear in the current model, the
corresponding column in the database table is simply renamed from
parent_id to child_id.

Additionally, the mapper setup has been modified in order to allow for a
backref, which is now parent.

Thus, as of now, both parent and child can be accessed through the ORM.
Better text history implementation

Use a single database query to construct the history of a Text object.

Additionally, exclude deleted Text objects from the history, if not told
otherwise.
Allow deleting of objects from history

* Add Page.purge_history and Page.ask_purge_history views
* Add page.delete_history permission
Add valid_parent method which returns next not-deleted predecessor
Merge pull request #175 from nidico/feature/fix-text-successor-relation

Feature/fix text successor relation
Fix 'create new proposal' link for relative_url

Addendum to e74eaf6b0f0bda02dd3a69ac2e0065c6071c6503