попап в конце видео

remotes/origin/feature/end-video-popup-28-05-19
gzbender 7 years ago
parent 726b55b106
commit 32d190ceb2
  1. 9
      api/v1/views.py
  2. 2
      apps/school/templates/blocks/schedule_item.html
  3. 6
      web/src/sass/_common.sass

@ -212,6 +212,15 @@ class LikeViewSet(ExtendedModelViewSet):
headers = self.get_success_headers(serializer.data)
return Response(serializer.data, status=status.HTTP_201_CREATED, headers=headers)
@action(methods=['get'], detail=False, url_path='course-liked')
def course_liked(self, request):
user_id = request.query_params.get('user_id')
course_id = request.query_params.get('course_id')
course = Course.objects.get(id=course_id)
return Response({
'is_liked': course.likes.filter(user_id=user_id).exists()
})
class CategoryViewSet(BothListFormatMixin, ExtendedModelViewSet):
queryset = Category.objects.order_by('-id')

@ -24,7 +24,7 @@
{% include './day_pay_btn.html' %}
{% endif %}
{% endif %}
{% if not is_purchased and not request.user_agent.is_mobile and school_schedule.trial_lesson and not is_drawing_camp %}
{% if not is_purchased and not request.user_agent.is_mobile and school_schedule.trial_lesson %}
<a class="timing__trial-lesson js-video-modal" href="#" data-trial-lesson="1" data-video-url="{{ school_schedule.trial_lesson|safe }}">Пробный урок</a>
{% endif %}
</div>

@ -4131,8 +4131,10 @@ a.grey-link
+m
margin-right: 0
&__item a.timing__btn
opacity: 0;
transition: 0.5s ease;
opacity: 0;
transition: 0.5s ease
+m
opacity: 1
&__item:hover a.timing__btn
opacity: 1;
&__pic

Loading…
Cancel
Save