This commit is contained in:
simon 2017-07-26 16:51:31 +01:00
parent 5d10ae2e54
commit c2e771561d
5 changed files with 130 additions and 1 deletions

View file

@ -65,6 +65,10 @@
:edit-users-title "Select user to edit"
;; title of edit users page
:email-prompt "Email address" ;; text of the email widget prompt on edit user page
:file-upload-link-text "You may link to this file using a link of the form"
;; Text introducing the link to an uploaded file
:file-upload-prompt "File to upload" ;; prompt string for the file upload widget
:file-upload-title "Upload a file" ;; title for the file upload page
:is-admin-prompt "Is administrator?"
:home-link "Home" ;; text of the home link on the menu
:login-label "Log in!" ;; text of the login widget on the login page

View file

@ -6,6 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="{{servlet-context}}/content/stylesheet.css" media="screen" rel="stylesheet" type="text/css" />
<link href="{{servlet-context}}/css/print.css" media="print" rel="stylesheet" type="text/css" />
{% block extra-headers %}
{% endblock %}
</head>
@ -20,6 +21,7 @@
<li class="{{edit-users-selected}}"><a href="{{servlet-context}}/edit-users">{{config.edit-users-link}}</a></li>
{% endif %}
{% if user %}
<li class="{{upload-selected}}"><a href="upload">{{config.file-upload-title}}</a></li>
<li class="{{passwd-selected}}"><a href="passwd">{{config.change-pass-link}}</a></li>
<li class="user" id="user">{{config.logged-in-as}} {{user}}</li>
<li class="{{auth-selected}}"><a href="{{servlet-context}}/auth">
@ -90,4 +92,3 @@
<footer>
</body>
</html>

View file

@ -0,0 +1,34 @@
{% extends "templates/base.html" %}
{% block content %}
Uploaded: {{uploaded}}; is-image: {{is-image}}
<div id="content" class="auth">
{% if uploaded %}
{% if is-image %}
<img alt="Uploaded image" src="uploads/{{uploaded}}"/>
<p>
{{config.file-upload-link-text}}:
<code>![Uploaded image](uploads/{{uploaded}})</code>
</p>
{% else %}
<p>
{{config.file-upload-link-text}}:
<code>[Uploaded file](uploads/{{uploaded}})</code>
</p>
{% endif %}
{% else %}
<form action="{{servlet-context}}/upload" enctype="multipart/form-data" method="POST">
<p class="widget">
<label for="upload">{{config.file-upload-prompt}}</label>
<input name="upload" id="upload" type="file" required/>
</p>
<p class="widget">
<label for="submit">{{config.save-prompt}}</label>
<input name="submit" id="submit" type="submit" class="action" value="{{config.save-label}}"/>
</p>
</form>
{% endif %}
</div>
{% endblock %}