summaryrefslogtreecommitdiff
path: root/examples/lib/okpush/templates
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-10-06 14:46:54 -0400
committerJules Laplace <jules@okfoc.us>2016-10-06 14:46:54 -0400
commitc8c0b465d9796b526d268ea0e641fd7ba00e44bb (patch)
tree5887519533426d0a4ac58c090f593e5ece0611b7 /examples/lib/okpush/templates
parentf8bbee2634329595711d33ae82923f23a3ddb7fc (diff)
displaying list of notifications, slight css tweaks
Diffstat (limited to 'examples/lib/okpush/templates')
-rw-r--r--examples/lib/okpush/templates/index.liquid63
1 files changed, 62 insertions, 1 deletions
diff --git a/examples/lib/okpush/templates/index.liquid b/examples/lib/okpush/templates/index.liquid
index 388a95b..e0547c3 100644
--- a/examples/lib/okpush/templates/index.liquid
+++ b/examples/lib/okpush/templates/index.liquid
@@ -2,10 +2,71 @@
{% include 'partials/flash' %}
+<style>
+th {
+ min-width: 100px;
+ text-align: left;
+ background: #ddd;
+}
+th:nth-child(2) {
+ min-width: 300px;
+}
+table,tr,th,td {
+ margin: 0;
+ padding: 0;
+}
+th,td {
+ padding: 5px;
+}
+tr:nth-child(2n+1) {
+ background: #f8f8f8;
+}
+</style>
+
<nav class="resource-nav">
+ <a href="/admin/" class="btn">Back</a>
</nav>
-<section class="main resource resource-new">
+<section class="main resource">
+
+ <h2>Push Notifications</h2>
+
+ <table class="notifications" cellpadding="0" cellspacing="0">
+ <tr>
+ <th>Key</th>
+ <th>Message</th>
+ <th>Last Push</th>
+ <th></th>
+ </tr>
+ {% for pair in notifications %}
+ {% assign name = pair[0] %}
+ {% assign spec = pair[1] %}
+ <tr>
+ <td>
+ {{name | escape}}
+ </td>
+ <td>
+ {{spec.alert}}
+ </td>
+ <td>
+ {% unless spec.last_fired %}
+ Never
+ {% else %}
+ {{spec.last_fired}}
+ {% endunless %}
+ </td>
+ <td>
+ <button data-key="{{name}}" class="btn">send</button>
+ </td>
+ </tr>
+ {% endfor %}
+ </table>
+
</section>
+<script>
+$(function(){
+ $("
+})
+</script>
{% include 'partials/tail' %}