Changeset View
Changeset View
Standalone View
Standalone View
films/templates/films/gallery.html
| {% extends 'films/base_films.html' %} | {% extends 'films/base_films.html' %} | ||||
| {% load common_extras %} | {% load common_extras %} | ||||
| {% load film_extras %} | {% load film_extras %} | ||||
| {% load static %} | {% load static %} | ||||
| {% block title_prepend %}{{ film.title }} Content Gallery - {% endblock title_prepend %} | {% block title_prepend %}{{ film.title }} Content Gallery - {% endblock title_prepend %} | ||||
| {% block meta %} | {% block meta %} | ||||
| {% firstof asset.url current_collection.url as url %} | {% firstof asset.url current_collection.url as url %} | ||||
| {% firstof asset.description asset.collection.text current_collection.text film.description as description %} | {% firstof asset.description asset.collection.text current_collection.text film.description as description %} | ||||
| {% firstof asset.static_asset.thumbnail_m_url film.thumbnail_m_url as image_url %} | {% firstof asset.static_asset.thumbnail_m_url film.thumbnail_m_url as image_url %} | ||||
| {% if asset and asset.collection.name %} | {% if asset and asset.collection.name %} | ||||
| {% capture title %}{{ film.title }} - {{ asset.collection.name }}: {{ asset.name }}{% endcapture %} | {% capture title %}{{ film.title }} - {{ asset.collection.name }}: {{ asset.name }}{% endcapture %} | ||||
| {% elif asset %} | {% elif asset %} | ||||
| {% capture title %}{{ film.title }} - {{ asset.name }}{% endcapture %} | {% capture title %}{{ film.title }} - {{ asset.name }}{% endcapture %} | ||||
| {% elif current_collection %} | {% elif current_collection %} | ||||
| {% capture title %}{{ film.title }} - {{ current_collection.name }}{% endcapture %} | {% capture title %}{{ film.title }} - {{ current_collection.name }}{% endcapture %} | ||||
| {% else %} | {% else %} | ||||
| {% capture title %}{{ film.title }} - Featured Artwork{% endcapture %} | {% capture title %}{{ film.title }} - Featured Artwork{% endcapture %} | ||||
| {% endif %} | {% endif %} | ||||
| {% firstof title film.title as title %} | {% firstof title film.title as title %} | ||||
| {% include 'common/components/meta.html' %} | {% include 'common/components/meta.html' %} | ||||
| {% endblock %} | {% endblock %} | ||||
| {% block bodyclasses %} | {% block bodyclasses %} | ||||
| {% comment %} has-nav-drawer{% endcomment %} | {% comment %} has-nav-drawer{% endcomment %} | ||||
| has-secondary-nav | has-secondary-nav | ||||
| {% endblock bodyclasses %} | {% endblock bodyclasses %} | ||||
| {% block nav_drawer_inner %} | {% block nav_drawer_inner %} | ||||
| <div class="nav-drawer-inner"> | <div class="nav-drawer-inner"> | ||||
| <div class="drawer-nav-header"> | <div class="drawer-nav-header"> | ||||
| <p class="subtitle">Content Gallery</p> | <p class="subtitle">Content Gallery</p> | ||||
| <h2 class="mb-1">{{ film.title }}</h2> | <h2 class="mb-1">{{ film.title }}</h2> | ||||
| </div> | </div> | ||||
| <div class="drawer-nav-group"> | <div class="drawer-nav-group"> | ||||
| <div class="drawer-nav-dropdown-wrapper"> | <div class="drawer-nav-dropdown-wrapper"> | ||||
| <a class="drawer-nav-dropdown h3 " href="{% url 'film-gallery' film_slug=film.slug %}"> | <a class="drawer-nav-dropdown h3 " href="{% url 'film-gallery' film_slug=film.slug %}"> | ||||
| <i class="material-icons mr-2">grade</i> | <i class="material-icons mr-2">grade</i> | ||||
| Featured Artwork | Featured Artwork | ||||
| </a> | </a> | ||||
| {% comment %} {% if admin_change_href is not none %} | {% comment %} {% if admin_change_href is not none %} | ||||
| <a href="{{ admin_change_href }}">edit</a> | <a href="{{ admin_change_href }}">edit</a> | ||||
| {% endif %} {% endcomment %} | {% endif %} {% endcomment %} | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| {% for collection, child_collections in collections.items %} | {% for collection, child_collections in collections.items %} | ||||
| <div class="drawer-nav-dropdown-wrapper"> | <div class="drawer-nav-dropdown-wrapper"> | ||||
| {% if child_collections %} | {% if child_collections %} | ||||
| <a class="drawer-nav-dropdown h3 dropdown" href="{{ collection.url }}"> | <a class="drawer-nav-dropdown h3 dropdown" href="{{ collection.url }}"> | ||||
| <span class="drawer-nav-dropdown-text"> | <span class="drawer-nav-dropdown-text"> | ||||
| {{ collection.name }} | {{ collection.name }} | ||||
| </span> | </span> | ||||
| </a> | </a> | ||||
| <a class="drawer-nav-dropdown icon {% if current_collection.parent.parent != collection and current_collection.parent != collection and current_collection != collection %}collapsed{% endif %}" | <a class="drawer-nav-dropdown icon {% if current_collection.parent.parent != collection and current_collection.parent != collection and current_collection != collection %}collapsed{% endif %}" | ||||
| data-toggle="collapse" data-target="#collection-{{ collection.id }}"> | data-toggle="collapse" data-target="#collection-{{ collection.id }}"> | ||||
| <i class="material-icons">keyboard_arrow_down</i> | <i class="material-icons">keyboard_arrow_down</i> | ||||
| </a> | </a> | ||||
| {% else %} | {% else %} | ||||
| <a class="drawer-nav-dropdown h3 {% if current_collection.parent != collection and current_collection != collection %}collapsed{% endif %}" | <a class="drawer-nav-dropdown h3 {% if current_collection.parent != collection and current_collection != collection %}collapsed{% endif %}" | ||||
| href="{{ collection.url }}" {% if child_collections %}data-toggle="collapse" | href="{{ collection.url }}" {% if child_collections %}data-toggle="collapse" | ||||
| data-target="#collection-{{ collection.id }}" {% endif %}> | data-target="#collection-{{ collection.id }}" {% endif %}> | ||||
| <span class="drawer-nav-dropdown-text"> | <span class="drawer-nav-dropdown-text"> | ||||
| {{ collection.name }} | {{ collection.name }} | ||||
| </span> | </span> | ||||
| </a> | </a> | ||||
| {% endif %} | {% endif %} | ||||
| {% if user_can_edit_collection %} | {% if user_can_edit_collection %} | ||||
| <a href="{{ collection.admin_url }}" class="btn btn-secondary btn-xs btn-icon btn-float"> | <a href="{{ collection.admin_url }}" class="btn btn-secondary btn-xs btn-icon btn-float"> | ||||
| <i class="material-icons btn-material-icons">create</i> | <i class="material-icons btn-material-icons">create</i> | ||||
| </a> | </a> | ||||
| {% endif %} | {% endif %} | ||||
| </div> | </div> | ||||
| {% if child_collections %} | {% if child_collections %} | ||||
| <div | <div | ||||
| class="collapse {% if current_collection.parent == collection or current_collection == collection %}show{% endif %}" | class="collapse {% if current_collection.parent == collection or current_collection == collection %}show{% endif %}" | ||||
| id="collection-{{ collection.id }}"> | id="collection-{{ collection.id }}"> | ||||
| <ol class="drawer-nav-list "> | <ol class="drawer-nav-list "> | ||||
| {% for child_collection in child_collections %} | {% for child_collection in child_collections %} | ||||
| <li class="drawer-nav-section"> | <li class="drawer-nav-section"> | ||||
| <a href="{{ child_collection.url }}" class="drawer-nav-section-link"> | <a href="{{ child_collection.url }}" class="drawer-nav-section-link"> | ||||
| <i class="material-icons">folder</i> | <i class="material-icons">folder</i> | ||||
| <h4>{{ child_collection.name }}</h4> | <h4>{{ child_collection.name }}</h4> | ||||
| </a> | </a> | ||||
| {% comment %} {% if user_can_edit_collection %} | {% comment %} {% if user_can_edit_collection %} | ||||
| <a href="{{ child_collection.admin_url }}" target="_blank" class="btn btn-secondary btn-xs btn-float btn-icon"> | <a href="{{ child_collection.admin_url }}" target="_blank" class="btn btn-secondary btn-xs btn-float btn-icon"> | ||||
| <i class="material-icons btn-material-icons">create</i> | <i class="material-icons btn-material-icons">create</i> | ||||
| </a> | </a> | ||||
| {% endif %} {% endcomment %} | {% endif %} {% endcomment %} | ||||
| </li> | </li> | ||||
| {% endfor %} | {% endfor %} | ||||
| </ol> | </ol> | ||||
| </div> | </div> | ||||
| {% endif %} | {% endif %} | ||||
| {% endfor %} | {% endfor %} | ||||
| </div> | </div> | ||||
| {% endblock nav_drawer_inner %} | {% endblock nav_drawer_inner %} | ||||
| {% block content %} | {% block content %} | ||||
| <div class="container-xl pt-3"> | <div class="container-xl pt-3"> | ||||
| <div class="row"> | <div class="row"> | ||||
| <div class="col-md-4 col-lg-3 mb-3 d-none d-md-block"> | <div class="col-md-4 col-lg-3 mb-3 d-none d-md-block"> | ||||
| {% block nested_nav_drawer %} | {% block nested_nav_drawer %} | ||||
| <nav class="nav-drawer nested"> | <nav class="nav-drawer nested"> | ||||
| <div class="nav-drawer-body"> | <div class="nav-drawer-body"> | ||||
| {% block nested_nav_drawer_inner %} | {% block nested_nav_drawer_inner %} | ||||
| <div class="drawer-nav-group"> | <div class="drawer-nav-group"> | ||||
| <div class="drawer-nav-dropdown-wrapper"> | <div class="drawer-nav-dropdown-wrapper"> | ||||
| <a class="drawer-nav-dropdown font-weight-bold" href="{% url 'film-gallery' film_slug=film.slug %}" | <a class="drawer-nav-dropdown font-weight-bold" href="{% url 'film-gallery' film_slug=film.slug %}" | ||||
| data-tooltip="tooltip-overflow" data-placement="top" title="Featured Artwork"> | data-tooltip="tooltip-overflow" data-placement="top" title="Featured Artwork"> | ||||
| <i class="material-icons mr-2">grade</i> | <i class="material-icons mr-2">grade</i> | ||||
| <span class="overflow-text">Featured Artwork</span> | <span class="overflow-text">Featured Artwork</span> | ||||
| </a> | </a> | ||||
| {% comment %} {% if admin_change_href is not none %} | {% comment %} {% if admin_change_href is not none %} | ||||
| <a href="{{ admin_change_href }}">edit</a> | <a href="{{ admin_change_href }}">edit</a> | ||||
| {% endif %} {% endcomment %} | {% endif %} {% endcomment %} | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| {% for collection, child_collections in collections.items %} | {% for collection, child_collections in collections.items %} | ||||
| <div class="drawer-nav-dropdown-wrapper"> | <div class="drawer-nav-dropdown-wrapper"> | ||||
| {% if child_collections %} | {% if child_collections %} | ||||
| <a class="drawer-nav-dropdown font-weight-bold dropdown" href="{{ collection.url }}" | <a class="drawer-nav-dropdown font-weight-bold dropdown" href="{{ collection.url }}" | ||||
| data-tooltip="tooltip-overflow" data-placement="top" title="{{ collection.name }}"> | data-tooltip="tooltip-overflow" data-placement="top" title="{{ collection.name }}"> | ||||
| <span class="drawer-nav-dropdown-text overflow-text"> | <span class="drawer-nav-dropdown-text overflow-text"> | ||||
| {{ collection.name }} | {{ collection.name }} | ||||
| </span> | </span> | ||||
| </a> | </a> | ||||
| <a class="drawer-nav-dropdown icon {% if current_collection.parent.parent != collection and current_collection.parent != collection and current_collection != collection %}collapsed{% endif %}" | <a class="drawer-nav-dropdown icon {% if current_collection.parent.parent != collection and current_collection.parent != collection and current_collection != collection %}collapsed{% endif %}" | ||||
| data-toggle="collapse" data-target="#collection-{{ collection.id }}"> | data-toggle="collapse" data-target="#collection-{{ collection.id }}"> | ||||
| <i class="material-icons">keyboard_arrow_down</i> | <i class="material-icons">keyboard_arrow_down</i> | ||||
| </a> | </a> | ||||
| {% else %} | {% else %} | ||||
| <a class="drawer-nav-dropdown font-weight-bold" href="{{ collection.url }}" data-tooltip="tooltip-overflow" | <a class="drawer-nav-dropdown font-weight-bold" href="{{ collection.url }}" data-tooltip="tooltip-overflow" | ||||
| data-placement="top" title="{{ collection.name }}"> | data-placement="top" title="{{ collection.name }}"> | ||||
| <span class="drawer-nav-dropdown-text overflow-text"> | <span class="drawer-nav-dropdown-text overflow-text"> | ||||
| {{ collection.name }} | {{ collection.name }} | ||||
| </span> | </span> | ||||
| </a> | </a> | ||||
| {% endif %} | {% endif %} | ||||
| </div> | </div> | ||||
| {% if child_collections %} | {% if child_collections %} | ||||
| <div | <div | ||||
| class="collapse {% if current_collection.parent == collection or current_collection.parent.parent == collection or current_collection == collection %}show{% endif %}" | class="collapse {% if current_collection.parent == collection or current_collection.parent.parent == collection or current_collection == collection %}show{% endif %}" | ||||
| id="collection-{{ collection.id }}"> | id="collection-{{ collection.id }}"> | ||||
| <ol class="drawer-nav-list "> | <ol class="drawer-nav-list "> | ||||
| {% for child_collection in child_collections %} | {% for child_collection in child_collections %} | ||||
| <li class="drawer-nav-section"> | <li class="drawer-nav-section"> | ||||
| <a href="{{ child_collection.url }}" class="drawer-nav-section-link" data-tooltip="tooltip-overflow" | <a href="{{ child_collection.url }}" class="drawer-nav-section-link" data-tooltip="tooltip-overflow" | ||||
| data-placement="top" title="{{ child_collection.name }}"> | data-placement="top" title="{{ child_collection.name }}"> | ||||
| <i class="material-icons">folder</i> | <i class="material-icons">folder</i> | ||||
| <h4 class="overflow-text">{{ child_collection.name }}</h4> | <h4 class="overflow-text">{{ child_collection.name }}</h4> | ||||
| </a> | </a> | ||||
| </li> | </li> | ||||
| {% endfor %} | {% endfor %} | ||||
| </ol> | </ol> | ||||
| </div> | </div> | ||||
| {% endif %} | {% endif %} | ||||
| {% endfor %} | {% endfor %} | ||||
| {% endblock nested_nav_drawer_inner %} | {% endblock nested_nav_drawer_inner %} | ||||
| </div> | </div> | ||||
| </nav> | </nav> | ||||
| {% endblock nested_nav_drawer %} | {% endblock nested_nav_drawer %} | ||||
| </div> | </div> | ||||
| <div class="col col-md-8 col-lg-9"> | <div class="col col-md-8 col-lg-9"> | ||||
| {% block nested_content %} | {% block nested_content %} | ||||
| {% show_breadcrumbs %} | {% show_breadcrumbs %} | ||||
| {% block gallery_files %} | {% block gallery_files %} | ||||
| <div class=""> | <div class=""> | ||||
| <div class="files row grid"> | <div class="files row grid"> | ||||
| {% if featured_artwork %} | {% if featured_artwork %} | ||||
| <div class="grid-sizer col-6 col-sm-6 col-md-6 col-lg-4"></div> | <div class="grid-sizer col-6 col-sm-6 col-md-6 col-lg-4"></div> | ||||
| {% for asset in featured_artwork %} | {% for asset in featured_artwork %} | ||||
| {% if asset.is_published or user_can_edit_collection %} | {% if asset.is_published or user_can_edit_collection %} | ||||
| {% include "common/components/file.html" with asset=asset site_context="featured_artwork" card_sizes="col-6 col-sm-6 col-md-6 col-lg-4" %} | {% include "common/components/file.html" with asset=asset site_context="featured_artwork" card_sizes="col-6 col-sm-6 col-md-6 col-lg-4" %} | ||||
| {% endif %} | {% endif %} | ||||
| {% endfor %} | {% endfor %} | ||||
| {% else %} | {% else %} | ||||
| <div class="d-inline-block w-100"> | <div class="d-inline-block w-100"> | ||||
| <div class="text-center"> | <div class="text-center"> | ||||
| <div class="bg-secondary py-4 rounded"> | <div class="bg-secondary py-4 rounded"> | ||||
| <h3 class="mb-0">No Featured Artwork to display</h3> | <h3 class="mb-0">No Featured Artwork to display</h3> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| {% endif %} | {% endif %} | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| {% endblock gallery_files %} | {% endblock gallery_files %} | ||||
| <div class="gallery-load-overlay"> | <div class="gallery-load-overlay"> | ||||
| <div class="spinner-border text-primary" role="status"> | <div class="spinner-border text-primary" role="status"> | ||||
| <span class="sr-only">Loading...</span> | <span class="sr-only">Loading...</span> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| {% endblock nested_content%} | {% endblock nested_content%} | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| {% endblock content %} | {% endblock content %} | ||||
| {% block footer %} | {% block footer %} | ||||
| <footer class="bg-navigation py-2"> | <footer class="bg-navigation py-2"> | ||||
| <div class="navdrawer-offset"> | <div class="navdrawer-offset"> | ||||
| <div class="container-xl"> | <div class="container-xl"> | ||||
| <div class="row"> | <div class="row"> | ||||
| <div class="col-12"> | <div class="col-12"> | ||||
| <div class="row"> | <div class="row"> | ||||
| <div class="col-auto"> | <div class="col-auto"> | ||||
| <a href="/terms-and-conditions" class="small text-highlight-xstrong">Terms & Conditions</a> | <a href="/terms-and-conditions" class="small text-highlight-xstrong">Terms & Conditions</a> | ||||
| </div> | </div> | ||||
| <div class="col-auto"> | <div class="col-auto"> | ||||
| <a href="/privacy" class="small text-highlight-xstrong">Privacy Policy</a> | <a href="/privacy" class="small text-highlight-xstrong">Privacy Policy</a> | ||||
| </div> | </div> | ||||
| <div class="col-auto"> | <div class="col-auto"> | ||||
| <a href="https://www.blender.org/" target="_blank" class="small text-highlight-xstrong">Blender.org</a> | <a href="https://www.blender.org/" target="_blank" class="small text-highlight-xstrong">Blender.org</a> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| </footer> | </footer> | ||||
| {% endblock footer%} | {% endblock footer%} | ||||
| {% block scripts %} | {% block scripts %} | ||||
| <script> | <script> | ||||
| makeGrid(); | makeGrid(); | ||||
| </script> | </script> | ||||
| {% endblock scripts %} | {% endblock scripts %} | ||||