]> git.ipfire.org Git - ipfire.org.git/blobdiff - src/templates/wiki/files/detail.html
wiki: Improve layout of file detail page
[ipfire.org.git] / src / templates / wiki / files / detail.html
index e8a8748284b93479adc504017c0d66bcb7de1dec..c4fe5ea0642411d82cd464116c07ccedf4b0648f 100644 (file)
                                {{ _("Download") }} ({{ format_size(file.size) }})
                        </a>
 
+                       {% if file.is_image() %}
+                               <h6>{{ _("Usage") }}</h6>
+
+                               <pre><code>![](./{{ file.filename }})</code></pre>
+
+                               <p>{{ _("Or with an optional caption") }}</p>
+
+                               <pre><code>![](./{{ file.filename }} "{{ _("Caption") }}")</code></pre>
+                       {% end %}
+
+                       <h6 class="my-3">{{ _("Details") }}</h6>
+
                        <dl class="row">
                                <dt class="col-sm-3">{{ _("Filename") }}</dt>
                                <dd class="col-sm-9">{{ file.filename }}</dd>
                                        <dt class="col-sm-3">{{ _("Deleted at") }}</dt>
                                        <dd class="col-sm-9">{{ locale.format_date(file.deleted_at) }}</dd>
                                {% end %}
-                       </dl>
 
-                       {% if file.is_image() %}
-                               <h6>{{ _("Usage") }}</h6>
-
-                               <pre><code>![](./{{ file.filename }})</code></pre>
-
-                               <p>{{ _("Or with an optional caption") }}</p>
-
-                               <pre><code>![](./{{ file.filename }} "{{ _("Caption") }}")</code></pre>
-                       {% end %}
+                               {% set revisions = file.get_revisions() %}
+                               {% if len(revisions) > 1 %}
+                                       <dt class="col-sm-3">{{ _("Other Revisions") }}</dt>
+                                       <dd class="col-sm-9">
+                                               <ul class="list-inline">
+                                                       {% for r in revisions %}
+                                                               <li>
+                                                                       <a href="{{ r.url }}?action=detail&revision={{ r.created_at.isoformat() }}">
+                                                                               {{ _("Uploaded %(time)s by %(author)s") % { "time" : locale.format_date(r.created_at), "author" : r.author } }}
+                                                                       </a>
+                                                               </li>
+                                                       {% end %}
+                                               </ul>
+                                       </dd>
+                               {% end %}
+                       </dl>
 
-                       {% set revisions = file.get_revisions() %}
-                       {% if len(revisions) > 1 %}
-                               <h6>{{ _("Other Revisions") }}</h6>
-
-                               <ul>
-                                       {% for r in revisions %}
-                                               {% if not file == r %}
-                                                       <li>
-                                                               <a href="{{ r.url }}?action=detail&revision={{ r.created_at.isoformat() }}">
-                                                                       {{ _("Uploaded %(time)s by %(author)s") % { "time" : locale.format_date(r.created_at), "author" : r.author } }}
-                                                               </a>
-                                                       </li>
-                                               {% end %}
-                                       {% end %}
-                               </ul>
-                       {% end %}
+                       <h6>{{ _("Upload Newer Revision") }}</h6>
 
                        <form method="POST" action="/actions/upload" enctype="multipart/form-data">
                                {% raw xsrf_form_html() %}
                                                <input type="file" class="custom-file-input" name="file" required>
                                                <label class="custom-file-label" for="customFile">{{ _("Choose a file to upload") }}</label>
                                        </div>
+
+                                       <small class="form-text text-muted">
+                                               {{ _("Uploading a new file to replaces this one to fix any errata in the current version") }}
+                                       </small>
                                </div>
 
                                <input class="btn btn-primary btn-block" type="submit" value="{{ _("Upload") }}">