summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates/container_view.html
blob: bdde6715cf29e6132ab06beafe5e8ecc8044f8c6 (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
{% set container = entity %}
{% set entity_view = "overview" %}
{% import "entity_macros.html" as entity_macros %}
{% extends "entity_base.html" %}

{% block entity_main %}

<div class="ui stackable mobile reversed grid centered">
<div class="column" style="font-size: 16px; flex: 1;">

{% if (container.extra != None) and (container.extra['urls'] != None) and (container.extra['urls']|length > 0) %}
  <div style="text-overflow: ellipsis; overflow: hidden; width: 100%;">
    <a href="{{ container.extra['urls'][0] }}"><code>{{ container.extra['urls'][0] }}</code></a>
  </div>
{% elif (container.extra != None) and (container.extra['webarchive_urls'] != None) and (container.extra['webarchive_urls']|length > 0) %}
{# fallback to a webarchive URL if no valid/live homepage URL #}
  <div style="text-overflow: ellipsis; overflow: hidden; width: 100%;">
    <a href="{{ container.extra['webarchive_urls'][0] }}"><code>{{ container.extra['webarchive_urls'][0] }}</code></a>
  </div>
{% endif %}
<p>
{% if container.publisher != None %}
  Published by {{ container.publisher }}
{% endif %}

{% if container.state == "active" %}
<h3>Search Releases from this Container</h3>
<form class="" role="search" action="/release/search" method="get">
  <div class="ui form">
    <div class="ui action input large fluid">
      <input type="text" placeholder="Search Articles..." name="q" aria-label="search release metadata">
      <input type="hidden" name="container_id" value="{{ container.ident }}">
      <button class="ui button">Search</button>
    </div>
  </div>
</form>
{% endif %}

{% if container._random_releases %}
<h3>Example Publications</h3>
{% for random_release in container._random_releases %}
  {{ entity_macros.release_search_result_row(random_release) }}
{% endfor %}
{% endif %}

</div>
<div class="column" style="flex: 0 0 24em;">

{% if container._es and container._es.is_oa == True %}
<div class="ui segment top attached">
  <i class="icon unlock huge orange"></i><b>Open Access Publication</b>
</div>
{% endif %}

{% if container._stats %}
<div class="ui segment attached">
  <div style="text-align: center;">
    <div class="ui small statistic">
      <div class="value">{{ "{:,}".format(container._stats.total) }}</div>
      <div class="label" style="text-transform: none;">Known Releases</div>
    </div>
  </div>
</div>
{% if container._stats.total >= 1 %}
  <div class="ui segment attached">
    <b>Preservation Status</b><br>
      {{ entity_macros.preservation_bar(container._stats.preservation) }}
      {{ entity_macros.preservation_small_table(container._stats.preservation) }}
  </div>
  <div class="ui segment attached">
    <b>Work Types</b><br>
    <table class="ui very basic very compact collapsing table">
      <tbody>
        {% for type_row in container._stats.release_type %}
        <tr>
          <td class="three wide">
            {% if type_row == "_unknown" %}
              <i>Unknown</i>
            {% else %}
              <code>{{ type_row }}</code>
            {% endif %}
          <td class="three wide right aligned">{{ "{:,}".format(container._stats.release_type[type_row]) }}
        {% endfor %}
      </tbody>
    </table>
  </div>
{% endif %}
{% endif %}

{% if container.issnl != None or container.wikidata_qid != None %}
<div class="ui segment attached">
  {% if container.issnl != None %}
    <b>ISSN-L<sup><a href="https://en.wikipedia.org/wiki/International_Standard_Serial_Number#Linking_ISSN">?</a></sup></b> 
    &nbsp;<code>{{ container.issnl }}</code>
  {% endif %}
  {% if container.extra != None and container.extra.issnp != None and (container.extra.issnp|length > 0) %}
    <br><i class="icon paperclip"></i>Print: &nbsp;<code>{{ container.extra.issnp }}</code>
  {% endif %}
  {% if container.extra != None and container.extra.issne != None and (container.extra.issne|length > 0) %}
    <br><i class="icon plug"></i>Electronic: &nbsp;<code>{{ container.extra.issne }}</code>
  {% endif %}
  <br>
  {% if container.wikidata_qid != None %}
    <b>Wikidata</b> &nbsp;<a href="https://wikidata.org/wiki/{{ container.wikidata_qid }}"><code>{{ container.wikidata_qid }}</code></a>
  {% endif %}
</div>
{% endif %}

{% if (container._es and container._es != None) %}
<div class="ui segment attached">
<b>Directory Listings</b><br>
  {% if container._es.in_doaj == True %}
    <i class="icon check green"></i> In <a href="https://doaj.org/toc/{{ container.issnl }}">DOAJ</a><br>
  {% elif container._es.in_doaj == False %}
    <i class="icon times grey"></i> Not in <a href="https://doaj.org">DOAJ</a><br>
  {% endif %}

  {% if container._es.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._es.in_road == False %}
    <i class="icon times grey"></i> Not in <a href="https://road.issn.org">ISSN ROAD</a><br>
  {% endif %}

  {% if container._es.any_kbart == True %}
    <i class="icon check green"></i> In <a href="https://keepers.issn.org/?q=api/search&search[]=MUST=allissn={{ container.issnl }}&search[]=MUST_EXIST=keepers">Keepers Registery</a><br>
  {% elif container._es.any_kbart == False %}
    <i class="icon times grey"></i> Not in <a href="https://keepers.issn.org/?q=api/search&search[]=MUST=allissn={{ container.issnl }}&search[]=MUST_EXIST=keepers">Keepers Registry</a><br>
  {% endif %}

  {% if container.extra and container.extra.sherpa_romeo and container.extra.sherpa_romeo.color %}
    SHERPA/RoMEO color: <code>{{ container.extra.sherpa_romeo.color }}</code>
  {% endif %}
</div>
{% endif %}

<div class="ui segment attached accordion">
  <div class="title" style="padding: 0px;"><i class="dropdown icon"></i><b>Lookup Links</b></div>
  <div class="content">
    {% if container.issnl %}
      <a href="https://portal.issn.org/resource/issn/{{ container.issnl }}">ISSN Portal</a><br>
      <a href="https://keepers.issn.org/?q=api/search&search[]=MUST=allissn={{ container.issnl }}&search[]=MUST_EXIST=keepers">The Keepers Registry</a> (preservation)<br>
      <a href="http://www.sherpa.ac.uk/romeo/issn/{{ container.issnl }}/">SHERPA/RoMEO</a> (access policies)<br>
    {% endif %}
    {% if not container.wikidata_qid %}
      <a href="https://www.wikidata.org/w/index.php?search={{ container.name|urlencode }}">wikidata.org</a><br>
    {% endif %}
  </div>
</div>

{{ entity_macros.fatcat_bits(entity, "container", "", editgroup) }}

</div>
</div>

{% endblock %}