# HG changeset patch # User Aleksej Bobylev # Date 1419349489 -7200 # Node ID 82838b56a261f0bcafe4145efd0a8111801355db # Parent c17a5059333568f6d1a65dee9df28800211bc2fb pkgs.cgi: "cat extra": show info for installed packages; "search package": don't wrap checkbox and package name; "search file": shrink looong file paths, highlight search term. diff -r c17a50593335 -r 82838b56a261 tazpanel/pkgs.cgi --- a/tazpanel/pkgs.cgi Tue Dec 23 16:25:43 2014 +0200 +++ b/tazpanel/pkgs.cgi Tue Dec 23 17:44:49 2014 +0200 @@ -437,8 +437,15 @@ case $category in extra) - sed 's|.*|& -- - -- http://mirror.slitaz.org/packages/get/& - - -|' \ - $i/extra.list | parse_packages_info + NA="$(_n 'n/a')" + for pkg in $(cat $i/extra.list); do + PKG="$(grep ^$pkg$'\t' $i/installed.info)" + if [ -n "$PKG" ]; then + echo "$PKG" + else + echo "$pkg $NA - $NA http://mirror.slitaz.org/packages/get/$pkg - - -" + fi + done | parse_packages_info ;; all) make_mixed_list | sort -t$'\t' -k1,1 | awk -F$'\t' ' @@ -518,11 +525,10 @@ - - EOT if [ "$(GET files)" ]; then cat < @@ -538,11 +544,12 @@ cat << EOT - + EOT done else + echo '
$(_ 'Package')
$(pkg_info_link $PACKAGE $class)$FILE$(echo "$FILE" | sed "s|$pkg|$pkg|g")
' table_head echo " " awk -F$'\t' 'BEGIN{IGNORECASE = 1} diff -r c17a50593335 -r 82838b56a261 tazpanel/pkgs.css --- a/tazpanel/pkgs.css Tue Dec 23 16:25:43 2014 +0200 +++ b/tazpanel/pkgs.css Tue Dec 23 17:44:49 2014 +0200 @@ -26,11 +26,11 @@ display: inline-block; } -.pkglist td:nth-child(1) { +.pkglist td:nth-child(1), .filelist td:nth-child(1) { white-space: nowrap; } -.pkglist td:nth-child(1) a { +.pkglist td:nth-child(1) a, .filelist td:nth-child(1) a { max-width: 12em; } @@ -38,9 +38,14 @@ max-width: 7em; } -.pkglist td:nth-child(1) a, .pkglist td:nth-child(2) { +.pkglist td:nth-child(1) a, .pkglist td:nth-child(2), +.filelist td:nth-child(1) a, .filelist td:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -o-text-overflow: ellipsis; } +.filelist td:nth-child(2) { + max-width: 30em; + } +