diff --git a/powerdnsadmin/templates/template.html b/powerdnsadmin/templates/template.html index 165d828..3776d93 100644 --- a/powerdnsadmin/templates/template.html +++ b/powerdnsadmin/templates/template.html @@ -1,148 +1,157 @@ {% extends "base.html" %} - {% set active_page = "admin_domain_template" %} - -{% block title %} - - Templates - {{ SITE_NAME }} - -{% endblock %} +{% block title %}Zone Templates - {{ SITE_NAME }}{% endblock %} {% block dashboard_stat %} - -
-
-
-
-

- Templates - List -

-
-
- -
+
+
+
+
+

Zone Templates

+
+
+ +
+
+
-
-
- {% endblock %} {% block content %} -
-
- {% with errors = get_flashed_messages(category_filter=["error"]) %} - {% if errors %} -
-
-
- -

- Error! -

-
- x -
    - {%- for msg in errors %} -
  • {{ msg }}
  • - {% endfor -%} -
-
+
+
+ {% with errors = get_flashed_messages(category_filter=["error"]) %} + {% if errors %} +
+
+
+ +

+ Error! +

+
+ x +
    + {%- for msg in errors %} +
  • {{ msg }}
  • + {% endfor -%} +
+
+
+
+
+ {% endif %} + {% endwith %} + +
+
+
+
+

Templates

+ +
+ +
+ + + + + + + + + + + {% for template in templates %} + + + + + + + {% endfor %} + +
NameDescriptionTotal RecordsActions
+ + {{ template.name }} + + {{ template.description }}{{ template.records|count }} + +
+
+ +
+ +
+
-
+
- {% endif %} - {% endwith %} -
-
-
- -
- - - - - - - - - - - {% for template in templates %} - - - - - - - {% endfor %} - -
NameDescriptionNumber of RecordsActions
- - {{ template.name }} - - - {{ template.description }} - - {{ template.records|count }} - - -
-
-
-
-
-
-
+ + +{% endblock %} + +{% block head_styles %} + {% endblock %} {% block extrascripts %} - + // handle delete button + $(document.body).on("click", ".button_delete", function (e) { + var template = $(this).prop('id'); + $.post($SCRIPT_ROOT + '/admin/template/' + template + '/delete', { + '_csrf_token': '{{ csrf_token() }}' + }, function () { + window.location.href = '{{ url_for('admin.templates') }}'; + }); + }); + {% endblock %} {% block modals %}