Commit graph

135 commits

Author SHA1 Message Date
Anton Khorev
caf49bb25d Show user id on profile pages to moderators and admins 2023-09-05 13:35:08 +03:00
Andy Allan
1253bdcdc5 Use bootstrap badges to implement count-number badges
This leaves bootstrap to take care of most aspects, while retaining
the current colours and font weights.
2023-08-30 18:11:56 +01:00
Anton Khorev
ca4555df43 Use Bootstrap inline lists for <dl>s on user pages 2023-08-10 19:12:25 +03:00
Andy Allan
63484a169a Rework the help text to avoid raw html in translations
Unfortunately bootstrap_form has no method for passing interpolation
values to the automatic help text system, so instead we'll use an
explicit override.
2023-04-02 10:14:00 +01:00
Andy Allan
235618b9c0 Remove html from translations for terms page 2023-03-08 16:09:27 +00:00
Andy Allan
8df3c7b12a Rework about page to avoid html in the translations 2023-02-22 10:25:51 +00:00
Andy Allan
a11e156f56 Use mail_to help to avoid handcrafting mailto links
This also reworks the user suspended page to avoid having html in
the translation strings.
2022-11-30 11:13:44 +00:00
Andy Allan
a3474de4d8 Use bootstrap utility classes for showing the new user arm
The original value was close to the 'lg' breakpoint, but the 'md'
breakpoint is fine for this too.
2022-09-14 17:32:43 +01:00
Andy Allan
934d81aa55 Bootstrap 5: Replace all form-group classes with mb-3 2022-07-20 14:42:57 +01:00
Andy Allan
e80d74ae73 Bootstrap 5: Add form-label class to hand-crafted form labels
This is done automatically for forms created by bootstrap_form
2022-07-20 14:41:56 +01:00
Andy Allan
2080696fe6 Bootstrap 5: Remove use of form-row class
This has been replaced by simple `row` class in v5. We can also use the
gx-N classes here, which tighten up the horizontal gutter sizes for
space-constrained forms.
2022-07-20 14:41:41 +01:00
Tom Hughes
cbcc7dc49f Fix some rubocop Naming/PredicateName warnings 2022-03-03 22:47:55 +00:00
Andy Allan
2731e7244a Add extra user transitions needed by the administrators 2022-02-02 16:37:50 +00: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
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
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
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
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
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
Tom Hughes
e91c02f2ce Merge remote-tracking branch 'upstream/pull/3297' 2021-09-15 18:44:23 +01:00
Andy Allan
31e247c1e2 Restore the grey border around the user image on the profile page
This approach keeps the look without adding in the margins (and floats)
which are inappropriate for the flex-based layout.
2021-09-15 14:11:05 +01:00
Andy Allan
dfaea75c27 Use an 'inline' dl to unify the appearance of the mapper and admin info details lines 2021-09-15 13:19:56 +01:00
Andy Allan
3b1ef97c69 Move the admin actions into line with the other links
This avoids wrapping them under the user profile picture
2021-09-15 11:57:58 +01:00
Tom Hughes
29e9857145 Improve behaviour of secondary action lists when wrapping
Based on https://stackoverflow.com/a/31732902 this ensure that when
a secondary action list wraps the additional lines don't start with
an item delimiter by pushing it to the left, outside of a parent nav
element which then hides it.
2021-08-21 15:38:00 +01:00
Andy Allan
6ab522b2b3 Convert account setting menu to tabs, and include on other pages
This makes it easier to navigate around these pages. Since each tab
corresponds to a given controller, this makes the selection of active
tabs straightforward.
2021-08-18 14:30:35 +01:00
Andy Allan
3f8cf32272 Refactor the profile page to move the profile information out of the header
This makes it look like other normal pages, along with removing the unusual full-width class.
2021-08-18 13:33:14 +01:00
Andy Allan
cb7b79a58f Split the non-public information off of the profile page
This opens up many possibilities for more interesting things to be
shown on the dashboard, as well as making it easier to find if
you have lots of content in your profile.
2021-08-18 13:32:36 +01:00
Tom Hughes
9778714046 Merge remote-tracking branch 'upstream/pull/3293' 2021-08-12 18:10:54 +01:00
Andy Allan
2436f9e580 Use named paths for diary comments path 2021-08-12 17:57:40 +01:00
Andy Allan
536dee8fc7 Use named paths for various user blocks links 2021-08-12 17:57:40 +01:00
Andy Allan
d797de4317 Use user_account_path for links to settings page
Much easier to read than having to be explicit about controllers etc
2021-08-12 17:09:07 +01:00
Andy Allan
06d73857d1 Avoid using raw html in translations for links.
This is a followup to 26698d6 which introduced the html. It's better
to use interpolation for links, since this avoids the translations
from introducing html syntax errors.

I had to change the translation key, since changing the interpolation
variables alone would lead to breakages.
2021-08-12 16:35:54 +01:00
Tom Hughes
26698d6d26 Use correct link for users with no location
Fixes #3290
2021-08-09 18:29:54 +01:00
Tom Hughes
f1935b1c57 Merge remote-tracking branch 'upstream/pull/3257' 2021-07-21 19:24:31 +01:00
Tom Hughes
0bbdadd727 Merge remote-tracking branch 'upstream/pull/3233' 2021-07-21 18:37:17 +01:00
Josh Soref
a3c5bbbbb6 spelling: (self reference is superfluous)
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2021-07-21 10:45:38 -04:00
Andy Allan
2a885c2cce Ensure the heading text appears above the illustration
The easiest way to do this is to make the text a child of the div
with the background image. The change to min-size is so that if
the text wraps often enough on narrow screens, the header expands
vertically rather than the text spilling over.

Fixes #3259
2021-07-21 15:08:33 +01:00
Andy Allan
2443e7dd65 Refactor to use a heading class for height when using header-illustrations
This fixes a glitch highlighted in #3259, where the css class stopped applying
when the view was moved to a different controller.

We're moving to having each view responsible for their layout, and commonly having
override classes explicitly in the relevant views. So we can follow that pattern here.
2021-07-21 11:45:37 +01:00
Andy Allan
caf2e2a242 Move profile-related settings to their own form
Refs #3167
2021-07-14 17:45:19 +01:00
Andy Allan
2403630da8 Split user preferences into a separate page
Refs #3167
2021-07-14 17:40:20 +01:00
Tom Hughes
a32b751fed Remove some references to webmaster 2021-06-29 19:22:31 +01:00
Tom Hughes
8d76be71bb Merge remote-tracking branch 'upstream/pull/3177' 2021-06-24 08:43:18 +01:00
Andy Allan
0876ea0bee Refactor terms declined flash message to use a partial
This allows us to include a link in the flash message, without having
to use html_safe. Also refactor to avoid having html angle brackets in
the translation strings, while still allowing locale-specific urls.
2021-06-23 20:11:19 +01:00
Tom Hughes
2c5e981684 Fix erblint warnings 2021-06-05 07:40:55 +01:00
Tom Hughes
e222329d04 Add support for OAuth2 using doorkeeper 2021-05-18 12:05:32 +01:00
Andy Allan
094d6c8bb9 Move confirmation methods into ConfirmationsController 2021-04-07 16:05:32 +01:00
Andy Allan
7a66c6d4eb Split password reset functionality into PasswordsController 2021-04-07 16:05:28 +01:00