Files
home-assistant/hass/settings/custom_components/hacs/frontend/templates/overviews.html
T
2019-11-07 12:36:14 +03:00

77 lines
2.1 KiB
HTML

<!-- Used for both overview and store-->
{% extends "base.html" %}
{% block content %}
{% if location == 'store' %}
<div class='hacs-overview-container'>
<input type="text" id="Search" onkeyup="Search()" placeholder="Please enter a search term.." title="Type in a name"
autofocus style="color: var(--primary-text-color)">
</div>
{% if hacs.configuration.frontend_mode == "Grid" %}
{% include 'grid_new.html' with context %}
{% else %}
{% include 'table_new.html' with context %}
{% endif %}
{% endif %}
{% for type in hacs.common.categories %}
{% if type == 'appdaemon' %}
{% set displaytype = 'APPDAEMON APPS' %}
{% elif type == 'python_script' %}
{% set displaytype = 'PYTHON SCRIPTS' %}
{% else %}
{% set displaytype = (type + 's') | upper %}
{% endif %}
{% set repositories = namespace(repositories=[]) %}
{% for repository in hacs.sorted_by_name %}
{% set repo = namespace(include=True) %}
{% if repository.status.hide and repo.include %}
{% set repo.include = False %}
{% endif %}
{% if repository.information.category != type and repo.include %}
{% set repo.include = False %}
{% endif %}
{% if location == 'overview' %}
{% if not repository.status.installed and repo.include %}
{% set repo.include = False %}
{% if repository.information.uid == "172733314" %}
{% set repo.include = True %}
{% endif %}
{% endif %}
{% else %}
{% if repository.information.uid == "172733314" %}
{% set repo.include = False %}
{% endif %}
{% if hacs.configuration.country and repo.include %}
{% if repository.repository_manifest %}
{% if repository.repository_manifest.country %}
{% if hacs.configuration.country not in repository.repository_manifest.country %}
{% set repo.include = False %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% if repo.include %}
{% set repositories.repositories = repositories.repositories+[repository] %}
{% endif %}
{% endfor %}
{% if repositories.repositories %}
{% if hacs.configuration.frontend_mode == "Grid" %}
{% include 'grid.html' with context %}
{% else %}
{% include 'table.html' with context %}
{% endif %}
{% endif %}
{% endfor %}
{% endblock %}