aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2007-11-14 08:52:39 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2007-11-14 08:52:39 +0000
commit92bbc991bc6f99e9e9e93bac3719eea63a617b5d (patch)
tree6d1681d9be95c9c65ad4ef807f3eac5930415f95 /web
parentAdd comment about min-width. (diff)
downloadpackages-92bbc991bc6f99e9e9e93bac3719eea63a617b5d.tar.gz
packages-92bbc991bc6f99e9e9e93bac3719eea63a617b5d.tar.bz2
packages-92bbc991bc6f99e9e9e93bac3719eea63a617b5d.zip
Fix rendering of ebuilds with multiple HOMEPAGEs.
Diffstat (limited to 'web')
-rw-r--r--web/model.py14
-rw-r--r--web/templates/layout.html44
2 files changed, 36 insertions, 22 deletions
diff --git a/web/model.py b/web/model.py
index ad5f259..05b6302 100644
--- a/web/model.py
+++ b/web/model.py
@@ -407,6 +407,20 @@ class PackageDB(object):
l = '<a href="%s">%s</a>' % (url, l)
pkg['license'].append(l)
pkg['license'] = ' '.join(pkg['license'])
+ pkg['homepage'] = []
+ homepages = pkg_metadata['homepage'].split()
+ if len(homepages) == 1:
+ url = pkg_metadata['homepage']
+ l = '<a href="%s">%s</a>' % (url, 'Homepage')
+ pkg['homepage'].append(l)
+ else:
+ pkg['homepage'].append('Homepages:')
+ i = 1
+ for l in homepages:
+ l = '<a href="%s">%s</a>' % (l, i)
+ pkg['homepage'].append(l)
+ i += 1
+ pkg['homepage'] = ' '.join(pkg['homepage'])
pkg['changelog'] = viewcvs_link('%s/ChangeLog' % (atom.key))
pkg['bugzilla'] = bugzilla_search_link(pn)
diff --git a/web/templates/layout.html b/web/templates/layout.html
index 7a17b27..838079e 100644
--- a/web/templates/layout.html
+++ b/web/templates/layout.html
@@ -90,19 +90,19 @@ def alpha_url(baseurl):
<div>
<span class="left-legend">Links</span>
- <ul class="links left-bar-list">
- <li
- py:if="cherrypy.request.path_info.startswith('/category/') and 'full_cat' not in safeqs"
- py:with="baseurl = cherrypy.request.path_info"
- >
- <a href="${full_cat_url(baseurl)}">category-full</a>
- </li>
- <li
- py:if="cherrypy.request.path_info.startswith('/category/') and 'full_cat' in safeqs"
- py:with="baseurl = cherrypy.request.path_info"
- >
- <a href="${alpha_url(baseurl)}">category-latest</a>
- </li>
+ <ul class="links left-bar-list">
+ <li
+ py:if="cherrypy.request.path_info.startswith('/category/') and 'full_cat' not in safeqs"
+ py:with="baseurl = cherrypy.request.path_info"
+ >
+ <a href="${full_cat_url(baseurl)}">category-full</a>
+ </li>
+ <li
+ py:if="cherrypy.request.path_info.startswith('/category/') and 'full_cat' in safeqs"
+ py:with="baseurl = cherrypy.request.path_info"
+ >
+ <a href="${alpha_url(baseurl)}">category-latest</a>
+ </li>
<li><a href="${relurl('/categories/')}">categories</a></li>
<li><a href="${relurl('/verbump/')}">version bumps</a></li>
<li><a href="${relurl('/newpackage/')}">new packages</a></li>
@@ -118,17 +118,17 @@ def alpha_url(baseurl):
</py:match>
<py:match path="pkginfo" once="false">
- <table class="pkginfo">
+ <table class="pkginfo">
<tr>
<td class="category"><a href="${relurl('/category/'+pkg.meta.atom.category)}">${pkg.meta.atom.category}</a></td>
- <td class="homepage"><a href="${pkg.meta.homepage}">Homepage</a></td>
- <td class="license">${HTML(pkg.license)}</td>
- <td class="changelog" ><a href="${pkg.changelog}">ChangeLog</a></td>
- <td class="similar" >Similar</td>
- <td class="bugz" ><a href="${pkg.bugzilla}">Bugs</a></td>
- <td class="forums" ><a href="${pkg.forums}">Forums</a></td>
- </tr>
- </table>
+ <td class="homepage">${HTML(pkg.homepage)}</td>
+ <td class="license">${HTML(pkg.license)}</td>
+ <td class="changelog" ><a href="${pkg.changelog}">ChangeLog</a></td>
+ <td class="similar" >Similar</td>
+ <td class="bugz" ><a href="${pkg.bugzilla}">Bugs</a></td>
+ <td class="forums" ><a href="${pkg.forums}">Forums</a></td>
+ </tr>
+ </table>
</py:match>
<py:match path="footer">
<div id="footer">