1.1.1 autosubscribe to null price subscribe

This commit is contained in:
SDE
2024-05-29 12:25:27 +03:00
parent efec0754cd
commit 17024d7350
11 changed files with 289 additions and 56 deletions

View File

@@ -1,6 +1,7 @@
{% load static %}
{% csrf_token %}
{% load i18n %}
{% load subscribes_tags_extra %}
{%trans "Профиль" as t_prof %}
{%trans "Разместить объявление как отправитель" as t_customer %}
@@ -11,6 +12,7 @@
{%trans "Моя подписка" as t_subscribe %}
{%trans "Изменить профиль" as t_change_profile %}
{%trans "Выход" as t_logout %}
{% check_subscribe_option user 'размещение заявок' as create_routes_allow %}
<div class="menu_profile {% if not page_type == 'profile' %}background{% endif %}">
<div class="subscribe_type_txt"> {% if user_subscribe %}<span class="f-l">{% trans "Подписка" %}:</span> <span class="f-r">{{ user_subscribe.subscribe.name }}</span>{% endif %}<div class="clear_both"></div></div>
@@ -18,12 +20,14 @@
{% with sel_page_name='create_route_for_mover' sel_page_name='dashboard' ajax_url="dashboard" title=t_prof img_path="/static/img/svg/User.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=t_customer 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=t_mover img_path="/static/img/svg/PushPin.svg"%}
{% include "widgets/profile/w_button_for_profile_menu.html" %}
{% endwith %}
{% if create_routes_allow %}
{% with sel_page_name='create_route_for_customer' dom_id="customer" ajax_url="new_route_view" owner_type="customer" title=t_customer 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=t_mover img_path="/static/img/svg/PushPin.svg"%}
{% include "widgets/profile/w_button_for_profile_menu.html" %}
{% endwith %}
{% endif %}
{% with sel_page_name='my_routes' dom_id="my_routes_id" ajax_url="get_routes" title=t_my_routes img_path="/static/img/svg/Cards.svg"%}
{% include "widgets/profile/w_button_for_profile_menu.html" %}
{% endwith %}

View File

@@ -1,5 +1,6 @@
{% load static %}
{% load i18n %}
{% load subscribes_tags_extra %}
{% if route.departure_DT %}
{% now 'Y-m-d H:i:s' as current_date %}
@@ -99,43 +100,44 @@
{# {% endif %}#}
</div>
{% check_subscribe_option request.user 'просмотр контактов' as show_contacts_allow %}
<div name="form_carrier">
{% if user.is_authenticated %}
<div class="inf_carrier">
<img class="route_contact_avatar {% if route.owner == user %} active{% endif %}" {% if route.owner.user_profile.avatar %}
src="{{ route.owner.user_profile.avatar.url }}"
{% else %}src="{% static "img/svg/user_icon_standart.png" %}"{% endif %}>
{% if user.is_authenticated and show_contacts_allow %}
<div class="inf_carrier">
<img class="route_contact_avatar {% if route.owner == user %} active{% endif %}" {% if route.owner.user_profile.avatar %}
src="{{ route.owner.user_profile.avatar.url }}"
{% else %}src="{% static "img/svg/user_icon_standart.png" %}"{% endif %}>
{% if user.is_authenticated %}
{# <span class="name_carrier">{{ route.owner.last_name }} {{ route.owner.first_name }}</span>#}
<span class="name_carrier{% if route.owner == user %}active{% endif %} el_for_open_el">{{ route.owner.last_name }} {{ route.owner.first_name }}</span>
{% if user.is_authenticated %}
{# <span class="name_carrier">{{ route.owner.last_name }} {{ route.owner.first_name }}</span>#}
<span class="name_carrier{% if route.owner == user %}active{% endif %} el_for_open_el">{{ route.owner.last_name }} {{ route.owner.first_name }}</span>
{% endif %}
{% if not user.is_authenticated %}
<span class="name_carrier"></span>
{% endif %}
{% endif %}
{% if not user.is_authenticated %}
<span class="name_carrier"></span>
{% endif %}
<a class="phones_carrier" data-href="tel:{{ route.phone }}">
<img class="inf_carrier_icon" src="{% static "/img/svg/phone.svg" %}"/>
<span class="phones_carrier_span el_for_open_el {% if route.owner == user %} active{% endif %}">{{ route.phone }}</span>
{# <input value="{{ route.phone }}">#}
<div class="clear_both"></div>
</a>
<a class="email_carrier" data-href="mailto:{{ route.owner.email }}">
<img class="inf_carrier_icon" src="{% static "/img/svg/email.svg" %}">
<span class="email_carrier_span el_for_open_el {% if route.owner == user %} active{% endif %}">{{ route.owner.email }}</span>
{# <input value="{{ route.owner.email }}">#}
<div class="clear_both"></div>
{# <div>{{ route.get_cargo_type_display }}</div>#}
{# <div>{{ route.weight }}</div>#}
{# <div>{{ route.get_owner_type_display }}</div>#}
{# <div>{{ route.id }},{{ forloop.counter }}</div>#}
</a>
</div>
<a class="phones_carrier" data-href="tel:{{ route.phone }}">
<img class="inf_carrier_icon" src="{% static "/img/svg/phone.svg" %}"/>
<span class="phones_carrier_span el_for_open_el {% if route.owner == user %} active{% endif %}">{{ route.phone }}</span>
{# <input value="{{ route.phone }}">#}
<div class="clear_both"></div>
</a>
<a class="email_carrier" data-href="mailto:{{ route.owner.email }}">
<img class="inf_carrier_icon" src="{% static "/img/svg/email.svg" %}">
<span class="email_carrier_span el_for_open_el {% if route.owner == user %} active{% endif %}">{{ route.owner.email }}</span>
{# <input value="{{ route.owner.email }}">#}
<div class="clear_both"></div>
{# <div>{{ route.get_cargo_type_display }}</div>#}
{# <div>{{ route.weight }}</div>#}
{# <div>{{ route.get_owner_type_display }}</div>#}
{# <div>{{ route.id }},{{ forloop.counter }}</div>#}
</a>
</div>
{% endif %}
{% if not user.is_authenticated %}
{% if not user.is_authenticated or not show_contacts_allow %}
<div class="inf_carrier">
<a class="phones_carrier">
<img class="inf_carrier_icon" src="{% static "/img/svg/phone.svg" %}"/>
@@ -155,7 +157,7 @@
{% if not user.is_anonymous and route.owner != user %}
{% if not user.is_anonymous and route.owner != user and show_contacts_allow %}
<button class="open_chat_carrier" onclick="open_chat({{ route.owner_id }})">
<img src="{% static "img/svg/Logo.svg" %}" width="30px">
<span> {% translate "Написать сообщение" %}</span>
@@ -163,7 +165,7 @@
</button>
{% endif %}
{% if user.is_authenticated %}
{% if user.is_authenticated and show_contacts_allow %}
<button
class="open_inf_carrier"
{% if route.owner == user %} style="display: none;"{% endif %}
@@ -174,7 +176,7 @@
{% endif %}
{% if not user.is_authenticated %}
{% if not user.is_authenticated and show_contacts_allow %}
<div class="show_contact_wrapper">
<a class="open_inf_carrier" href='{% url "login_profile" %}'>
{% translate "Открыть контакт"%}