don't show empty attrs in overview

This commit is contained in:
Tomáš Mládek 2017-03-08 10:10:23 +01:00
parent 5419bbf675
commit 33eeeec9e4

View file

@ -1,9 +1,15 @@
<div class="text document"> <div class="text document">
<h1><?= $doc["Title"] ?></h1> <h1><?= $doc["Title"] ?></h1>
<?php if (!empty($doc["Author"])): ?>
<h2><?= $doc["Author"] ?></h2> <h2><?= $doc["Author"] ?></h2>
<?php endif; ?>
<?php if (!empty($doc["Published"])): ?> <?php if (!empty($doc["Published"])): ?>
<h3>Published: <?= $doc["Published"] ?></h3> <h3>Published: <?= $doc["Published"] ?></h3>
<?php endif; ?> <?php endif; ?>
<?php if (!empty($doc["tags"])): ?>
<h3 class="doc-taglist">Tags: <h3 class="doc-taglist">Tags:
<? <?
foreach($doc["tags"] as $tag){ foreach($doc["tags"] as $tag){
@ -11,6 +17,11 @@
} }
?> ?>
</h3> </h3>
<?php endif; ?>
<?php if (!empty($doc["Description"])): ?>
<p class="doc-description"><span class="doc-description-intro">Description: </span><?= $doc["Description"] ?></p> <p class="doc-description"><span class="doc-description-intro">Description: </span><?= $doc["Description"] ?></p>
<?php endif; ?>
<div class="doc-link"><span class="doc-link-intro">Access file at: </span><a href="<?= $doc["URL"] ?>"><?= urldecode($doc["URL"]) ?></a></div> <div class="doc-link"><span class="doc-link-intro">Access file at: </span><a href="<?= $doc["URL"] ?>"><?= urldecode($doc["URL"]) ?></a></div>
</div> </div>