summaryrefslogtreecommitdiff
path: root/templates/base.tmpl
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2013-08-30 23:21:42 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2013-08-30 23:30:52 +0200
commit143f638a4b1bafdc4a2a811a9f4c97a5392a0acc (patch)
treea3f5e445ef7c597c25890b57b1b224504746405d /templates/base.tmpl
parent3c42d5d76da5eda2ce6bedd954269161259b2289 (diff)
Added settings for registrations and uploads.
* create_active_users: Controls whether new user accounts are created as 'active'; accounts that are not marked as active will not be able to log in, and will be automatically logged out if they're already logged in. * allow_registration: Allow or disallow creation of new user accounts. Any attempts to access the registration page will result in an error message. * allow_anonymous_uploads: Allow or disallow uploading of files by anonymous (not logged in) users. Combined with either allow_registration or create_active_users, this will effectively create a private filebin where the admin must explicitly create or activate new users.
Diffstat (limited to 'templates/base.tmpl')
-rw-r--r--templates/base.tmpl25
1 files changed, 15 insertions, 10 deletions
diff --git a/templates/base.tmpl b/templates/base.tmpl
index fe9120b..5c1f894 100644
--- a/templates/base.tmpl
+++ b/templates/base.tmpl
@@ -4,33 +4,38 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>$title</title>
- <link rel="StyleSheet" href="${root}s/style.css" type="text/css" />
+ <link rel="StyleSheet" href="${settings.virtual_root}s/style.css" type="text/css" />
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
#block head
#end block
</head>
<body>
+ $settings
<div id="page">
<div id="page-header">
- <h1><a href="$root">$header</a></h1>
+ <h1><a href="$settings.virtual_root">$header</a></h1>
<div id="page-menu">
<ul>
- <li><a href="${root}u">upload</a></li>
+#if $user or $settings.allow_anonymous_uploads
+ <li><a href="${settings.virtual_root}u">upload</a></li>
+#end if
#if $user
- <li><a href="${root}o">logout</a></li>
- <li><a href="${root}m">myfiles</a></li>
- <li><a href="${root}i">images</a></li>
+ <li><a href="${settings.virtual_root}o">logout</a></li>
+ <li><a href="${settings.virtual_root}m">myfiles</a></li>
+ <li><a href="${settings.virtual_root}i">images</a></li>
#else
- <li><a href="${root}l">login</a></li>
- <li><a href="${root}r">register</a></li>
+ <li><a href="${settings.virtual_root}l">login</a></li>
+#if $settings.allow_registration
+ <li><a href="${settings.virtual_root}r">register</a></li>
+#end if
#end if
- <li><a href="${root}h">help</a></li>
+ <li><a href="${settings.virtual_root}h">help</a></li>
</ul>
</div>
</div>
<p class="login">#slurp
#if $user
-Logged in as $user.username. <a href="${root}c">Change password</a>#slurp
+Logged in as $user.username. <a href="${settings.virtual_root}c">Change password</a>#slurp
#else
Not logged in.#slurp
#end if