More work

This commit is contained in:
nikolark committed 2014-11-09 22:23:43 +01:00
1 parent 348182a679
commit 4fae23c444
7 files changed
+32 -15

No files matched your search

+6 -1
View File
@@ -15,4 +15,9 @@
# Development
python manage.py runserver
# Log in with username 'test@example.com' and password 'test'
# Log in with username 'test@example.com' and password 'test'
# TODO
- new list button with form
- ajax spinner (sircon is slow)
- wire up rest of interface.
+4
View File
@@ -24,5 +24,9 @@ $(document).ready(function() {
});
$(".forwards-container").html(forward_html);
$("input[name=fwd-delete]").click(function() {
$(this).parent().parent().toggleClass('danger');
});
});
});
+4 -4
View File
@@ -1,8 +1,8 @@
{% for list,members in lists %}
<div class="fwdlist col-md-12">
<div class="panel panel-default">
<div class="panel-heading">{{ list }}</div>
<table class="table">
<div class="panel-heading">{{ list }} <span class="badge">{{members|length}}</span></div>
<table class="table table-striped table-condensed">
<thead>
<tr>
<th>Medlem</th>
@@ -13,9 +13,9 @@
{% for member in members %}
<tr><td>{{ member.forward }}</td><td class="text-center"><input type="checkbox" name='fwd-delete' value="{{ member.uri_dest }}={{ member.uri_forward }}"></td></tr>
{% endfor %}
<tr><td>
<tr><td colspan="2">
<div class="input-group"><input type="email" name="" class="form-control"><span class="input-group-btn"><button class="btn btn-default" type="button">Legg til</button></span></div>
<td></td></tr>
</td></tr>
</tbody>
</table>
</div>
+4
View File
@@ -24,5 +24,9 @@ $(document).ready(function() {
});
$(".forwards-container").html(forward_html);
$("input[name=fwd-delete]").click(function() {
$(this).parent().parent().toggleClass('danger');
});
});
});
+8 -4
View File
@@ -22,7 +22,9 @@ frame.set("loop.last", t_1 === t_2 - 1);
frame.set("loop.length", t_2);
output += "\n<div class=\"fwdlist col-md-12\">\n\t<div class=\"panel panel-default\">\n\t <div class=\"panel-heading\">";
output += runtime.suppressValue(t_4, env.autoesc);
output += "</div>\n\t\t<table class=\"table\">\n\t\t\t<thead>\n\t\t <tr>\n\t\t\t <th>Medlem</th>\n\t\t\t <th class=\"text-center\">Slett</th>\n\t\t </tr>\n\t </thead>\n\t <tbody>\n\t\t\t";
output += " <span class=\"badge\">";
output += runtime.suppressValue(env.getFilter("length").call(context, t_5), env.autoesc);
output += "</span></div>\n\t\t<table class=\"table table-striped table-condensed\">\n\t\t\t<thead>\n\t\t <tr>\n\t\t\t <th>Medlem</th>\n\t\t\t <th class=\"text-center\">Slett</th>\n\t\t </tr>\n\t </thead>\n\t <tbody>\n\t\t\t";
frame = frame.push();
var t_8 = t_5;
if(t_8) {var t_7 = t_8.length;
@@ -47,7 +49,7 @@ output += "\"></td></tr>\n\t\t\t";
}
}
frame = frame.pop();
output += "\n\t\t\t\t<tr><td>\n\t\t\t\t<div class=\"input-group\"><input type=\"email\" name=\"\" class=\"form-control\"><span class=\"input-group-btn\"><button class=\"btn btn-default\" type=\"button\">Legg til</button></span></div>\n\t\t\t\t<td></td></tr>\n\t\t\t</tbody>\n\t\t</table>\n\t</div>\n</div>\n";
output += "\n\t\t\t\t<tr><td colspan=\"2\">\n\t\t\t\t<div class=\"input-group\"><input type=\"email\" name=\"\" class=\"form-control\"><span class=\"input-group-btn\"><button class=\"btn btn-default\" type=\"button\">Legg til</button></span></div>\n\t\t\t\t</td></tr>\n\t\t\t</tbody>\n\t\t</table>\n\t</div>\n</div>\n";
;
}
} else {
@@ -67,7 +69,9 @@ frame.set("loop.last", t_1 === t_2 - 1);
frame.set("loop.length", t_2);
output += "\n<div class=\"fwdlist col-md-12\">\n\t<div class=\"panel panel-default\">\n\t <div class=\"panel-heading\">";
output += runtime.suppressValue(t_10, env.autoesc);
output += "</div>\n\t\t<table class=\"table\">\n\t\t\t<thead>\n\t\t <tr>\n\t\t\t <th>Medlem</th>\n\t\t\t <th class=\"text-center\">Slett</th>\n\t\t </tr>\n\t </thead>\n\t <tbody>\n\t\t\t";
output += " <span class=\"badge\">";
output += runtime.suppressValue(env.getFilter("length").call(context, t_11), env.autoesc);
output += "</span></div>\n\t\t<table class=\"table table-striped table-condensed\">\n\t\t\t<thead>\n\t\t <tr>\n\t\t\t <th>Medlem</th>\n\t\t\t <th class=\"text-center\">Slett</th>\n\t\t </tr>\n\t </thead>\n\t <tbody>\n\t\t\t";
frame = frame.push();
var t_14 = t_11;
if(t_14) {var t_13 = t_14.length;
@@ -92,7 +96,7 @@ output += "\"></td></tr>\n\t\t\t";
}
}
frame = frame.pop();
output += "\n\t\t\t\t<tr><td>\n\t\t\t\t<div class=\"input-group\"><input type=\"email\" name=\"\" class=\"form-control\"><span class=\"input-group-btn\"><button class=\"btn btn-default\" type=\"button\">Legg til</button></span></div>\n\t\t\t\t<td></td></tr>\n\t\t\t</tbody>\n\t\t</table>\n\t</div>\n</div>\n";
output += "\n\t\t\t\t<tr><td colspan=\"2\">\n\t\t\t\t<div class=\"input-group\"><input type=\"email\" name=\"\" class=\"form-control\"><span class=\"input-group-btn\"><button class=\"btn btn-default\" type=\"button\">Legg til</button></span></div>\n\t\t\t\t</td></tr>\n\t\t\t</tbody>\n\t\t</table>\n\t</div>\n</div>\n";
;
}
}
+1 -1
View File
@@ -3,7 +3,7 @@
<head lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block "title" %}{% endblock %}</title>
<title>{% block "title" %}Email admin{% endblock %}</title>
<link rel="stylesheet" href="{% static 'dist/styles/main.css' %}" type="text/css">
<script type="text/javascript" src="{% static 'bower_components/jquery/dist/jquery.js' %}"></script>
<script type="text/javascript" src="{% static 'bower_components/underscore/underscore.js' %}"></script>
+5 -5
View File
@@ -2,6 +2,7 @@
{% load bootstrap %}
{% block "body" %}
<div class="container">
<div class="row">
{% if not user.is_authenticated %}
<form method="post">
{{ form|bootstrap }}
@@ -12,11 +13,10 @@
<div class="greeting">Hei, {{ user.username }}</div>
<a href="{% url 'logout' %}">Logg ut</a>.
{% endif %}
<div class="row">
<div class="forwards-container"></div>
</div>
</div>
<div class="row">
<div class="forwards-container"></div>
</div>
<a href="/api/">API</a><br>
</div>
{% endblock %}