Commit graph

2748 commits

Author SHA1 Message Date
Tom Hughes
1f8df781be Merge remote-tracking branch 'upstream/pull/3398' 2022-02-16 18:13:16 +00:00
Andy Allan
2fabc46421
Merge pull request #3440 from mmd-osm/relationmemberlimit
Introduce relation member limit
2022-02-16 14:58:30 +00:00
Andy Allan
6c1d73a509 Allow users to delete their own accounts
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.
2022-02-09 16:15:24 +00:00
Tom Hughes
446837c351 Merge remote-tracking branch 'upstream/pull/3419' 2022-02-03 18:37:12 +00:00
Andy Allan
2731e7244a Add extra user transitions needed by the administrators 2022-02-02 16:37:50 +00:00
mmd-osm
2efd73c672 Introduce relation member limit
Adds a new parameter `max_number_of_relation_members` in settings.yml
2022-02-02 13:15:40 +01:00
Tom Hughes
81c58571c5 Fix route for "go public" button on the account edit page 2022-01-28 12:39:39 +00:00
Nick Doiron
a4f601b114
rm spaces 2022-01-12 19:16:09 -05:00
Nick Doiron
e9522b0205
add dir="auto" to search fields
Improves right-to-left text input support
2022-01-12 19:06:18 -05:00
Andy Allan
1a11c4dc19 Use a state machine for user status
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.
2022-01-12 18:16:14 +00:00
Tom Hughes
6403515897 Replace to_s on TimeWithZone objects with to_formatted_s 2022-01-10 18:59:22 +00:00
Tom Hughes
fea1b5b88d Fix new rubocop warnings 2021-12-28 19:47:51 +00:00
Andy Allan
40e8482825 Alias the user creation_time column
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.
2021-12-22 14:48:07 +00:00
Andy Allan
a8e8ba1a64 Refactor the account edit/update pages out into a separate accounts controller 2021-12-08 15:17:50 +00:00
Tom Hughes
4eecd59a5d Merge remote-tracking branch 'upstream/pull/3380' 2021-11-25 17:15:54 +00:00
Tom Hughes
5dfbf00776 Merge remote-tracking branch 'upstream/pull/3378' 2021-11-25 17:15:10 +00:00
Andy Allan
c343f3ed3e Prevent flash messages from expanding offscreen
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
2021-11-24 14:32:36 +00:00
Andy Allan
675f72fe35 Use flex grid to position changeset discussion subscribe button
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
2021-11-24 12:24:16 +00:00
Andy Allan
cb68450ac7 Simplify margins when showing diary entries 2021-11-24 12:24:16 +00:00
Andy Allan
3bc20b6f21 Pass classes to override the default thumbnail_tiny style, rather than having another selector overriding 2021-11-24 12:24:16 +00:00
Andy Allan
52cd62bf13 Replace CSS-driven borders with bootstrap borders
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.
2021-11-24 12:24:16 +00:00
Andy Allan
300cd884ec Use flex grid instead of floating to position changeset element paging nav
This works much better when either the heading or the paging is long.

The heading was moved into the partial to avoid repetitive grid definitions
2021-11-24 12:07:49 +00:00
Andy Allan
18c70fa2de Add a user link to the heading of the diary comments page
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
2021-11-24 10:55:09 +00:00
Tom Hughes
87bf5648c8 Drop es5 polyfill 2021-11-19 18:09:49 +00:00
Tom Hughes
d8da12f587 Drop use of html5shiv
Fixes #3367
2021-11-18 17:20:07 +00:00
Tom Hughes
e21b9b2bf1 Merge remote-tracking branch 'upstream/pull/3365' 2021-11-11 15:33:08 +00:00
Andy Allan
75749cc540 Convert remaining heading titles to use h1
This makes them consistent with all the other pages that use h1
in the `content_for :heading` sections
2021-11-11 15:12:23 +00:00
Andy Allan
3719e8defb Remove the userinformation ids from headings
The style rule was removed in 3f8cf32272
and they were otherwise only used in the tests.
2021-11-11 14:53:36 +00:00
Tom Hughes
425818913b Merge remote-tracking branch 'upstream/pull/3363' 2021-11-10 18:26:34 +00:00
Tom Hughes
8da015ac88 Merge remote-tracking branch 'upstream/pull/3362' 2021-11-10 18:21:01 +00:00
Andy Allan
9c9bf153cd Simplify user_image and user_thumbnail css
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.
2021-11-10 15:30:42 +00:00
Andy Allan
dc67e54958 Use grid for dashboard map popups 2021-11-10 15:19:31 +00:00
Andy Allan
aa77ff5aec Use flex grid for issue reports and comments 2021-11-10 15:06:54 +00:00
Andy Allan
2c9d2486ec Use flex grid for diary index headings 2021-11-10 14:54:54 +00:00
Andy Allan
afce5886f4 Rework diary entries to use grid when a heading thumbnail is shown
This happens on the index page, but not individual show pages. I've
reversed the if condition to avoid having an else on a negative
condition.
2021-11-10 14:46:52 +00:00
Andy Allan
ee9c8ff7c8 Use grid for diary entry heading layout
This brings it into line with the user profile, which has a similar heading
2021-11-10 14:41:27 +00:00
Andy Allan
6283d0a47a Rework diary comments to use flex grid rather than floats and margins 2021-11-10 14:32:13 +00:00
Andy Allan
6181919b61 Fix erblint errors from the Rails/ContentTag cop 2021-11-10 12:23:48 +00:00
Andy Allan
abe8551506 Remove custom css overrides for the users list
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.
2021-11-03 18:35:42 +00:00
Andy Allan
6bce75b134 Add button classes for users list action buttons 2021-11-03 18:35:42 +00:00
Andy Allan
826a864e6c Remove the contact-activity class
The margin-top is better replaced with a bottom margin on the
preceding element, and the width is unnecessary in the grid layout.
2021-11-03 18:35:42 +00:00
Andy Allan
2b84452222 Remove custom margins on sidebar headings
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.
2021-11-03 18:16:38 +00:00
Andy Allan
1a97236747 Use em rather than fixed pixels to offset the copyright symbol
Fixes #3302

Also fixes an error where the h5 tag was closed incorrectly.
2021-10-20 17:48:21 +01:00
Andy Allan
b0a9b39c8d Use flexbox instead of floating to position the comment icon
This ensures both components get appropriate padding. Fixes #3305
2021-10-13 17:36:48 +01:00
Tom Hughes
5966acc207 Merge remote-tracking branch 'upstream/pull/3300' 2021-10-07 17:45:07 +01:00
Andy Allan
95e5178bfb Refactor tracepoint index to use an xml builder view
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.
2021-09-29 15:14:53 +01:00
Tom Hughes
e91c02f2ce Merge remote-tracking branch 'upstream/pull/3297' 2021-09-15 18:44:23 +01:00
Andy Allan
76f1d7bc78 Use a builder to render changeset downloads 2021-09-15 16:33:04 +01:00
Andy Allan
9aa17258fc Use flexbox to position user thumbnails on the dashboard
This fixes a poor interaction involving lots of margins and the secondary-actions list
2021-09-15 14:30:32 +01:00
Andy Allan
99abdeb683 Refactor paragraph margin to avoid custom css 2021-09-15 14:29:15 +01:00