ui_link conversion -> mount

This commit is contained in:
Nawawi Jamili
2013-12-19 02:01:16 +08:00
parent d376160596
commit b71802b3c0
5 changed files with 12 additions and 17 deletions

View File

@@ -66,12 +66,10 @@ if (@visible) {
local @cols;
if ($canedit && !$access{'only'}) {
if (defined($midx)) {
push(@cols, "<a href=\"edit_mount.cgi?".
"index=$midx\">$p</a>");
push(@cols, &ui_link("edit_mount.cgi?index=$midx", $p) );
}
else {
push(@cols, "<a href=\"edit_mount.cgi?".
"temp=1&index=$medidx\">$p</a>");
push(@cols, &ui_link("edit_mount.cgi?temp=1&index=$medidx", $p) );
}
}
else {
@@ -97,9 +95,8 @@ if (@visible) {
}
if (&can_edit_fs(@minfo)) {
push(@cols,
defined($medidx) ?
"<a href='unmount.cgi?index=$medidx'>$yes</a>" :
"<a href='mount.cgi?index=$midx'>$no</a>");
defined($medidx) ? &ui_link("unmount.cgi?index=$medidx", $yes) : &ui_link("mount.cgi?index=$midx", $no)
);
}
else {
push(@cols, defined($medidx) ? $yes : $no);

View File

@@ -31,8 +31,8 @@ print "<tr $tb> <td><b>$text{'nfs_dir'}</b></td> ",
"<td><b>$text{'nfs_clients'}</b></td> </tr>\n";
for($i=0; $i<@dirs; $i++) {
print "<tr $cb>\n";
print "<td><a href=\"\" onClick='choose(\"$dirs[$i]\"); return false'>",
"$dirs[$i]</a></td>\n";
print "<td>".&ui_link("#", $dirs[$i], undef, "onClick='choose(\"$dirs[$i]\"); return false;'" );
print "</td>\n";
printf "<td>%s</td>\n",
length($clients[$i]) > 45 ?
&html_escape(substr($clients[$i], 0, 45))." ..." :

View File

@@ -54,9 +54,9 @@ if (@fromip) {
"<td><b>$text{'nfs_host'}</b></td> </tr>\n";
for($i=0; $i<@fromip; $i++) {
$fromhost = gethostbyaddr($fromaddr[$i], AF_INET);
printf "<tr $cb> <td><a href=\"\" onClick='choose(\"%s\"); ".
"return false'>$fromip[$i]</a></td>\n",
$fromhost ? $fromhost : $fromip[$i];
print "<tr $cb><td>";
print &ui_link("#", $fromip[$i], undef, "onClick='choose(\"".($fromhost ? $fromhost : $fromip[$i])."\");return false;'" );
print "</td>\n";
printf "<td>%s</td> </tr>\n",
$fromhost ? $fromhost : "<br>";
}

View File

@@ -77,9 +77,8 @@ if (@names) {
print &ui_columns_start([ $text{'smb_name'}, $text{'smb_desc'} ]);
for($i=0; $i<@names; $i++) {
print &ui_columns_row([
"<a href=\"\" onClick='choose(\"$names[$i]\"); ".
"return false'>$names[$i]</a></td>\n",
&html_escape($comms[$i]),
&ui_link("#", $names[$i], undef, "onClick='choose(\"$names[$i]\");return false;'"),
&html_escape($comms[$i])
]);
}
print &ui_columns_end();

View File

@@ -44,8 +44,7 @@ if (@names) {
$text{'smb_comment'} ]);
for($i=0; $i<@names; $i++) {
print &ui_columns_row([
"<a href=\"\" onClick='choose(\"$names[$i]\"); ".
"return false'>$names[$i]</a>",
&ui_link("#", $names[$i], undef, "onClick='choose(\"$names[$i]\");return false;'" ),
&html_escape($comms[$i]),
]);
}