mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	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.   
This commit is contained in:
		@@ -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}}
 | 
			
		||||
 
 | 
			
		||||
@@ -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}}
 | 
			
		||||
 
 | 
			
		||||
@@ -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>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user