aboutsummaryrefslogtreecommitdiff
path: root/templates/list.html
blob: 1a482d1c7e4d3a06f18fa473b621b2987753bb1f (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
{{ define "list" }}
<table summary='paper list' class='list nowrap'>
{{ range $category, $papers := .Papers }}
  {{ $paperCount := len $papers }}
  {{ if ge $paperCount 1 }}
  <tr class='nohover-highlight'>
		<td colspan='4' class='papersection'>{{ $category }}</td>
	</tr>
  {{ range $path, $paper := $papers }}
  <tr>
    {{ if $paper.Meta.Title }}
    <td class="sublevel-paper title"><a href='/download/{{ $path }}' title='{{ $paper.Meta.Title }}'>{{ $paper.Meta.Title }}</a></td>
    {{ else }}
    <td class="sublevel-paper title"><a href='/download/{{ $path }}' title='{{ $paper.PaperName }}'>{{ $paper.PaperName }}</a></td>
    {{ end }}
  </tr>
  <tr>
    {{ if $paper.Meta.Title }}
    <td class="sub">{{ $paper.Meta.PubYear }} - {{ $contCount := len $paper.Meta.Contributors }} {{ if gt $contCount 0 }}{{ $author := index $paper.Meta.Contributors 0 }}{{ $author.LastName }}{{ if gt $contCount 1 }} et al.{{ end }}{{ end }} - <a href="https://doi.org/{{ $paper.Meta.DOI }}">{{ $paper.Meta.DOI }}</a> - {{ $paper.Meta.Journal }}</td>
    {{ else }}
    <td></td>
    {{ end }}
  </tr>
  {{ end }}
  {{ else }}
  {{ end }}
{{ end }}
</table>
{{ end }}