Free assets: Assets should not be advertised as free if the user is a logged in subscriber.
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
| {% set node_type = asset.properties.content_type if asset.properties.content_type else asset.node_type %}
|
| {% set node_type = asset.properties.content_type if asset.properties.content_type else asset.node_type %}
|
||||||
|
|
||||||
a.card.asset.card-image-fade.pr-0.mx-0.mb-2(
|
a.card.asset.card-image-fade.pr-0.mx-0.mb-2(
|
||||||
class="js-item-open {% if asset.permissions.world %}free{% endif %}",
|
class="js-item-open {% if asset.permissions.world and not current_user.has_cap('subscriber') %}free{% endif %}",
|
||||||
data-node_id="{{ asset._id }}",
|
data-node_id="{{ asset._id }}",
|
||||||
title="{{ asset.name }}",
|
title="{{ asset.name }}",
|
||||||
href='{{ url_for_node(node=asset) }}')
|
href='{{ url_for_node(node=asset) }}')
|
||||||
|
@@ -133,7 +133,8 @@ section.node-details-meta.pl-4.pr-2.py-2.border-bottom
|
|||||||
script(src="{{ url_for('static_cloud', filename='assets/js/tagged_assets.min.js') }}")
|
script(src="{{ url_for('static_cloud', filename='assets/js/tagged_assets.min.js') }}")
|
||||||
script.
|
script.
|
||||||
$(function() {
|
$(function() {
|
||||||
$('.js-asset-list').loadTaggedAssets(4, 0);
|
let is_subscriber = {{ current_user.has_cap('subscriber')|string|lower }};
|
||||||
|
$('.js-asset-list').loadTaggedAssets(4, 0, is_subscriber);
|
||||||
})
|
})
|
||||||
.tagged-similar.p-3
|
.tagged-similar.p-3
|
||||||
h6 Similar assets
|
h6 Similar assets
|
||||||
|
Reference in New Issue
Block a user