Commit graph

59 commits

Author SHA1 Message Date
nertc
be11f2075e Refactor friendships controller and model 2025-01-14 11:33:56 +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
f0b8498879 Remove commit parameter from diary controller test 2025-01-02 09:15:24 +03:00
Anton Khorev
eaabf7bb59 Remove "User's Diary" from diary entry og:title 2024-10-20 19:12:09 +03:00
Anton Khorev
09721c6fee Add article:published_time meta tag to diary entries 2024-08-14 18:00:14 +03:00
Andy Allan
735a5cf9e2
Merge pull request #5056 from AntonKhorev/diary-og-description
Set og:description meta tag to diary entry description
2024-08-14 14:38:28 +01:00
Anton Khorev
5f4ae35814 Set og:description meta tag to diary entry description 2024-08-07 18:59:16 +03:00
Anton Khorev
6f5167b866 Don't order by id when getting last records 2024-08-07 05:08:27 +03:00
Anton Khorev
243557a31a Set og:image:alt OpenGraph property 2024-08-05 05:32:47 +03:00
Anton Khorev
2ba7eab67d Change richtext edit/preview buttons type to non-submit 2024-08-03 04:52:13 +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
Tom Hughes
2d09b9408b Merge remote-tracking branch 'upstream/pull/4891' 2024-06-17 17:22:38 +01:00
Anton Khorev
a128b4f585 Move diary comments hide/unhide actions to comments controller 2024-06-17 18:16:31 +03:00
Anton Khorev
b97834f1fd Use default og:image if Addressable::URI fails 2024-06-15 15:57:10 +03:00
Anton Khorev
c03649355a Join and normalize og:image url using Addressable
Avoids failing on urls that are not strictly rfc2396 URIs.
2024-06-15 15:06:07 +03:00
Anton Khorev
6624beff11 Move diary comments index action to comments controller 2024-06-10 16:32:53 +03:00
Anton Khorev
24c138ac8d Ensure that Open Graph image url is absolute 2024-06-06 18:01:23 +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
e3c43e4a1a Add validation for before/after parameters to pagination concern 2024-04-11 10:08:20 +01:00
Anton Khorev
32f13f5d68 Redirect from old diary comments pagination 2024-03-29 08:09:26 +03:00
Anton Khorev
ff8fbcbdc5 Simplify links on diary pages 2024-03-21 17:30:59 +03:00
Anton Khorev
fa00a38664 Shorten user path helper calls in tests 2024-03-19 07:07:00 +03:00
Anton Khorev
bde2faac58 Remove assert_response when followed by assert_redirected_to 2024-03-03 10:56:50 +03:00
Anton Khorev
3a873b1668 Add diary entry subscribe/unsubscribe GET pages 2024-02-17 05:43:13 +03:00
Tom Hughes
b9c5df4dad Use with_settings for temporary changes to settings 2024-02-01 18:37:28 +00:00
Tom Hughes
45be62391f Update test results for changes to rescuable exception handling
https://github.com/rails/rails/pull/45867
2023-10-18 18:26:14 +01:00
Tom Hughes
8d7b98a618 Drop workaround to force UTF8 form upload in IE8
This has been disabled by default in rails for some time.
2023-10-07 11:57:54 +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
7e6de66444 Swap older/newer diary entries buttons 2023-09-04 16:32:54 +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
41f8607810 Use article html elements for diary posts 2023-08-12 01:40:34 +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
7fb984f915 Allow moderator to unhide diary entries as well as hide them 2023-07-27 18:07:35 +01:00
Tom Hughes
6651d713d7 Allow administrators to see deleted diary entries 2023-07-27 18:03:58 +01:00
Tom Hughes
600ed78b04 Use CGI.escape for ruby 2.7 compatibility 2022-12-29 17:45:29 +00:00
Tom Hughes
27e9965dd2 Require integer IDs for diary_entries#show
Fixes #3865
2022-12-29 17:14:05 +00:00
Andy Allan
415ac577f3 Remove some old debugging comments 2022-12-21 12:05:15 +00:00
Andy Allan
cb68450ac7 Simplify margins when showing diary entries 2021-11-24 12:24:16 +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
Tom Hughes
abd98757b6 Improve capitalisation of page titles 2021-07-22 19:00:08 +01:00
Harry Wood
95d682119a Display no diary comments message when empty
Display a 'No diary comments' message when there are no diary comments to display, rather than an empty table.
2021-04-10 00:47:20 +01:00
Andy Allan
38ad8fbc36 Use login_path instead of explicit controller and actions
This makes future refactoring easier.
2021-03-10 14:31:55 +00:00
Tom Hughes
f75eb6fe9e Refactor more controller tests 2020-04-27 22:24:28 +01:00
Tom Hughes
7a1615bc55 Fix rubocop-minitest warnings 2020-04-15 19:07:13 +01:00
Andy Allan
5fdada204c Use bootstrap table striping to replace hand-cycled table stripes
This cuts down on the complexity of having to use the `cycle` function
and makes the templates easier to read. CSS-based striping has been
around for many years.

The CSS is in order to keep our custom colour for striped tables.
2020-03-18 12:14:24 +01:00
Tom Hughes
e219916dcb When overriding setup make sure to call the superclass 2019-09-05 21:24:20 +01:00
Andy Allan
1cf8fec58d Rename Friend model to Friendship
This better describes what the model represents, which is the relationship
between the two users.
2019-06-19 16:39:25 +02:00
Tom Hughes
31edc7dff6 Merge remote-tracking branch 'upstream/pull/2226' 2019-06-18 21:10:07 +01:00