profile curtain reformat
This commit is contained in:
SDE
2023-11-05 18:48:58 +03:00
parent 6dd0cf7724
commit 114a65746c
3 changed files with 130 additions and 70 deletions

View File

@@ -40,7 +40,8 @@ def registration_View(request):
def profile_page_View(request, page_name, id=None): def profile_page_View(request, page_name, id=None):
Dict = { Dict = {
'page_html': get_profile_page_content_html(request, page_name, id), 'page_html': get_profile_page_content_html(request, page_name, id),
'page_name': page_name 'page_name': page_name,
'page_type': 'profile'
} }
t = loader.get_template('pages/profile/p_user_profile.html') t = loader.get_template('pages/profile/p_user_profile.html')

View File

@@ -1,75 +1,107 @@
{% load static %} {% load static %}
{% csrf_token %} {% csrf_token %}
<div class="menu_profile"> <div class="menu_profile">
<div> {% with title="Поиск посылки" img_path="/static/img/svg/MagnifyingGlass.svg"%}
<img class="svg" src="/static/img/svg/MagnifyingGlass.svg"> {% include "widgets/profile/w_button_for_profile_menu.html" %}
<a href="#">Поиск посылки</a> {% endwith %}
</div> {% with sel_page_name='create_route_for_customer' dom_id="customer" ajax_url="new_route_view" owner_type="customer" title="Разместить объявление как отправитель" img_path="/static/img/svg/PushPin.svg"%}
<div {% include "widgets/profile/w_button_for_profile_menu.html" %}
id="customer" {% endwith %}
onclick="select_tab_profile(this,'new_route_view','customer')" {% with sel_page_name='create_route_for_mover' dom_id="mover" ajax_url="new_route_view" owner_type="mover" title="Разместить объявление как перевозчик" img_path="/static/img/svg/PushPin.svg"%}
{% if page_name == 'create_route_for_customer' %} {% include "widgets/profile/w_button_for_profile_menu.html" %}
class="selected" {% endwith %}
{% endif %} > {% with sel_page_name='my_routes' dom_id="my_routes_id" ajax_url="get_routes" title="Мои объявления" img_path="/static/img/svg/Cards.svg"%}
<img class="svg" src="/static/img/svg/PushPin.svg"> {% include "widgets/profile/w_button_for_profile_menu.html" %}
<a href="#">Разместить объявление как отправитель</a> {% endwith %}
</div> {% with sel_page_name='chat' ajax_url="chats" title="Написать сообщение" img_path="/static/img/svg/ChatCircleDots.svg"%}
<div {% include "widgets/profile/w_button_for_profile_menu.html" %}
id="mover" {% endwith %}
onclick="select_tab_profile(this,'new_route_view','mover')" {% with sel_page_name='support' ajax_url="support_tickets" title="Тех. поддержка" img_path="/static/img/svg/Headset.svg"%}
{% if page_name == 'create_route_for_mover' %} {% include "widgets/profile/w_button_for_profile_menu.html" %}
class="selected" {% endwith %}
{% endif %}> {% with sel_page_name='my_subscribe' ajax_url="show_cur_subscribe" title="Моя подписка" img_path="/static/img/svg/CurrencyDollar.svg"%}
<img class="svg" src="/static/img/svg/PushPin.svg"> {% include "widgets/profile/w_button_for_profile_menu.html" %}
<a href="#">Разместить объявление как перевозчик</a> {% endwith %}
</div> {% with sel_page_name='change_profile' ajax_url="change_profile" title="Мой профиль" img_path="/static/img/svg/User.svg"%}
<div {% include "widgets/profile/w_button_for_profile_menu.html" %}
id="my_routes_id" {% endwith %}
onclick="select_tab_profile(this,'get_routes')" {# <div>#}
{% if page_name == 'my_routes' %} {# <img class="svg" src="/static/img/svg/MagnifyingGlass.svg">#}
class="selected" {# <a href="#">Поиск посылки</a>#}
{% endif %}> {# </div>#}
<img class="svg" src="/static/img/svg/Cards.svg"> {# <div#}
<a href="#">Мои объявления</a> {# id="customer"#}
</div> {# onclick="select_tab_profile(this,'new_route_view','customer')"#}
<div {# {% if page_name == 'create_route_for_customer' %}#}
onclick="select_tab_profile(this,'chats')" {# class="selected"#}
{% if page_name == 'chat' %} {# {% endif %} >#}
class="selected" {# <img class="svg" src="/static/img/svg/PushPin.svg">#}
{% endif %}> {# {% if page_type and page_type == 'profile' %}#}
<img class="svg" src="/static/img/svg/ChatCircleDots.svg"> {# <span>Разместить объявление как отправитель</span>#}
<a href="#">Написать сообщение {# {% else %}#}
<div class="icon_unread_messages" style="padding-top: 0;"> {# <a href="{% url "profile_page" "create_route_for_customer" %}">Разместить объявление как отправитель</a>#}
<div class="cost-messages-in-user-tab-messenger"> {# {% endif %}#}
<span class="unredmessages_value_text" style="padding-top: 2px;padding-left: 0;"></span> {# </div>#}
</div> {# <div#}
</div> {# id="mover"#}
</a> {# onclick="select_tab_profile(this,'new_route_view','mover')"#}
</div> {# {% if page_name == 'create_route_for_mover' %}#}
<div {# class="selected"#}
onclick="select_tab_profile(this,'support_tickets')" {# {% endif %}>#}
{% if page_name == 'support' %} {# <img class="svg" src="/static/img/svg/PushPin.svg">#}
class="selected" {# {% if page_type and page_type == 'profile' %}#}
{% endif %}> {# <span>Разместить объявление как перевозчик</span>#}
<img class="svg" src="/static/img/svg/Headset.svg"> {# {% else %}#}
<a href="#">Тех. поддержка</a> {# <a href="{% url "profile_page" "create_route_for_mover" %}">Разместить объявление как перевозчик</a>#}
</div> {# {% endif %}#}
<div {# </div>#}
onclick="select_tab_profile(this,'show_cur_subscribe')" {# <div#}
{% if page_name == 'my_subscribe' %} {# id="my_routes_id"#}
class="selected" {# onclick="select_tab_profile(this,'get_routes')"#}
{% endif %}> {# {% if page_name == 'my_routes' %}#}
<img class="svg" src="/static/img/svg/CurrencyDollar.svg"> {# class="selected"#}
<a href="#">Моя подписка</a> {# {% endif %}>#}
</div> {# <img class="svg" src="/static/img/svg/Cards.svg">#}
<div {# <a href="{% url "profile_page" "my_routes" %}">Мои объявления</a>#}
onclick="select_tab_profile(this,'change_profile')" {# </div>#}
{% if page_name == 'change_profile' %} {# <div#}
class="selected" {# onclick="select_tab_profile(this,'chats')"#}
{% endif %}> {# {% if page_name == 'chat' %}#}
<img class="svg" src="/static/img/svg/User.svg"> {# class="selected"#}
<a href="#">Мой профиль</a> {# {% endif %}>#}
</div> {# <img class="svg" src="/static/img/svg/ChatCircleDots.svg">#}
{# <a href="{% url "profile_page" "chat" %}">Написать сообщение#}
{# <div class="icon_unread_messages" style="padding-top: 0;">#}
{# <div class="cost-messages-in-user-tab-messenger">#}
{# <span class="unredmessages_value_text" style="padding-top: 2px;padding-left: 0;"></span>#}
{# </div>#}
{# </div>#}
{# </a>#}
{# </div>#}
{# <div#}
{# onclick="select_tab_profile(this,'support_tickets')"#}
{# {% if page_name == 'support' %}#}
{# class="selected"#}
{# {% endif %}>#}
{# <img class="svg" src="/static/img/svg/Headset.svg">#}
{# <a href="{% url "profile_page" "support" %}">Тех. поддержка</a>#}
{# </div>#}
{# <div#}
{# onclick="select_tab_profile(this,'show_cur_subscribe')"#}
{# {% if page_name == 'my_subscribe' %}#}
{# class="selected"#}
{# {% endif %}>#}
{# <img class="svg" src="/static/img/svg/CurrencyDollar.svg">#}
{# <a href="{% url "profile_page" "my_subscribe" %}">Моя подписка</a>#}
{# </div>#}
{# <div#}
{# onclick="select_tab_profile(this,'change_profile')"#}
{# {% if page_name == 'change_profile' %}#}
{# class="selected"#}
{# {% endif %}>#}
{# <img class="svg" src="/static/img/svg/User.svg">#}
{# <a href="{% url "profile_page" "change_profile" %}">Мой профиль</a>#}
{# </div>#}
{# <div>#} {# <div>#}
{# <a href="/profile/logout">Выйти из профиля</a>#} {# <a href="/profile/logout">Выйти из профиля</a>#}
{# </div>#} {# </div>#}

View File

@@ -0,0 +1,27 @@
<div
{% if dom_id %}id="{{ dom_id }}"{% endif %}
{% if ajax_url %}onclick="select_tab_profile(this,'{{ ajax_url }}'{% if owner_type %},'{{ owner_type }}'{% endif %})"{% endif %}
{% if page_name == sel_page_name %}
class="selected"
{% endif %} >
<img class="svg" src="{{ img_path }}" />
{% if page_type and page_type == 'profile' %}
<span class="text_btn_profile">
{% else %}
<a href="{% url "profile_page" sel_page_name %}" class="text_btn_profile">
{% endif %}
{{ title }}
{% if page_name == 'chat' or page_name == 'support' %}
<div class="icon_unread_messages" style="padding-top: 0;">
<div class="cost-messages-in-user-tab-messenger">
<span class="unredmessages_value_text" style="padding-top: 2px;padding-left: 0;"></span>
</div>
</div>
{% endif %}
{% if page_type and page_type == 'profile' %}
</span>
{% else %}
</a>
{% endif %}
</div>