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

77 lines
2.3 KiB
HTML
Raw 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_completed" "!=" "" ) "date_completed" "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>
2024-01-08 22:58:53 +00:00
{{ .title }}
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_completed -}}
{{- time.Format "Jan 2, 2006" .date_completed -}}
{{- 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_completed" "" ) "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>
2024-01-08 22:58:53 +00:00
{{- with ( where ( where $.Site.Pages "Section" "films" ) "title" .title ) -}}
2023-02-28 22:03:09 +00:00
{{ range . }}
<a href="{{ .RelPermalink }}">
2024-01-08 22:58:53 +00:00
{{ end }}
{{- end -}}
<cite class="film">{{ .title }}</cite>
{{- with ( where ( where $.Site.Pages "Section" "films" ) "title" .title ) -}}
2023-02-28 22:03:09 +00:00
</a>
2024-01-08 22:58:53 +00:00
{{- 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_completed -}}
{{- time.Format "Jan 2, 2006" .date_completed -}}
{{- 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>
2024-01-08 22:58:53 +00:00
{{- with ( where ( where $.Site.Pages "Section" "films" ) "title" .title ) -}}
2023-02-28 22:03:09 +00:00
{{ range . }}
<a href="{{ .RelPermalink }}">
{{ end }}
{{- end -}}
2024-01-08 22:58:53 +00:00
<cite class="film">{{ .title }}</cite>
{{- with ( where ( where $.Site.Pages "Section" "films" ) "title" .title ) -}}
2023-02-28 22:03:09 +00:00
</a>
{{- 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_completed -}}
{{- time.Format "Jan 2, 2006" .date_completed -}}
{{- 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 }}