dashboard.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php if(!empty($TemplateData['search'])) { ?>
  2. <div class="window">
  3. <div class="title-bar">
  4. <div class="title-bar-text"><?php echo $I18n->t('global.search'); ?></div>
  5. <div class="title-bar-controls">
  6. <button aria-label="<?php echo $I18n->t('global.close'); ?>" id="searchNoteWindowCloseButton"></button>
  7. </div>
  8. </div>
  9. <div class="window-body">
  10. <p><?php echo $I18n->t('global.search.resultfor', $TemplateData['search'] ?? ''); ?></p>
  11. </div>
  12. </div>
  13. <script>
  14. const searchNoteWindowCloseButton = document.getElementById('searchNoteWindowCloseButton');
  15. searchNoteWindowCloseButton.addEventListener('click', () => {
  16. window.location.href="index.php";
  17. });
  18. </script>
  19. <?php } ?>
  20. <?php foreach($TemplateData['latest'] as $k=>$v) { ?>
  21. <h4>
  22. <a href="index.php?p=collections&collection=<?php echo $k; echo $TemplateData['navSearched'] ?? ''; ?>"><?php echo $v['name']; ?></a>
  23. <?php echo $v['description']; ?>
  24. </h4>
  25. <?php if(isset($v['entries']['results'])) { ?>
  26. <div class="sunken-panel">
  27. <table width="100%">
  28. <thead>
  29. <tr>
  30. <th width="60px"><?php echo $I18n->t('global.image'); ?></th>
  31. <th width="300px"><?php echo $I18n->t('global.title'); ?></th>
  32. <th><?php echo $I18n->t('global.description'); ?></th>
  33. <th width="60px"><?php echo $I18n->t('global.view'); ?></th>
  34. </tr>
  35. </thead>
  36. <tbody>
  37. <?php foreach($v['entries']['results'] as $entryK=>$entry) { ?>
  38. <tr>
  39. <td>
  40. <?php if(isset($entry['fields']['coverimage'])) { ?>
  41. <a href="index.php?p=entry&collection=<?php echo $k ?>&id=<?php echo $entryK; ?>">
  42. <img src="<?php echo PATH_WEB_STORAGE.'/'.$k.'/'.$entryK.'/'.$entry['fields']['coverimage']['value']; ?>"
  43. alt="<?php echo $entry['fields']['coverimage']['displayname']; ?>"
  44. width="50px">
  45. </a>
  46. <?php } ?>
  47. </td>
  48. <td>
  49. <?php if(isset($entry['fields']['title'])) {
  50. echo $entry['fields']['title']['value'];
  51. } ?>
  52. </td>
  53. <td>
  54. <?php if(isset($entry['fields']['description']['value'])) {
  55. echo $entry['fields']['description']['value'];
  56. } ?>
  57. </td>
  58. <td>
  59. <a href="index.php?p=entry&collection=<?php echo $k ?>&id=<?php echo $entryK; ?>"><?php echo $I18n->t('global.view'); ?></a>
  60. </td>
  61. </tr>
  62. <?php } ?>
  63. </tbody>
  64. </table>
  65. </div>
  66. <?php } ?>
  67. <?php } ?>