From 9ee3fd3aa184ba974be690d0834883c54986986f Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Tue, 11 Sep 2007 17:24:21 +0200 Subject: [PATCH] html/show.tmpl: Improve display of VCS-* information Suggested by Joey Hess Move the detailed VCS-* links below the download table as these can get very long, and since the URIs can't be broken, this may make the sidebar very huge and ugly. Still leave the links available in the sidebar but don't display the URIs themselves. --- static/packages.css.sed.in | 2 +- templates/html/show.tmpl | 50 +++++++++++++++++++++++++------------- 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/static/packages.css.sed.in b/static/packages.css.sed.in index 1b2defe..2afe3f3 100644 --- a/static/packages.css.sed.in +++ b/static/packages.css.sed.in @@ -173,7 +173,7 @@ table#pdeplegend, #pdownload table { font-family: monospace; } #pdownload p { - display: inline; + margin-left: 1em; } #pdownloadnotes { diff --git a/templates/html/show.tmpl b/templates/html/show.tmpl index 544fe2e..07fefe7 100644 --- a/templates/html/show.tmpl +++ b/templates/html/show.tmpl @@ -1,5 +1,14 @@ [% PROCESS 'config/archive_layout.tmpl' %] [% PROCESS 'config/mirrors.tmpl' %] +[%- known_vcs = [ [ 'cvs', 'CVS', 'cvs' ], + [ 'svn', 'Subversion', 'subversion' ], + [ 'bzr', 'bzr', 'bzr' ], + [ 'darcs', 'Darcs', 'darcs' ], + [ 'arch', 'arch', 'tla' ], + [ 'git', 'Git', 'git-core' ], + [ 'hg', 'Hg', 'mercurial' ], ]; + vcs_link = page.get_newest("vcs-browser"); +-%] [%- nav_arr = [ { prefix=>'Distribution:', title=>'Overview over this suite', url=>make_url('/','','source',''), name=>suite }, ]; nav_arr.push( { title => 'Source packages', url=>make_url('/'), name=>'Source' } ) IF is_source; nav_arr.push( { prefix=>'Section:', title=>'All packages in this section', url=>make_url("$subsection/"), name=>subsection } ); @@ -65,27 +74,20 @@
  • Debian Changelog
  • Copyright File
  • [% END %] - -[% vcs_link = page.get_newest("vcs-browser") %] -[% #FIXME: should this only be used for the PTS? - known_vcs = [ [ 'cvs', 'CVS', 'cvs' ], - [ 'svn', 'Subversion', 'subversion' ], - [ 'bzr', 'bzr', 'bzr' ], - [ 'darcs', 'Darcs', 'darcs' ], - [ 'arch', 'arch', 'tla' ], - [ 'git', 'Git', 'git-core' ], - [ 'hg', 'Hg', 'mercurial' ], ]; - FOREACH vcs IN known_vcs; +[% IF vcs_link %] +
  • Debian Source Repository +[%- FOREACH vcs IN known_vcs; vcs_id = vcs.0; vcs_name = vcs.1; vcs_pkg = vcs.2; vcs_info = page.get_newest("vcs-$vcs_id"); SET vcs_info = page.get_newest("x-vcs-$vcs_id") UNLESS vcs_info; - IF vcs_info; %] -

    Debian Package Repository (VCS: -[% vcs_name %]):
    [% vcs_info %]

    -[% IF vcs_link %] -

    Debian Package Repository (Browsable):
    [% vcs_link %]

    -[% END; END; END %] + IF vcs_info %] + ([% vcs_name %]) +[% END %] +
  • +[% END; END %] + + [% IF src %]

    Download Source Package [% src.pkg %]: @@ -314,6 +316,20 @@ Do not install it on a normal Debian system.

    [% IF loop.last -%] +[% FOREACH vcs IN known_vcs; + vcs_id = vcs.0; vcs_name = vcs.1; vcs_pkg = vcs.2; + vcs_info = page.get_newest("vcs-$vcs_id"); + SET vcs_info = page.get_newest("x-vcs-$vcs_id") UNLESS vcs_info; + IF vcs_info; %] +
    +
    Debian Package Source Repository (VCS: [% vcs_name %])
    +
    [% vcs_info %]
    +[% IF vcs_link %] +
    Debian Package Source Repository (Browsable)
    [% vcs_link %]
    +[% END %] +
    +[% END; END %] + [%- END %] [% END %] -- 2.39.2