1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?php if(!empty($TemplateData['search'])) { ?>
- <div class="window">
- <div class="title-bar">
- <div class="title-bar-text"><?php echo $I18n->t('global.search'); ?></div>
- <div class="title-bar-controls">
- <button aria-label="<?php echo $I18n->t('global.close'); ?>" id="searchNoteWindowCloseButton"></button>
- </div>
- </div>
- <div class="window-body">
- <p><?php echo $I18n->t('global.search.resultfor', $TemplateData['search'] ?? ''); ?></p>
- </div>
- </div>
- <script>
- const searchNoteWindowCloseButton = document.getElementById('searchNoteWindowCloseButton');
- searchNoteWindowCloseButton.addEventListener('click', () => {
- window.location.href="index.php";
- });
- </script>
- <?php } ?>
- <?php foreach($TemplateData['latest'] as $k=>$v) { ?>
- <h4>
- <a href="index.php?p=collections&collection=<?php echo $k; echo $TemplateData['navSearched'] ?? ''; ?>"><?php echo $v['name']; ?></a>
- <?php echo $v['description']; ?>
- </h4>
- <?php if(isset($v['entries']['results'])) { ?>
- <div class="sunken-panel">
- <table width="100%">
- <thead>
- <tr>
- <th width="60px"><?php echo $I18n->t('global.image'); ?></th>
- <th width="300px"><?php echo $I18n->t('global.title'); ?></th>
- <th><?php echo $I18n->t('global.description'); ?></th>
- <th width="60px"><?php echo $I18n->t('global.view'); ?></th>
- </tr>
- </thead>
- <tbody>
- <?php foreach($v['entries']['results'] as $entryK=>$entry) { ?>
- <tr>
- <td>
- <?php if(isset($entry['fields']['coverimage'])) { ?>
- <a href="index.php?p=entry&collection=<?php echo $k ?>&id=<?php echo $entryK; ?>">
- <img src="<?php echo PATH_WEB_STORAGE.'/'.$k.'/'.$entryK.'/'.$entry['fields']['coverimage']['value']; ?>"
- alt="<?php echo $entry['fields']['coverimage']['displayname']; ?>"
- width="50px">
- </a>
- <?php } ?>
- </td>
- <td>
- <?php if(isset($entry['fields']['title'])) {
- echo $entry['fields']['title']['value'];
- } ?>
- </td>
- <td>
- <?php if(isset($entry['fields']['description']['value'])) {
- echo $entry['fields']['description']['value'];
- } ?>
- </td>
- <td>
- <a href="index.php?p=entry&collection=<?php echo $k ?>&id=<?php echo $entryK; ?>"><?php echo $I18n->t('global.view'); ?></a>
- </td>
- </tr>
- <?php } ?>
- </tbody>
- </table>
- </div>
- <?php } ?>
- <?php } ?>
|