Merge branch 'master' of https://gitlab.com/lilcity/backend into hotfix/lil-595

remotes/origin/hotfix/LIL-661
gzbender 8 years ago
commit f899622cc7
  1. 14
      apps/school/templates/blocks/schedule.html
  2. 3
      apps/school/views.py

@ -8,21 +8,25 @@
{% for school_schedule in school_schedules %} {% for school_schedule in school_schedules %}
{% with current_live_lesson=school_schedule.current_live_lesson %} {% with current_live_lesson=school_schedule.current_live_lesson %}
<div class="timing__item{% if school_schedule.weekday > 5 %} timing__item_bg{% endif %} js-timing-item js-timing-toggle"> <div class="timing__item{% if school_schedule.weekday > 5 %} timing__item_bg{% endif %} js-timing-item js-timing-toggle">
<div class="timing__cell"> <div class="timing__cell timing__cell--info">
<div class="timing__info"> <div class="timing__info">
<div class="timing__day{% if school_schedule.is_online %} active{% endif %}"> <div class="timing__day{% if school_schedule.is_online %} active{% endif %}">
{{ school_schedule }} {{ school_schedule }}
</div> </div>
{% comment %}
{% if current_live_lesson %} {% if current_live_lesson %}
<!--<div class="timing__date">{{ current_live_lesson.date }}</div>--> <div class="timing__date">{{ current_live_lesson.date }}</div>
{% endif %} {% endif %}
{% endcomment %}
</div> </div>
<div class="timing__buy"> <div class="timing__buy">
<div class="timing__time">{{ school_schedule.start_at }} (МСК)</div> <div class="timing__time">{{ school_schedule.start_at }} (МСК)</div>
<!--{% include './pay_btn.html' %}--> {% comment %}
{% include './pay_btn.html' %}
{% endcomment %}
</div> </div>
</div> </div>
<div class="timing__cell"> <div class="timing__cell timing__cell--preview">
<div class="timing__preview"> <div class="timing__preview">
{% thumbnail current_live_lesson.cover.image "70x70" crop="center" as im %} {% thumbnail current_live_lesson.cover.image "70x70" crop="center" as im %}
<img class="timing__pic" src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/> <img class="timing__pic" src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/>
@ -31,7 +35,7 @@
{% endthumbnail %} {% endthumbnail %}
</div> </div>
</div> </div>
<div class="timing__cell"> <div class="timing__cell timing__cell--content">
<div class="timing__title">{{ school_schedule.title }} <div class="timing__title">{{ school_schedule.title }}
{% if current_live_lesson and current_live_lesson.title %} {% if current_live_lesson and current_live_lesson.title %}
, <span class="bold">{{ current_live_lesson.title }}</span> , <span class="bold">{{ current_live_lesson.title }}</span>

@ -223,8 +223,7 @@ class SummerSchoolView(TemplateView):
school_schedules_purchased = [] school_schedules_purchased = []
if school_payment_exists and is_previous: if school_payment_exists and is_previous:
live_lessons = LiveLesson.objects.filter( live_lessons = LiveLesson.objects.filter(
date__gte=school_payment.last().date_start, date__lt=(now_time - timedelta(days=1)).date(),
date__range=[(now_time - timedelta(days=8)).date(), (now_time - timedelta(days=1)).date()],
deactivated_at__isnull=True, deactivated_at__isnull=True,
) )
live_lessons_exists = live_lessons.exists() live_lessons_exists = live_lessons.exists()

Loading…
Cancel
Save