frostfs.info/layouts/shortcodes/proposals_table.html
Mikhail Petrov 7b16d141f7 [#1] Implement FrostFS Proposals
Signed-off-by: Mikhail Petrov <m.petrov@yadro.com>
2022-12-29 15:35:27 +03:00

44 lines
1.1 KiB
HTML

<h5 id="index-by-category" style="margin-bottom: 10px;">{{ .Get 1 }}</h5>
{{ $active_category := .Get 0 }}
{{ $active_status := .Get 1 }}
{{ $is_exists := 0 }}
{{ range $page := .Site.RegularPages }}
{{ if gt (len (findRE $active_status $page.Params.status)) 0 }}
{{ if gt (len (findRE (print "/" $active_category "/") $page.File)) 0 }}
{{ $is_exists = 1 }}
{{ end }}
{{ end }}
{{ end }}
{{ if eq $is_exists 1 }}
<table>
<thead>
<tr>
<th>Status</th>
<th>PEP</th>
<th>Authors</th>
</tr>
</thead>
<tbody>
{{ range $page := .Site.RegularPages }}
{{ if gt (len (findRE $active_status $page.Params.status)) 0 }}
{{ if gt (len (findRE (print "/" $active_category "/") $page.File)) 0 }}
<tr>
<th>{{ $page.Params.status }}</th>
<th>
<a href="{{ $page.Permalink }}">{{ $page.Title }}</a>
</th>
<th>{{ $page.Params.author }}</th>
<!-- <th>{{ $page.Lastmod }}</th> -->
</tr>
{{ end }}
{{ end }}
{{ end }}
</tbody>
</table>
{{ else }}
<p>Not found</p>
{{ end }}