Skip to content

Commit

Permalink
Add downloads page
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelcullum committed Oct 11, 2013
1 parent 1eedde8 commit e57fb15
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 4 deletions.
5 changes: 4 additions & 1 deletion app/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ framework:
form: true
csrf_protection: true
validation: { enable_annotations: true }
templating: { engines: ['twig'] } #assets_version: SomeVersionScheme
templating:
engines: ['twig']
assets_version: 111020132212
assets_version_format: %%s?v%%s
session: ~
esi: { enabled: true }

Expand Down
27 changes: 26 additions & 1 deletion src/Phpbb/Area51Bundle/Controller/DefaultController.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ public function projectsAction()
{
return array(
'active_tab' => 'projects',

);
}

Expand Down Expand Up @@ -121,4 +120,30 @@ public function docsRedirectAction($path)
}
return $this->redirect($this->generateUrl('index'), 301);
}

/**
* @Route("/downloads/", name="downloads")
* @Template()
*/
public function downloadsAction()
{
// Make this false when the most recent release is not an RC/Alpha/Beta
$latestDevelopment = false;
$previousVersion = '3.0.12';
$currentVersion = '3.1.0-a1';
$currentBranch = '3.1';
$currentVersionFiles = 'https://download.phpbb.com/pub/release/' . $currentBranch
. '/' . $currentVersion . '/';
$currentUpgradeFiles = 'https://download.phpbb.com/pub/release/' . $currentBranch
. '/update/to_' . $currentVersion . '/';

return array(
'active_tab' => 'downloads',
'latestDevelopment' => $latestDevelopment,
'previousVersion' => $previousVersion,
'currentVersion' => $currentVersion,
'currentVersionFiles' => $currentVersionFiles,
'currentUpgradeFiles' => $currentUpgradeFiles,
);
}
}
47 changes: 47 additions & 0 deletions src/Phpbb/Area51Bundle/Resources/views/Default/downloads.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{% extends "PhpbbArea51Bundle::layout.html.twig" %}

{% block stylesheets %}
<style type="text/css">
li p {
margin-top: 0;
margin-bottom: 0;
}
</style>
{% endblock %}

{% block body %}
<div class="clearfix">
<h2>Downloads</h2>
<p>This page hosts the latest unstable development version. All releases on this page are unsupported. Please visit <a href="https://www.phpbb.com/downloads/">the main downloads page</a> for the latest stable release.</p>
{% if latestDevelopment %}
<h1>Latest Development Release: {{ currentVersion }} </h1>
<p>You can view the full set of files <a href="{{ currentVersionFiles }}">here</a></p>
<ul>
<li>
<p>Full Package - <a href="{{ currentVersionFiles }}phpBB-{{ currentVersion }}.zip">zip</a> | <a href="{{ currentVersionFiles }}phpBB-{{ currentVersion }}.tar.bz2">bz2</a></p>
</li>
<li>
<p>Patch Files from {{ previousVersion }} - <a href="{{ currentVersionFiles }}phpBB-{{ currentVersion }}-patch.zip">zip</a> | <a href="{{ currentVersionFiles }}phpBB-{{ currentVersion }}-patch.tar.bz2">bz2</a></p>
</li>
<li>
<p>Changed Files from {{ previousVersion }} - <a href="{{ currentVersionFiles }}phpBB-{{ currentVersion }}-files.zip">zip</a> | <a href="{{ currentVersionFiles }}phpBB-{{ currentVersion }}-files.tar.bz2">bz2</a></p>
</li>
<li>
<p>Automatic Update Package from {{ previousVersion }} - <a href="{{ currentUpgradeFiles }}phpBB-{{ previousVersion }}_to_{{ currentVersion }}.zip">zip</a> | <a href="{{ currentUpgradeFiles }}phpBB-{{ previousVersion }}_to_{{ currentVersion }}.tar.bz2">bz2</a></p>
</li>
<li>
<p>Language and Style Code Changes from {{ previousVersion }} - <a href="{{ currentUpgradeFiles }}phpBB-{{ previousVersion }}_to_{{ currentVersion }}-codechanges.zip">zip</a> | <a href="{{ currentUpgradeFiles }}phpBB-{{ previousVersion }}_to_{{ currentVersion }}-codechanges.tar.bz2">bz2</a></p>
</li>
</ul>
{% endif %}
<h1>Latest repository builds</h1>
<ul>
<li>
<p><a href="https://bamboo.phpbb.com/browse/PHPBB3-DEVELOP/latestSuccessful/artifact/JOBPACKAGE/Release-Files">Develop</a></p>
</li>
<li>
<p><a href="https://bamboo.phpbb.com/browse/PHPBB3-OLYMPUS/latestSuccessful/artifact/PACKAGE/Release-Files">Olympus</a></p>
</li>
</ul>
</div>
{% endblock %}
2 changes: 1 addition & 1 deletion src/Phpbb/Area51Bundle/Resources/views/layout.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<div id="phpbb-sub-header">
<div class="fixed-width">
{# <a href="/feed/" class="{{ active_tab == 'feed' ? 'active' : '' }} phpbb-tab">Feed</a> #}
{# <a href="{{ path('contributors') }}" class="{{ active_tab == 'contributors' ? 'active' : '' }} phpbb-tab">Contributors</a> #}
<a href="{{ path('downloads') }}" class="{{ active_tab == 'downloads' ? 'active' : '' }} phpbb-tab">Downloads</a>
<a href="{{ path('stats') }}" class="{{ active_tab == 'stats' ? 'active' : '' }} phpbb-tab">Statistics</a>
<a href="{{ path('index') }}" class="{{ active_tab == 'index' ? 'active' : '' }} phpbb-tab">Main</a>
<h1>Home of phpBB Development</h1>
Expand Down
2 changes: 1 addition & 1 deletion web/area51.css
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ a.issue.closed, a.issue.closed:link, a.issue.closed:visited {
}

li p {
margin-top:0;
margin-top: 0;
}

ul.section-list, ul.contribution-list {
Expand Down

0 comments on commit e57fb15

Please sign in to comment.