Cataloguer/layouts/partials/tv/table-body.html

26 lines
899 B
HTML
Raw Normal View History

2023-02-17 20:22:09 +00:00
{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
2023-02-18 00:13:50 +00:00
{{ .Scratch.Set "filterCol" "Date Watched" }}
2023-02-17 20:22:09 +00:00
{{ .Scratch.Set "filterDir" "desc" }}
{{ end }}
{{ range ( sort ( sort ( index $.Site.Data.tv ( .Scratch.Get "listMode" ) ) "Episode Title" "asc" ) ( .Scratch.Get "filterCol" ) ( .Scratch.Get "filterDir" ) ) }}
<tr>
<td>
2023-10-05 18:27:13 +00:00
{{- partial "cite" ( dict "c" . "schemaType" "Book" "title" ( index . "Series Title" ) ) -}}
2023-02-17 20:22:09 +00:00
</td>
<td>
2023-10-05 18:27:13 +00:00
{{- partial "cite" ( dict "c" . "schemaType" "TVEpisode" "title" ( index . "Episode Title" ) ) -}}
2023-02-17 20:22:09 +00:00
<span class="episode-number">({{ index . "Episode Number" }})</span>
</td>
<td>
2023-02-18 00:13:50 +00:00
{{- if ( index . "Date Watched" ) -}}
{{- time.Format "Jan 2, 2006" ( index . "Date Watched" ) -}}
2023-02-17 20:22:09 +00:00
{{- else -}}
n/a
{{- end -}}
</td>
</tr>
{{ end }}
{{ end }}