aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat/templates/release_view.html
blob: 9dccbcf29c9c14a36d5e2313da134115ec841a0c (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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
{% extends "base.html" %}
{% block fullbody %}

<div class="ui stackable mobile reversed grid centered">
<div class="one wide column"></div>
<div class="fifteen wide column">
  <h1 class="ui header">{{ release.title }}
  <div class="sub header"><code>release {{ release.ident }}</code></div></h1>
  <p style="font-size: larger;">
  {% if authors != [] %} by {% endif %}
  {% for contrib in authors %}
    {% if contrib.creator_id %}
      <b><a href="/creator/{{contrib.creator_id}}">{{ contrib.raw_name }}</a></b>{% if not loop.last %}, {% endif %}
    {% else %}
      {% if contrib.raw_name != None %}{{ contrib.raw_name }}{% else %}<i>Unknown</i>{% endif %}{% if not loop.last %}, {% endif %}
    {% endif %}
  {% endfor %}
</div>
</div>

<div class="ui stackable mobile reversed grid centered">
<div class="one wide column"></div>
<div class="ten wide column" style="font-size: 16px;">

{% if release.release_date != None %}<p><b>Date (published):</b> {{ release.release_date }}{% endif %}
{% if release.doi != None %}
<br><b>DOI:</b> <a href="https://doi.org/{{ release.doi }}">&nbsp;<code>{{ release.doi }}</code></a>
{% endif %}
{% if release.pmid != None %}
<br><b>PubMed:</b> <a href="https://www.ncbi.nlm.nih.gov/pubmed/{{ release.pmid }}">&nbsp;<code>{{ release.pmid }}</code></a>
{% endif %}
{% if release.pmcid != None %}
<br><b>PubMed Central:</b> <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/{{ release.pmcid }}">&nbsp;<code>{{ release.pmcid }}</code></a>
{% endif %}
{% if release.wikidata_qid != None %}
<br><b>Wikidata Entity:</b> <a href="https://www.wikidata.org/wiki/{{ release.wikidata_qid }}">&nbsp;<code>{{ release.wikidata_qid }}</code></a>
{% endif %}
{% if release.isbn13 != None %}
<br><b>ISBN-13:</b> &nbsp;<code>{{ release.isbn13 }}</code>
{% endif %}
{% if release.language != None %}
<br><b>Primary Language:</b> &nbsp;<code>{{ release.language }}</code> (<a href="https://www.loc.gov/standards/iso639-2/php/langcodes_name.php?iso_639_1={{ release.language }}">lookup ISO-639 code</a>)
{% endif %}
<br><b>Fatcat Work:</b>&nbsp;<a href="/work/{{ release.work_id }}">&nbsp;<code>{{ release.work_id }}</code></a>
<br>There may be other versions or releases (pre-prints, publications, etc)
linked to the same work.

{% if container != None %}
<div class="ui attached message">
<h4>
{% if release.release_status == 'published' %}
  Published in <a href="/container/{{ container.ident }}">{{ container.name }}</a>
{% else %}
  In <i>{{ release.release_type }}</i> in <a href="/container/{{ container.ident }}">{{ container.name }}</a>
{% endif %}
</h4>
</div>
<div class="ui segment attached">
{% if container != None and container.issnl != None %}<b>ISSN-L:</b> {{ container.issnl }}<br>{% endif %}
{% if release.volume != None %}<b>Volume:</b> {{ release.volume }}<br>{% endif %}
{% if release.issue != None %}<b>Issue:</b> {{ release.issue }}<br>{% endif %}
{% if release.pages != None %}<b>Page(s):</b> {{ release.pages }}<br>{% endif %}
{% if release.publisher != None %}<b>Publisher:</b> {{ release.publisher }}<br>{% endif %}
{% if release.release_status != None %}<b>Release Status:</b> {{ release.release_status }}<br>{% endif %}
{% if release.release_type != None %}<b>Release Type:</b> {{ release.release_type}}<br>{% endif %}
</div>
{% endif %}

{% if release.extra != None %}
<h3>Extra Metadata (raw JSON)</h3>
{% for (key, value) in release.extra.items() %}
<code><b>{{ key }}:</b> {{ value }}</code><br>
{% endfor %}
{% endif %}

<!--
Raw Object:
{{ release|safe }}
-->

<br>
<h3>Abstracts</h3>
{% if release.abstracts != [] %}
  {% for abstract in release.abstracts %}
  <b>Abstract (<code>{{ abstract.sha1 }}</code>, {{ abstract.mimetype }}):</b> {{ abstract.content }}
  {% endfor %}
{% else %}
<p>No known abstracts.
{% endif %}

<br>
<h3>All Contributors</h3>
{% if release.contribs.size != 0 %}
<table class="ui compact table">
  <thead>
    <tr><th>Attribution Order
        <th>Name
        <th>Role
  </thead>
  <tbody>
  {% for contrib in release.contribs %}
  <tr><td>{{ contrib.index }}
      {% if contrib.creator_id %}
        <td><a href="/creator/{{contrib.creator_id}}">{{ contrib.raw_name }}</a> 
      {% else %}
        <td>{{ contrib.raw_name }}
      {% endif %}
      <td>{{ contrib.role or '' }}
  {% endfor %}
  </tbody>
</table>
{% else %}
<p>Contributors (authors, etc) not known.
{% endif %}

<br>
<h3>Files</h3>
{% if files != [] %}
Believed to represent this release...
<table class="ui compact table">
  <thead>
    <tr><th>SHA-1
        <th>Size (bytes)
        <th>File Type
        <th>Links
  </thead>
  <tbody>
  {% for file in files %}
  <tr><td><small><code><a href="/file/{{ file.ident }}">{{ file.sha1}}</a></code></small>
      <td>{% if file.size != None %}{{ file.size }}{% endif %}
      <td>{% if file.mimetype != None %}{{ file.mimetype }}{% endif %}
      <td>{% for url in file.urls %}
        <a href="{{ url.url }}">{{ url.url.split('/')[2] }}</a> ({{ url.rel }})<br>
      {% endfor %}
  {% endfor %}
  </tbody>
</table>
</ul>
{% else %}
<p>There are no known files associated with this release (you could try
<a href="/work/{{ release.work_id }}">other releases for this work?</a>).
{% endif %}

<br>
{% if release.refs.size != 0 %}
<h3>References</h3>
This release citing other releases.
<ol>
  {% for ref in release.refs %}
    <li>{% if ref.extra != None and ref.extra.unstructured != None %}{{ ref.extra.unstructured }}{% else %}<i>unknown</i>{% endif %}
    {% if ref.target_release_id != None %}
      (<a href="/release/{{ ref.target_release_id }}">fatcat release</a>)
{#    {% elif ref.extra != None and ref.extra.doi != None %}
      (DOI: <a href="/release/lookup?doi={{ ref.exta.get('doi') }}">{{ ref.extra.get('doi') }}</a>) #}
    {% endif %}
  {% endfor %}
</ol>
{% else %}
<p>No reference list available.
{% endif %}

</div>
<div class="five wide column">

{% if files != [] and files[0].urls != [] %}
<a href="https://web.archive.org/web/1/{{ files[0].urls[0].url }}" class="ui top attached fluid huge green button"><i class="file pdf outline icon"></i>Download Full Text</a>
{% else %}
<span class="ui top attached fluid huge grey button"><i class="file cross icon"></i>No Full Text Available</span>
{% endif %}
<div class="ui segment attached">

{% if release.release_type != None %}
<b>Release Type</b> <code>{{ release.release_type }}</code>
</div><div class="ui segment attached">
{% endif %}

{% if release.doi %}
<b>DOI </b> <a href="https://doi.org/{{ release.doi }}">{{ release.doi }}</a>
<br><a href="https://api.crossref.org/v1/works/http://dx.doi.org/{{ release.doi }}">Crossref Metadata</a> (via API)
</div><div class="ui segment attached">
{% endif %}
{% if release.isbn13 != None %}
<p><b>ISBN-13 </b> &nbsp;<code>{{ release.isbn13 }}</code>
</div><div class="ui segment attached">
{% endif %}

{% if release.extra.is_oa == True %}
<b><i class="ui icon unlock alternate green"></i> Open Access</b>
</div><div class="ui segment attached">
{% elif release.extra.is_oa == False %}
<b><i class="ui icon lock red"></i> Not Open Access</b>
</div><div class="ui segment attached">
{% endif %}

{% if container != None %}
<b>Container Metadata</b><br>
{% if container.extra.is_oa == True %}
<i class="icon unlock orange"></i>Open Access Publication<br>
{% elif container.extra.is_oa == False  %}
<i class="icon lock black"></i>Not Open Access<br>
{% else %}
<i class="icon question grey"></i>Unknown OA Status<br>
{% endif %}
{% if (container.extra != None) %}
  {% if container.extra.in_doaj == True %}
    <i class="icon check green"></i> In <a href="https://doaj.org/toc/{{ container.issnl }}">DOAJ</a><br>
  {% elif container.extra.in_doaj == False %}
    <i class="icon times grey"></i> Not in <a href="https://doaj.org">DOAJ</a><br>
  {% endif %}
  {% if container.extra.in_road == True %}
    <i class="icon check green"></i> In <a href="http://road.issn.org/issn/{{ container.issnl }}">ISSN ROAD</a><br>
  {% elif container.extra.in_road == False %}
    <i class="icon times grey"></i> Not in <a href="https://road.issn.org">ISSN ROAD</a><br>
  {% endif %}
  {% if container.extra.is_kept == True %}
    <i class="icon check green"></i> In <a href="https://thekeepers.org/purl/issn/{{ container.issnl }}">Keepers Registery</a><br>
  {% elif container.extra.is_kept == False %}
    <i class="icon times grey"></i> Not in <a href="https://thekeepers.org/journals?query={{ container.issnl }}">Keepers Registry</a><br>
  {% endif %}
{% endif %}
{% if container.issnl != None %}
  <i class="icon hashtag"></i>ISSN-L: &nbsp;<code>{{ container.issnl }}</code><br>
{% endif %}
  <i class="icon linkify"></i>Fatcat: &nbsp;<small><code><a href="/container/{{ container.ident }}">{{ container.ident }}</a></code></small><br>
</div><div class="ui segment attached">
{% endif %}

<b>Lookup Links</b>
{% if container != None and container.issnl != None %}
  <br><a href="http://www.sherpa.ac.uk/romeo/issn/{{ container.issnl }}/">SHERPA/RoMEO</a> (journal policies)
{% endif %}
{% if container != None and container.doi != None %}
  <br><a href="https://oadoi.org/{{ release.doi }}">oaDOI/unpaywall</a>
{% endif %}
{% if release.isbn13 != None %}
  <br><a href="https://openlibrary.org/search?isbn={{ release.isbn13 }}">Open Library</a>
  <br><a href="http://www.worldcat.org/search?q=bn%3A{{ release.isbn13 }}">Worldcat</a>
{% else %}
  <br><a href="http://www.worldcat.org/search?qt=worldcat_org_art&q={{ release.title }}">Worldcat</a>
{% endif %}
<br><a href="https://www.wikidata.org/w/index.php?search={{ release.title }}">wikidata.org</a>
<br><a href="https://core.ac.uk/search?q={{ release.title }}">CORE.ac.uk</a>
<br><a href="https://www.semanticscholar.org/search?q={{ release.title }}">Semantic Scholar</a> (CS, neuro)
<br><a href="https://scholar.google.com/scholar?q={{ release.title }}">Google Scholar</a>
</div><div class="ui segment attached">

<b>Fatcat Bits</b>
<p>State is "{{ release.state }}". Revision:
<br><small><code>{{ release.revision }}</code></small>
<br><a href="https://api.qa.fatcat.wiki/v0/release/{{ release.ident }}">As JSON object via API</a>

</div>
<div class="two ui buttons bottom attached">
  <a href="/release/{{ release.ident }}/edit" class="ui blue button">Edit Metadata</a>
  <a href="/release/{{ release.ident }}/history" class="ui button">View History</a>
</div>

</div>
</div>
{% endblock %}