Changeset View
Changeset View
Standalone View
Standalone View
common/templates/common/components/file_section.html
| {% load static %} | {% load static %} | ||||
| {% load thumbnail %} | {% load thumbnail %} | ||||
| {% load common_extras %} | {% load common_extras %} | ||||
| <div class="{{ card_sizes|default:"col-12 col-sm-6 col-md-6 col-lg-4" }} grid-item card-grid-item"> | <div class="{{ card_sizes|default:"col-12 col-sm-6 col-md-6 col-lg-4" }} grid-item card-grid-item"> | ||||
| <div class="file"> | <div class="file"> | ||||
| <div class="file-header"> | <div class="file-header"> | ||||
| <a href="{{ section.url }}" class="file-folder-link"> | <a href="{{ section.url }}" class="file-folder-link"> | ||||
| {% if section.thumbnail_s_url %} | {% if section.thumbnail_s_url %} | ||||
| <img class="file-image" src="{{ section.thumbnail_s_url }}" alt="{{ section.name }}" /> | <img class="file-image" src="{{ section.thumbnail_s_url }}" alt="{{ section.name }}" /> | ||||
| {% endif %} | {% endif %} | ||||
| {% if section.static_asset.source|endswith:".blend" %} | {% if section.static_asset.source|endswith:".blend" %} | ||||
| <img class="file-icon" src="{% static "common/images/icons/blend.svg" %}" alt="asset preview"> | <img class="file-icon" src="{% static "common/images/icons/blend.svg" %}" alt="asset preview"> | ||||
| {% elif section.static_asset.source_type == "file" %} | {% elif section.static_asset.source_type == "file" %} | ||||
| <img class="file-icon" src="{% static "common/images/icons/file.svg" %}" alt="asset preview"> | <img class="file-icon" src="{% static "common/images/icons/file.svg" %}" alt="asset preview"> | ||||
| {% elif section.static_asset.source_type == "video" %} | {% elif section.static_asset.source_type == "video" %} | ||||
| <div class="badge badge-video-duration badge-darkhighlight-xstrong"> | <div class="badge badge-video-duration badge-darkhighlight-xstrong"> | ||||
| {% firstof section.duration_label section.static_asset.video.duration_label %} | {% firstof section.duration_label section.static_asset.video.duration_label %} | ||||
| </div> | </div> | ||||
| {% endif %} | {% endif %} | ||||
| </a> | </a> | ||||
| </div> | </div> | ||||
| <a class="file-body" href="{{ section.url }}" data-tooltip="tooltip-overflow" data-placement="top" | <a class="file-body" href="{{ section.url }}" data-tooltip="tooltip-overflow" data-placement="top" | ||||
| title="{{ section.name }}"> | title="{{ section.name }}"> | ||||
| {% if section.is_free %} | {% if section.is_free %} | ||||
| <i class="material-icons icon-inline small text-success mr-1" data-toggle="tooltip" data-placement="top" | <i class="material-icons icon-inline small text-success mr-1" data-toggle="tooltip" data-placement="top" | ||||
| title="Free">lock_open</i> | title="Free">lock_open</i> | ||||
| {% endif %} | {% endif %} | ||||
| <h4 class="overflow-text">{{ section.name }}</h4> | <h4 class="overflow-text">{{ section.name }}</h4> | ||||
| </a> | </a> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||