Commit graph

51 commits

Author SHA1 Message Date
nertc
be11f2075e Refactor friendships controller and model 2025-01-14 11:33:56 +04:00
nertc
2b7a48029b Modify the way Friends are added 2025-01-14 11:32:54 +04:00
Andy Allan
55e3f90dd4 Show diary entry after creation
This allows users to review their post and use the social share
buttons more easily.

Refs #1391
2025-01-09 13:38:54 +00:00
Anton Khorev
eaabf7bb59 Remove "User's Diary" from diary entry og:title 2024-10-20 19:12:09 +03:00
Tom Hughes
edddaab122 Use turbo for pagination 2024-08-20 14:44:10 +01:00
Anton Khorev
09721c6fee Add article:published_time meta tag to diary entries 2024-08-14 18:00:14 +03:00
Anton Khorev
5f4ae35814 Set og:description meta tag to diary entry description 2024-08-07 18:59:16 +03:00
Anton Khorev
5573df7741 Set OpenGraph properties hash in diary entry show action 2024-08-07 18:58:47 +03:00
Anton Khorev
243557a31a Set og:image:alt OpenGraph property 2024-08-05 05:32:47 +03:00
Anton Khorev
580daf06bd Check diary entry edit/update ability using CanCanCan 2024-07-23 18:22:46 +03:00
Anton Khorev
00c2589374 Move diary comment action to comments controller 2024-07-12 17:58:43 +03:00
Anton Khorev
a128b4f585 Move diary comments hide/unhide actions to comments controller 2024-06-17 18:16:31 +03:00
Anton Khorev
6624beff11 Move diary comments index action to comments controller 2024-06-10 16:32:53 +03:00
Anton Khorev
a73e20cd5c Set Open Graph image to first image for diary entries 2024-06-06 17:28:57 +03:00
Tom Hughes
20bdbb05c3 Switch to using rails builtin content security policy support 2024-05-22 16:38:59 +01:00
Anton Khorev
274a516bc6 Make "include" and "limit" keyword args of pagination method 2024-03-26 04:41:07 +03:00
Anton Khorev
addf99f191 Move common pagination code to mixin 2024-03-26 02:36:28 +03:00
Anton Khorev
3a873b1668 Add diary entry subscribe/unsubscribe GET pages 2024-02-17 05:43:13 +03:00
Anton Khorev
f4d84c4806 Add links to diaries in preferred languages 2024-01-03 13:10:08 +03:00
Tom Hughes
f6d1b6cda4 Fix rails 7.1.0 deprecation warning 2023-10-06 19:07:47 +01:00
Andy Allan
1700c23dd1 Prefer find_by() instead of where().first
These are very similar, differing only if we would expect multiple
results and the sorting is important. However, in all our cases
we're only expecting one result to be returned, and so find_by is
easier to read.
2023-10-04 17:53:58 +01:00
Anton Khorev
e143726f1a Combine comments and traces pagination partials 2023-09-09 14:33:59 +03:00
Anton Khorev
a780a7456f Don't interpolate in pagination partial 2023-09-09 14:33:58 +03:00
Anton Khorev
c213abb8e3 Refactor diary paging queries 2023-09-09 14:23:11 +03:00
Anton Khorev
299c59e34f Change diary comments pagination to before/after id 2023-09-09 14:23:10 +03:00
Andy Allan
f5db9cbb20 Avoid using _id in queries
This makes the queries shorter and easier to read.
2023-08-30 17:08:16 +01:00
Anton Khorev
4ceebefefa Move user lookup and error render to concerns 2023-08-21 17:29:55 +03:00
Tom Hughes
6982903ae7 Fix predicate method names in the user model 2023-08-15 18:53:14 +01:00
Anton Khorev
033c032ed6 Add home location condition to user model 2023-08-11 21:44:15 +03:00
Andy Allan
aceef47cd8
Merge pull request #4106 from tomhughes/diary-paging
Replace page numbers with ID based selection for diary indexes
2023-08-02 16:57:26 +01:00
Tom Hughes
f29ba01eb9 Replace page numbers with ID based selection for diary indexes 2023-07-27 20:37:07 +01:00
Tom Hughes
6651d713d7 Allow administrators to see deleted diary entries 2023-07-27 18:03:58 +01:00
Tom Hughes
dc28f1dccc Fix new rubocop warnings 2022-11-22 18:32:02 +00:00
Andy Allan
22946d703a Enable the ActionOrder cop for remaining controllers
Where actions were reordered, the rails standard actions were
also moved to the top of each controller.
2022-11-02 11:06:00 +00:00
Tom Hughes
cfb4a70129 Fix Lint/DuplicateBranch rubocop warnings 2022-03-08 19:05:37 +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
Andy Allan
2c1033f62d Rename Notifier to UserMailer
It's a convention in rails to name your mailers with a Mailer suffix, and is also common to name the class after the recipient (e.g. User, Admin). So UserMailer seems a reasonable choice.
2020-10-14 15:04:58 +02:00
Andy Allan
60ecfde65c Convert various administator? tests to use cancancan permissions checks 2019-10-23 10:52:12 +02:00
Tom Hughes
936967d0cb Allow administrators to see deleted diary comments 2019-10-17 12:16:28 +01:00
Andy Allan
2169c503ef Rename user.friend_users to user.friends
This is possible now since we've renamed Friend to Friendship
2019-06-19 16:51:35 +02:00
Andy Allan
9e158a5d39 Show all diary comments to administrators 2019-06-06 16:03:42 +02:00
Andy Allan
fdffd22cca Allow admins to unhide diary comments, if they wish 2019-06-06 16:03:42 +02:00
Andy Allan
49fc17c6b6 Show deleted diary entries to administrators, if the user isn't also deleted
This will allow administrators to review diary entry deletions from non-spam users.
2019-06-06 15:59:47 +02:00
Andy Allan
f2f3fbb1f1 Allow administrators to unhide diary entries, if they wish 2019-06-06 15:59:47 +02:00
Tom Hughes
e49953f141 Merge remote-tracking branch 'upstream/pull/2239' 2019-05-29 17:41:08 +01:00
Andy Allan
6ed749e7eb Allow a configurable delay to keep diary entries from being published in feeds
This is to provide another tool to help spam fighting.

The configuration value is set to zero hours for new deploys in
order to be 'least surprising'. You can change the setting without
interfering with your test suite.
2019-05-29 16:56:15 +02:00
Andy Allan
b7893df84e Refactor diary entries to use create and update methods
This brings it slightly more into line with resourceful routing.
2019-05-29 15:37:23 +02:00
Tom Hughes
6600221fe3 Fix database offline mode 2019-03-17 11:15:34 +00:00
Andy Allan
d102c9aaf4 Move all settings to settings.yml
We leave the STATUS setting alone, since it's required before rails
boots. The test-specific settings now live in config/settings/test.yml
2019-03-13 18:06:23 +01:00
Andy Allan
234afb3f42 Remove custom deny_access handlers
Since these pages are not accessed by normal users, except for url fiddling, it's fine to respond with a generic access denied.
2018-11-14 14:10:51 +01:00