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
Andy Allan
847536c80d
Avoid some uses of html_safe
...
We can use `html_safe` on non-interpolated strings, since that's trusted content.
2020-10-28 14:45:20 +01:00
Andy Allan
5e06815214
Use friendly_date_ago helper for user_blocks
...
Refs #2255
Removes two unused translations.
2019-06-19 18:04:08 +02:00
Andy Allan
90ac07d071
Allow user_blocks to be created for longer periods
...
This avoids admins from having to manually change end periods in the database
2019-05-15 11:30:28 +02:00
Andy Allan
a0de9b780d
Use lazy lookups for user_blocks translations
2018-04-25 12:03:58 +08:00
Simon Poole
998a84a1b4
Small improvement to block status display
2017-02-18 18:08:25 +01:00
Tom Hughes
4676179879
Improve display of user block timestamps
...
Display the creation time, as a friendly date with a tooltip for
the exact time, and add a tooltip to the expiry time.
Fixes #923 and #996
2015-06-25 17:44:20 +01:00
Tom Hughes
dc2a2c8ebd
Standardise on double quoted strings
2015-02-20 19:47:26 +00:00
Tom Hughes
34e3e51456
Cleanup trailing whitespace
2015-02-20 08:56:16 +00:00
Matt Amos
ca06b3c7b1
New migration to add better auditing to user_roles and better column names there and on user_blocks. Added a helper for displaying block status messages.
2009-09-29 16:44:03 +00:00