summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web/templates/file_view.html
blob: 74977668f02ee61942193b680ceb88344becdc24 (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
{% 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">
  <div class="sub header"><code>file {{ file.ident }}</code></div></h1>
</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 file.extra != None %}
<h3>Extra Metadata (raw JSON)</h3>
{% for (key, value) in file.extra.items() %}
<code><b>{{ key }}:</b> {{ value }}</code><br>
{% endfor %}
{% endif %}

<h3>Releases</h3>
{% if file.releases != None %}
<p>Releases associated with this file:
<ul>
{% for release_id in file.releases %}
  <li><a href="/release/{{ release_id }}"><code>{{ release_id }}</code></a>
{% endfor %}
</ul>
{% else %}
This file is not associated with any fatcat release.
{% endif %}

<h3>URLs</h3>
{% if file.url != None %}
<p>Known locations of this file:
<ul>
{% for url in file.urls %}
  <li><a href="{{ url.url }}">{{ url.url.split('/')[2] }}</a> ({{ url.rel }})<br>
{% endfor %}
</ul>
{% else %}
No known public URL, mirror, or archive for this file.
{% endif %}

<h3>Checksums</h3>
<table class="ui compact table">
  <thead>
    <tr><th>Algorithm
        <th>Value
  <tbody>
    {% if file.sha1 != None %}
    <tr><td>SHA-1
        <td><small><code>{{ file.sha1 }}</code></small>
    {% endif %}
    {% if file.sha256 != None %}
    <tr><td>SHA-256
        <td><small><code>{{ file.sha256 }}</code></small>
    {% endif %}
    {% if file.md5!= None %}
    <tr><td>MD5
        <td><small><code>{{ file.md5 }}</code></small>
    {% endif %}
</table>

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

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

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

<div class="ui segment attached">

{% if file.size != None %}
<p><b>Size</b> &nbsp;{{ file.size }} (bytes)
</div><div class="ui segment attached">
{% endif %}

{% if file.mimetype != None %}
<p><b>File Type</b> &nbsp;<code>{{ file.mimetype }}</code>
</div><div class="ui segment attached">
{% endif %}

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

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

</div>
</div>


{% endblock %}