[ADD] BASE: Added new html section from the index page

This commit is contained in:
Horilla
2024-10-18 16:03:48 +05:30
parent a2c5dbccd3
commit cd0ffb6f89
3 changed files with 83 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
{% load static %}
{% load i18n %}
<ul class="oh-navbar__breadcrumb">
{% for breadcrumb in breadcrumbs %}
{% if forloop.last %}
<li class="oh-navbar__breadcrumb-item">
{% if breadcrumb.found %}
<a href="{{breadcrumb.url}}" class="oh-navbar__breadcrumb-link active">{% trans breadcrumb.name %}</a>
{% else %}
<a href="#" class="oh-navbar__breadcrumb-link active">{% trans breadcrumb.name %}</a>
{% endif %}
</li>
{% else %}
<li class="oh-navbar__breadcrumb-item">
{% if breadcrumb.found %}
<a href="{{breadcrumb.url}}" class="oh-navbar__breadcrumb-link">{% trans breadcrumb.name %}</a>
{% else %}
<a href="#" class="oh-navbar__breadcrumb-link">{% trans breadcrumb.name %}</a>
{% endif %}
</li>
{% endif %}
{% endfor %}
</ul>

View File

@@ -0,0 +1,28 @@
{% load static %}
{% load i18n %}
<div id="multCompany" class="oh-dropdown" x-data="{open: false}" @click="open = !open" title="{% trans 'Companies' %}">
<div class="oh-navbar__action-icons">
<a href="#" class="oh-navbar__action-icons-link">
<ion-icon name="business"></ion-icon>
</a>
<div class="oh-dropdown__menu oh-dropdown__menu--right" x-show="open"
@click.outside="open = false" style="display:none; margin-top:115%;">
<ul class="oh-dropdown__items">
{% for company in all_companies %}
<li class="oh-dropdown__item">
<a hx-get="{% url 'update-selected-company' %}?company_id={{company.0}}"class="oh-dropdown__link">
<img src="{{company.2}}" class="oh-dropdown__lang-icon" style="border-radius: 50%;" />
{{company.1}}
{% if company.3 %}
<ion-icon name="checkmark-circle-outline" style="position: relative; top: 3.3px; color: green; font-size: 1.2em;"></ion-icon>
{% endif %}
{% if not company_selected and request.user.employee_get.employee_work_info.company_id.id == company.0 %}
<ion-icon name="checkmark-circle-outline" style="position: relative; top: 3.3px; color: green; font-size: 1.2em;"></ion-icon>
{% endif %}
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>

View File

@@ -0,0 +1,32 @@
{% load static %}
{% load i18n %}
<div class="oh-dropdown" id="multiLanguage" x-data="{open: false}" @click="open = !open">
<div class="oh-navbar__action-icons">
<a href="#" class="oh-navbar__action-icons-link" title="Languages">
<ion-icon name="globe-outline" class="oh-navbar__icon"></ion-icon>
</a>
<div class="oh-dropdown__menu oh-dropdown__menu--right" x-show="open"
@click.outside="open = false" style="display:none; margin-top:95%;">
<ul class="oh-dropdown__items">
{% get_available_languages as LANGUAGES %}
{% for language in LANGUAGES %}
<li class="oh-dropdown__item">
<a href="{% url 'set_language' %}" class="oh-dropdown__link"
onclick="event.preventDefault(); document.getElementById('language-form-{{ language.0 }}').submit();">
<img src="{% static 'images/ui/' %}{{ language.0 }}.png" class="oh-dropdown__lang-icon" />{{ language.1 }}
{% if language.0 == LANGUAGE_CODE %}
<ion-icon name="checkmark-circle-outline"
style="position: relative; top: 3.3px; color: green; font-size: 1.2em;">
</ion-icon>
{% endif %}
</a>
<form id="language-form-{{ language.0 }}" action="{% url 'set_language' %}" method="post" style="display: none;">
{% csrf_token %}
<input type="hidden" name="language" value="{{ language.0 }}">
</form>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>