The branch, master has been updated via 52db94cab2c8a12ae9fb1956d63b24a9dd34fc4b (commit) via 07ef141550bfec7c7bacdccacab1c36e99ea7bec (commit) via 40dde422021165dbf09dd4e19c291cf966b7830b (commit) from 9bc654ae46fd9e12c276a11e4dbb7a0ca3642391 (commit)
- Log ----------------------------------------------------------------- commit 52db94cab2c8a12ae9fb1956d63b24a9dd34fc4b Author: Michal Čihař michal@cihar.com Date: Mon Apr 19 15:13:15 2010 +0200
Separate link for release notes.
commit 07ef141550bfec7c7bacdccacab1c36e99ea7bec Author: Michal Čihař michal@cihar.com Date: Mon Apr 19 15:01:35 2010 +0200
Add link to more download options.
commit 40dde422021165dbf09dd4e19c291cf966b7830b Author: Michal Čihař michal@cihar.com Date: Mon Apr 19 14:59:47 2010 +0200
Limit list of featured donwloads.
-----------------------------------------------------------------------
Summary of changes: render.py | 6 ++++-- templates/_dlbox.tpl | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/render.py b/render.py index d17b94f..6cc0378 100755 --- a/render.py +++ b/render.py @@ -53,7 +53,7 @@ PROJECT_ID = 23067 PROJECT_NAME = 'phpmyadmin'
# Filtering -FILES_MARK = 'all-languages.' +FILES_REGEXP = re.compile(r'.*all-languages.(zip|tar.bz2).*') BRANCH_REGEXP = re.compile('^([0-9]+.[0-9]+).') MAJOR_BRANCH_REGEXP = re.compile('^([0-9]+).') TESTING_REGEXP = re.compile('.*(beta|alpha|rc).*') @@ -295,7 +295,9 @@ class SFGenerator: ext = os.path.splitext(filename)[1] link = item.getElementsByTagName('link')[0].childNodes[0].data pubdate = item.getElementsByTagName('pubDate')[0].childNodes[0].data - featured = (filename.find(FILES_MARK) != -1) + featured = (FILES_REGEXP.match(filename) is not None) + if featured: + helper.log.dbg('Release is featured!') dlcount = item.getElementsByTagName('files:download-count')[0].childNodes[0].data try: notes = item.getElementsByTagName('files:release-notes-url')[0].childNodes[0].data diff --git a/templates/_dlbox.tpl b/templates/_dlbox.tpl index 82537a5..666eba6 100644 --- a/templates/_dlbox.tpl +++ b/templates/_dlbox.tpl @@ -1,11 +1,13 @@ <html xmlns:py="http://genshi.edgewall.org/" xmlns:xi="http://www.w3.org/2001/XInclude" py:strip=""> <!--! Download box content -->
-<span class="dlname">Download <a href="${release.notes}" title="Release notes">${release.version}</a>:</span> +<span class="dlname">Download ${release.version}:</span> <ul class="dllist"> <py:for each="file in release.files"><py:if test="file.featured"> <li><a href="${file.url}#!md5!${file.md5}" title="Download ${file.ext} compressed release, ${file.humansize}" rel="quick-download" class="piwik_download">${file.ext}</a></li> </py:if></py:for> + <li><a href="${release.notes}" title="Release notes">✍</a></li> + <li><a href="${base_url}downloads.${file_ext}" title="More download options">…</a></li> </ul>
</html>
hooks/post-receive