From cb809cb8fa154831359c72e80251f64ea97ddbd6 Mon Sep 17 00:00:00 2001 From: gzbender Date: Thu, 19 Jul 2018 14:55:42 +0500 Subject: [PATCH] =?UTF-8?q?LIL-560=20=D0=9A=D0=BD=D0=BE=D0=BF=D0=BA=D1=83?= =?UTF-8?q?=20=C2=AB=D0=A1=D0=BC=D0=BE=D1=82=D1=80=D0=B5=D1=82=D1=8C=20?= =?UTF-8?q?=D1=83=D1=80=D0=BE=D0=BA=C2=BB=20=D0=BF=D0=BE=D0=B4=D0=BD=D1=8F?= =?UTF-8?q?=D1=82=D1=8C=20=D0=B2=D1=8B=D1=88=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../blocks/_schedule_purchased_item.html | 78 ------------------- apps/school/templates/blocks/schedule.html | 69 +--------------- .../schedule_item.html} | 38 +++++---- .../templates/blocks/schedule_purchased.html | 4 +- .../templates/school/schedules_print.html | 62 +-------------- .../templates/summer/schedule_purchased.html | 4 +- web/src/sass/_common.sass | 11 ++- 7 files changed, 41 insertions(+), 225 deletions(-) delete mode 100644 apps/school/templates/blocks/_schedule_purchased_item.html rename apps/school/templates/{summer/_schedule_purchased_item.html => blocks/schedule_item.html} (70%) diff --git a/apps/school/templates/blocks/_schedule_purchased_item.html b/apps/school/templates/blocks/_schedule_purchased_item.html deleted file mode 100644 index b9d1db1f..00000000 --- a/apps/school/templates/blocks/_schedule_purchased_item.html +++ /dev/null @@ -1,78 +0,0 @@ -{% load static %} {% load thumbnail %} -
-
-
-
- {{ 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 live_lesson.title %} - {% include './open_lesson.html' %} - {% endif %} - {% else %} - {% include './day_pay_btn.html' %} - {% endif %} -
- {% comment %} - - {% endcomment %} - {% if school_schedule.weekday in school_schedules_purchased %} - - {% endif %} -
-
-
- {% thumbnail live_lesson.cover.image "70x70" crop="center" as im %} - - {% empty %} - - {% endthumbnail %} -
-
-
-
{{ school_schedule.title }}{% if live_lesson and live_lesson.title %}, - {{ live_lesson.title }} - {% endif %} -
-
- {% if live_lesson and live_lesson.short_description %} - {{ live_lesson.short_description }} - {% else %} - {{ school_schedule.description }} - {% endif %} -
-
-
Материалы
-
-
- {{ school_schedule.materials }} -
-
- {% if school_schedule.schoolschedule_images.exists %} -
Результаты прошлых уроков
- - {% endif %} -
-
-
- -
-
diff --git a/apps/school/templates/blocks/schedule.html b/apps/school/templates/blocks/schedule.html index 2e4c6457..5f088511 100644 --- a/apps/school/templates/blocks/schedule.html +++ b/apps/school/templates/blocks/schedule.html @@ -6,74 +6,7 @@
{% for school_schedule in school_schedules %} - {% with current_live_lesson=school_schedule.current_live_lesson %} -
-
-
-
- {{ school_schedule }} -
- {% if current_live_lesson %} - - {% endif %} -
-
-
{{ school_schedule.start_at }} (МСК)
- -
-
-
-
- {% thumbnail current_live_lesson.cover.image "70x70" crop="center" as im %} - - {% empty %} - - {% endthumbnail %} -
-
-
-
{{ school_schedule.title }} - {% if current_live_lesson and current_live_lesson.title %} - , {{ current_live_lesson.title }} - {% endif %} -
-
- {% if live_lesson %} - {{ live_lesson.short_description }} - {% else %} - {{ school_schedule.description }} - {% endif %} -
-
-
Материалы
-
-
- {{ school_schedule.materials }} -
-
- {% if school_schedule.schoolschedule_images.exists %} -
Результаты прошлых уроков
- - {% endif %} -
-
-
- -
-
- {% endwith %} + {% include 'blocks/schedule_item.html' with school_schedule=school_schedule live_lesson=school_schedule.current_live_lesson purchased=True %} {% endfor %}
diff --git a/apps/school/templates/summer/_schedule_purchased_item.html b/apps/school/templates/blocks/schedule_item.html similarity index 70% rename from apps/school/templates/summer/_schedule_purchased_item.html rename to apps/school/templates/blocks/schedule_item.html index 0e86ccba..0cafb9f3 100644 --- a/apps/school/templates/summer/_schedule_purchased_item.html +++ b/apps/school/templates/blocks/schedule_item.html @@ -1,21 +1,23 @@ {% load static %} {% load thumbnail %} -
+
{{ school_schedule }}
- {% if live_lesson %} + {% if purchased and live_lesson %}
{{ live_lesson.date }}
{% endif %} +
{{ school_schedule.start_at }} (МСК)
-
{{ school_schedule.start_at }} (МСК)
- {% if school_schedule.weekday in school_schedules_purchased %} - {% if live_lesson and live_lesson.title %} - {% include './open_lesson.html' %} + {% if purchased %} + {% if school_schedule.weekday in school_schedules_purchased %} + {% if live_lesson and live_lesson.title %} + {% include './open_lesson.html' %} + {% endif %} + {% else %} + {% include './day_pay_btn.html' %} {% endif %} - {% else %} - {% include './day_pay_btn.html' %} {% endif %}
@@ -36,7 +38,7 @@ {% endthumbnail %}
-
+
{{ school_schedule.title }}{% if live_lesson and live_lesson.title %}, {{ live_lesson.title }} {% endif %} @@ -51,11 +53,19 @@
Материалы
-
- {{ school_schedule.materials }} -
+ {% if print %} +
+
+ {{ school_schedule.materials }} +
+
+ {% else %} +
+ {{ school_schedule.materials }} +
+ {% endif %}
- {% if school_schedule.schoolschedule_images.exists %} + {% if not print and school_schedule.schoolschedule_images.exists %}
Результаты прошлых уроков
+ {% if not print %}
+ {% endif %}
diff --git a/apps/school/templates/blocks/schedule_purchased.html b/apps/school/templates/blocks/schedule_purchased.html index 7f8f035d..5d1a5827 100644 --- a/apps/school/templates/blocks/schedule_purchased.html +++ b/apps/school/templates/blocks/schedule_purchased.html @@ -41,10 +41,10 @@ {% for school_schedule in school_schedules %} {% if is_previous %} {% if school_schedule.previous_live_lesson in live_lessons %} - {% include './_schedule_purchased_item.html' with school_schedule=school_schedule live_lesson=school_schedule.previous_live_lesson %} + {% include 'blocks/schedule_item.html' with school_schedule=school_schedule live_lesson=school_schedule.previous_live_lesson purchased=True %} {% endif %} {% else %} - {% include './_schedule_purchased_item.html' with school_schedule=school_schedule live_lesson=school_schedule.current_live_lesson %} + {% include 'blocks/schedule_item.html' with school_schedule=school_schedule live_lesson=school_schedule.current_live_lesson purchased=True %} {% endif %} {% endfor %} {% endif %} diff --git a/apps/school/templates/school/schedules_print.html b/apps/school/templates/school/schedules_print.html index 25aca06e..66c936cb 100644 --- a/apps/school/templates/school/schedules_print.html +++ b/apps/school/templates/school/schedules_print.html @@ -11,70 +11,16 @@ - +
Расписание
- {% for school_schedule in school_schedules %} {% with current_live_lesson=school_schedule.current_live_lesson %} -
-
-
-
- {{ school_schedule }} -
- {% if current_live_lesson %} - - {% endif %} -
-
-
{{ school_schedule.start_at }} (МСК)
-
-
-
-
- {% thumbnail current_live_lesson.cover.image "70x70" crop="center" as im %} - {% empty %} - {% endthumbnail %} -
-
-
-
{{ school_schedule.title }}{% if current_live_lesson %}, - {{ current_live_lesson.title }} - {% endif %} -
-
- {% if live_lesson %} - {{ live_lesson.short_description }} - {% else %} - {{ school_schedule.description }} - {% endif %} -
-
-
Материалы
-
-
-
- {{ school_schedule.materials }} -
-
-
- - - - - - - - - - -
-
-
- {% endwith %} {% endfor %} + {% for school_schedule in school_schedules %} + {% include 'blocks/schedule_item.html' with school_schedule=school_schedule live_lesson=school_schedule.current_live_lesson print=True %} + {% endfor %}
diff --git a/apps/school/templates/summer/schedule_purchased.html b/apps/school/templates/summer/schedule_purchased.html index 63e963fd..e327fc96 100644 --- a/apps/school/templates/summer/schedule_purchased.html +++ b/apps/school/templates/summer/schedule_purchased.html @@ -41,10 +41,10 @@ {% for school_schedule in school_schedules %} {% if is_previous %} {% if school_schedule.previous_live_lesson in live_lessons %} - {% include './_schedule_purchased_item.html' with school_schedule=school_schedule live_lesson=school_schedule.previous_live_lesson %} + {% include 'blocks/schedule_item.html' with school_schedule=school_schedule live_lesson=school_schedule.previous_live_lesson purchased=True %} {% endif %} {% else %} - {% include './_schedule_purchased_item.html' with school_schedule=school_schedule live_lesson=school_schedule.current_live_lesson %} + {% include 'blocks/schedule_item.html' with school_schedule=school_schedule live_lesson=school_schedule.current_live_lesson purchased=True %} {% endif %} {% endfor %} {% endif %} diff --git a/web/src/sass/_common.sass b/web/src/sass/_common.sass index 8386a037..f9cee7ff 100755 --- a/web/src/sass/_common.sass +++ b/web/src/sass/_common.sass @@ -3782,6 +3782,7 @@ a.grey-link +m display: flex flex-direction: row + width: 100% &__day position: relative margin: 10px 0 5px @@ -3807,20 +3808,22 @@ a.grey-link margin: -3px 0 0 auto &__buy +m - display: flex - margin-left: 20px + flex: 1 0 0 + text-align: right &__time margin: 15px 0 opacity: .5 +m - width: 90px - margin: 0 + margin: -1px 15px + font-size: 12px; &__btn margin-right: -60px padding-left: 20px padding-right: 20px white-space: nowrap letter-spacing: 1px + +m + margin-right: 0 &__pic display: block width: 100%