tazpanel rev 84
pkgs.cgi: add links in file search result
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Apr 13 17:43:09 2011 +0200 (2011-04-13) |
parents | c9d788b862bb |
children | 7c672aea996d |
files | pkgs.cgi |
line diff
1.1 --- a/pkgs.cgi Wed Apr 13 17:27:27 2011 +0200 1.2 +++ b/pkgs.cgi Wed Apr 13 17:43:09 2011 +0200 1.3 @@ -263,7 +263,15 @@ 1.4 <td>`gettext "File"`</td> 1.5 </tr> 1.6 $(unlzma -c files.list.lzma | grep -Ei ": .*$(GET search)" | \ 1.7 - sed 's|\(.*\): \(.*\)|<tr><td>\1</td><td>\2</td></tr>|') 1.8 + while read PACKAGE FILE; do 1.9 + PACKAGE=${PACKAGE%:} 1.10 + image=tazpkg-installed.png 1.11 + [ -d $INSTALLED/$PACKAGE ] || image=tazpkg.png 1.12 + echo "<tr> 1.13 + <td><a href='$SCRIPT_NAME?info=$PACKAGE'><img src='$IMAGES/$image' />$PACKAGE</a></td> 1.14 + <td>$FILE</td> 1.15 +</tr>" 1.16 + done) 1.17 EOT 1.18 else 1.19 table_head