]>
Commit | Line | Data |
---|---|---|
531846f7 | 1 | {% extends "../page.html" %} |
8cb0bea4 MT |
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() %} | |
acc2b3b6 MT |
9 | <p class="text-center"> |
10 | <img class="img-fluid img-thumbnail" src="{{ file.url }}?s=768" alt="{{ file.filename }}"> | |
11 | </p> | |
8cb0bea4 MT |
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 | ||
75271a43 | 27 | <dl class="row"> |
8cb0bea4 MT |
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> | |
75271a43 MT |
41 | |
42 | {% if file.is_image() %} | |
43 | <h6>{{ _("Usage") }}</h6> | |
44 | ||
ccb3e29b | 45 | <pre><code>![](./{{ file.filename }})</code></pre> |
c78ad26e MT |
46 | |
47 | <p>{{ _("Or with an optional caption") }}</p> | |
48 | ||
ccb3e29b | 49 | <pre><code>![](./{{ file.filename }} "{{ _("Caption") }}")</code></pre> |
75271a43 | 50 | {% end %} |
8cb0bea4 MT |
51 | </div> |
52 | </div> | |
53 | {% end block %} |