blob: 712a8ec553f66b0eeb38a7b09fc61f61289a76aa [file] [log] [blame]
<?php
/**
* Copyright (c) 2017, 2018 Eclipse Foundation and others.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* Contributors:
* Wayne Beaton (Eclipse Foundation) - Initial implementation
* Eric Poirier (Eclipse Foundation)
*
* SPDX-License-Identifier: EPL-2.0
*/
require_once ($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php");
require_once ($_SERVER['DOCUMENT_ROOT'] . "/projects/classes/Project.class.php");
$App = new App();
$Theme = $App->getThemeClass();
include($App->getProjectCommon());
$pageTitle ="Eclipse Public License 2.0";
$source = dirname(__FILE__) . "/../../org/documents/epl-2.0/EPL-2.0.html";
// FIXME Workaround because I can't get Asciidoctor to generate embeddable HTML
function getBodyContent($path)
{
$DOMDocument = new DOMDocument();
$DOMDocument->loadHTMLFile($path);
$body = $DOMDocument->getElementsByTagName('body')->item(0);
$content = "";
foreach ($body->childNodes as $childNode) {
$content .= $DOMDocument->saveHTML($childNode);
}
return $content;
}
ob_start();
?>
<style type="text/css">
#midcolumn h2{
font-size:18px;
}
#midcolumn ul,
#midcolumn ol{
list-style-type:none;
}
</style>
<div id="maincontent">
<div id="midcolumn">
<?php print getBodyContent($source); ?>
</div>
<div id="rightcolumn">
<div class="sideitem">
<h6>Eclipse Projects that Use EPL 2.0</h6>
<ul>
<?php
foreach(Project::getProjectsWithLicense('EPL-2.0') as $project) {
echo "<li><a href=\"{$project->getUrl()}\">{$project->getFormalName()}</a></li>";
}
?>
</ul>
</div>
</div>
</div>
<?php
$html = ob_get_clean();
$Theme->setPageTitle($pageTitle);
$Theme->setPageKeywords("");
$Theme->setPageAuthor("Wayne Beaton");
$Theme->setHtml($html);
$Theme->setNav($Nav);
$Theme->generatePage();