documentlist.php 860 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. // TODO: Make this MVC-style
  3. $documents = Document::getDocumentsByLabelId($this->_['labelId']);
  4. ?>
  5. <table class="table table-striped">
  6. <thead>
  7. <tr>
  8. <th>Typ</th>
  9. <th>Name</th>
  10. <th>Vorlage</th>
  11. <th>Erstellt am</th>
  12. <th>Letzte Änderung</th>
  13. </tr>
  14. </thead>
  15. <?php
  16. foreach($documents as $document) {
  17. echo '<tr>';
  18. echo '<td>' . $document->getType() . '</td>'; // TODO: Icon instead of text
  19. echo '<td>' . $document->getFileName() . '</td>';
  20. echo '<td>' . $document->getDraft() . '</td>';
  21. echo '<td>' . $document->getCreated() . '</td>';
  22. echo '<td>' . $document->getLastChange() . '</td>';
  23. echo '</tr>';
  24. }
  25. ?>
  26. </table>
  27. <a id="new-document" href="ajax.php?action=getNewDocumentBox" type="button" class="btn btn-success fancybox.ajax">New Document</a>