{% if school_schedule.weekday in school_schedules_purchased %}
- {% if live_lesson and school_schedule.is_online or live_lesson and is_previous and live_lesson in live_lessons %}
- {% include './open_lesson.html' %}
- {% endif %}
+ {% if live_lesson and live_lesson.title %}
+ {% include './open_lesson.html' %}
+ {% endif %}
{% else %}
- {% include './day_pay_btn.html' %}
+ {% include './day_pay_btn.html' %}
{% endif %}
{% comment %}
@@ -36,12 +36,12 @@
-
{{ school_schedule.title }}{% if live_lesson %},
+
{{ school_schedule.title }}{% if live_lesson and live_lesson.title %},
{{ live_lesson.title }}
{% endif %}
- {% if live_lesson %}
+ {% if live_lesson and live_lesson.short_description %}
{{ live_lesson.short_description }}
{% else %}
{{ school_schedule.description }}
diff --git a/apps/school/templates/blocks/schedule_purchased.html b/apps/school/templates/blocks/schedule_purchased.html
index 03e98e92..7f8f035d 100644
--- a/apps/school/templates/blocks/schedule_purchased.html
+++ b/apps/school/templates/blocks/schedule_purchased.html
@@ -9,7 +9,6 @@
{% if livelesson.stream_index %}
-
Если видео не загрузилось обновите страницу
diff --git a/apps/school/templates/school/summer_school.html b/apps/school/templates/school/summer_school.html
index 133f8d8b..00da0bf8 100644
--- a/apps/school/templates/school/summer_school.html
+++ b/apps/school/templates/school/summer_school.html
@@ -1,5 +1,6 @@
{% extends "templates/lilcity/index.html" %} {% load static %}
{% block title %}Онлайн-школа LilCity{% endblock title%}
+{% block ogimage %}http://{{request.META.HTTP_HOST}}{% static 'img/og_summer_school.jpg' %}{% endblock %}
{% block content %}
{% if not is_purchased %}
{% include "../summer/promo.html" %}
diff --git a/apps/school/templates/summer/_schedule_purchased_item.html b/apps/school/templates/summer/_schedule_purchased_item.html
index 8017a687..b9d1db1f 100644
--- a/apps/school/templates/summer/_schedule_purchased_item.html
+++ b/apps/school/templates/summer/_schedule_purchased_item.html
@@ -6,17 +6,17 @@
{{ school_schedule }}
{% if live_lesson %}
-
+
{{ live_lesson.date }}
{% endif %}
{{ school_schedule.start_at }} (МСК)
{% if school_schedule.weekday in school_schedules_purchased %}
- {% if live_lesson and school_schedule.is_online or live_lesson and is_previous and live_lesson in live_lessons %}
- {% include './open_lesson.html' %}
- {% endif %}
+ {% if live_lesson and live_lesson.title %}
+ {% include './open_lesson.html' %}
+ {% endif %}
{% else %}
- {% include './day_pay_btn.html' %}
+ {% include './day_pay_btn.html' %}
{% endif %}
{% comment %}
@@ -36,12 +36,12 @@
-
{{ school_schedule.title }}{% if live_lesson %},
+
{{ school_schedule.title }}{% if live_lesson and live_lesson.title %},
{{ live_lesson.title }}
{% endif %}
- {% if live_lesson %}
+ {% if live_lesson and live_lesson.short_description %}
{{ live_lesson.short_description }}
{% else %}
{{ school_schedule.description }}
diff --git a/apps/school/templates/summer/schedule_purchased.html b/apps/school/templates/summer/schedule_purchased.html
index 467be723..63e963fd 100644
--- a/apps/school/templates/summer/schedule_purchased.html
+++ b/apps/school/templates/summer/schedule_purchased.html
@@ -9,7 +9,6 @@
Подписка истекает
{{ subscription_ends }}
- {% include './prolong_btn.html' %}
{% else %}
Подписка
истекла
diff --git a/apps/school/views.py b/apps/school/views.py
index ae9b64f0..7f4ab734 100644
--- a/apps/school/views.py
+++ b/apps/school/views.py
@@ -61,26 +61,26 @@ class LiveLessonsDetailView(DetailView):
def get(self, request, pk=None):
response = super().get(request, pk=pk)
- try:
- school_payment = SchoolPayment.objects.get(
- user=request.user,
- add_days=False,
- date_start__lte=now(),
- date_end__gte=now(),
- status__in=[
- Pingback.PINGBACK_TYPE_REGULAR,
- Pingback.PINGBACK_TYPE_GOODWILL,
- Pingback.PINGBACK_TYPE_RISK_REVIEWED_ACCEPTED,
- ],
- )
- except SchoolPayment.DoesNotExist:
- school_payment = None
- if request.user.role not in [User.ADMIN_ROLE, User.TEACHER_ROLE] and not (
- request.user.role == User.USER_ROLE and
- school_payment and
- school_payment.is_deliverable()
- ):
- raise Http404
+ #try:
+ # school_payment = SchoolPayment.objects.get(
+ # user=request.user,
+ # add_days=False,
+ # date_start__lte=now(),
+ # date_end__gte=now(),
+ # status__in=[
+ # Pingback.PINGBACK_TYPE_REGULAR,
+ # Pingback.PINGBACK_TYPE_GOODWILL,
+ # Pingback.PINGBACK_TYPE_RISK_REVIEWED_ACCEPTED,
+ # ],
+ # )
+ #except SchoolPayment.DoesNotExist:
+ # school_payment = None
+ #if request.user.role not in [User.ADMIN_ROLE, User.TEACHER_ROLE] and not (
+ # request.user.role == User.USER_ROLE and
+ # school_payment and
+ # school_payment.is_deliverable()
+ #):
+ # raise Http404
return response
@@ -122,7 +122,7 @@ class SchoolView(TemplateView):
end_at = datetime.combine(now_time.today(), school_schedule.start_at)
online = (
school_schedule.start_at <= now_time.time() and
- (end_at + timedelta(hours=2)).time() >= now_time.time() and
+ (end_at + timedelta(hours=1)).time() >= now_time.time() and
school_schedule.current_live_lesson()
)
if self.request.user.is_authenticated:
@@ -183,7 +183,7 @@ class SummerSchoolView(TemplateView):
end_at = datetime.combine(now_time.today(), school_schedule.start_at)
online = (
school_schedule.start_at <= now_time.time() and
- (end_at + timedelta(hours=2)).time() >= now_time.time() and
+ (end_at + timedelta(hours=1)).time() >= now_time.time() and
school_schedule.current_live_lesson()
)
if self.request.user.is_authenticated:
diff --git a/apps/user/templates/user/profile.html b/apps/user/templates/user/profile.html
index cea0b4ee..caddc204 100644
--- a/apps/user/templates/user/profile.html
+++ b/apps/user/templates/user/profile.html
@@ -67,18 +67,18 @@