2024-08-07 12:01:46 +05:30
|
|
|
{% load static i18n generic_template_filters %}
|
|
|
|
|
<div class="oh-card mt-4 mb-5" id="{{view_id|safe}}">
|
|
|
|
|
<button
|
|
|
|
|
hidden
|
|
|
|
|
hx-get="{{request.path}}"
|
|
|
|
|
class="reload-profile-view"
|
|
|
|
|
hx-target="#{{view_id|safe}}"
|
|
|
|
|
hx-swap="outerHTML"
|
|
|
|
|
></button>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div
|
|
|
|
|
class="col-lg-12 d-flex justify-content-between align-items-center mb-4"
|
|
|
|
|
>
|
|
|
|
|
<div class="members-container d-flex float-left">
|
|
|
|
|
<ul class="m-0 p-0 d-flex align-items-center">
|
|
|
|
|
{% for object in instances|slice:"6" %}
|
|
|
|
|
<li {% if instance.pk == object.pk %} class="active" {% endif %}>
|
|
|
|
|
<a
|
2024-08-14 12:17:45 +05:30
|
|
|
hx-get="{{object.get_profile_url}}?{{request.GET.urlencode}}"
|
2025-01-20 17:12:26 +05:30
|
|
|
hx-push-url = "{{object.get_push_url}}"
|
2024-08-07 12:01:46 +05:30
|
|
|
hx-target="#{{view_id|safe}}"
|
|
|
|
|
hx-swap="outerHTML"
|
|
|
|
|
class="d-block">
|
|
|
|
|
<img
|
|
|
|
|
style="border-radius :50px ;overflow :hidden;"
|
|
|
|
|
src="{{object.get_avatar}}"
|
|
|
|
|
width="28px"
|
|
|
|
|
/>
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
{% if display_count %}
|
|
|
|
|
<li class="li-last">
|
|
|
|
|
<a href="#" class="d-block" id="dropdownLink"> {{display_count}} </a>
|
|
|
|
|
<div class="dropdown-content" id="dropdownContent">
|
|
|
|
|
<div
|
|
|
|
|
class="oh-input-group oh-input__search-group my-2"
|
|
|
|
|
>
|
|
|
|
|
<ion-icon
|
|
|
|
|
name="search-outline"
|
|
|
|
|
class="oh-input-group__icon oh-input-group__icon--left md hydrated oh-faq_search--icon"
|
|
|
|
|
role="img"
|
|
|
|
|
aria-label="search outline"
|
|
|
|
|
></ion-icon>
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
hx-get="{% url "search-in-instance-ids" %}?instance_ids={{instance_ids}}"
|
|
|
|
|
hx-target="#{{view_id|safe}} #profileSearch"
|
|
|
|
|
hx-trigger="keyup"
|
|
|
|
|
class="oh-input oh-input__icon"
|
|
|
|
|
aria-label="Search Input"
|
|
|
|
|
name="search"
|
|
|
|
|
placeholder="Search"
|
|
|
|
|
/>
|
|
|
|
|
<div class="oh-autocomplete-suggestions"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="profileSearch">
|
|
|
|
|
{% for object in instances|slice:"6:9" %}
|
2024-08-14 12:17:45 +05:30
|
|
|
<a
|
2024-08-07 12:01:46 +05:30
|
|
|
hx-get="{{object.get_profile_url}}"
|
|
|
|
|
hx-target="#{{view_id|safe}}"
|
|
|
|
|
hx-swap="outerHTML"
|
2024-08-14 12:17:45 +05:30
|
|
|
><img
|
2024-08-07 12:01:46 +05:30
|
|
|
{% if instance.pk == object.pk %} class="active" {% endif %}
|
|
|
|
|
style="border-radius :30px ;overflow :hidden;"
|
|
|
|
|
src="{{object.get_avatar}}" />
|
|
|
|
|
<span>{{object}}</span>
|
|
|
|
|
</a>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="d-flex align-items-center gap-3">
|
2024-10-09 15:13:40 +05:30
|
|
|
{% if instances %}
|
2024-08-07 12:01:46 +05:30
|
|
|
<div class="container-right-left-arrows float-right">
|
|
|
|
|
<a
|
2024-08-14 12:17:45 +05:30
|
|
|
|
2024-08-07 12:01:46 +05:30
|
|
|
hx-get="{{previous_url}}?instance_ids={{instance_ids}}"
|
2025-01-20 17:12:26 +05:30
|
|
|
hx-push-url = "{{object.get_push_url}}"
|
2024-08-07 12:01:46 +05:30
|
|
|
hx-target="#{{view_id|safe}}"
|
|
|
|
|
hx-swap="outerHTML"
|
|
|
|
|
title=""
|
|
|
|
|
style="color: hsl(8, 77%, 56%);cursor: pointer;"
|
|
|
|
|
class="ms-1 fw-bold"
|
|
|
|
|
>
|
|
|
|
|
<ion-icon
|
|
|
|
|
name="arrow-back-circle-outline"
|
|
|
|
|
style="font-size: 35px"
|
|
|
|
|
role="img"
|
|
|
|
|
class="md"
|
|
|
|
|
aria-label="arrow back circle outline"
|
|
|
|
|
></ion-icon>
|
|
|
|
|
</a>
|
|
|
|
|
<a
|
|
|
|
|
hx-get="{{next_url}}?instance_ids={{instance_ids}}"
|
2025-01-20 17:12:26 +05:30
|
|
|
hx-push-url = "{{object.get_push_url}}"
|
2024-08-07 12:01:46 +05:30
|
|
|
hx-target="#{{view_id|safe}}"
|
|
|
|
|
hx-swap="outerHTML"
|
|
|
|
|
title=""
|
|
|
|
|
style="color: hsl(8, 77%, 56%);cursor: pointer;"
|
|
|
|
|
class="ms-1 fw-bold"
|
|
|
|
|
>
|
|
|
|
|
<ion-icon
|
|
|
|
|
name="arrow-forward-circle-outline"
|
|
|
|
|
style="font-size: 35px"
|
|
|
|
|
role="img"
|
|
|
|
|
class="md d"
|
|
|
|
|
aria-label="arrow forward circle outline"
|
|
|
|
|
></ion-icon>
|
|
|
|
|
</a>
|
2024-10-09 15:13:40 +05:30
|
|
|
|
2024-08-07 12:01:46 +05:30
|
|
|
</div>
|
2024-10-09 15:13:40 +05:30
|
|
|
{% endif %}
|
2024-08-07 12:01:46 +05:30
|
|
|
{% if actions %}
|
|
|
|
|
<div class="oh-dropdown" x-data="{open: false}">
|
|
|
|
|
<button
|
|
|
|
|
class="oh-btn oh-stop-prop oh-btn--transparent oh-accordion-meta__btn py-0 px-2 mb-2"
|
|
|
|
|
@click="open = !open"
|
|
|
|
|
@click.outside="open = false"
|
|
|
|
|
>
|
|
|
|
|
<ion-icon
|
|
|
|
|
name="settings-outline"
|
|
|
|
|
class="oh-navbar__icon md hydrated"
|
|
|
|
|
role="img"
|
|
|
|
|
aria-label="settings outline"
|
|
|
|
|
></ion-icon>
|
|
|
|
|
</button>
|
|
|
|
|
<div
|
|
|
|
|
class="oh-dropdown__menu oh-dropdown__menu--right"
|
|
|
|
|
style="min-width: 250px"
|
|
|
|
|
x-show="open"
|
|
|
|
|
>
|
|
|
|
|
<ul class="oh-dropdown__items">
|
|
|
|
|
{% for action in actions %}
|
2024-08-28 12:01:40 +05:30
|
|
|
{% if action.accessibility|accessibility:instance %}
|
2024-08-07 12:01:46 +05:30
|
|
|
<li class="oh-dropdown__item">
|
2024-09-04 20:56:04 +05:30
|
|
|
<a href="#" class="oh-profile-dropdown-link" {{action.attrs|format:instance|safe}}>
|
2024-08-07 12:01:46 +05:30
|
|
|
<img
|
2024-08-28 12:01:40 +05:30
|
|
|
src="{{action.src}}"
|
2024-08-07 12:01:46 +05:30
|
|
|
style="width: 20px; height: auto"
|
|
|
|
|
title="{{action.title}}"
|
|
|
|
|
/>
|
|
|
|
|
<button
|
|
|
|
|
style="border: none; background: transparent"
|
|
|
|
|
>
|
|
|
|
|
{{action.title}}
|
|
|
|
|
</button>
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
2024-08-28 12:01:40 +05:30
|
|
|
{% endif %}
|
2024-08-07 12:01:46 +05:30
|
|
|
{% endfor %}
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-12 col-sm-12 col-md-12 col-lg-4">
|
|
|
|
|
<div class="d-flex align-items-center">
|
|
|
|
|
<div class="oh-profile oh-profile--lg me-3">
|
|
|
|
|
<div class="oh-profile__avatar">
|
|
|
|
|
<img src="{{instance.get_avatar}}" class="oh-profile__image" />
|
|
|
|
|
</div>
|
2025-01-20 17:12:26 +05:30
|
|
|
{% if instance|getattribute:"is_active" %}
|
2024-08-07 12:01:46 +05:30
|
|
|
<span
|
|
|
|
|
class="oh-profile__active-badge oh-profile__active-badge--secondary"
|
|
|
|
|
title="Active"
|
2025-01-20 17:12:26 +05:30
|
|
|
style="background-color: limegreen;"
|
2024-08-07 12:01:46 +05:30
|
|
|
></span>
|
2025-01-20 17:12:26 +05:30
|
|
|
{% endif %}
|
2024-08-07 12:01:46 +05:30
|
|
|
</div>
|
|
|
|
|
<div class="oh-profile__info-container">
|
|
|
|
|
<h1 class="oh-profile__info-name">{{instance}}</h1>
|
|
|
|
|
<p class="oh-profile__info-designation">{{instance.get_subtitle}}</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-12 col-sm-12 col-md-12 col-lg-8 d-flex align-items-center">
|
|
|
|
|
<ul class="oh-profile__info-list">
|
|
|
|
|
<li class="oh-profile__info-list-item">
|
|
|
|
|
<span class="oh-profile__info-label">
|
|
|
|
|
<ion-icon name="mail-outline"></ion-icon>
|
|
|
|
|
<span>{% trans "E-mail" %}:</span>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="oh-profile__info-value">{{instance.get_email}}</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li class="oh-profile__info-list-item">
|
|
|
|
|
<span class="oh-profile__info-label">
|
|
|
|
|
<ion-icon name="call-outline"></ion-icon>
|
|
|
|
|
<span>{% trans "Phone" %}:</span>
|
|
|
|
|
</span>
|
|
|
|
|
<span class="oh-profile__info-value">{{instance.get_contact}}</span>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-sm-12 col-md-12 col lg-12 oh-table_sticky--wrapper">
|
|
|
|
|
<div class="oh-sticky-dropdown--header" style="border: none">
|
|
|
|
|
<div class="oh-dropdown" x-data="{open: false}">
|
|
|
|
|
<button class="oh-sticky-dropdown_btn" @click="open = !open">
|
|
|
|
|
<ion-icon
|
|
|
|
|
name="ellipsis-vertical-sharp"
|
|
|
|
|
role="img"
|
|
|
|
|
class="md hydrated"
|
|
|
|
|
aria-label="ellipsis vertical sharp"
|
|
|
|
|
></ion-icon>
|
|
|
|
|
</button>
|
|
|
|
|
<div
|
|
|
|
|
class="oh-dropdown__menu oh-sticky-table_dropdown"
|
|
|
|
|
x-show="open"
|
|
|
|
|
@click.outside="
|
|
|
|
|
open = false
|
|
|
|
|
$($el).closest('#{{view_id|safe}}').parent().find('.reload-profile-view').click();
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
{{toggle_form.as_list}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<ul
|
|
|
|
|
class="oh-general__tabs oh-general__tabs--border oh-general__tabs--profile oh-general__tabs--no-grow oh-profile-section__tab mt-5"
|
|
|
|
|
>
|
|
|
|
|
{% for tab in visible_tabs %} {% if not tab.accessibility or tab.accessibility|accessibility:instance %}
|
|
|
|
|
<li class="oh-general__tab">
|
|
|
|
|
<a
|
|
|
|
|
href="#"
|
|
|
|
|
class="oh-general__tab-link {% if forloop.counter == 1 and not active_target %} oh-general__tab-link--active {% endif %}"
|
|
|
|
|
data-action="general-tab"
|
|
|
|
|
onclick="switchGeneralTab(event)"
|
|
|
|
|
data-target="#profileTab{{forloop.counter}}"
|
|
|
|
|
hx-get="{{tab.url|format:instance}}"
|
|
|
|
|
hx-trigger="revealed"
|
|
|
|
|
hx-target="#profileTab{{forloop.counter}}"
|
|
|
|
|
>{{tab.title}}</a
|
|
|
|
|
>
|
|
|
|
|
</li>
|
|
|
|
|
{% endif %} {% endfor %}
|
|
|
|
|
</ul>
|
|
|
|
|
{% for tab in visible_tabs %}
|
|
|
|
|
<div
|
|
|
|
|
class="oh-general__tab-target oh-profile__info-tab mb-4 pt-4 {% if forloop.counter == 1 and not active_target %} {% else %} d-none {% endif %}"
|
|
|
|
|
id="profileTab{{forloop.counter}}"
|
|
|
|
|
>
|
|
|
|
|
{{tab.title}}
|
|
|
|
|
</div>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<script>
|
2024-08-14 12:17:45 +05:30
|
|
|
$(".oh-general__tab-link").click(function (e) {
|
2024-08-07 12:01:46 +05:30
|
|
|
var target = `[data-target="${$(this).attr('data-target')}"]`
|
|
|
|
|
e.preventDefault();
|
|
|
|
|
$.ajax({
|
|
|
|
|
type: "get",
|
|
|
|
|
url: "{% url 'active-tab' %}",
|
|
|
|
|
data: {
|
|
|
|
|
"path":"{{request.path}}",
|
|
|
|
|
"target":target,
|
|
|
|
|
},
|
|
|
|
|
success: function (response) {
|
2024-08-14 12:17:45 +05:30
|
|
|
|
2024-08-07 12:01:46 +05:30
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
{% if active_target %}
|
|
|
|
|
$("#{{view_id|safe}}").find(`{{active_target|safe}}`).click();
|
|
|
|
|
{% endif %}
|
|
|
|
|
</script>
|
|
|
|
|
<script>
|
2024-08-17 23:18:21 +05:30
|
|
|
document.querySelectorAll("ul.oh-general__tabs li").forEach(function (link) {
|
2024-08-07 12:01:46 +05:30
|
|
|
link.addEventListener("click", function (event) {
|
|
|
|
|
event.preventDefault();
|
2024-08-17 23:18:21 +05:30
|
|
|
document.querySelectorAll("ul.oh-general__tabs li").forEach(function (link) {
|
2024-08-07 12:01:46 +05:30
|
|
|
link.classList.remove("active");
|
|
|
|
|
});
|
|
|
|
|
this.classList.add("active");
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
document
|
|
|
|
|
.getElementById("dropdownLink")
|
|
|
|
|
.addEventListener("click", function (event) {
|
|
|
|
|
event.preventDefault();
|
|
|
|
|
document.getElementById("dropdownContent").classList.toggle("show");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
window.onclick = function (event) {
|
|
|
|
|
if (
|
|
|
|
|
!event.target.matches("#dropdownLink") &&
|
|
|
|
|
!event.target.closest("#dropdownContent")
|
|
|
|
|
) {
|
|
|
|
|
var dropdowns = document.getElementsByClassName("dropdown-content");
|
|
|
|
|
for (var i = 0; i < dropdowns.length; i++) {
|
|
|
|
|
var openDropdown = dropdowns[i];
|
|
|
|
|
if (openDropdown.classList.contains("show")) {
|
|
|
|
|
openDropdown.classList.remove("show");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
2024-08-14 15:17:09 +05:30
|
|
|
|
2024-08-07 12:01:46 +05:30
|
|
|
</script>
|
|
|
|
|
</div>
|