From fe2cacf5ea2e371c4e74f003ee594767c16028fa Mon Sep 17 00:00:00 2001 From: zeripath Date: Tue, 2 Jun 2020 21:24:18 +0100 Subject: [PATCH] Properly truncate system notices (#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 --- 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 7d1720bec..5311ad8f7 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}}