diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-07-22 18:54:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-22 10:54:48 +0000 |
commit | a7e82735742096fabd97eb6faa0389d2dc49464d (patch) | |
tree | 66772b53ea94918f55ebbf7a66a745d8013805c6 /templates | |
parent | acc74c2fc6e67ca72293da1540226c3931700566 (diff) | |
download | gitea-a7e82735742096fabd97eb6faa0389d2dc49464d.tar.gz gitea-a7e82735742096fabd97eb6faa0389d2dc49464d.zip |
Fix the truncate and alignment problem for some admin tables (#26042)
Some "text truncate email" code were just copied&pasted, they are not
suitable for most admin tables.
For the table layouts, some "max-width" helpers could be very helpful.
At least, we can get rid of the confusing "email" CSS class.
![image](https://github.com/go-gitea/gitea/assets/2114189/0b0bd068-56fc-41cf-b4a3-ed45eb797401)
![image](https://github.com/go-gitea/gitea/assets/2114189/e7f843a3-5f46-4205-b383-4c7ef647ce83)
![image](https://github.com/go-gitea/gitea/assets/2114189/ce8d65e1-7e03-466e-a03b-9bd33815da91)
Diffstat (limited to 'templates')
-rw-r--r-- | templates/admin/emails/list.tmpl | 4 | ||||
-rw-r--r-- | templates/admin/packages/list.tmpl | 4 | ||||
-rw-r--r-- | templates/admin/user/list.tmpl | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/templates/admin/emails/list.tmpl b/templates/admin/emails/list.tmpl index 67e9cb05e8..153877174b 100644 --- a/templates/admin/emails/list.tmpl +++ b/templates/admin/emails/list.tmpl @@ -47,8 +47,8 @@ {{range .Emails}} <tr> <td><a href="{{AppSubUrl}}/{{.Name | PathEscape}}">{{.Name}}</a></td> - <td><span class="text truncate">{{.FullName}}</span></td> - <td><span class="text email">{{.Email}}</span></td> + <td class="gt-ellipsis gt-max-width-12rem">{{.FullName}}</td> + <td class="gt-ellipsis gt-max-width-12rem">{{.Email}}</td> <td>{{if .IsPrimary}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td> <td> {{if .CanChange}} diff --git a/templates/admin/packages/list.tmpl b/templates/admin/packages/list.tmpl index a0b6fd9bb0..9aa1d933f6 100644 --- a/templates/admin/packages/list.tmpl +++ b/templates/admin/packages/list.tmpl @@ -56,8 +56,8 @@ {{end}} </td> <td>{{.Package.Type.Name}}</td> - <td class="text truncate email">{{.Package.Name}}</td> - <td><a href="{{.FullWebLink}}" class="text truncate email">{{.Version.Version}}</a></td> + <td class="gt-ellipsis gt-max-width-12rem">{{.Package.Name}}</td> + <td class="gt-ellipsis gt-max-width-12rem"><a href="{{.FullWebLink}}">{{.Version.Version}}</a></td> <td><a href="{{.Creator.HomeLink}}">{{.Creator.Name}}</a></td> <td> {{if .Repository}} diff --git a/templates/admin/user/list.tmpl b/templates/admin/user/list.tmpl index 3742b4ae85..45fed87a40 100644 --- a/templates/admin/user/list.tmpl +++ b/templates/admin/user/list.tmpl @@ -85,7 +85,7 @@ <tr> <td>{{.ID}}</td> <td><a href="{{.HomeLink}}">{{.Name}}</a></td> - <td><span class="text truncate email">{{.Email}}</span></td> + <td class="gt-ellipsis gt-max-width-12rem">{{.Email}}</td> <td>{{if .IsActive}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td> <td>{{if .IsAdmin}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td> <td>{{if .IsRestricted}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}</td> |