Refine list template to include item bank in the table

This commit is contained in:
Zhang Liang 2018-04-02 16:52:51 +08:00
parent 35fda67181
commit 37b1fa3fbc

View File

@ -10,7 +10,7 @@
<tr> <tr>
<th>ID</th> <th>ID</th>
<th>名称</th> <th>名称</th>
<th>序列</th> <th>序列或题库</th>
<th>创建日期</th> <th>创建日期</th>
</tr> </tr>
{{ range (where .Data.Pages "Section" "!=" "") }} {{ range (where .Data.Pages "Section" "!=" "") }}
@ -20,6 +20,8 @@
<td> <td>
{{ if fileExists (printf "static/seq/%s.json" .File) }} {{ if fileExists (printf "static/seq/%s.json" .File) }}
<a href="{{ printf "/seq/%s.json" .File }}">{{ printf "%s.json" .File }}</a> <a href="{{ printf "/seq/%s.json" .File }}">{{ printf "%s.json" .File }}</a>
{{ else if fileExists (printf "static/seq/%s.csv" .File) }}
<a href="{{ printf "/seq/%s.csv" .File }}">{{ printf "%s.csv" .File }}</a>
{{ else }} {{ else }}
暂无 暂无
{{ end }} {{ end }}