Commit graph

11 commits

Author SHA1 Message Date
Anton Khorev
3df14c5a40 Report deactivates_at as block read date 2025-01-07 13:19:33 +03:00
Anton Khorev
7e8fd5d7b7 Check deactivates_at to report if block was read after its end date 2025-01-06 21:10:18 +03:00
Anton Khorev
f7b0e87973 Remove "expired unread" short block status
It was supposed to mean that the block is past its end date but still wasn't read by the user. That turned out to be confusing because although it said "expired", such blocks were active.
2025-01-03 11:37:32 +03:00
Andy Allan
24a562f885 Use html 'time' element for friendly date helpers
This provides more structure than just a simple span.
2023-11-15 17:53:38 +00:00
Tom Hughes
b5f06e06c1 Fix rubocop Rails/TimeZone warnings 2022-03-01 22:55:10 +00:00
Andy Allan
71be435886 Fix case when user block durations are slightly negative
The output from ActiveSupport::Duration is wildly unhelpful in those cases

Fixes #3210
2021-06-09 15:16:35 +01:00
Andy Allan
5ce14cfa4d Ensure that short duration blockss are shown as '0 hours'
Passing `:count => nil` means that i18n.t will return the hash of translations, so use a default value of 0 when checking for hours to prevent this.

Refs #3210
2021-06-09 14:17:56 +01:00
Tom Hughes
9b52542e52 Use simple string matches for user_blocks_helper tests
Testing against the translations is not something we do anywhere
else is and is dangerously close to testing the helper against
itself which is a bit pointless.
2017-02-19 11:50:01 +00:00
Tom Hughes
9c926c6c71 Use the factory to create user blocks 2017-02-19 11:42:38 +00:00
Simon Poole
325cd12c24 Make rupocop happy and correct placement of include 2017-02-19 12:35:02 +01:00
Simon Poole
455e906afa Improve wording and add test 2017-02-19 11:59:34 +01:00