From f03d77f73be72a934a99541b30a9663cc99a1733 Mon Sep 17 00:00:00 2001 From: Jordan Date: Sun, 14 Mar 2021 13:43:03 -0700 Subject: r/w map locks; concurrent safety --- templates/admin-edit.html | 10 +++++----- templates/admin.html | 6 +++--- templates/index.html | 4 ++-- templates/list.html | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'templates') diff --git a/templates/admin-edit.html b/templates/admin-edit.html index 57a9aaa..7b30294 100644 --- a/templates/admin-edit.html +++ b/templates/admin-edit.html @@ -3,13 +3,13 @@

{{ .Status }}

- {{ $categoryCount := len .Papers }} + {{ $categoryCount := len .Papers.List }} {{ if gt $categoryCount 0 }}
- {{ range $category, $paper := .Papers }}[{{ $category }}] {{ end }} + {{ range $category, $paper := .Papers.List }}[{{ $category }}] {{ end }}
@@ -36,7 +36,7 @@ - {{ range $category, $papers := .Papers }} + {{ range $category, $papers := .Papers.List }} {{ end }} @@ -44,7 +44,7 @@
-{{ range $category, $papers := .Papers }} +{{ range $category, $papers := .Papers.List }} {{ $paperCount := len $papers }}
diff --git a/templates/admin.html b/templates/admin.html index 22b0e0a..05cf04f 100644 --- a/templates/admin.html +++ b/templates/admin.html @@ -14,7 +14,7 @@
- {{ $categoryCount := len .Papers }} + {{ $categoryCount := len .Papers.List }} {{ if gt $categoryCount 0 }}
@@ -25,7 +25,7 @@ {{ if $lastUsedCategory }} {{ end }} - {{ range $category, $papers := .Papers }} + {{ range $category, $papers := .Papers.List }} {{ if ne $category $lastUsedCategory }} {{ end }} @@ -39,7 +39,7 @@
{{ if gt $categoryCount 0 }}
- {{ range $category, $paper := .Papers }}[{{ $category }}] {{ end }} + {{ range $category, $paper := .Papers.List }}[{{ $category }}] {{ end }}
diff --git a/templates/index.html b/templates/index.html index 30023cd..6397671 100644 --- a/templates/index.html +++ b/templates/index.html @@ -2,10 +2,10 @@ {{ define "content" }}
-{{ $categoryCount := len .Papers }} +{{ $categoryCount := len .Papers.List }} {{ if gt $categoryCount 0 }}
- {{ range $category, $paper := .Papers }}[{{ $category }}] {{ end }} + {{ range $category, $paper := .Papers.List }}[{{ $category }}] {{ end }}
diff --git a/templates/list.html b/templates/list.html index 9e139b9..a08efd6 100644 --- a/templates/list.html +++ b/templates/list.html @@ -1,6 +1,6 @@ {{ define "list" }}
-{{ range $category, $papers := .Papers }} +{{ range $category, $papers := .Papers.List }} {{ $paperCount := len $papers }} {{ if ge $paperCount 1 }}
-- cgit v1.2.3-54-g00ecf
Manage