mirror of
https://github.com/journeyman-cc/smeagol.git
synced 2026-04-12 18:05:06 +00:00
Added 'list uploaded files' page, only accessible if logged in.
This commit is contained in:
parent
84360110fc
commit
da3bde16d0
8 changed files with 138 additions and 22 deletions
|
|
@ -83,6 +83,8 @@
|
|||
:file-upload-title "Upload a file" ;; title for the file upload page
|
||||
:is-admin-prompt "Is administrator?"
|
||||
:here "here" ;; used in sanity check report
|
||||
:history-link "History" ;; text of the history link on the content frame
|
||||
:history-title-prefix "History of" ;; prefix of the title on the history page
|
||||
:home-link "Home" ;; text of the home link on the menu
|
||||
:is-not-directory "is not a directory"
|
||||
;; (of a file or directory) used in sanity check report
|
||||
|
|
@ -90,6 +92,8 @@
|
|||
;; (of a file or directory) used in sanity check report
|
||||
:is-not-writable "is not writable"
|
||||
;; (of a file or directory) used in sanity check report
|
||||
:list-files "List uploaded files"
|
||||
;; title of the 'List uploaded Files' page
|
||||
:login-label "Log in!" ;; text of the login widget on the login page
|
||||
:login-link "Log in" ;; text of the login link on the menu
|
||||
:login-prompt "To edit this wiki"
|
||||
|
|
@ -98,8 +102,7 @@
|
|||
:logout-link "Log out" ;; text of the logout link on the menu
|
||||
:logged-in-as "You are logged in as"
|
||||
;; text of the 'logged in as' label on the menu
|
||||
:history-link "History" ;; text of the history link on the content frame
|
||||
:history-title-prefix "History of" ;; prefix of the title on the history page
|
||||
:matching "matching" ;; 'matching' in e.g. 'list files matching fred'
|
||||
:new-pass-prompt "New password" ;; text of the new password widget prompt on the change
|
||||
;; password and edit user pages
|
||||
:no-admin-users "There are no users in the 'passwd' file with administrative privileges"
|
||||
|
|
|
|||
|
|
@ -10,4 +10,6 @@
|
|||
+ \*\***bold**\*\*
|
||||
+ \__italic_\_
|
||||
|
||||
More documentation [here](http://daringfireball.net/projects/markdown/syntax)
|
||||
More documentation [here](http://daringfireball.net/projects/markdown/syntax)
|
||||
|
||||
Your <a href="list-uploads">uploaded files are listed here</a>.
|
||||
|
|
|
|||
34
resources/templates/list-uploads.html
Normal file
34
resources/templates/list-uploads.html
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{% extends "templates/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div id="content" class="list-uploads">
|
||||
<form action="list-uploads" method="post">
|
||||
{% csrf-field %}
|
||||
<p class="widget">
|
||||
<label for="search">{% i18n matching %}</label>
|
||||
<input name="search" id="search" type="text" value="{{search}}" required/>
|
||||
</p>
|
||||
</form>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Uploaded</th>
|
||||
<th>Type this</th>
|
||||
<th>To get this</th>
|
||||
</tr>
|
||||
{% for entry in files %}
|
||||
<tr>
|
||||
<th>{{entry.base-name}}</th>
|
||||
<td>{{entry.modified}}</td>
|
||||
<td>
|
||||
{% if entry.is-image %}  {% else %} [{{entry.name|capitalize}}](uploads/{{entry.base-name}}) {% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if entry.is-image %} <img src="uploads/{{entry.base-name}}" alt="{{entry.name|capitalize}}"/> {% else %} <a href="uploads/{{entry.base-name}}">link</a> {% endif %}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
@ -34,5 +34,8 @@
|
|||
</p>
|
||||
</form>
|
||||
{% endif %}
|
||||
<p>
|
||||
Your <a href="list-uploads">uploaded files are listed here</a>.
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue