From 7339018c5efaa7a818311e44bfe7d9bfd1bc9273 Mon Sep 17 00:00:00 2001 From: zeripath Date: Wed, 3 Jun 2020 00:44:05 +0100 Subject: [PATCH] Properly truncate system notices (#11714) (#11742) Backport #11714 * Properly truncate system notices As noted in #11658 the system notifications list will always suffix system notices with ... even when the notice is longer than 120 characters. Instead we should use .text.truncate to auto truncate and make the notices clickable to view their details. Signed-off-by: Andrew Thornton * As per @CirnoT make table cell clickable * ensure that pre wraps Signed-off-by: Andrew Thornton Co-authored-by: techknowlogick Co-authored-by: techknowlogick --- templates/admin/notice.tmpl | 11 ++++++----- web_src/js/index.js | 3 ++- web_src/less/_admin.less | 17 +++++++++++++++++ 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/templates/admin/notice.tmpl b/templates/admin/notice.tmpl index 7d1720becd..5311ad8f79 100644 --- a/templates/admin/notice.tmpl +++ b/templates/admin/notice.tmpl @@ -7,7 +7,7 @@ {{.i18n.Tr "admin.notices.system_notice_list"}} ({{.i18n.Tr "admin.total" .Total}})
- +
@@ -28,9 +28,9 @@ - - - + + + {{end}} @@ -73,10 +73,11 @@ -
{{.ID}} {{$.i18n.Tr .TrStr}}{{SubStr .Description 0 120}}...{{.CreatedUnix.FormatShort}}{{.Description}}{{.CreatedUnix.FormatShort}}