Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Template tweaks, including adding the admin detail template.

  • Loading branch information...
commit d339ef8bbddd5e5262946599eee91224d028cfa2 1 parent 8d76804
@alexsdutton alexsdutton authored
View
5 openorg_timeseries/demo/static/timeseries-demo/base.css
@@ -70,4 +70,9 @@ p {
.login-form tfoot td {
padding-top: 1em;
text-align: center;
+}
+
+.helptext {
+ font-size:80%;
+ color: #444;
}
View
2  openorg_timeseries/static/timeseries/base.css
@@ -2,4 +2,4 @@ table.timeseries-serializations, table.timeseries-samples {
border: 1px solid #aaa;
float:right;
font-size:80%;
-}
+}
View
37 openorg_timeseries/templates/timeseries-admin/detail.html
@@ -0,0 +1,37 @@
+{% extends "timeseries-admin/base.html" %}
+
+{% block title %}{{ series }}{% endblock %}
+
+{% block content %}
+ <h1>{{ series }}</h1>
+
+ <section>
+ <h2>Details</h2>
+ <form method="post" action=".">
+ <table>
+ <tbody>{{ form }}</tbody>
+ <tfoot>
+ <tr>
+ <td colspan="2">
+ <input type="submit" value="Update"/>
+ </td>
+ </tr>
+ </tfoot>
+ </table>
+ </form>
+ </section>
+
+ <section>
+ <h2>Upload readings</h2>
+ <p class="helptext">
+ Use this form to upload a CSV file containing readings. The CSV file
+ should contain exactly two columns, the first containing a date-time
+ string, and the second containing the reading.
+ </p>
+ <form method="post" action="." enctype="multipart/form-data">
+ <input type="file" name="readings"/>
+ <input type="submit" value="Upload"/>
+ </form>
+ </section>
+
+{% endblock %}
View
6 openorg_timeseries/templates/timeseries-admin/index.html
@@ -3,7 +3,7 @@
{% block title %}Time-series admin{% endblock %}
{% block content %}
- <h1>Time-series</h1>
+ <h1>Time-series administration</h1>
<p>
<a href="{% url timeseries-admin:create %}">Create new time-series</a>
@@ -14,12 +14,16 @@
<tr>
<th>Slug</th>
<th>Title</th>
+ <th>Notes</th>
+ <th>Last updated</th>
</tr>
</thead>
<tbody>{% for series in series %}
<tr>
<td><a href="{{ series.get_admin_url }}">{{ series.slug }}</a></td>
<td>{{ series.title }}</td>
+ <td>{{ series.notes }}</td>
+ <td>{{ series.last }}</td>
</tr>
{% endfor %}</tbody>
</table>
View
16 openorg_timeseries/tests/templates/base.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>{% block title %}{% endblock %} | openorg_timeseries tests</title>
+ {% block extra_head %}{% endblock %}
+ </head>
+ {% block body %}
+ <body>
+ <header>openorg_timeseries tests</header>
+ {% block menu %}{% endblock %}
+ <article>
+ {% block content %}{% endblock %}
+ </article>
+ </body>
+ {% endblock %}
+</html>
Please sign in to comment.
Something went wrong with that request. Please try again.