From 9bcff7cd5ffd06854adafce37296668e4c5dcd13 Mon Sep 17 00:00:00 2001 From: warlordjones Date: Wed, 2 Oct 2019 12:40:55 +0100 Subject: [PATCH] Supplier bootstrap port --- assets/templates/asset_list.html | 4 +- assets/templates/helpers/render_field.html | 22 +++++----- assets/templates/supplier_list.html | 49 ++++++++++++---------- assets/templates/supplier_update.html | 18 ++++---- 4 files changed, 48 insertions(+), 45 deletions(-) diff --git a/assets/templates/asset_list.html b/assets/templates/asset_list.html index ca977980..ded3e939 100644 --- a/assets/templates/asset_list.html +++ b/assets/templates/asset_list.html @@ -17,7 +17,7 @@ - +
@@ -33,7 +33,7 @@
Asset ID
{% if is_paginated %} -
+
{% paginator %}
{% endif %} diff --git a/assets/templates/helpers/render_field.html b/assets/templates/helpers/render_field.html index 6397415d..e372f92c 100644 --- a/assets/templates/helpers/render_field.html +++ b/assets/templates/helpers/render_field.html @@ -1,15 +1,15 @@ {% load widget_tweaks %} -
- {% if css %} - {% render_field field|add_class:css %} - {% elif disable_if_filled and field.value %} - {% render_field field|attr:'disabled' %} - {% elif css and disable_if_filled %} - {% render_field field|add_class:css|attr:'disabled' %} - {% else %} - {{ field }} - {% endif %} +
+ {% if css %} + {% render_field field|add_class:'form-control' %} + {% elif disable_if_filled and field.value %} + {% render_field field|attr:'disabled'|add_class:'form-control' %} + {% elif css and disable_if_filled %} + {% render_field field|add_class:'form-control'|attr:'disabled' %} + {% else %} + {{ field|add_class:'form-control' }} + {% endif %} -
\ No newline at end of file +
diff --git a/assets/templates/supplier_list.html b/assets/templates/supplier_list.html index 5b37dadf..2affb7f8 100644 --- a/assets/templates/supplier_list.html +++ b/assets/templates/supplier_list.html @@ -1,29 +1,36 @@ {% extends 'base_assets.html' %} {% block title %}List{% endblock %} +{% load paginator from filters %} {% block content %} -

Supplier List

+ - - - - - - - - - {% for item in object_list %} - - - - - {% endfor %} - -
SupplierQuick Links
{{ item.name }} - edit -
+ + + + + + + + + {% for item in object_list %} + + + + + {% endfor %} + +
SupplierQuick Links
{{ item.name }} + Edit +
- {% include 'helpers/paginator.html' %} +{% if is_paginated %} +
+ {% paginator %} +
+{% endif %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/assets/templates/supplier_update.html b/assets/templates/supplier_update.html index 2f120369..dfc8cc54 100644 --- a/assets/templates/supplier_update.html +++ b/assets/templates/supplier_update.html @@ -3,22 +3,18 @@ {% block content %} -

- Supplier +

+
{% csrf_token %} - {{ form }} - +
-{% endblock %} \ No newline at end of file +{% endblock %}