Fix view type list for folders
This commit is contained in:
@@ -24,59 +24,7 @@ include ../../../mixins/components
|
|||||||
|
|
||||||
+card-deck(class="px-2")
|
+card-deck(class="px-2")
|
||||||
| {% for child in children %}
|
| {% for child in children %}
|
||||||
| {# Browse type: List #}
|
|
||||||
a(
|
|
||||||
href="{{ url_for_node(node=child) }}",
|
|
||||||
data-node_id="{{ child._id }}",
|
|
||||||
class="js-item-open list-node-children-item browse-list")
|
|
||||||
.list-node-children-item-thumbnail
|
|
||||||
|
|
||||||
| {% if child.picture %}
|
|
||||||
img(
|
|
||||||
src="{{ child.picture.thumbnail('t', api=api)}} ")
|
|
||||||
| {% else %}
|
|
||||||
.cloud-logo
|
|
||||||
i.pi-blender-cloud
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
| {% if child.permissions.world %}
|
|
||||||
.list-node-children-item-ribbon
|
|
||||||
span free
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
.list-node-children-item-thumbnail-icon
|
|
||||||
| {% if child.properties.content_type and child.properties.content_type == 'video' %}
|
|
||||||
i.pi-play
|
|
||||||
| {% elif child.properties.content_type and child.properties.content_type == 'image' %}
|
|
||||||
i.pi-image
|
|
||||||
| {% elif child.properties.content_type and child.properties.content_type == 'file' %}
|
|
||||||
i.pi-file-archive
|
|
||||||
| {% else %}
|
|
||||||
i.pi-folder
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
.list-node-children-item-name {{ child.name }}
|
|
||||||
|
|
||||||
.list-node-children-item-meta
|
|
||||||
| {% if child.properties.status != 'published' %}
|
|
||||||
span.status {{ child.properties.status }}
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
span.type
|
|
||||||
| {% if child.properties.content_type %}
|
|
||||||
| {{ child.properties.content_type | undertitle }} ·
|
|
||||||
| {% elif child.node_type == 'group' %}
|
|
||||||
| Folder ·
|
|
||||||
| {% else %}
|
|
||||||
| {{ child.node_type | undertitle }} ·
|
|
||||||
| {% endif %}
|
|
||||||
|
|
||||||
span(title="Created on {{ child._created }}") {{ child._created | pretty_date }}
|
|
||||||
|
|
||||||
| {# Browse type: Icon #}
|
|
||||||
|
|
||||||
| {{ asset_list_item(child, current_user) }}
|
| {{ asset_list_item(child, current_user) }}
|
||||||
|
|
||||||
| {% endfor %}
|
| {% endfor %}
|
||||||
| {% else %}
|
| {% else %}
|
||||||
.list-node-children-container
|
.list-node-children-container
|
||||||
@@ -115,14 +63,12 @@ include ../../../mixins/components
|
|||||||
|
|
||||||
// Browse type: icon or list
|
// Browse type: icon or list
|
||||||
function projectBrowseTypeIcon() {
|
function projectBrowseTypeIcon() {
|
||||||
$(".list-node-children-item.browse-list").hide();
|
$(".card-deck").removeClass('card-deck-vertical');
|
||||||
$(".list-node-children-item.browse-icon").show();
|
|
||||||
$(".js-btn-browsetoggle").html('<i class="pi-list"></i> List View');
|
$(".js-btn-browsetoggle").html('<i class="pi-list"></i> List View');
|
||||||
};
|
};
|
||||||
|
|
||||||
function projectBrowseTypeList() {
|
function projectBrowseTypeList() {
|
||||||
$(".list-node-children-item.browse-list").show();
|
$(".card-deck").addClass('card-deck-vertical');
|
||||||
$(".list-node-children-item.browse-icon").hide();
|
|
||||||
$(".js-btn-browsetoggle").html('<i class="pi-layout"></i> Grid View');
|
$(".js-btn-browsetoggle").html('<i class="pi-layout"></i> Grid View');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user