summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorb_b <bruno@eliaz.fr>2019-11-10 08:19:05 +0100
committerBenjamin Brahmer <info@b-brahmer.de>2019-11-10 08:19:05 +0100
commit44658773bf864042ba5f9d4937a28b4ce4e9cc56 (patch)
tree6b4c49de0e3d7f3471d4f362ed3fd48ecf990181 /templates
parent71cfef02bc8751185ce01fc2803f62e519655cac (diff)
Generate enclosure div only for audio & video (#567)
Generate enclosure div only for audio & video Fix #532 Signed-off-by: brunob <bruno@eliaz.fr>
Diffstat (limited to 'templates')
-rw-r--r--templates/part.content.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/templates/part.content.php b/templates/part.content.php
index bfaa3133b..b7cf52243 100644
--- a/templates/part.content.php
+++ b/templates/part.content.php
@@ -130,19 +130,20 @@
</span>
</div>
- <div class="enclosure" ng-if="item.enclosureLink">
- <video controls preload="none" ng-if="Content.getMediaType(item.enclosureMime) =='video'" news-play-one ng-src="{{ item.enclosureLink|trustUrl }}" type="{{ item.enclosureMime }}">
+ <div class="enclosure" ng-if="Content.getMediaType(item.enclosureMime) == 'audio'">
+ <button ng-click="App.play(item)"><?php p($l->t('Play audio')) ?></button>
+ <a class="button" ng-href="{{ item.enclosureLink|trustUrl }}" target="_blank" rel="noreferrer">
+ <?php p($l->t('Download audio')) ?>
+ </a>
+ </div>
+ <div class="enclosure" ng-if="Content.getMediaType(item.enclosureMime) == 'video'">
+ <video controls preload="none" news-play-one ng-src="{{ item.enclosureLink|trustUrl }}" type="{{ item.enclosureMime }}">
</video>
- <button ng-if="Content.getMediaType(item.enclosureMime) == 'audio'" ng-click="App.play(item)"><?php p($l->t('Play audio')) ?></button>
- <a ng-show="Content.getMediaType(item.enclosureMime) =='video'" class="button" ng-href="{{ item.enclosureLink|trustUrl }}" target="_blank" rel="noreferrer">
+ <a class="button" ng-href="{{ item.enclosureLink|trustUrl }}" target="_blank" rel="noreferrer">
<?php p($l->t('Download video')) ?>
</a>
- <a ng-show="Content.getMediaType(item.enclosureMime) =='audio'" class="button" ng-href="{{ item.enclosureLink|trustUrl }}" target="_blank" rel="noreferrer">
- <?php p($l->t('Download audio')) ?>
- </a>
</div>
-
<div class="body" news-bind-html-unsafe="item.body" ng-attr-dir="{{item.rtl && 'rtl'}}"></div>
</div>