Don't show an empty item-content-enclosure div

This commit is contained in:
Frederic Guillot 2015-01-19 19:43:15 -05:00
parent bb570ecd3e
commit e09133f004

View File

@ -67,23 +67,27 @@
<div id="item-content" <?= Helper\isRTL($item + array('rtl' => $feed['rtl'])) ? 'dir="rtl"' : '' ?>> <div id="item-content" <?= Helper\isRTL($item + array('rtl' => $feed['rtl'])) ? 'dir="rtl"' : '' ?>>
<?php if ($item['enclosure']): ?> <?php if ($item['enclosure']): ?>
<div id="item-content-enclosure">
<?php if (strpos($item['enclosure_type'], 'audio') !== false): ?> <?php if (strpos($item['enclosure_type'], 'audio') !== false): ?>
<div id="item-content-enclosure">
<audio controls> <audio controls>
<source src="<?= $item['enclosure'] ?>" type="<?= $item['enclosure_type'] ?>"> <source src="<?= $item['enclosure'] ?>" type="<?= $item['enclosure_type'] ?>">
</audio> </audio>
</div>
<?php elseif (strpos($item['enclosure_type'], 'video') !== false): ?> <?php elseif (strpos($item['enclosure_type'], 'video') !== false): ?>
<div id="item-content-enclosure">
<video controls> <video controls>
<source src="<?= $item['enclosure'] ?>" type="<?= $item['enclosure_type'] ?>"> <source src="<?= $item['enclosure'] ?>" type="<?= $item['enclosure_type'] ?>">
</video> </video>
</div>
<?php elseif (strpos($item['enclosure_type'], 'image') !== false && $item['content'] === ''): ?> <?php elseif (strpos($item['enclosure_type'], 'image') !== false && $item['content'] === ''): ?>
<div id="item-content-enclosure">
<?php if ($image_proxy_enabled): ?> <?php if ($image_proxy_enabled): ?>
<img src="?action=proxy&amp;url=<?= urlencode($item['enclosure']) ?>" alt="enclosure"/> <img src="?action=proxy&amp;url=<?= urlencode($item['enclosure']) ?>" alt="enclosure"/>
<?php else: ?> <?php else: ?>
<img src="<?= $item['enclosure'] ?>" alt="enclosure"/> <img src="<?= $item['enclosure'] ?>" alt="enclosure"/>
<?php endif ?> <?php endif ?>
</div>
<?php endif ?> <?php endif ?>
</div>
<?php endif ?> <?php endif ?>
<?= $item['content'] ?> <?= $item['content'] ?>