Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $transitcodes = $data->transitcode()->split(); // this gives us an array of the transit codes
- $items = page('datenbank')->children()->filterBy('template', 'document')->filter(function($item) use($transitcodes) {
- // within the callback, we check of the item's identifier is in the array and return if true
- return in_array($item->documentidentifiercode(), $transitcodes);};
- foreach($items as $item): ?>
- <?= $item->title()->html() ?>
- <span class="color-<?php if($item->documenttype() == 'Arbeitshilfe'): ?>a<?php endif; ?><?php if($item->documenttype() == 'Formular'): ?>b<?php endif; ?><?php if($item->documenttype() == 'MitgeltendeUnterlagen'): ?>c<?php endif; ?><?php if($item->documenttype() == 'Intern'): ?>d<?php endif; ?><?php if($item->documenttype() == 'Verfahrensbeschreibung'): ?>e<?php endif; ?>">
- <?php if($item->documenttype() == 'Verfahrensbeschreibung'): ?>
- <i class="fas fa-exclamation-circle"></i></span>
- <?php else: ?>
- <i class="fas fa-circle"></i></span>
- <?php endif; ?>
- <?php if($item->documenttype() == 'Arbeitshilfe'): ?>Arbeitshilfe<?php endif; ?>
- <?php if($item->documenttype() == 'Formular'): ?>Formular<?php endif; ?>
- <?php if($item->documenttype() == 'MitgeltendeUnterlagen'): ?>Mitgeltende Unterlagen<?php endif; ?>
- <?php if($item->documenttype() == 'Intern'): ?>Intern<?php endif; ?>
- <?php if($item->documenttype() == 'Verfahrensbeschreibung'): ?>Verfahrensbeschreibung<?php endif; ?>
- <a href="<?php if($file = $item->documentselect()->toFile()) {echo $file->url();} ?>"><button class="btn is-download"><i class="fas fa-arrow-down"></i></button></a>
- </li>
- <?php if($item->documentlastchange() == 'delete'): ?>
- <li class="line-three"></li>
- <?php else: ?>
- <li class="line-three">
- <?php if ($item->documentdescription()->isNotEmpty()): ?>
- <button class="btn is-detail"><i class="fas fa-info-circle"></i> Info </button>
- <div class="content-expanded">
- <?= $item->documentdescription()->kt()?>
- </div>
- <?php else: ?>
- <?php endif; ?>
- <?php endif; ?>
- </li>
- </ul>
- <?php endforeach ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement