From fb1c34e7aeac67a75c29a132ded87edeb557cdaf Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 15 Oct 2014 00:17:53 -0400 Subject: Improve UI for enabling/disabling plugins config Use the same templates for both info and login plugins Signed-off-by: Simo Sorce Reviewed-by: Patrick Uiterwijk --- templates/admin/plugins.html | 108 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 templates/admin/plugins.html (limited to 'templates/admin/plugins.html') diff --git a/templates/admin/plugins.html b/templates/admin/plugins.html new file mode 100644 index 0000000..7bbe544 --- /dev/null +++ b/templates/admin/plugins.html @@ -0,0 +1,108 @@ +{% extends "master-admin.html" %} +{% block main %} +{% if user.is_admin %} + +
+
+

{{ title }}

+
+ +
+ + + {% for p in enabled %} + + {% endfor %} + + {% for p in available if not p in enabled %} + + {% endfor %} + + +
+
+
+ {{ p }} +
+
+
+
+ Disable +
+
+ {%- if available[p].get_config_desc() %} + Configure + {% endif %} +
+
+
+
+ {%- if not (loop.first and loop.last) %} +
+ {%- set outer_loop = loop %} + {%- for move in ['↑', '↓'] %} + {%- if move == '↑' %} + {%- if outer_loop.first %} + {%- set state='disabled' %} + {%- else %} + {%- set state='btn-default' %} + {%- set idx0=outer_loop.index0-1 %} + {%- set idx1=outer_loop.index0 %} + {%- endif %} + {%- else %} + {%- if outer_loop.last %} + {%- set state='disabled' %} + {%- else %} + {%- set state='btn-default' %} + {%- set idx0=outer_loop.index0 %} + {%- set idx1=outer_loop.index0+1 %} + {%- endif %} + {%- endif %} + + {%- endfor %} +
+ {%- endif %} +
+
+
+
+
+ {{ p }} +
+
+
+
+ Enable +
+
+ {%- if available[p].get_config_desc() %} + Configure + {% endif %} +
+
+
+
+
+
+
+
+ +{% endif %} +{% endblock %} -- cgit