Skip to content

Commit 3ff4f94

Browse files
committed
Add a "No data available" message to be displayed when the list has no data.
1 parent 943cc4f commit 3ff4f94

File tree

8 files changed

+12
-0
lines changed

8 files changed

+12
-0
lines changed

templates/admin/auth/list.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
<td><a href="{{AppSubUrl}}/-/admin/auths/{{.ID}}">{{svg "octicon-pencil"}}</a></td>
3232
</tr>
3333
{{end}}
34+
{{template "shared/no_results_found" (dict "rst" .Sources "colspan" 7)}}
3435
</tbody>
3536
</table>
3637
</div>

templates/admin/emails/list.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
</td>
6969
</tr>
7070
{{end}}
71+
{{template "shared/no_results_found" (dict "rst" .Emails "colspan" 6)}}
7172
</tbody>
7273
</table>
7374
</div>

templates/admin/notice.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<td class="view-detail"><a href="#">{{svg "octicon-note" 16}}</a></td>
2626
</tr>
2727
{{end}}
28+
{{template "shared/no_results_found" (dict "rst" .Notices "colspan" 6)}}
2829
</tbody>
2930
{{if .Notices}}
3031
<tfoot>

templates/admin/org/list.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
<td><a href="{{.OrganisationLink}}/settings" data-tooltip-content="{{ctx.Locale.Tr "edit"}}">{{svg "octicon-pencil"}}</a></td>
6868
</tr>
6969
{{end}}
70+
{{template "shared/no_results_found" (dict "rst" .Users "colspan" 7)}}
7071
</tbody>
7172
</table>
7273
</div>

templates/admin/packages/list.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
<td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Paginater.Current}}&sort={{$.SortType}}" data-id="{{.Version.ID}}" data-name="{{.Package.Name}}" data-data-version="{{.Version.Version}}">{{svg "octicon-trash"}}</a></td>
7676
</tr>
7777
{{end}}
78+
{{template "shared/no_results_found" (dict "rst" .PackageDescriptors "colspan" 10)}}
7879
</tbody>
7980
</table>
8081
</div>

templates/admin/repo/list.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
<td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Paginater.Current}}&sort={{$.SortType}}" data-id="{{.ID}}" data-name="{{.Name}}">{{svg "octicon-trash"}}</a></td>
8888
</tr>
8989
{{end}}
90+
{{template "shared/no_results_found" (dict "rst" .Repos "colspan" 12)}}
9091
</tbody>
9192
</table>
9293
</div>

templates/admin/user/list.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
</td>
111111
</tr>
112112
{{end}}
113+
{{template "shared/no_results_found" (dict "rst" .Users "colspan" 9)}}
113114
</tbody>
114115
</table>
115116
</div>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{{if not .rst}}
2+
<tr>
3+
<td class="center aligned" colspan="{{.colspan}}">{{ctx.Locale.Tr "no_results_found"}}</td>
4+
</tr>
5+
{{end}}

0 commit comments

Comments
 (0)