From 852b4d626cddac12fa8097be6bcff183f228bf52 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 18 May 2017 23:26:05 +0200 Subject: okpush --- lib/okpush/templates/index.liquid | 76 ++++++ lib/okpush/templates/partials/flash.liquid | 20 ++ lib/okpush/templates/partials/head.liquid | 13 + lib/okpush/templates/partials/inputs.liquid | 395 ++++++++++++++++++++++++++++ lib/okpush/templates/partials/tail.liquid | 14 + 5 files changed, 518 insertions(+) create mode 100644 lib/okpush/templates/index.liquid create mode 100644 lib/okpush/templates/partials/flash.liquid create mode 100644 lib/okpush/templates/partials/head.liquid create mode 100644 lib/okpush/templates/partials/inputs.liquid create mode 100644 lib/okpush/templates/partials/tail.liquid (limited to 'lib/okpush/templates') diff --git a/lib/okpush/templates/index.liquid b/lib/okpush/templates/index.liquid new file mode 100644 index 0000000..124fb4e --- /dev/null +++ b/lib/okpush/templates/index.liquid @@ -0,0 +1,76 @@ +{% include 'partials/head' %} + +{% include 'partials/flash' %} + + + + + +
+ +

Push Notifications

+ + + + + + + + + + {% for pair in notifications %} + {% assign name = pair[0] %} + {% assign spec = pair[1] %} + + + + + + + + {% endfor %} +
KeyMessageLast PushTokens
+ {{name | capitalize}} + + {{spec.alert}} + + {% unless spec.last_push %} + Never + {% else %} + {{ spec.last_push | date: "%a %d-%b-%Y %H:%M" }} + {% endunless %} + + {{spec.count}} + + +
+ +
+ +{% include 'partials/tail' %} + + \ No newline at end of file diff --git a/lib/okpush/templates/partials/flash.liquid b/lib/okpush/templates/partials/flash.liquid new file mode 100644 index 0000000..e51a86b --- /dev/null +++ b/lib/okpush/templates/partials/flash.liquid @@ -0,0 +1,20 @@ +{% if success.length > 0 %} +
+
Changes saved.
+ +
+{% endif %} + +{% if errors.length > 0 %} +
+ {% for error in errors %} +
+
{{error.message}}
+
+ {% endfor %} +
+{% endif %} \ No newline at end of file diff --git a/lib/okpush/templates/partials/head.liquid b/lib/okpush/templates/partials/head.liquid new file mode 100644 index 0000000..e9c27dc --- /dev/null +++ b/lib/okpush/templates/partials/head.liquid @@ -0,0 +1,13 @@ + + + + + {{meta.project}} Admin + + + +
+ {{meta.project}} Admin + View Site +
+
\ No newline at end of file diff --git a/lib/okpush/templates/partials/inputs.liquid b/lib/okpush/templates/partials/inputs.liquid new file mode 100644 index 0000000..60466de --- /dev/null +++ b/lib/okpush/templates/partials/inputs.liquid @@ -0,0 +1,395 @@ +{% for pair in resource.spec %} + {% assign name = pair[0] %} + {% assign spec = pair[1] %} + {% assign type = spec.type %} + +
+ + + {% if type == 'string' %} + + {% elsif type == 'text' %} + + {% elsif type == 'number' %} + + {% elsif type == 'enum' or type == 'foreign-key' %} + + {% elsif type == 'video' %} +
+ + + + + + + + + +
+ {% elsif type == 'image' %} +
+
+
+ + +
+ +
+
+ + + + + {{spec.value.caption | escape}} + +
+
+ + {% elsif type == 'date' %} + +
+ +
+ + {% elsif type == 'flag' %} + +
+ +
+ + {% elsif type == 'tag-list' %} +
+ +
+ + {% elsif type == 'link-list' %} + + + {% elsif type == 'media-list' or type == 'media' %} +
+
+
+ + +
+ +
+ + + + + + + + + +
    + {% for image in spec.value %} + {% if image.type and (image.type == "vimeo" or image.type == "youtube" or image.type == "video") %} +
  1. +
    + + + + + + + + + + + + + + + +
    + + +
  2. + {% elsif image.type and (image.type == "audio" or image.type == "soundcloud") %} +
  3. +
    + + + + + + + + +
    + + +
  4. + {% elsif image.type and image.type == "link" %} + + {% else %} +
  5. + + + + + + + {{image.caption | strip_html}} + +
  6. + {% endif %} + {% endfor %} +
+
+ {% elsif type == 'captioned-image-list' or type == 'gallery' %} +
+
+
+ + +
+ +
+ + + +
    + {% for image in spec.value %} +
  1. + + + + + {{image.caption | strip_html}} + +
  2. + {% endfor %} +
+
+ {% elsif type == 'double-captioned-image-list' %} +
+
+
+ + +
+ +
+ + + +
    + {% for image in spec.value %} +
  1. + {{image.caption | strip_html}} + + + + + + +
  2. + {% endfor %} +
+
+ {% elsif type == 'triple-captioned-image-list' %} +
+
+
+ + +
+ +
+ + + +
    + {% for image in spec.value %} +
  1. + {{image.caption | strip_html}} + + + + + + + +
  2. + {% endfor %} +
+
+ {% elsif type == 'meta' %} + + {% else %} +

Admin template doesn't support '{{type}}' properties!

+ {% endif %} +
+ +{% endfor %} diff --git a/lib/okpush/templates/partials/tail.liquid b/lib/okpush/templates/partials/tail.liquid new file mode 100644 index 0000000..522023b --- /dev/null +++ b/lib/okpush/templates/partials/tail.liquid @@ -0,0 +1,14 @@ +
{% comment %} closes container tag {% endcomment %} +
+
+ + + + + + + + -- cgit v1.2.3-70-g09d2