show UTC
[mdref/mdref] / views / index.phtml
index 6b4f2b1dd65fa4f153285ae53c5d88ba79347add..aa9b1ffb3a42f1386270737e45ea2af3f2b21c44 100644 (file)
@@ -1,16 +1,33 @@
+
 <h1>mdref</h1>
 
 <?php if (isset($html)) : ?>
        <?= $html ?>
 <?php elseif (isset($text)) : ?>
-       <p style="white-space:pre-wrap"><?= $view->esc($text) ?></p>
+
+       <p style="white-space:pre-wrap"><?= $esc($text) ?></p>
 <?php elseif (isset($refs)) : ?>
        <?php foreach ($refs as $repo) : /* @var \mdref\Repo $repo */ ?>
                <?php foreach ($repo as $entry) : /* @var \mdref\Entry $entry */ ?>
-               <h2>
-                       <a href="<?= $view->esc($entry->getName()) ?>"
-                       ><?= $view->esc($entry->getTitle()) ?></a></h2>
+
+               <h2 id="<?= $anchor($entry->getTitle()) ?>">
+                       <a href="<?= $esc($entry->getName()) ?>"
+                       ><?= $esc($entry->getTitle()) ?></a></h2>
                <div><?= $quick($entry->getIntro()) ?></div>
+                       <?php if ($repo->hasStub($stub)) : ?>
+                               <div>
+                                       <p><strong>Download the Stub file:</strong></p>
+                                       <ul style="list-style-type: '&raquo;'">
+                                               <li>
+                                                       <a href="stub?ref=<?= $entry->getName() ?>"><?= $entry->getName() ?>.stub.php</a><br>
+                                                       <small>
+                                                               Last modified:
+                                                               <?= date_create("@".filemtime($stub))->setTimezone(new DateTimezone("UTC"))->format("Y-m-d H:i:s T") ?>
+                                                       </small>
+                                               </li>
+                                       </ul>
+                               </div>
+                       <?php endif; ?>
                <?php endforeach; ?>
        <?php endforeach; ?>
-<?php endif; ?>
\ No newline at end of file
+<?php endif; ?>