Browse Source

Update file templates

JoostSijm 6 years ago
parent
commit
d125cfb8bf

+ 1 - 1
app/modules/backend/modules/file/templates/file/create.j2

@@ -8,7 +8,7 @@
     </div>
     <div class="form-group">
         <label class="text-normal text-dark">File</label>
-        <input type="file" class="form-control-file border" name="file">
+        <input type="file" class="form-control-file" name="file">
     </div>
     <div class="form-group float-right">
         <button class="btn btn-primary">Create</button>

+ 1 - 3
app/modules/backend/modules/file/templates/file/view.j2

@@ -2,10 +2,8 @@
 {% block content %}
 <h1>Title: {{ file.title }}</h1>
 <a href="{{ url_for('backend_file.edit', file_id=file.id) }}">Edit</a><br>
-<p>{{ file.path }}</p>
+<a href="/static/uploads/{{ file.path }}">{{ file.path}}</a>
 {% if file.is_image() %}
 <img src="/static/uploads/{{ file.path }}" alt="{{ file.title }}" class="img-thumbnail">
-{% else %}
-<a href="/static/uploads/{{ file.path }}">{{ file.title }}</a>
 {% endif %}
 {% endblock %}

+ 2 - 0
app/modules/backend/templates/site/index.j2

@@ -56,6 +56,7 @@
                         <tr>
                             <th>Action</th>
                             <th>Title</th>
+                            <th>Extension</th>
                             <th>Author</th>
                         </tr>
                     </thead>
@@ -79,6 +80,7 @@
                                     {{ file.title if file.title else 'file %s' % file.id }}
                                 </a>
                             </td>
+                            <td>{{ file.extension() }}</td>
                             <td>{{ file.user.name }}</td>
                         </tr>
                         {%- endfor -%}