mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 06:03:28 +00:00
ui_link conversion -> software
This commit is contained in:
@@ -62,9 +62,8 @@ else {
|
||||
$packages{$i,'version'} ne $vers[$j] ||
|
||||
$packages{$i,'name'} ne $pkgs[$j]);
|
||||
local @cols;
|
||||
push(@cols, "<a href=\"edit_pack.cgi?package=".
|
||||
&urlize($pkgs[$j])."&version=".&urlize($vers[$j]).
|
||||
"\">$pkgs[$j]</a>");
|
||||
push(@cols, &ui_link("edit_pack.cgi?package=".
|
||||
&urlize($pkgs[$j])."&version=".&urlize($vers[$j]), $pkgs[$j]) );
|
||||
$c = $packages{$i,'class'};
|
||||
push(@cols, $c || $text{'file_none'});
|
||||
push(@cols, $packages{$i,'desc'});
|
||||
|
||||
@@ -55,7 +55,7 @@ if (defined($search)) {
|
||||
$sel = $a->{'select'} || $a->{'name'};
|
||||
$epoch = $a->{'epoch'} ? "$a->{'epoch'}:" : "";
|
||||
print &ui_columns_row(
|
||||
[ "<a href='' onClick='sel(\"$sel\")'>$a->{'name'}</a>",
|
||||
[ &ui_link("#", $a->{'name'}, undef, "onClick='sel(\"$sel\");'"),
|
||||
$hasver ? ($epoch.$a->{'version'}) : ( ),
|
||||
$hasdesc ? ($a->{'desc'}) : ( ) ]);
|
||||
}
|
||||
|
||||
@@ -21,23 +21,21 @@ for($i=0; $i<$n; $i++) {
|
||||
$sz = $files{$i,'size'};
|
||||
$ty = $files{$i,'type'};
|
||||
local @cols;
|
||||
$ls = "<a href=\"file_info.cgi?file=".&urlize($files{$i,'path'})."\">";
|
||||
$ls = "file_info.cgi?file=".&urlize($files{$i,'path'});
|
||||
$le = "</a>";
|
||||
if ($ty == 3 || $ty == 4) {
|
||||
# Hard or soft link
|
||||
push(@cols, $ls.&html_escape($files{$i,'path'}).
|
||||
" -> ".&html_escape($files{$i,'link'}).$le);
|
||||
push(@cols, &ui_link($ls, &html_escape($files{$i,'path'}).
|
||||
" -> ".&html_escape($files{$i,'link'})) );
|
||||
push(@cols, "", "");
|
||||
}
|
||||
else {
|
||||
$table = "<table width=100% cellpadding=0 ".
|
||||
"cellspacing=0><tr><td>$ls".
|
||||
&html_escape($files{$i,'path'}).
|
||||
"$le</td> <td align=right>\n";
|
||||
$table = "<table width=100% cellpadding=0 cellspacing=0><tr><td>".
|
||||
&ui_link($ls, &html_escape($files{$i,'path'}) ).
|
||||
"</td><td align=right>\n";
|
||||
if ($ty == 0 || $ty == 5) {
|
||||
$table .= "<a href='view.cgi".
|
||||
&html_escape($files{$i,'path'}).
|
||||
"'>$text{'list_view'}</a>";
|
||||
$table .= &ui_link("view.cgi".
|
||||
&html_escape($files{$i,'path'}), $text{'list_view'});
|
||||
}
|
||||
$table .= "</td></tr></table>";
|
||||
push(@cols, $table);
|
||||
|
||||
@@ -35,7 +35,9 @@ else {
|
||||
"$text{'rhn_version'}</b></td> </tr>\n";
|
||||
}
|
||||
print "<tr>\n";
|
||||
print "<td><a href='' onClick='sel(\"$1\")'>$1</a></td>\n";
|
||||
print "<td>";
|
||||
print &ui_link("#", $1, undef, "onClick='sel(\"$1\");'");
|
||||
print "</td>\n";
|
||||
print "<td align=right>$2 - $3</td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
@@ -70,8 +70,7 @@ if ($in{'search'}) {
|
||||
$text{'rpm_finddesc'} ], 100);
|
||||
foreach $r (@rv) {
|
||||
print &ui_columns_row([
|
||||
"<a href='' onClick='sel(\"$r->{'url'}\")'>".
|
||||
"$r->{'file'}</a>",
|
||||
&ui_link("#", $r->{'file'}, undef, "onClick='sel(\"$r->{'url'}\");'"),
|
||||
$r->{'dist'},
|
||||
$r->{'desc'}
|
||||
]);
|
||||
|
||||
@@ -49,10 +49,10 @@ if (@match) {
|
||||
local @cols;
|
||||
local $v = $packages{$i,'shortversion'} ||
|
||||
$packages{$i,'version'};
|
||||
push(@cols, "<a href=\"edit_pack.cgi?search=$s&package=".
|
||||
push(@cols, &ui_link("edit_pack.cgi?search=$s&package=".
|
||||
&urlize($packages{$i,'name'})."&version=".
|
||||
&urlize($packages{$i,'version'})."\">".&html_escape(
|
||||
$packages{$i,'name'}.($v ? " $v" : ""))."</a>");
|
||||
&urlize($packages{$i,'version'}), &html_escape(
|
||||
$packages{$i,'name'}.($v ? " $v" : "")) ) );
|
||||
$c = $packages{$i,'class'};
|
||||
push(@cols, $c ? &html_escape($c)
|
||||
: $text{'search_none'});
|
||||
|
||||
@@ -44,8 +44,10 @@ print "<table width=100%>\n";
|
||||
&traverse("", 0);
|
||||
print "</table>\n";
|
||||
if ($hasclasses) {
|
||||
print "<a href=closeall.cgi>$text{'index_close'}</a>\n";
|
||||
print "<a href=openall.cgi>$text{'index_open'}</a><p>\n";
|
||||
print &ui_link("closeall.cgi", $text{'index_close'});
|
||||
print "\n";
|
||||
print &ui_link("openall.cgi", $text{'index_open'});
|
||||
print "<p>\n";
|
||||
}
|
||||
|
||||
&ui_print_footer("", $text{'index_return'});
|
||||
@@ -59,9 +61,10 @@ print "<tr> <td>", $spacer x $_[1];
|
||||
if ($_[0]) {
|
||||
print "<a name=\"$_[0]\"></a>\n";
|
||||
$act = $heiropen{$_[0]} ? "close" : "open";
|
||||
print "<a href=\"$act.cgi?what=",&urlize($_[0]),"\">";
|
||||
my $link = "$act.cgi?what=".&urlize($_[0]);
|
||||
$_[0] =~ /([^\/]+)$/;
|
||||
print "<img border=0 src=images/$act.gif></a> $1</td>\n";
|
||||
print &ui_link($link, "<img border=0 src='images/$act.gif'>");
|
||||
print " $1</td>\n";
|
||||
}
|
||||
else {
|
||||
print "<img src=images/close.gif> <i>$text{'index_all'}</i></td>\n";
|
||||
@@ -74,10 +77,10 @@ if ($heiropen{$_[0]}) {
|
||||
if ($class[$i] eq $_[0]) {
|
||||
print "<tr> <td nowrap>", $spacer x ($_[1]+1);
|
||||
print "<img border=0 src=images/pack.gif></a> \n";
|
||||
print "<a href=\"edit_pack.cgi?package=",
|
||||
&urlize($pack[$i]),"&version=",
|
||||
&urlize($vers[$i]),"\">",&html_escape($pack[$i].
|
||||
($svers[$i] ? " $svers[$i]" : "")),"</a></td>\n";
|
||||
print &ui_link("edit_pack.cgi?package=".
|
||||
&urlize($pack[$i])."&version=".
|
||||
&urlize($vers[$i]), &html_escape($pack[$i].
|
||||
($svers[$i] ? " $svers[$i]" : "")) )."</td>\n";
|
||||
print "<td>",&html_escape($desc[$i]),"</td>\n";
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user