Re-position some links
authorJamie Cameron <jcameron@webmin.com>
Wed, 27 Feb 2008 22:48:40 +0000 (22:48 +0000)
committerJamie Cameron <jcameron@webmin.com>
Wed, 27 Feb 2008 22:48:40 +0000 (22:48 +0000)
ldap-useradmin/index.cgi
useradmin/index.cgi
useradmin/user-lib.pl

index f377b82..7ae6acf 100755 (executable)
@@ -180,7 +180,9 @@ if ($ucount > $mconfig{'display_max'}) {
 elsif (@ulist) {
        # Show table of all users
        @ulist = &useradmin::sort_users(\@ulist, $mconfig{'sort_mode'});
-       &useradmin::users_table(\@ulist, $form++, 1, 0, \@links);
+       @left = grep { !/batch_form|export_form/ } @links;
+       @right = grep { /batch_form|export_form/ } @links;
+       &useradmin::users_table(\@ulist, $form++, 1, 0, \@left, \@right);
        }
 else {
        # No users
index c47df18..86843a1 100755 (executable)
@@ -92,7 +92,10 @@ elsif (@ulist) {
                }
        elsif ($config{'display_mode'} == 1) {
                # Show names, real names, home dirs and shells
-               &users_table(\@ulist, $formno++, 0, 0, [ &get_user_buttons() ]);
+               @b = &get_user_buttons();
+               @left = grep { !/batch_form|export_form/ } @b;
+               @right = grep { /batch_form|export_form/ } @b;
+               &users_table(\@ulist, $formno++, 0, 0, \@left, \@right);
                $no_user_buttons = 1;
                }
        else {
@@ -247,7 +250,10 @@ return @rv;
 sub show_user_buttons
 {
 local @b = &get_user_buttons();
-print &ui_links_row(\@b);
+local @left = grep { !/batch_form|export_form/ } @b;
+local @right = grep { /batch_form|export_form/ } @b;
+local @grid = ( &ui_links_row(\@left), &ui_links_row(\@right) );
+print &ui_grid_table(\@grid, 2, 100, [ "align=left", "align=right" ]);
 }
 
 sub get_group_buttons
index cb19551..171e127 100644 (file)
@@ -1686,12 +1686,13 @@ sub berkeley_cksum {
     return sprintf("%lu",${crc});;
 }
 
-# users_table(&users, [form], [no-last], [no-boxes], [&otherlinks])
+# users_table(&users, [form], [no-last], [no-boxes], [&otherlinks],
+#            [&rightlinks])
 # Prints a table listing full user details, with checkboxes and buttons to
 # delete or disable multiple at once.
 sub users_table
 {
-local ($users, $formno, $nolast, $noboxes, $links) = @_;
+local ($users, $formno, $nolast, $noboxes, $links, $rightlinks) = @_;
 
 local (@ginfo, %gidgrp);
 &my_setgrent();
@@ -1716,7 +1717,8 @@ if ($anyedit) {
                        &select_invert_link("d", $_[1]));
        }
 push(@linksrow, @$links);
-print &ui_links_row(\@linksrow);
+local @grid = ( &ui_links_row(\@linksrow), &ui_links_row($rightlinks) );
+print &ui_grid_table(\@grid, 2, 100, [ "align=left", "align=right" ]);
 
 local @tds = $anyedit ? ( "width=5" ) : ( );
 push(@tds, "width=15%", "width=10%");