diff --git a/var/mongoose/html/m/index.jim b/var/mongoose/html/m/index.jim index 634120a..b5ce6e9 100755 --- a/var/mongoose/html/m/index.jim +++ b/var/mongoose/html/m/index.jim @@ -41,7 +41,7 @@ puts "" tb "/images/323_1_10_Menu_Video.png" "Browse" "browse.jim" tb "/images/321_1_00_Menu_CHList.png" "Schedule" "schedule.jim" tb "/img/spanner.png" "Services" "#" -tb "/img/packages.png" "Packages" "#" +tb "/img/packages.png" "Packages" "pkgi_b.jim" tb "/images/326_1_00_Menu_Settings.png" "Settings" \ "/cgi-bin/settings.jim\" rel=\"external" tb "/img/diagnostics.png" "Diag" "#" diff --git a/var/mongoose/html/m/lib/header.jim b/var/mongoose/html/m/lib/header.jim index ebe41b2..ff73842 100755 --- a/var/mongoose/html/m/lib/header.jim +++ b/var/mongoose/html/m/lib/header.jim @@ -45,18 +45,20 @@ if {[string range $pageid end-1 end] eq "_d"} { set _dialog 1 } +set _bare 0 +if {[string range $pageid end-1 end] eq "_b"} { + set _bare 1 +} + puts "
" -if {$_dialog} { - puts "[$pkg get latest]
" + } else { + puts "[$pkg get installed]
" + } + + if {$type eq "upgr"} { + puts "Latest: [$pkg get latest]
" + } + + if {[dict exists $::pkgmeta $name]} { + puts "$::pkgmeta($name)
" + } else { + puts "[$pkg get descr]
" + } + + if {![$pkg is installed]} { + set btype Install + } elseif {$type eq "upgr" && [$pkg is upgradable]} { + set btype Upgrade + } else { + set btype Remove + } + +# puts "+ $btype +
+" + puts "" +} + +proc pkglist {type} { + set pkgs [pkg $type] + + if {[llength $pkgs] <= 0} { + puts "No packages " + switch $type { + inst { puts "are installed." } + upgr { puts "are available for upgrade; try updating the package list from the Internet using the button below." } + avail { puts "are available for installation." } + } + puts "" + return + } + + puts "