From 731399c84a85a43e56d5e0f6a84567d726f33d19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Padilla?= Date: Sun, 15 May 2016 22:25:59 -0400 Subject: [PATCH] Spring cleaning template styles --- .../templates/rest_framework/admin.html | 480 +++++++++--------- .../rest_framework/admin/detail.html | 12 +- .../templates/rest_framework/admin/list.html | 34 +- .../rest_framework/admin/list_value.html | 16 +- .../templates/rest_framework/base.html | 461 +++++++++-------- 5 files changed, 501 insertions(+), 502 deletions(-) diff --git a/rest_framework/templates/rest_framework/admin.html b/rest_framework/templates/rest_framework/admin.html index a21ea57be..cec8f426f 100644 --- a/rest_framework/templates/rest_framework/admin.html +++ b/rest_framework/templates/rest_framework/admin.html @@ -1,252 +1,252 @@ {% load staticfiles %} {% load i18n %} {% load rest_framework %} + - - {% block head %} + + {% block head %} - {% block meta %} - - - {% endblock %} + {% block meta %} + + + {% endblock %} - {% block title %}Django REST framework{% endblock %} - - {% block style %} - {% block bootstrap_theme %} - - - {% endblock %} - - - {% endblock %} + {% block title %}Django REST framework{% endblock %} + {% block style %} + {% block bootstrap_theme %} + + {% endblock %} - + + + {% endblock %} - {% block body %} - - -
- - {% block navbar %} - - {% endblock %} - -
- {% block breadcrumbs %} - - {% endblock %} - - -
- - {% if 'GET' in allowed_methods %} -
-
-
- - -
-
-
- {% endif %} - - {% if post_form %} - - {% endif %} - - {% if put_form %} - - {% endif %} - - {% if delete_form %} -
- -
- {% endif %} - - {% if filter_form %} - - {% endif %} - -
- -
- {% block description %} - {{ description }} - {% endblock %} -
- - {% if paginator %} - - {% endif %} - -
- {% if style == 'list' %} - {% include "rest_framework/admin/list.html" %} - {% else %} - {% include "rest_framework/admin/detail.html" %} - {% endif %} -
- - {% if paginator %} - - {% endif %} -
- -
- -
-
- - - - - - - -{% if error_form %} - - -{% endif %} - -{% if filter_form %}{{ filter_form }}{% endif %} - - {% block script %} - - - - - - - - - {% endblock %} - {% endblock %} + + + {% block body %} + +
+ {% block navbar %} + + {% endblock %} + +
+ {% block breadcrumbs %} + + {% endblock %} + + +
+ {% if 'GET' in allowed_methods %} +
+
+
+ + +
+
+
+ {% endif %} + + {% if post_form %} + + {% endif %} + + {% if put_form %} + + {% endif %} + + {% if delete_form %} +
+ +
+ {% endif %} + + {% if filter_form %} + + {% endif %} + +
+ + +
+ {% block description %} + {{ description }} + {% endblock %} +
+ + {% if paginator %} + + {% endif %} + +
+ {% if style == 'list' %} + {% include "rest_framework/admin/list.html" %} + {% else %} + {% include "rest_framework/admin/detail.html" %} + {% endif %} +
+ + {% if paginator %} + + {% endif %} +
+
+ +
+
+ + + + + + + + {% if error_form %} + + + {% endif %} + + {% if filter_form %} + {{ filter_form }} + {% endif %} + + {% block script %} + + + + + + + + + {% endblock %} + + {% endblock %} diff --git a/rest_framework/templates/rest_framework/admin/detail.html b/rest_framework/templates/rest_framework/admin/detail.html index beac0a708..759fa163d 100644 --- a/rest_framework/templates/rest_framework/admin/detail.html +++ b/rest_framework/templates/rest_framework/admin/detail.html @@ -1,10 +1,10 @@ {% load rest_framework %} - - {% for key, value in results.items %} - {% if key in details %} + + {% for key, value in results.items %} + {% if key in details %} - {% endif %} - {% endfor %} - + {% endif %} + {% endfor %} +
{{ key|capfirst }}{{ value|format_value }}
diff --git a/rest_framework/templates/rest_framework/admin/list.html b/rest_framework/templates/rest_framework/admin/list.html index 048843bb7..6044ebb38 100644 --- a/rest_framework/templates/rest_framework/admin/list.html +++ b/rest_framework/templates/rest_framework/admin/list.html @@ -1,22 +1,22 @@ {% load rest_framework %} - - {% for column in columns%}{% endfor %} - - - {% for row in results %} - - {% for key, value in row.items %} - {% if key in columns %} - - {% endif %} - {% endfor %} - + {% for column in columns%}{% endfor %} + + + {% for row in results %} + + {% for key, value in row.items %} + {% if key in columns %} + - + {% endif %} {% endfor %} - + + + {% endfor %} +
{{ column|capfirst }}
- {{ value|format_value }} - - +
{{ column|capfirst }}
+ {{ value|format_value }}
+ +
diff --git a/rest_framework/templates/rest_framework/admin/list_value.html b/rest_framework/templates/rest_framework/admin/list_value.html index 267bbaa39..5bab6b57a 100644 --- a/rest_framework/templates/rest_framework/admin/list_value.html +++ b/rest_framework/templates/rest_framework/admin/list_value.html @@ -1,11 +1,11 @@ {% load rest_framework %} - - {% for item in value %} - - - - - {% endfor %} - + + {% for item in value %} + + + + + {% endfor %} +
{{ forloop.counter0 }}{{ item|format_value }}
{{ forloop.counter0 }}{{ item|format_value }}
diff --git a/rest_framework/templates/rest_framework/base.html b/rest_framework/templates/rest_framework/base.html index 21431b70c..a75e642e6 100644 --- a/rest_framework/templates/rest_framework/base.html +++ b/rest_framework/templates/rest_framework/base.html @@ -1,185 +1,198 @@ {% load staticfiles %} -{% load rest_framework %} {% load i18n %} +{% load rest_framework %} - - {% block head %} + + {% block head %} - {% block meta %} - - - {% endblock %} - - {% block title %}{% if name %}{{ name }} – {% endif %}Django REST framework{% endblock %} - - {% block style %} - {% block bootstrap_theme %} - - + {% block meta %} + + + {% endblock %} + + {% block title %}{% if name %}{{ name }} – {% endif %}Django REST framework{% endblock %} + + {% block style %} + {% block bootstrap_theme %} + + + {% endblock %} + + + {% endblock %} - - {% endblock %} + - {% endblock %} - + {% block body %} + -{% block body %} - - -
- {% block navbar %} -