Files
cmautobuy/admin/templates/partials/footer.html
T

39 lines
1.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{define "footer"}}
</main>
{{/* 底部状态条:三段式布局的第三段,六个主列表都有。
Pagination 是可选的(只有做了分页的页面才传),
没做分页的页面不受影响,见 docs/admin/05-ui-specification.md §3.2。
`[必须]` 每个链接的 href 必须整体来自 .Pagination.XxxURL 这一个 pipeline,
不要在这里把筛选参数和 page 分开拼接(比如 "?{{.BaseQuery}}&page=...")——
html/template 会把夹在字面量 & 中间的动态内容当成单个参数值整体转义,
? 和 = 变成 %3F/%3D,链接直接失效。已经在 service.NewPaginationView
里把完整链接拼好,这里只管原样输出。 */}}
<footer class="statusbar">
<span>{{.Status}}</span>
{{if .Pagination}}
<nav class="pagination" aria-label="分页">
{{if .Pagination.HasPrev}}
<a href="{{.Pagination.FirstURL}}">首页</a>
<a href="{{.Pagination.PrevURL}}">上一页</a>
{{else}}
<span class="disabled">首页</span>
<span class="disabled">上一页</span>
{{end}}
{{if .Pagination.HasNext}}
<a href="{{.Pagination.NextURL}}">下一页</a>
<a href="{{.Pagination.LastURL}}">末页</a>
{{else}}
<span class="disabled">下一页</span>
<span class="disabled">末页</span>
{{end}}
</nav>
{{end}}
</footer>
<script src="/static/js/app.js"></script>
</body>
</html>
{{end}}