1 {% extends
"../page.html" %}
3 {% block title %}{{ file.filename }}{% end block %}
5 {% block head %}{% end block %}
8 <section class=
"section">
9 <div class=
"container">
10 {% if file.is_image() %}
12 <div class=
"notification">
13 <figure class=
"image">
14 <img src=
"{{ file.url }}?revision={{ file.created_at.isoformat() }}&s=1920" alt=
"{{ file.filename }}">
18 {% elif file.is_pdf() %}
20 <object class=
"pdf-viewer" data=
"{{ file.url }}?revision={{ file.created_at.isoformat() }}"
21 title=
"{{ file.filename }}" type=
"{{ file.mimetype }}">
23 {{ _(
"This PDF attachment could not be displayed.") }}
24 <a href=
"{{ file.url }}?revision={{ file.created_at.isoformat() }}">{{ _(
"Click here to download") }}
</a>
31 <a class=
"button is-primary is-fullwidth" href=
"{{ file.url }}?revision={{ file.created_at.isoformat() }}">
33 <i class=
"fas fa-file-download"></i>
35 <span>{{ _(
"Download") }} ({{ format_size(file.size) }})
</span>
41 <section class=
"section">
42 <div class=
"container">
43 {% if file.is_image() %}
44 <h5 class=
"title is-5">{{ _(
"Usage") }}
</h6>
47 <pre><code>![](./{{ file.filename }})
</code></pre>
50 <h6 class=
"title is-6">{{ _(
"Or with an optional caption") }}
</h6>
53 <pre><code>![](./{{ file.filename }}
"{{ _("Caption
") }}")
</code></pre>
57 <h5 class=
"title is-5">{{ _(
"Details") }}
</h5>
59 <table class=
"table is-fullwidth">
65 <code>{{ file.filename }}
</code>
75 <a href=
"/users/{{ file.author.uid }}">{{ file.author }}
</a>
82 {{ _(
"Uploaded at") }}
85 {{ locale.format_date(file.created_at) }}
89 {% if file.deleted_at %}
95 {{ locale.format_date(file.deleted_at) }}
100 {% set revisions = file.get_revisions() %}
101 {% if len(revisions)
> 1 %}
102 {% for i, r in enumerate(revisions) %}
105 <th scope=
"row">{{ _(
"Other Revisions") }}
</th>
111 <a href=
"{{ r.url }}?action=detail&revision={{ r.created_at.isoformat() }}">
112 {{ _(
"Uploaded %(time)s by %(author)s") % {
"time" : locale.format_date(r.created_at),
"author" : r.author } }}
122 <section class=
"section">
123 <div class=
"container">
125 <h6 class=
"title is-6">{{ _(
"Used By") }}
</h6>
129 {% for page in file.pages %}
131 <a href=
"{{ page.url }}">
132 {% for p, b in page.breadcrumbs %}
144 <h6 class=
"title is-6">{{ _(
"Delete") }}
</h6>
147 <a class=
"button is-danger" href=
"{{ file.url }}/_delete" {% if not file.can_be_deleted() %}disabled{% end %}
>
152 <h6 class=
"title is-6">{{ _(
"Upload Newer Revision") }}
</h6>
154 <form method=
"POST" action=
"/docs/_upload" enctype=
"multipart/form-data">
155 {% raw xsrf_form_html() %}
157 <input type=
"hidden" name=
"path" value=
"{{ file.path }}">
158 <input type=
"hidden" name=
"filename" value=
"{{ file.filename }}">
161 <div class=
"control">
162 <div class=
"file is-boxed">
163 <label class=
"file-label">
164 <input class=
"file-input" type=
"file" name=
"file">
165 <span class=
"file-cta">
166 <span class=
"file-icon">
167 <i class=
"fas fa-upload"></i>
169 <span class=
"file-label">
170 {{ _(
"Choose a file to upload") }}
178 {{ _(
"Uploading a new file to replaces this one to fix any errata in the current version") }}
183 <div class=
"control">
184 <input class=
"button is-primary" type=
"submit" value=
"{{ _("Upload
") }}">