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

27 lines
916 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 }}
2023-12-12 22:41:58 +00:00
{{ range ( sort ( index $.Site.Data.tv ( .Scratch.Get "listMode" ) ) ( .Scratch.Get "filterCol" ) ( .Scratch.Get "filterDir" ) ) }}
2023-02-17 20:22:09 +00:00
<tr>
<td>
2023-12-12 22:41:58 +00:00
{{- partial "cite" ( dict "c" . "schemaType" "TVSeries" "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-12-12 22:41:58 +00:00
{{- if .Rewatch }} &#x21BB;{{ end -}}
2023-02-17 20:22:09 +00:00
{{- else -}}
n/a
{{- end -}}
</td>
</tr>
{{ end }}
{{ end }}