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
}
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 {
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
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();
&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%");