1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| {% import ( "{{{ .Package }}}/app" "{{{ .Package }}}/app/controller/cutil" "{{{ .Package }}}/app/lib/audit" "{{{ .Package }}}/app/lib/filter" "{{{ .Package }}}/views/components" "{{{ .Package }}}/views/layout" ) %}
{% code type List struct { layout.Basic Models audit.Audits Params filter.ParamSet } %}
{% func (p *List) Body(as *app.State, ps *cutil.PageState) %} <div class="card"> <div class="right"><a href="/admin/audit/new"><button>New</button></a></div> <h3>{%= components.SVGRefIcon(`cog`, ps) %} Audits</h3> {%- if len(p.Models) == 0 -%} <div class="mt"><em>No audits available</em></div> {%- else -%} {%= Table(p.Models, p.Params, as, ps) %} {%- endif -%} </div> {% endfunc %}
|