{ let div_id = div.id.toLocaleLowerCase() let item = {} if (div.classList.contains('collection')) { item = Alpine.$data(div).collection } else { item = Alpine.$data(div).entry } if (div_id.includes(query)) { item_map.set(item, item) } else { item_map.delete(item) } }) if (!query) { this.found_items.clear() } else { this.found_items = item_map } }, show_menu({event, type, object}) { this.x = event.pageX this.y = event.pageY this.focused_type = type this.focused_object = object this.title = this.focused_object.name this.show_context_menu = true }, hide_menu() { this.show_context_menu = false this.focused_object = {} }, {% if AuthController.knowledge.can_view %} view_entry() { window.location.href = this.focused_object.view_url }, {% endif %} {% if AuthController.knowledge.can_change %} edit_collection() { window.location.href = this.focused_object.edit_url }, edit_entry() { window.location.href = this.focused_object.edit_url }, edit_entry_version() { window.location.href = this.focused_object.edit_version_url }, {% endif %} {% if AuthController.knowledge.can_delete %} delete_entry() { window.location.href = this.focused_object.delete_url }, delete_collection() { window.location.href = this.focused_object.delete_url }, {% endif %} {% if AuthController.knowledge.can_add %} import_entry() { window.location.href = this.focused_object.import_entry_url }, add_entry() { window.location.href = this.focused_object.create_entry_url }, {% endif %} }" > {% include 'django_spire/knowledge/collection/navigation/content/navigation_content.html' %}