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):
Dict = {
'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')

View File

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