diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/admin-edit.html | 10 | ||||
-rw-r--r-- | templates/admin.html | 6 | ||||
-rw-r--r-- | templates/index.html | 4 | ||||
-rw-r--r-- | templates/list.html | 2 |
4 files changed, 11 insertions, 11 deletions
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 @@ <p>{{ .Status }}</p> <table id='header'> <tr> - {{ $categoryCount := len .Papers }} + {{ $categoryCount := len .Papers.List }} {{ if gt $categoryCount 0 }} <td class='inpt'> <form method='post' action='/admin/edit/'> <input type="text" id="rename-category" name="rename-to" placeholder="Mathematics"> <select class="sel" name="rename-category" id="category"> - {{ range $category, $papers := .Papers }} + {{ range $category, $papers := .Papers.List }} <option value="{{ $category }}">{{ $category }}</option> {{ end }} </select> @@ -20,7 +20,7 @@ </tr> </table> <div class="cat"> - <span>{{ range $category, $paper := .Papers }}[<a href="#{{ $category }}">{{ $category }}</a>] {{ end }}</span> + <span>{{ range $category, $paper := .Papers.List }}[<a href="#{{ $category }}">{{ $category }}</a>] {{ end }}</span> </div> <table class='tabs'> <tr> @@ -36,7 +36,7 @@ <option value="delete">Delete</option> </optgroup> <optgroup label="Move To"> - {{ range $category, $papers := .Papers }} + {{ range $category, $papers := .Papers.List }} <option value="move-{{ $category }}">{{ $category }}</option> {{ end }} </optgroup> @@ -44,7 +44,7 @@ <input class="btn" type="submit" value="Save" /> </div> <div class='papers nowrap list'> -{{ range $category, $papers := .Papers }} +{{ range $category, $papers := .Papers.List }} {{ $paperCount := len $papers }} <div class="papersection"> <input type="checkbox" id="{{ $category }}" name="category" value="{{ $category }}"> 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 @@ </form> </td> </tr> - {{ $categoryCount := len .Papers }} + {{ $categoryCount := len .Papers.List }} {{ if gt $categoryCount 0 }} <tr> <td class='inpt'> @@ -25,7 +25,7 @@ {{ if $lastUsedCategory }} <option value="{{ .LastUsedCategory }}">{{ $lastUsedCategory }}</option> {{ end }} - {{ range $category, $papers := .Papers }} + {{ range $category, $papers := .Papers.List }} {{ if ne $category $lastUsedCategory }} <option value="{{ $category }}">{{ $category }}</option> {{ end }} @@ -39,7 +39,7 @@ </table> {{ if gt $categoryCount 0 }} <div class="cat"> - <span>{{ range $category, $paper := .Papers }}[<a href="#{{ $category }}">{{ $category }}</a>] {{ end }}</span> + <span>{{ range $category, $paper := .Papers.List }}[<a href="#{{ $category }}">{{ $category }}</a>] {{ end }}</span> </div> <table class='tabs'> <tr> 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" }} <table id='header'> </table> -{{ $categoryCount := len .Papers }} +{{ $categoryCount := len .Papers.List }} {{ if gt $categoryCount 0 }} <div class="cat"> - <span>{{ range $category, $paper := .Papers }}[<a href="#{{ $category }}">{{ $category }}</a>] {{ end }}</span> + <span>{{ range $category, $paper := .Papers.List }}[<a href="#{{ $category }}">{{ $category }}</a>] {{ end }}</span> </div> <table class='tabs'> <td><a class='active' href='/admin/'>Manage</a></td> 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" }} <div class='papers nowrap list'> -{{ range $category, $papers := .Papers }} +{{ range $category, $papers := .Papers.List }} {{ $paperCount := len $papers }} {{ if ge $paperCount 1 }} <div class="papersection"> |