extract stub.phtml
[mdref/mdref] / views / index.phtml
index aa9b1ffb3a42f1386270737e45ea2af3f2b21c44..db2accd3867eaf8ee18a9cac969e06e34bb1c55e 100644 (file)
                        ><?= $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 include __DIR__ . "/stub.phtml"; ?>
                        <?php endif; ?>
                <?php endforeach; ?>
        <?php endforeach; ?>