blob: d4c9196dd4fa04104442dd3fd1e548e768f6dba0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
{{ template "layout.html" . }}
{{ define "content" }}
<table class="admin" id="header">
<tr>
<td>
{{ if .LastPaperDL }}
{{ .Status }} (<a style="text-decoration: underline;" href="/download/{{ .LastPaperDL }}">download</a>)
{{ else }}
{{ .Status }}
{{ end }}
</td>
</tr>
<tr>
{{ $categoryCount := len .Papers.List }}
{{ if gt $categoryCount 0 }}
<td>
<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.List }}
<option value="{{ $category }}">{{ $category }}</option>
{{ end }}
</select>
<input type="submit" value="Rename Category"/>
</form>
</td>
{{ end }}
</tr>
</table>
<div class="cat-cont">
<div class="cat">
{{ range $category, $paper := .Papers.List }}
<span class="cat">[<a href="#{{ $category }}">{{ $category }}</a>]</span>
{{ end }}
</div>
</div>
<p class="Pp"><a class='active' href='/admin/'>Back</a></p>
<div class='content'>
{{ if gt $categoryCount 0 }}
<form method='post' action='/admin/edit/'>
<div class="action">
<select class="sel" name="action" id="Action">
<optgroup label="Action">
<option value="delete">Delete</option>
</optgroup>
<optgroup label="Move To">
{{ range $category, $papers := .Papers.List }}
<option value="move-{{ $category }}">{{ $category }}</option>
{{ end }}
</optgroup>
</select>
<input type="submit" value="Save" />
</div>
<div>
{{ range $category, $papers := .Papers.List }}
{{ $paperCount := len $papers }}
<input type="checkbox" id="{{ $category }}" name="category" value="{{ $category }}"/>
<label for="{{ $category }}">
<span id='{{ $category }}'>
<a class="permalink" href="#{{ $category }}">{{ $category }}</a>
</span>
</label>
{{ range $path, $paper := $papers }}
<div class="paper">
{{ if $paper.Meta.Title }}
<span class="title">
<input type="checkbox" id="{{ $path }}" name="paper" value="{{ $path }}"/>
<a href='/download/{{ $path }}' title='{{ normalizeStr $paper.Meta.Title }}'>
{{- normalizeStr $paper.Meta.Title }}</a>
</span>
<br />
{{ else }}
<span class="title">
<input type="checkbox" id="{{ $path }}" name="paper" value="{{ $path }}"/>
<label for="{{ $path }}">
<a href='/download/{{ $path }}' title='{{ $paper.PaperName }}'>{{ $paper.PaperName }}</a>
</label>
</span>
<br />
{{ end }}
{{ $contCount := len $paper.Meta.Contributors }}{{ if ge $contCount 1 }}
<span class="authors">
{{- range $index, $contributor := $paper.Meta.Contributors -}}
{{- if $index }}, {{ end }}
{{- $contributor.FirstName }} {{ $contributor.LastName -}}
{{- end -}}
</span>
<br />
{{ end }}
{{ $hasVal := false }}
{{ if $paper.Meta.PubYear }}{{ $hasVal = true }}
<span class="year">{{ $paper.Meta.PubYear }}</span>
{{ end }}
{{ if $paper.Meta.DOI }}{{ if $hasVal }}- {{end}}
<span class="doi">
<a href="https://doi.org/{{ $paper.Meta.DOI }}">{{ $paper.Meta.DOI }}</a>
</span>
{{ else if $paper.Meta.ArxivID }}
{{ if $hasVal }}- {{ end }}
<span class="doi">
<a href="https://arxiv.org/abs/{{ $paper.Meta.ArxivID }}">{{ $paper.Meta.ArxivID }}</a>
</span>
{{ else if $paper.Meta.Resource }}
{{ if $hasVal }}- {{ end }}
<span class="doi">
<a href="{{ $paper.Meta.Resource }}">{{ $paper.Meta.Resource }}</a>
</span>
{{ end }}
{{ if $paper.Meta.Journal }}
{{ if $hasVal }}- {{ end }}
<span class="journal">{{ $paper.Meta.Journal }}
</span>
{{ end }}
</div>
{{ end }}
{{ end }}
</div>
{{ end }}
</form></div>
{{ end }}
|