]> git.deb.at Git - deb/packages.git/commitdiff
- Add $ROOT at appropriate places
authorJeroen van Wolffelaar <jeroen@wolffelaar.nl>
Tue, 7 Feb 2006 15:20:54 +0000 (15:20 +0000)
committerJeroen van Wolffelaar <jeroen@wolffelaar.nl>
Tue, 7 Feb 2006 15:20:54 +0000 (15:20 +0000)
- Move display of 'kB' to the column itself, and right align it

cgi-bin/show_package.pl
config.sh
lib/Packages/HTML.pm

index 445195d37e55192f280e3a52b43be6f2ce11266f..747db62ada96ee2b29bd87695a7b2255c19befd3 100755 (executable)
@@ -225,11 +225,11 @@ unless (@Packages::CGI::fatal_errors) {
 
                $package_page .= simple_menu( [ gettext( "Distribution:" ),
                                                gettext( "Overview over this suite" ),
-                                               "/$suite/",
+                                               "$ROOT/$suite/",
                                                $suite ],
                                              [ gettext( "Section:" ),
                                                gettext( "All packages in this section" ),
-                                               "/$suite/$subsection/",
+                                               "$ROOT/$suite/$subsection/",
                                                $subsection ],
                                              );
 
@@ -298,35 +298,22 @@ unless (@Packages::CGI::fatal_errors) {
                $package_page .= "<th>".gettext("Architecture")."</th><th>".gettext("Files")."</th><th>".gettext( "Package Size")."</th><th>".gettext("Installed Size")."</th></tr>\n";
                foreach my $a ( @archs ) {
                    $package_page .= "<tr>\n";
-                   $package_page .=  "<th><a href=\"$DL_URL?arch=$a";
-                   $package_page .=  "&amp;file=".uri_escape($filenames->{$a});
-                   $package_page .=  "&amp;md5sum=$file_md5sums->{$a}";
-                   $package_page .=  "&amp;arch=$a";
-                   for ($archives->{$a}) {
-                       /security/o &&  do {
-                           $package_page .=  "&amp;type=security"; last };
-                       /volatile/o &&  do {
-                           $package_page .=  "&amp;type=volatile"; last };
-                       /backports/o &&  do {
-                           $package_page .=  "&amp;type=backports"; last };
-                       /non-us/io  &&  do {
-                           $package_page .=  "&amp;type=nonus"; last };
-                       $package_page .=  "&amp;type=main";
-                   }
+                   $package_page .=  "<th><a href=\"$ROOT/$suite/$encodedpkg/$a/download";
                    $package_page .=  "\">$a</a></th>\n";
                    $package_page .= "<td>";
                    if ( $suite ne "experimental" ) {
-                       $package_page .= sprintf( "[<a href=\"%s\">".gettext( "list of files" )."</a>]\n", "$FILELIST_URL$encodedpkg&amp;version=$suite&amp;arch=$a", $pkg );
+                       $package_page .= sprintf( "[<a href=\"%s\">".gettext( "list of files" )."</a>]\n",
+                           "$ROOT/$suite/$encodedpkg/$a/filelist", $pkg );
                    } else {
                        $package_page .= gettext( "no current information" );
                    }
-                   $package_page .= "</td>\n<td>";
-                   $package_page .=  floor(($sizes_deb->{$a}/102.4)+0.5)/10;
-                   $package_page .= "</td>\n<td>";
-                   $package_page .=  $sizes_inst->{$a};
+                   $package_page .= "</td>\n<td align=right>"; #FIXME: css
+                   $package_page .=  floor(($sizes_deb->{$a}/102.4)+0.5)/10 . "&nbsp;kB";
+                   $package_page .= "</td>\n<td align=right>"; #FIXME: css
+                   $package_page .=  $sizes_inst->{$a} . "&nbsp;kB";
                    $package_page .= "</td>\n</tr>";
                }
-               $package_page .= "</table><p>".gettext ( "Size is measured in kBytes." )."</p>\n";
+               $package_page .= "</table>\n";
                $package_page .= "</div> <!-- end pdownload -->\n";
                
                #
index 8867ddb528b1305f45f8beece6fcccbde4a77f11..750326567d83e596b117c6c035c30e4df11e7df3 100644 (file)
--- a/config.sh
+++ b/config.sh
@@ -33,9 +33,9 @@ kfreebsd_ftpsite=http://kfreebsd-gnu.debian.net/debian
 
 root=""
 search_page="http://packages.debian.net/"
-search_cgi="/cgi-bin/search_packages.pl"
-search_url="/search/"
-search_src_url="/search/source/"
+# FIXME: remove dupe
+search_cgi="/search"
+search_url="/search"
 webmaster=webmaster@debian.org
 contact=debian-www@lists.debian.org
 home="http://www.debian.org"
index 8d43b3be56d4cbf5e37851f5a88aa0da24e164e6..1663b8f71ef90a1c119a6ac5ddf4274c1875901e 100644 (file)
@@ -206,8 +206,9 @@ sub pmoreinfo {
 
     if ($info{search}) {
        my $encodedname = uri_escape( $name );
-       my $search_url = $is_source ? $SRC_SEARCH_URL : $SEARCH_URL;
-       $str .= "<p>".sprintf( gettext( "Search for <a href=\"%s\">other versions of %s</a>" ), $search_url.$encodedname, $name )."</p>\n";
+       my $search_url = $is_source ? "$ROOT/source" : $ROOT;
+       $str .= "<p>".sprintf( gettext( "Search for <a href=\"%s\">other versions of %s</a>" ),
+           "$search_url/$encodedname", $name )."</p>\n";
     }
 
     $str .= "</div> <!-- end pmoreinfo -->\n";
@@ -283,12 +284,12 @@ sub print_deps {
                (read_entry_simple( $packages, $p_name, $opts->{h_archives}, $opts->{suite}))->[-1];
            if ( $short_desc ) {
                if ( $is_old_pkgs ) {
-                   push @res_pkgs, dep_item( "/$opts->{suite}/$p_name",
+                   push @res_pkgs, dep_item( "$ROOT/$opts->{suite}/$p_name",
                                              $p_name, "$pkg_version$arch_str" );
                } else {
                    $short_descs{$p_name} ||= $short_desc;
                    $short_desc = encode_entities( $short_desc, "<>&\"" );
-                   push @res_pkgs, dep_item( "/$opts->{suite}/$p_name",
+                   push @res_pkgs, dep_item( "$ROOT/$opts->{suite}/$p_name",
                                              $p_name, "$pkg_version$arch_str", $short_desc );
                }
            } elsif ( $is_old_pkgs ) {