mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
*Replace more links with &ui_link call
This commit is contained in:
@@ -29,8 +29,7 @@ if (@profiles) {
|
||||
$text{'index_files'} ], 100, 0, \@tds);
|
||||
foreach $p (@profiles) {
|
||||
local @cols;
|
||||
push(@cols, "<a href='edit_profile.cgi?id=$p->{'id'}'>".
|
||||
"$p->{'name'}</a>");
|
||||
push(@cols, &ui_link("edit_profile.cgi?id=$p->{'id'}","$p->{'name'}"));
|
||||
push(@cols, $text{'index_type'.$p->{'type'}});
|
||||
if ($p->{'type'} == 1) {
|
||||
push(@cols, $p->{'iso'});
|
||||
|
||||
@@ -46,8 +46,7 @@ if (@jobs) {
|
||||
else {
|
||||
push(@cols, join(", ", @servers));
|
||||
}
|
||||
push(@cols, "<a href='exec.cgi?id=$j->{'cluster_id'}'>".
|
||||
"$text{'index_run'}</a>");
|
||||
push(@cols, &ui_link("exec.cgi?id=$j->{'cluster_id'}",$text{'index_run'}));
|
||||
print &ui_checked_columns_row(
|
||||
\@cols,
|
||||
[ "width=5", undef, undef, undef, undef, "width=10" ],
|
||||
|
||||
@@ -47,8 +47,7 @@ if (@$users) {
|
||||
print "<tr $cb> <td><table width=100%>\n";
|
||||
for($i=0; $i<@$users; $i++) {
|
||||
$u = $users->[$i];
|
||||
$link = "<a href='edit.cgi?idx=$u->{'index'}'>".
|
||||
"$u->{'user'}</a>";
|
||||
$link = &ui_link("edit.cgi?idx=$u->{'index'}","$u->{'user'}");
|
||||
print "<tr>\n" if ($i%4 == 0);
|
||||
if ($u->{'enabled'}) {
|
||||
print "<td width=25%>$link</td>\n";
|
||||
|
||||
@@ -31,10 +31,8 @@ print &ui_columns_start([ $editable ? ( "" ) : ( ),
|
||||
@files = sort { &schema_sorter } &list_schema_files();
|
||||
for($i=0; $i<@files; $i++) {
|
||||
$s = $files[$i];
|
||||
@acts = ( "<a href='view_sfile.cgi?file=".&urlize($s->{'file'})."'>".
|
||||
"$text{'schema_view'}</a>",
|
||||
"<a href='edit_sfile.cgi?file=".&urlize($s->{'file'})."'>".
|
||||
"$text{'schema_edit'}</a>" );
|
||||
@acts = ( &ui_link("view_sfile.cgi?file=".&urlize($s->{'file'})."",$text{'schema_view'}),
|
||||
&ui_link("edit_sfile.cgi?file=".&urlize($s->{'file'})."",$text{'schema_edit'}) );
|
||||
if ($incs{$s->{'file'}}) {
|
||||
$mover = &ui_up_down_arrows(
|
||||
"up_schema.cgi?file=".&urlize($s->{'file'}),
|
||||
|
||||
@@ -117,17 +117,14 @@ print &ui_form_start("delete_bifcs.cgi", "post");
|
||||
if ($allow_add) {
|
||||
push(@links, &ui_link("edit_bifc.cgi?new=1",$text{'ifcs_add'}));
|
||||
if (defined(&supports_bonding) && &supports_bonding()) {
|
||||
push(@links, "<a href='edit_bifc.cgi?new=1&bond=1'>".
|
||||
"$text{'bonding_add'}</a>");
|
||||
push(@links, &ui_link("edit_bifc.cgi?new=1&bond=1",$text{'bonding_add'}));
|
||||
}
|
||||
if (defined(&supports_vlans) && &supports_vlans()) {
|
||||
push(@links, "<a href='edit_bifc.cgi?new=1&vlan=1'>".
|
||||
"$text{'vlan_add'}</a>");
|
||||
push(@links, &ui_link("edit_bifc.cgi?new=1&vlan=1",$text{'vlan_add'}));
|
||||
}
|
||||
}
|
||||
if ($allow_add && defined(&supports_bridges) && &supports_bridges()) {
|
||||
push(@links, "<a href='edit_bifc.cgi?new=1&bridge=1'>".
|
||||
"$text{'ifcs_badd'}</a>");
|
||||
push(@links, &ui_link("edit_bifc.cgi?new=1&bridge=1",$text{'ifcs_badd'}));
|
||||
}
|
||||
if ($allow_add && defined(&supports_ranges) && &supports_ranges()) {
|
||||
push(@links, &ui_link("edit_range.cgi?new=1",$text{'ifcs_radd'}));
|
||||
|
||||
@@ -36,12 +36,10 @@ print &ui_hidden("file", $in{'id'});
|
||||
|
||||
# Start of headers section
|
||||
if ($in{'headers'}) {
|
||||
$rlink = "<a href='view_mailq.cgi?id=$in{'id'}&headers=0$subs'>".
|
||||
"$text{'view_noheaders'}</a>";
|
||||
$rlink = &ui_link("view_mailq.cgi?id=$in{'id'}&headers=0$subs",$text{'view_noheaders'});
|
||||
}
|
||||
else {
|
||||
$rlink = "<a href='view_mailq.cgi?id=$in{'id'}&headers=1$subs'>".
|
||||
"$text{'view_allheaders'}</a>";
|
||||
$rlink = &ui_link("view_mailq.cgi?id=$in{'id'}&headers=1$subs",$text{'view_allheaders'});
|
||||
}
|
||||
print &ui_table_start($text{'view_headers'}, "width=100%", 2, undef, $rlink);
|
||||
|
||||
|
||||
@@ -148,16 +148,13 @@ for($i=0; $i<=@values; $i++) {
|
||||
local $valtxt = &ui_textbox("val_$i", $val, 30);
|
||||
local $edlnk;
|
||||
if ($type == 2 && $a) {
|
||||
$edlnk = "<a href='edit_afile.cgi?file=$val&num=$a->{'num'}'>".
|
||||
"$text{'aform_afile'}</a>\n";
|
||||
$edlnk = &ui_link("edit_afile.cgi?file=$val&num=$a->{'num'}",$text{'aform_afile'})\n";
|
||||
}
|
||||
elsif ($type == 5 && $a) {
|
||||
$edlnk = "<a href='edit_rfile.cgi?file=$val&num=$a->{'num'}'>".
|
||||
"$text{'aform_afile'}</a>\n";
|
||||
$edlnk = &ui_link("edit_rfile.cgi?file=$val&num=$a->{'num'}",$text{'aform_afile'})\n";
|
||||
}
|
||||
elsif ($type == 6 && $a) {
|
||||
$edlnk = "<a href='edit_ffile.cgi?file=$val&num=$a->{'num'}'>".
|
||||
"$text{'aform_afile'}</a>\n";
|
||||
$edlnk = &ui_link("edit_ffile.cgi?file=$val&num=$a->{'num'}",$text{'aform_afile'})\n";
|
||||
}
|
||||
print &ui_table_row(&hlink($text{'aform_val'},"alias_to"),
|
||||
$typesel."\n".$valtxt."\n".$edlnk);
|
||||
|
||||
@@ -18,8 +18,7 @@ if (@tmpls) {
|
||||
$msg = $tmpl->{'email'};
|
||||
$msg = substr($msg, 0, 80)." ..." if (length($msg) > 80);
|
||||
print &ui_checked_columns_row(
|
||||
[ "<a href='edit_tmpl.cgi?id=$tmpl->{'id'}'>".
|
||||
"$tmpl->{'desc'}</a>", &html_escape($msg) ],
|
||||
[ &ui_link("edit_tmpl.cgi?id=$tmpl->{'id'}","$tmpl->{'desc'}"), &html_escape($msg) ],
|
||||
\@tds, "d", $tmpl->{'id'});
|
||||
}
|
||||
print &ui_columns_end();
|
||||
|
||||
@@ -28,8 +28,7 @@ foreach my $type ('allow', 'deny') {
|
||||
push(@table, [
|
||||
{ 'type' => 'checkbox', 'name' => 'd',
|
||||
'value' => $r->{'id'} },
|
||||
"<a href='edit_rule.cgi?$type=1&id=$r->{'id'}'>".
|
||||
"$r->{'service'}</a>",
|
||||
&ui_link("edit_rule.cgi?$type=1&id=$r->{'id'}","$r->{'service'}"),
|
||||
$r->{'host'},
|
||||
$r->{'cmd'} ? join("<br>", split /:/, $r->{'cmd'})
|
||||
: $text{'index_none'},
|
||||
|
||||
@@ -16,8 +16,7 @@ foreach $m (@mods) {
|
||||
if ((-r "$miniserv{'root'}/$m->{'dir'}/config.info" ||
|
||||
-r "$miniserv{'root'}/$m->{'dir'}/uconfig.info") &&
|
||||
&can_use_module($m->{'dir'})) {
|
||||
push(@grid, "<a href='edit_configs.cgi?mod=$m->{'dir'}'>".
|
||||
"$m->{'desc'}</a>");
|
||||
push(@grid, &ui_link("edit_configs.cgi?mod=$m->{'dir'}","$m->{'desc'}"));
|
||||
}
|
||||
}
|
||||
print &ui_grid_table(\@grid, 4, 100,
|
||||
|
||||
Reference in New Issue
Block a user