Permalink
Browse files

Refactor Doctrine Downloads view

  • Loading branch information...
1 parent 9f541a0 commit f841bdb28c81158129cc5c862c73969b4baea026 @beberlei beberlei committed Jun 16, 2012
Showing with 44 additions and 14 deletions.
  1. +22 −13 pages/source/_exts/doctrinedownloads.py
  2. +22 −1 pages/source/projects.yml
@@ -68,8 +68,9 @@ def visit_doctrinedownloads_html(self, node):
self.body.append('<p>%s</p>' % node['project']['description']);
self.body.append('<ul>')
+ self.body.append('<li>Latest Version: %s</li>' % (node['project']['latest_version']))
self.body.append('<li><a href="%s">Issues</a></li>\n' % (node['project']['issues_link']) )
- self.body.append('<li><a href="/docs/%s/%s/en/index.html">Documentation</a></li>\n' % (node['project']['slug'], node['project']['latest_version']) )
+ self.body.append('<li><a href="/docs/%s/%s/en/index.html">Latest Documentation</a></li>\n' % (node['project']['slug'], node['project']['latest_version']) )
self.body.append('<li><a href="%s">Browse Source</a></li>\n' % (node['project']['browse_source_link']) )
self.body.append('</ul>')
@@ -79,31 +80,39 @@ def visit_doctrinedownloads_html(self, node):
self.body.append('<h3>Download %s (%s)</h3>' % ( version, versiondata['stability'] ))
+ self.body.append('<ul class="release">');
+ self.body.append('<li><a href="/docs/%s/%s/en/index.html">Documentation (%s)</a></li>' % (node['project']['slug'], version, version))
+ self.body.append('</ul>');
+
releaseVersions = sorted(versiondata['releases'].keys(), cmp=version_compare)
self.body.append('<div class="releases">')
+ num = 1
for release in releaseVersions:
releasedata = versiondata['releases'][release]
- self.body.append('<h4>%s</h4>' % release)
+ if num == 1:
+ self.body.append('<h4>%s</h4>' % release)
- self.body.append('<ul class="release">');
+ self.body.append('<ul class="release">');
- self.body.append('<li><a href="/docs/%s/%s/en/index.html">Documentation</a></li>' % (node['project']['slug'], version))
+ if 'package_name' in releasedata:
+ self.body.append('<li><a href="http://www.doctrine-project.org/downloads/%s">Download Archive</a></li>' % (releasedata['package_name']))
- if 'package_name' in releasedata:
- self.body.append('<li><a href="http://www.doctrine-project.org/downloads/%s">Download Archive</a></li>' % (releasedata['package_name']))
+ if 'pear_install_command' in releasedata:
+ self.body.append('<li><a href="http://pear.doctrine-project.org">Install via PEAR</a>: <pre>%s</pre></li>' % (releasedata['pear_install_command']))
- if 'svn_checkout_command' in releasedata:
- self.body.append('<li><strong>Checkout from Subversion:</strong> <pre>%s</pre></li>' % (releasedata['svn_checkout_command']))
+ if 'composer' in releasedata:
+ self.body.append('<li><a href="http://www.packagist.org/packages/doctrine/%s">Composer</a>: <pre>{"require": {"doctrine/%s": "%s"}}</pre>' % (node['project']['slug'], node['project']['slug'], release))
- if 'git_checkout_command' in releasedata:
- self.body.append('<li><strong>Checkout from Git:</strong> <pre>%s</pre></li>' % (releasedata['git_checkout_command']))
+ self.body.append('</ul>');
+ else:
+ if num == 2:
+ self.body.append('<h4>Older versions:</h4><ul class="release">')
- if 'pear_install_command' in releasedata:
- self.body.append('<li><strong>Install via PEAR:</strong> <pre>%s</pre></li>' % (releasedata['pear_install_command']))
+ self.body.append('<li>%s</li>' % (release))
- self.body.append('</ul>');
+ num = num + 1
self.body.append('</div></div>')
View
@@ -170,10 +170,12 @@ orm:
package_name: DoctrineORM-2.1.6-full.tar.gz
git_checkout_command: 'git clone git://github.com/doctrine/doctrine2.git doctrine2-orm<br/>$ cd doctrine2-orm<br/>$ git checkout 2.1.6<br />$ git submodule update --init --recursive'
pear_install_command: 'pear install pear.doctrine-project.org/DoctrineORM-2.1.6'
+ composer: true
2.1.7:
package_name: DoctrineORM-2.1.7-full.tar.gz
git_checkout_command: 'git clone git://github.com/doctrine/doctrine2.git doctrine2-orm<br/>$ cd doctrine2-orm<br/>$ git checkout 2.1.7<br />$ git submodule update --init --recursive'
pear_install_command: 'pear install pear.doctrine-project.org/DoctrineORM-2.1.7'
+ composer: true
'2.2':
version_file: source/orm2.2/lib/Doctrine/ORM/Version.php
api_source_path: source/orm2.2/lib
@@ -187,27 +189,33 @@ orm:
upgrade_file_path: source/orm2.2/UPGRADE_TO_2_2
releases:
2.2.0-beta1:
+ composer: true
package_name: DoctrineORM-2.2.0-BETA1-full.tar.gz
git_checkout_command: 'git clone git://github.com/doctrine/doctrine2.git doctrine2-orm<br/>$ cd doctrine2-orm<br/>$ git checkout 2.2.0-BETA1<br />$ git submodule update --init --recursive'
pear_install_command: 'pear install pear.doctrine-project.org/DoctrineORM-2.2.0-BETA1-beta'
2.2.0-beta2:
+ composer: true
package_name: DoctrineORM-2.2.0-BETA2-full.tar.gz
git_checkout_command: 'git clone git://github.com/doctrine/doctrine2.git doctrine2-orm<br/>$ cd doctrine2-orm<br/>$ git checkout 2.2.0-BETA2<br />$ git submodule update --init --recursive'
pear_install_command: 'pear install pear.doctrine-project.org/DoctrineORM-2.2.0-BETA2-beta'
2.2.0-rc1:
+ composer: true
package_name: DoctrineORM-2.2.0-RC1-full.tar.gz
git_checkout_command: 'git clone git://github.com/doctrine/doctrine2.git doctrine2-orm<br/>$ cd doctrine2-orm<br/>$ git checkout 2.2.0-RC1<br />$ git submodule update --init --recursive'
pear_install_command: 'pear install pear.doctrine-project.org/DoctrineORM-2.2.0RC1-beta'
2.2.0:
+ composer: true
package_name: DoctrineORM-2.2.0-full.tar.gz
git_checkout_command: 'git clone git://github.com/doctrine/doctrine2.git doctrine2-orm<br/>$ cd doctrine2-orm<br/>$ git checkout 2.2.0<br />$ git submodule update --init --recursive'
pear_install_command: 'pear install pear.doctrine-project.org/DoctrineORM-2.2.0'
2.2.1:
+ composer: true
package_name: DoctrineORM-2.2.1-full.tar.gz
git_checkout_command: 'git clone git://github.com/doctrine/doctrine2.git doctrine2-orm<br/>$ cd doctrine2-orm<br/>$ git checkout 2.2.1<br />$ git submodule update --init --recursive'
pear_install_command: 'pear install pear.doctrine-project.org/DoctrineORM-2.2.1'
2.2.2:
package_name: DoctrineORM-2.2.2-full.tar.gz
+ composer: true
git_checkout_command: 'git clone git://github.com/doctrine/doctrine2.git doctrine2-orm<br/>$ cd doctrine2-orm<br/>$ git checkout 2.2.2<br />$ git submodule update --init --recursive'
pear_install_command: 'pear install pear.doctrine-project.org/DoctrineORM-2.2.2'
dbal:
@@ -342,12 +350,13 @@ dbal:
package_name: DoctrineDBAL-2.1.7-full.tar.gz
git_checkout_command: 'git clone git://github.com/doctrine/dbal.git doctrine2-dbal<br/>$ cd doctrine2-dbal<br/>$ git checkout 2.1.7<br />$ git submodule update --init --recursive'
pear_install_command: 'pear install pear.doctrine-project.org/DoctrineDBAL-2.1.7'
+ composer: true
'2.2':
version_file: source/dbal2.2/lib/Doctrine/DBAL/Version.php
api_source_path: source/dbal2.2/lib
source_path: source/dbal2.2
update_source_command: 'rm -rf source/dbal2.2 && git clone git://github.com/doctrine/dbal.git source/dbal2.2 && cd source/dbal2.2 && git submodule init && git submodule update'
- stability: beta
+ stability: stable
git_checkout_command: 'git clone git://github.com/doctrine/dbal.git doctrine2-dbal'
svn_checkout_command: 'svn co http://svn.github.com/doctrine/dbal.git doctrine2-dbal'
pear_install_command: 'pear install doctrine/DoctrineDBAL'
@@ -358,24 +367,30 @@ dbal:
package_name: DoctrineDBAL-2.2.0-beta1-full.tar.gz
git_checkout_command: 'git clone git://github.com/doctrine/dbal.git doctrine2-dbal<br/>$ cd doctrine2-dbal<br/>$ git checkout 2.2.0-beta1<br />$ git submodule update --init --recursive'
pear_install_command: 'pear install pear.doctrine-project.org/DoctrineDBAL-2.2.0beta1'
+ composer: true
2.2.0BETA2:
package_name: DoctrineDBAL-2.2.0-BETA2-full.tar.gz
git_checkout_command: 'git clone git://github.com/doctrine/dbal.git doctrine2-dbal<br/>$ cd doctrine2-dbal<br/>$ git checkout 2.2.0-beta2<br />$ git submodule update --init --recursive'
pear_install_command: 'pear install pear.doctrine-project.org/DoctrineDBAL-2.2.0beta2'
+ composer: true
2.2.0-RC3:
package_name: DoctrineDBAL-2.2.0-RC3-full.tar.gz
git_checkout_command: 'git clone git://github.com/doctrine/dbal.git doctrine2-dbal<br/>$ cd doctrine2-dbal<br/>$ git checkout 2.2.0-RC3<br />$ git submodule update --init --recursive'
pear_install_command: 'pear install pear.doctrine-project.org/DoctrineDBAL-2.2.0RC3-beta'
+ composer: true
2.2.0:
package_name: DoctrineDBAL-2.2.0-full.tar.gz
git_checkout_command: 'git clone git://github.com/doctrine/dbal.git doctrine2-dbal<br/>$ cd doctrine2-dbal<br/>$ git checkout 2.2.0<br />$ git submodule update --init --recursive'
+ composer: true
pear_install_command: 'pear install pear.doctrine-project.org/DoctrineDBAL-2.2.0'
2.2.1:
package_name: DoctrineDBAL-2.2.1-full.tar.gz
+ composer: true
git_checkout_command: 'git clone git://github.com/doctrine/dbal.git doctrine2-dbal<br/>$ cd doctrine2-dbal<br/>$ git checkout 2.2.1<br />$ git submodule update --init --recursive'
pear_install_command: 'pear install pear.doctrine-project.org/DoctrineDBAL-2.2.1'
2.2.2:
package_name: DoctrineDBAL-2.2.2-full.tar.gz
+ composer: true
git_checkout_command: 'git clone git://github.com/doctrine/dbal.git doctrine2-dbal<br/>$ cd doctrine2-dbal<br/>$ git checkout 2.2.2<br />$ git submodule update --init --recursive'
pear_install_command: 'pear install pear.doctrine-project.org/DoctrineDBAL-2.2.2'
mongodb_odm:
@@ -574,6 +589,7 @@ common:
package_name: DoctrineCommon-2.1.3-full.tar.gz
git_checkout_command: 'git clone git://github.com/doctrine/common.git doctrine2-common<br/>$ cd doctrine2-common<br/>$ git checkout 2.1.3'
pear_install_command: 'pear install pear.doctrine-project.org/DoctrineCommon-2.1.3'
+ composer: true
'2.2':
version_file: source/common2.2/lib/Doctrine/Common/Version.php
update_source_command: 'rm -rf source/common2.2 && git clone git://github.com/doctrine/common.git source/common2.1 && cd source/common2.2 && git submodule init && git submodule update'
@@ -587,20 +603,25 @@ common:
2.2.0RC3:
package_name: DoctrineCommon-2.2.0-RC3-full.tar.gz
git_checkout_command: 'git clone git://github.com/doctrine/common.git doctrine2-common<br/>$ cd doctrine2-common<br/>$ git checkout 2.2.0-RC3'
+ composer: true
pear_install_command: 'pear install pear.doctrine-project.org/DoctrineCommon-2.2.0RC3'
2.2.0RC4:
package_name: DoctrineCommon-2.2.0-RC4-full.tar.gz
git_checkout_command: 'git clone git://github.com/doctrine/common.git doctrine2-common<br/>$ cd doctrine2-common<br/>$ git checkout 2.2.0-RC4'
+ composer: true
pear_install_command: 'pear install pear.doctrine-project.org/DoctrineCommon-2.2.0RC4'
2.2.0:
package_name: DoctrineCommon-2.2.0-full.tar.gz
git_checkout_command: 'git clone git://github.com/doctrine/common.git doctrine2-common<br/>$ cd doctrine2-common<br/>$ git checkout 2.2.0'
+ composer: true
pear_install_command: 'pear install pear.doctrine-project.org/DoctrineCommon-2.2.0'
2.2.1:
package_name: DoctrineCommon-2.2.1-full.tar.gz
git_checkout_command: 'git clone git://github.com/doctrine/common.git doctrine2-common<br/>$ cd doctrine2-common<br/>$ git checkout 2.2.1'
pear_install_command: 'pear install pear.doctrine-project.org/DoctrineCommon-2.2.1'
+ composer: true
2.2.2:
package_name: DoctrineCommon-2.2.2-full.tar.gz
+ composer: true
git_checkout_command: 'git clone git://github.com/doctrine/common.git doctrine2-common<br/>$ cd doctrine2-common<br/>$ git checkout 2.2.2'
pear_install_command: 'pear install pear.doctrine-project.org/DoctrineCommon-2.2.2'

0 comments on commit f841bdb

Please sign in to comment.