From 06e54482cc41a9121641dff848383cbffb2f90e2 Mon Sep 17 00:00:00 2001 From: flop25 Date: Thu, 29 Nov 2012 17:23:37 +0000 Subject: bug:2425 New interface like the Batch Mananger : select menu and js to handle the actions git-svn-id: http://piwigo.org/svn/trunk@19230 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/themes/default/template/group_list.tpl | 212 +++++++++++++++++++++++---- 1 file changed, 187 insertions(+), 25 deletions(-) diff --git a/admin/themes/default/template/group_list.tpl b/admin/themes/default/template/group_list.tpl index 1d89362ce..d629dd4c0 100644 --- a/admin/themes/default/template/group_list.tpl +++ b/admin/themes/default/template/group_list.tpl @@ -1,3 +1,52 @@ +{footer_script} +{literal} +$(document).ready(function() { + + $(".grp_action").hide(); + $("input[name=group_selection]").click(function() { + + var nbSelected = 0; + nbSelected = $("input[name=group_selection]").filter(':checked').length; + + if (nbSelected == 0) { + $("#permitAction").hide(); + $("#forbidAction").show(); + } + else { + $("#permitAction").show(); + $("#forbidAction").hide(); + } + $("p[group_id="+$(this).attr("value")+"]").each(function () { + $(this).toggle(); + }); + + if (nbSelected<2) { + $("#two_to_select").show(); + $("#two_atleast").hide(); + } + else { + $("#two_to_select").hide(); + $("#two_atleast").show(); + } + }); + $("[id^=action_]").hide(); + $("select[name=selectAction]").change(function () { + $("[id^=action_]").hide(); + $("#action_"+$(this).attr("value")).show(); + if ($(this).val() != -1) { + $("#applyActionBlock").show(); + } + else { + $("#applyActionBlock").hide(); + } + }); +}); + +{/literal} +{/footer_script} + + +

{'Group management'|@translate}

@@ -14,29 +63,142 @@ +
+ + + + + + + + + + {if not empty($groups)} + {foreach from=$groups item=group name=group_loop} + + + + + + + {/foreach} + {/if} +
{'Group name'|@translate}{'Members'|@translate}{'Actions'|@translate}
{$group.NAME}{$group.IS_DEFAULT}{$group.MEMBERS} + + {'Permissions'|@translate} + + {'Delete'|@translate} + + {'Toggle \'default group\' property'|@translate} +
+ +
+ {'Action'|@translate} + + +
+
+ \ No newline at end of file -- cgit v1.2.3