From 68f82549a1e0263fe24ce7ad078a57b37fed6aae Mon Sep 17 00:00:00 2001 From: Matt Webb Date: Sun, 1 Mar 2015 15:32:23 +0000 Subject: [PATCH] making the send message interface a little prettier --- sirius/web/printer_print.py | 2 +- sirius/web/templates/claim.html | 8 ++- sirius/web/templates/landing.html | 2 +- sirius/web/templates/printer_overview.html | 11 ++-- sirius/web/templates/printer_print.html | 71 ++++++++++++---------- 5 files changed, 56 insertions(+), 38 deletions(-) diff --git a/sirius/web/printer_print.py b/sirius/web/printer_print.py index f014954..69bcc64 100644 --- a/sirius/web/printer_print.py +++ b/sirius/web/printer_print.py @@ -130,4 +130,4 @@ def preview(user_id, username, printer_id): stats.inc('printer.preview') - return ''.format(base64.b64encode(png.getvalue())) + return ''.format(base64.b64encode(png.getvalue())) diff --git a/sirius/web/templates/claim.html b/sirius/web/templates/claim.html index d21b4f4..2903bd1 100644 --- a/sirius/web/templates/claim.html +++ b/sirius/web/templates/claim.html @@ -3,6 +3,9 @@ {% block title %}Overview{% endblock %} {% block page_content %} +
+
+

Claim a printer

{{ form.csrf_token }} @@ -30,6 +33,9 @@ {% endif %} {{ form.printer_name(class="form-control") }}
- + + +
+ {% endblock %} diff --git a/sirius/web/templates/landing.html b/sirius/web/templates/landing.html index 33177f9..1ccabad 100644 --- a/sirius/web/templates/landing.html +++ b/sirius/web/templates/landing.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% block title %}Sirius - Index{% endblock %} +{% block title %}Little Printer{% endblock %} {% block page_content %}
diff --git a/sirius/web/templates/printer_overview.html b/sirius/web/templates/printer_overview.html index 7332159..53dc297 100644 --- a/sirius/web/templates/printer_overview.html +++ b/sirius/web/templates/printer_overview.html @@ -28,9 +28,10 @@

Recent messages

{% for m in messages %} -

- -
+

+ +
+

From @{{ m.sender.username }} at {% if m.response_timestamp == None %} (still sending) @@ -41,7 +42,9 @@
Message failed: {{ m.failure_message }} {% endif %} -

+

+
+
{% endfor %} {% endif %} diff --git a/sirius/web/templates/printer_print.html b/sirius/web/templates/printer_print.html index c6e2f1e..75dce3a 100644 --- a/sirius/web/templates/printer_print.html +++ b/sirius/web/templates/printer_print.html @@ -3,39 +3,48 @@ {% block title %}Print{% endblock %} {% block page_content %} -

Print a thing on {{ printer.name }}

+
+
-
- {{ form.csrf_token }} -
- - {% if form.target_printer.errors %} -
    - {% for error in form.target_printer.errors %} -
  • {{ error }}
  • - {% endfor %} -
- {% endif %} - {{ form.target_printer(class="form-control") }} -
-
- - {% if form.message.errors %} -
    - {% for error in form.message.errors %} -
  • {{ error }}
  • - {% endfor %} -
- {% endif %} - {{ form.message(class="form-control") }} -
- -
-
- +

Send message

-Preview: -
+
+ {{ form.csrf_token }} +
+ + {% if form.target_printer.errors %} +
    + {% for error in form.target_printer.errors %} +
  • {{ error }}
  • + {% endfor %} +
+ {% endif %} + {{ form.target_printer(class="form-control") }} +
+
+ + {% if form.message.errors %} +
    + {% for error in form.message.errors %} +
  • {{ error }}
  • + {% endfor %} +
+ {% endif %} + {{ form.message(class="form-control") }} +
+ + +
+ +

 

+

+ Preview +

+
+
+
+ +
{% endblock %} -- 2.47.3