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

82 lines
2.4 KiB
HTML
Raw Permalink Normal View History

2022-12-17 18:41:44 +00:00
{{ if ( eq ( .Scratch.Get "listMode" ) "log" ) }}
2023-02-28 22:03:09 +00:00
<tr>
<td colspan=4><h3>Diary</h3></td>
</tr>
{{ range ( sort ( where $.Site.Data.films.log "date_finished" "!=" "" ) "date_finished" "desc" ) }}
2023-02-28 22:03:09 +00:00
<tr>
2024-01-08 22:58:53 +00:00
<td>{{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
2023-02-28 22:03:09 +00:00
<td>
{{- partial "cite" ( dict "c" . "g" $ "section" "films" "schemaType" "Movie" "title" .title "titleLang" .original_language "titleTrans" .original_title ) -}}
{{- with .comments -}}
<p class="comments">Comments: {{ . }}</p>
{{- end -}}
2023-02-28 22:03:09 +00:00
</td>
2024-01-08 22:58:53 +00:00
<td>{{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
2023-02-28 22:03:09 +00:00
<td>
{{- if .date_finished -}}
{{- time.Format "Jan 2, 2006" .date_finished -}}
{{- if .is_repeat }} &#x21BB;{{ end -}}
2023-02-28 22:03:09 +00:00
{{- else -}}
n/a
{{- end -}}
</td>
</tr>
{{ end }}
<tr>
<td colspan=4><h3>Assorted</h3></td>
</tr>
{{ range ( sort ( where $.Site.Data.films.log "date_finished" "" ) "title" "asc" ) }}
2023-02-28 22:03:09 +00:00
<tr>
2024-01-08 22:58:53 +00:00
<td>{{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
2023-02-28 22:03:09 +00:00
<td>
{{- partial "cite" ( dict "c" . "g" $ "section" "films" "schemaType" "Movie" "title" .title "titleLang" .original_language "titleTrans" .original_title ) -}}
{{- with .comments -}}
<p class="comments">Comments: {{ . }}</p>
{{- end -}}
2023-02-28 22:03:09 +00:00
</td>
2024-01-08 22:58:53 +00:00
<td>{{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
2023-02-28 22:03:09 +00:00
<td>
{{- if .date_finished -}}
{{- time.Format "Jan 2, 2006" .date_finished -}}
{{- if .is_repeat }} &#x21BB;{{ end -}}
2023-02-28 22:03:09 +00:00
{{- else -}}
n/a
2022-12-17 18:41:44 +00:00
{{- end -}}
2023-02-28 22:03:09 +00:00
</td>
</tr>
{{ end }}
{{ else if ( eq ( .Scratch.Get "listMode" ) "wishlist" ) }}
2024-01-08 22:58:53 +00:00
{{ range ( sort $.Site.Data.films.wishlist "title" "asc" ) }}
2023-02-28 22:03:09 +00:00
<tr>
2024-01-08 22:58:53 +00:00
<td>{{ with .date_added }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
2023-02-28 22:03:09 +00:00
<td>
{{- partial "cite" ( dict "c" . "g" $ "section" "films" "schemaType" "Movie" "title" .title "titleLang" .original_language "titleTrans" .original_title ) -}}
{{- with .comments -}}
<p class="comments">Comments: {{ . }}</p>
2023-02-28 22:03:09 +00:00
{{- end -}}
</td>
2024-01-08 22:58:53 +00:00
<td>{{ with .release_date }}{{ time.Format "Jan 2, 2006" . }}{{ end }}</td>
2023-02-28 22:03:09 +00:00
<td>
{{- if .date_finished -}}
{{- time.Format "Jan 2, 2006" .date_finished -}}
{{- if .is_repeat }} &#x21BB;{{ end -}}
2023-02-28 22:03:09 +00:00
{{- else -}}
n/a
2022-12-17 18:41:44 +00:00
{{- end -}}
2023-02-28 22:03:09 +00:00
</td>
</tr>
{{ end }}
2022-12-17 18:41:44 +00:00
{{ end }}