This PR allows users to delete their own accounts. The logic implemented matches
that currently used by the admins when they manually close accounts, although
there is room to be more complex in future e.g. completely removing accounts
with no content.
The error handling has been slightly adapted for namespaced controllers, by
anchoring the controller name with a leading forward slash.
The user status is a bit complex, since there are various states and
not all transitions between them make sense.
Using AASM means that we can name and restrict the transitions, which
hopefully makes them easier to reason about.
This allows rails to set the created_at automatically, and so avoids
us from having to do so in a callback. It also hides the unusual
db column name from the rest of the app.
Because we are using an edge-to-edge layout for the flash messages,
the negative margins on the row were expanding the element offscreen.
Bootstrap provides a "no-gutter" class for removing these margins,
but that also drops the spacing between columns which we want to preserve.
So instead we use a margin override on the row only.
Additionally, drop some padding css in favour of a utility class
Fixes#3351
Bug was introduced in 3dd639c8d0
This avoids needing any floats. Also remove buttons class from two
locations, since there is a min-width on that class and it affects
the button styling negatively for standalone buttons
This makes future refactoring easier, since the elements will
retain their borders even if the hierarchy changes.
Also round some maps and the legale section since I think those now
look nicer.
Fixes#3369
This makes the heading match the layout of the user's Notes page,
which also has a short heading and a subheading with a link.
Additionally, add a page title, again for consistency
Now that all uses of the images and thumbnails have been migrated
to flex grids, we can remove the margin and padding from the original
css classes and revert to using them.
The margins on the buttons aren't needed since the table has a bottom
margin, and the button class has never been applied since it was
incorrectly in the id field. The table row override had no effect since
the cells have their own vertical-alignment set.
Margin-top in particular is best avoided. The removal of some top
margins required a few corresponding changes to add bottom margins
to other features, mostly done by converting bare text strings to
live within paragraphs.
This avoids constructing xml by hand in both the controller and
the model, and opens the way for other rendering in future.
The complexity of deciding which point goes where, along with revisiting
previous tracks and tracksegs means that I've broken it down into
two parts - sorting the points into the right trksegs is done first,
before rendering them all as xml. I couldn't find a way to allow
revisiting using the builder.