Changeset View
Changeset View
Standalone View
Standalone View
common/templates/common/components/file.html
| {% load static %} | {% load static %} | ||||
| {% load thumbnail %} | {% load thumbnail %} | ||||
| {% load common_extras %} | {% load common_extras %} | ||||
| <div class="file grid-item {{ card_sizes|default:"col-12 col-sm-6 col-md-6 col-lg-4" }} {% if aspect_ratio == "16:9" %}widescreen{% elif aspect_ratio == "4:3" %}fourbythree{% elif aspect_ratio == "1:1" %}square{% endif %} {% if user_can_view_asset or asset.is_free %}{% else %}locked{% endif%}"> | <div class="file grid-item {{ card_sizes|default:"col-12 col-sm-6 col-md-6 col-lg-4" }} {% if aspect_ratio == "16:9" %}widescreen{% elif aspect_ratio == "4:3" %}fourbythree{% elif aspect_ratio == "1:1" %}square{% endif %} {% if request.user.is_authenticated and request.user|has_group:"subscriber" or asset.is_free %}{% else %}locked{% endif%}"> | ||||
| <div class="file-header"> | <div class="file-header"> | ||||
| <a href="?asset={{ asset.id }}" class="file-modal-link" data-asset-id="{{ asset.id }}" | <a href="?asset={{ asset.id }}" class="file-modal-link" data-asset-id="{{ asset.id }}" | ||||
| data-url="{% url 'api-asset' asset.id %}?site_context={{ site_context }}"> | data-url="{% url 'api-asset' asset.id %}?site_context={{ site_context }}"> | ||||
| {% if asset.static_asset.preview %} | {% if asset.static_asset.preview %} | ||||
| {% if user_can_view_asset or asset.is_free %} | {% if request.user.is_authenticated and request.user|has_group:"subscriber" or asset.is_free %} | ||||
| {% include "common/components/helpers/image_set.html" with alt=asset.name classes="file-image" img_source=asset.static_asset.preview xsmall_width="350" small_width="350" medium_width="350" large_width="350" xlarge_width="350" %} | {% include "common/components/helpers/image_set.html" with alt=asset.name classes="file-image" img_source=asset.static_asset.preview xsmall_width="350" small_width="350" medium_width="350" large_width="350" xlarge_width="350" %} | ||||
| {% else %} | {% else %} | ||||
| <div class="file-lock-text"> | <div class="file-lock-text"> | ||||
| <h4 class="mb-0"><i class="material-icons icon-inline small">lock</i>Subscribe to view</h4> | <h4 class="mb-0"><i class="material-icons icon-inline small">lock</i>Subscribe to view</h4> | ||||
| </div> | </div> | ||||
| {% include "common/components/helpers/image_set.html" with alt=asset.name classes="file-image locked" img_source=asset.static_asset.preview xsmall_width="200" small_width="200" medium_width="200" large_width="200" xlarge_width="200" %} | {% include "common/components/helpers/image_set.html" with alt=asset.name classes="file-image locked" img_source=asset.static_asset.preview xsmall_width="200" small_width="200" medium_width="200" large_width="200" xlarge_width="200" %} | ||||
| {% endif %} | {% endif %} | ||||
| {% if asset.contains_blend_file %} | {% if asset.contains_blend_file %} | ||||
| ▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines | |||||