From 99b52607ee7ab82cc2b166f99c077ee53375fe1a Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 31 Mar 2015 16:35:15 -0400 Subject: Merge the login and info plugins configurations Having separate login and info plugins configuration pages doesn't really make a lot of sense. As a first step moving towards login stacks put login and info plugin configuration into a common "Login Stack" menu item. https://fedorahosted.org/ipsilon/ticket/117 Signed-off-by: Simo Sorce Reviewed-by: Rob Crittenden --- templates/admin/ipsilon-scheme.svg | 4 +- templates/admin/loginstack.html | 117 +++++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+), 2 deletions(-) create mode 100644 templates/admin/loginstack.html (limited to 'templates') diff --git a/templates/admin/ipsilon-scheme.svg b/templates/admin/ipsilon-scheme.svg index 6f7fec7..ef2ae80 100644 --- a/templates/admin/ipsilon-scheme.svg +++ b/templates/admin/ipsilon-scheme.svg @@ -541,7 +541,7 @@ rect:hover { fill-opacity:0;stroke-opacity:1.0; } inkscape:connector-curvature="0" sodipodi:nodetypes="cscccsccc" /> @@ -645,7 +645,7 @@ rect:hover { fill-opacity:0;stroke-opacity:1.0; } y="490" /> diff --git a/templates/admin/loginstack.html b/templates/admin/loginstack.html new file mode 100644 index 0000000..da394e3 --- /dev/null +++ b/templates/admin/loginstack.html @@ -0,0 +1,117 @@ +{% extends "master-admin.html" %} +{% block main %} +{% if user.is_admin %} + +
+ +
+ + {% for s in sections %} +
+
+

{{ s["title"] }}

+
+
+ {% for p in s["enabled"] %} + {% set highlight = "hl-enabled" %} + {% if p in s["changed"] %} + {% if s["changed"][p] == 'enabled' %} + {% set highlight = "hl-enabled-new" %} + {% elif s["changed"][p] == 'reordered' %} + {% set highlight = "hl-enabled-flash" %} + {% endif %} + {% endif %} +
+
+

{{ p }}

+
+
+
+ +
+ {%- if s["available"][p].get_config_obj() %} +

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 %} +
+
+ {% endfor %} + + {% for p in s["available"] if not p in s["enabled"] %} + {% set highlight = "hl-disabled" %} + {% if p in s["changed"] %} + {% if s["changed"][p] == 'disabled' %} + {% set highlight = "hl-disabled-new" %} + {% endif %} + {% endif %} +
+
+ {{ p }} +
+
+
+
+ Enable +
+
+ {%- if s["available"][p].get_config_obj() %} + Configure + {% endif %} +
+
+
+
+
+
+ {% endfor %} + {% endfor %} + +{% endif %} +{% endblock %} -- cgit