[Commits] [svn:einsteintoolkit] www/documentation/ThornDoc/ (Rev. 1150)
barry.wardell at gmail.com
barry.wardell at gmail.com
Fri Mar 14 13:04:21 CDT 2014
User: barry.wardell
Date: 2014/03/14 01:04 PM
Modified:
/documentation/ThornDoc/
index.php
Log:
Make arrangement labels into links to the arrangement docs
File Changes:
Directory: /documentation/ThornDoc/
===================================
File [modified]: index.php
Delta lines: +17 -18
===================================================================
--- documentation/ThornDoc/index.php 2014-03-14 18:04:12 UTC (rev 1149)
+++ documentation/ThornDoc/index.php 2014-03-14 18:04:21 UTC (rev 1150)
@@ -20,41 +20,40 @@
Thorn documentation is available for the individual thorns and arrangements listed below.
It is alternatively available as a <a href="All/">single HTML file</a>.
-<h4>Arrangements</h4>
-
<?php
- $arrangementlist = glob("*/documentation.html");
- sort($arrangementlist);
-
- echo "<ul>";
- foreach($arrangementlist as $arrangement)
- {
- $arr = dirname($arrangement);
- echo "<li class=\"doclist\"><a href='$arr/'>$arr</a></li>";
- }
- echo "</ul>";
-
$thorns = glob("*/*", GLOB_ONLYDIR);
+ $arrangement_docs = glob("*/documentation.html");
$arrangements = array();
foreach($thorns as $thorn_path)
{
$thorn = basename($thorn_path);
$arrangement = dirname($thorn_path);
- $arrangements[$arrangement][] = $thorn;
+ $arrangements[$arrangement][$thorn] = $arrangement . "/" . $thorn;
}
- ksort($arrangements);
+ foreach($arrangement_docs as $arrangement_doc)
+ {
+ $arrangement = dirname($arrangement_doc);
+ $arrangements[$arrangement]["Arrangement Documentation"] = $arrangement;
+ }
+
+ ksort($arrangements);
foreach($arrangements as $name => $arrangement)
{
- echo "<h4>$name</h4>\n";
+ ksort($arrangement);
+ if(array_key_exists("Arrangement Documentation", $arrangement)) {
+ echo "<h4><a href='$name'>$name</a></h4>\n";
+ } else {
+ echo "<h4>$name</h4>\n";
+ }
echo "<ul>";
- foreach($arrangement as $thorn)
+ foreach($arrangement as $thorn => $link)
{
if (file_exists("$name/$thorn/documentation.html"))
{
- echo "<li class=\"doclist\"><a href='$name/$thorn/'>$thorn</a></li>\n";
+ echo "<li class=\"doclist\"><a href='$link/'>$thorn</a></li>\n";
}
else
{
More information about the Commits
mailing list