aboutsummaryrefslogtreecommitdiff
path: root/interface
diff options
context:
space:
mode:
Diffstat (limited to 'interface')
-rw-r--r--interface/admin_aliases.tmpl40
-rw-r--r--interface/admin_delete.tmpl21
-rw-r--r--interface/admin_dirs.tmpl6
-rw-r--r--interface/admin_files.tmpl21
-rw-r--r--interface/admin_rename.tmpl40
-rw-r--r--interface/admin_upload.tmpl36
-rw-r--r--interface/listing.htm3
7 files changed, 151 insertions, 16 deletions
diff --git a/interface/admin_aliases.tmpl b/interface/admin_aliases.tmpl
new file mode 100644
index 0000000..97315f7
--- /dev/null
+++ b/interface/admin_aliases.tmpl
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <meta name="robots" content="noindex,nofollow" />
+ <title>cargohold</title>
+ <link rel="stylesheet" href="/assets/cargohold.css" />
+ <link rel="stylesheet" href="/assets/admin.css" />
+ <link rel="icon" href="/assets/cargohold.ico" />
+ </head>
+ <body>
+ <div id="header">
+ <h1>cargohold - <span class="dirname">{{ directory }}</span></h1>
+ <a class="button" href="/admin">Back to overview</a>
+ </div>
+
+ <div id="container">
+ <div id="topmenu">
+ <a class="button" href="/admin/{{ directory }}">View</a>
+ <a class="button" href="/admin/{{ directory }}/upload">Upload</a>
+ <a class="button" href="/admin/{{ directory }}/rename">Rename</a>
+ <a class="button active" href="/admin/{{ directory }}/aliases">Links</a>
+ <a class="button delete" href="/admin/{{ directory }}/delete">Delete</a>
+ </div>
+
+ <div id="listing">
+ {% for alias in aliases %}
+ <div class="entry">
+ <a class="entry" href="{{ baseurl }}{{ alias.alias }}">{{ baseurl }}{{ alias.alias }}</a>
+ <a class="permission {% if 'r' not in alias.access %}disabled{% endif %}" href="#">Download</a>
+ <a class="permission {% if 'c' not in alias.access %}disabled{% endif %}" href="#">Upload</a>
+ <a class="permission {% if 'd' not in alias.access %}disabled{% endif %}" href="#">Delete</a>
+ <a class="permission" href="#">Previews</a>
+ </div>
+ {% endfor %}
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/interface/admin_delete.tmpl b/interface/admin_delete.tmpl
index bf6d8a2..102d908 100644
--- a/interface/admin_delete.tmpl
+++ b/interface/admin_delete.tmpl
@@ -11,24 +11,35 @@
</head>
<body>
<div id="header">
- cargohold - Administration
+ <h1>cargohold - <span class="dirname">{{ directory }}</span></h1>
+ <a class="button" href="/admin">Back to overview</a>
</div>
<div id="container">
+ <div id="topmenu">
+ <a class="button" href="/admin/{{ directory }}">View</a>
+ <a class="button" href="/admin/{{ directory }}/upload">Upload</a>
+ <a class="button" href="/admin/{{ directory }}/rename">Rename</a>
+ <a class="button" href="/admin/{{ directory }}/aliases">Links</a>
+ <a class="button active" href="/admin/{{ directory }}/delete">Delete</a>
+ </div>
+
<div id="message">
- This will delete the directory <span class="highlight">{{ directory }}</span>.
+ This will delete the directory <span class="highlight dirname">{{ directory }}</span>.
<br />
This directory still contains {{ listing | length }} files.
</div>
+
<div id="dirlisting">
{% for file in listing %}
<div class="entry">
- <a class="file" href="#">{{ file.name }}</a>
+ <a class="entry" href="/admin/{{ directory }}/file/{{ file.name }}">{{ file.name }}</a>
</div>
{% endfor %}
</div>
+
<div id="action">
- <a class="button" href="/admin">Cancel</a>
- <a class="button delete" href="?confirm">Confirm &amp; delete</a>
+ <a class="button" href="/admin/{{ directory }}">Cancel</a>
+ <a class="button delete" href="?confirm">Confirm &amp; delete all</a>
</div>
</div>
</body>
diff --git a/interface/admin_dirs.tmpl b/interface/admin_dirs.tmpl
index cebaa62..d7c5317 100644
--- a/interface/admin_dirs.tmpl
+++ b/interface/admin_dirs.tmpl
@@ -11,7 +11,7 @@
</head>
<body>
<div id="header">
- cargohold - Administration
+ <h1>cargohold - All directories</h1>
</div>
<div id="container">
{% if error %}
@@ -28,9 +28,9 @@
<div id="dirlisting">
{% for dir in listing %}
<div class="entry">
- <a class="directory" href="/admin/{{dir.name}}">{{dir.name}}</a>
+ <a class="entry" href="/admin/{{dir.name}}">{{dir.name}}</a>
<a class="button" href="/admin/{{dir.name}}/rename">Rename</a>
- <a class="button" href="/admin/{{dir.name}}/aliases">Aliases</a>
+ <a class="button" href="/admin/{{dir.name}}/aliases">{{dir.nlinks}} Links</a>
<a class="delete button" href="/admin/{{dir.name}}/delete">Delete</a>
</div>
{% endfor %}
diff --git a/interface/admin_files.tmpl b/interface/admin_files.tmpl
index 76b63d5..b0828b6 100644
--- a/interface/admin_files.tmpl
+++ b/interface/admin_files.tmpl
@@ -11,18 +11,25 @@
</head>
<body>
<div id="header">
- cargohold - Administration
+ <h1>cargohold - <span class="dirname">{{ directory }}</span></h1>
+ <a class="button" href="/admin">Back to overview</a>
</div>
+
<div id="container">
- {% if message %}
- <div id="message">
- {{ message }}
- </div>
- {% endif %}
+ <div id="topmenu">
+ <a class="button active" href="/admin/{{ directory }}">View</a>
+ <a class="button" href="/admin/{{ directory }}/upload">Upload</a>
+ <a class="button" href="/admin/{{ directory }}/rename">Rename</a>
+ <a class="button" href="/admin/{{ directory }}/aliases">Links</a>
+ <a class="button delete" href="/admin/{{ directory }}/delete">Delete</a>
+ </div>
+
<div id="dirlisting">
{% for file in listing %}
<div class="entry">
- <a class="file" href="#">{{ file.name }}</a>
+ <a class="entry" href="/admin/{{ directory }}/file/{{ file.name }}">{{ file.name }}</a>
+ <div class="info">{{ (file.size / 1024 / 1024) | round(2, "ceil") }} MB</div>
+ <a class="button delete" href="/admin/{{ directory }}/delete/{{ file.name }}">Delete</a>
</div>
{% endfor %}
</div>
diff --git a/interface/admin_rename.tmpl b/interface/admin_rename.tmpl
new file mode 100644
index 0000000..a760cb5
--- /dev/null
+++ b/interface/admin_rename.tmpl
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <meta name="robots" content="noindex,nofollow" />
+ <title>cargohold</title>
+ <link rel="stylesheet" href="/assets/cargohold.css" />
+ <link rel="stylesheet" href="/assets/admin.css" />
+ <link rel="icon" href="/assets/cargohold.ico" />
+ </head>
+ <body>
+ <div id="header">
+ <h1>cargohold - <span class="dirname">{{ directory }}</span></h1>
+ <a class="button" href="/admin">Back to overview</a>
+ </div>
+
+ <div id="container">
+ <div id="topmenu">
+ <a class="button" href="/admin/{{ directory }}">View</a>
+ <a class="button" href="/admin/{{ directory }}/upload">Upload</a>
+ <a class="button active" href="/admin/{{ directory }}/rename">Rename</a>
+ <a class="button" href="/admin/{{ directory }}/aliases">Links</a>
+ <a class="button delete" href="/admin/{{ directory }}/delete">Delete</a>
+ </div>
+
+ <div>
+ This will rename the directory <span class="highlight dirname">{{ directory }}</span>.
+ <br />
+ All aliases will be kept intact.
+ </div>
+
+ <input type="text" placeholder="New name" />
+
+ <div id="action">
+ <a class="button" href="?confirm">Rename</a>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/interface/admin_upload.tmpl b/interface/admin_upload.tmpl
new file mode 100644
index 0000000..be5b298
--- /dev/null
+++ b/interface/admin_upload.tmpl
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <meta name="robots" content="noindex,nofollow" />
+ <title>cargohold</title>
+ <link rel="stylesheet" href="/assets/cargohold.css" />
+ <link rel="stylesheet" href="/assets/admin.css" />
+ <link rel="icon" href="/assets/cargohold.ico" />
+ </head>
+ <body>
+ <div id="header">
+ <h1>cargohold - <span class="dirname">{{ directory }}</span></h1>
+ <a class="button" href="/admin">Back to overview</a>
+ </div>
+
+ <div id="container">
+ <div id="topmenu">
+ <a class="button" href="/admin/{{ directory }}">View</a>
+ <a class="button active" href="/admin/{{ directory }}/upload">Upload</a>
+ <a class="button" href="/admin/{{ directory }}/rename">Rename</a>
+ <a class="button" href="/admin/{{ directory }}/aliases">Links</a>
+ <a class="button delete" href="/admin/{{ directory }}/delete">Delete</a>
+ </div>
+
+ <div>
+ TBD
+ </div>
+
+ <div id="action">
+ <a class="button" href="#">Upload</a>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/interface/listing.htm b/interface/listing.htm
index 5866825..7cc2b62 100644
--- a/interface/listing.htm
+++ b/interface/listing.htm
@@ -11,7 +11,7 @@
</head>
<body>
<div id="header">
- cargohold
+ <h1>cargohold</h1>
</div>
<div id="container">
<div class="tab-wrap">
@@ -55,5 +55,6 @@
</div>
</div>
</div>
+ <div class="footer"><a href="https://git.services.cbcdn.com/cargohold/">cargohold</a> is a free and open source project</div>
</body>
</html>