]> git.ipfire.org Git - ipfire.org.git/blob - src/templates/wiki/files/detail.html
fea6448c36a6cc0cd407dd2e209d4137d20ff1e9
[ipfire.org.git] / src / templates / wiki / files / detail.html
1 {% extends "../page.html" %}
2
3 {% block title %}{{ file.filename }}{% end block %}
4
5 {% block main %}
6 <div class="card mb-4">
7 <div class="card-body">
8 {% if file.is_image() %}
9 <p class="text-center">
10 <img class="img-fluid img-thumbnail" src="{{ file.url }}?s=768" alt="{{ file.filename }}">
11 </p>
12 {% elif file.is_pdf() %}
13 <object class="pdf-viewer" data="{{ file.url }}"
14 title="{{ file.filename }}" type="{{ file.mimetype }}">
15 <p>
16 {{ _("This PDF attachment could not be displayed.") }}
17 <a href="{{ file.url }}">{{ _("Click here to download") }}</a>
18 </p>
19 </object>
20 {% end %}
21
22 <a class="btn btn-primary btn-lg btn-block my-3" href="{{ file.url }}">
23 <span class="fas fa-file-download"></span>
24 {{ _("Download") }} ({{ format_size(file.size) }})
25 </a>
26
27 <dl class="row">
28 <dt class="col-sm-3">{{ _("Filename") }}</dt>
29 <dd class="col-sm-9">{{ file.filename }}</dd>
30
31 {% if file.author %}
32 <dt class="col-sm-3">{{ _("Author") }}</dt>
33 <dd class="col-sm-9">
34 <a href="/users/{{ file.author.uid }}">{{ file.author }}</a>
35 </dd>
36 {% end %}
37
38 <dt class="col-sm-3">{{ _("Uploaded at") }}</dt>
39 <dd class="col-sm-9">{{ locale.format_date(file.created_at) }}</dd>
40 </dl>
41
42 {% if file.is_image() %}
43 <h6>{{ _("Usage") }}</h6>
44
45 <pre><code>![{{ _("Caption")}}]({{ file.filename }})</code></pre>
46 {% end %}
47 </div>
48 </div>
49 {% end block %}