diff options
author | zeripath <art27@cantab.net> | 2020-06-02 21:24:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-02 16:24:18 -0400 |
commit | fe2cacf5ea2e371c4e74f003ee594767c16028fa (patch) | |
tree | ceec01f10f6ee51310af0736b4f634cc886b31b2 /templates/admin/notice.tmpl | |
parent | 3af51f1ab728aedae1bb9501e2357d82edd522a6 (diff) | |
download | gitea-fe2cacf5ea2e371c4e74f003ee594767c16028fa.tar.gz gitea-fe2cacf5ea2e371c4e74f003ee594767c16028fa.zip |
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 <art27@cantab.net>
* As per @CirnoT make table cell clickable
* ensure that pre wraps
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates/admin/notice.tmpl')
-rw-r--r-- | templates/admin/notice.tmpl | 11 |
1 files changed, 6 insertions, 5 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}}) </h4> <div class="ui attached table segment"> - <table class="ui very basic select selectable table"> + <table id="notice-table" class="ui very basic select selectable table"> <thead> <tr> <th></th> @@ -28,9 +28,9 @@ </td> <td>{{.ID}}</td> <td>{{$.i18n.Tr .TrStr}}</td> - <td>{{SubStr .Description 0 120}}...</td> - <td><span class="poping up" data-content="{{.CreatedUnix.AsTime}}" data-variation="inverted tiny">{{.CreatedUnix.FormatShort}}</span></td> - <td><a href="#"><i class="browser icon view-detail" data-content="{{.Description}}"></i></a></td> + <td class="view-detail"><span class="notice-description text truncate">{{.Description}}</span></td> + <td><span class="notice-created-time poping up" data-content="{{.CreatedUnix.AsTime}}" data-variation="inverted tiny">{{.CreatedUnix.FormatShort}}</span></td> + <td><a href="#"><i class="browser icon view-detail"></i></a></td> </tr> {{end}} </tbody> @@ -73,10 +73,11 @@ </div> </div> -<div class="ui modal" id="detail-modal"> +<div class="ui modal admin" id="detail-modal"> <i class="close icon"></i> <div class="header">{{$.i18n.Tr "admin.notices.view_detail_header"}}</div> <div class="content"> + <div class="sub header"></div> <pre></pre> </div> </div> |