LIL-419. Revert galery & teachers blocks on main page

remotes/origin/hasaccess
Ivlev Denis 8 years ago
parent 5cf375ae24
commit 6207fe6c6d
  1. 16
      project/templates/blocks/teachers.html
  2. 2
      project/templates/lilcity/main.html
  3. 2
      project/views.py

@ -9,22 +9,22 @@
<img class="text__curve text__curve_three" src="{% static 'img/curve-3.svg' %}">
</div>
<div class="teachers">
{% for author in authors %}
{% for teacher in teachers %}
<div class="teachers__item">
<div class="teachers__ava ava">
{% if author.photo %}
<img class="ava__pic" src="{{ author.photo.url }}"> {% else %}
{% if teacher.photo %}
<img class="ava__pic" src="{{ teacher.photo.url }}"> {% else %}
<img class="ava__pic" src="{% static 'img/user.jpg' %}"> {% endif %}
</div>
<div class="teachers__wrap">
<div class="teachers__title">{{ author.get_full_name }},
<div class="teachers__title">{{ teacher.get_full_name }},
<a href='#'>#lil_персонаж</a>
</div>
{% if author.instagram %}
<div class="teachers__name">{{ author.instagram }}</div>
{% endif %} {% if author.about %}
{% if teacher.instagram %}
<div class="teachers__name">{{ teacher.instagram }}</div>
{% endif %} {% if teacher.about %}
<div class="teachers__content">
{{ author.about }}
{{ teacher.about }}
</div>
{% endif %}
</div>

@ -8,6 +8,8 @@
{% include "templates/blocks/advantages.html" %}
{% include "templates/blocks/arts.html" %}
{% include "templates/blocks/last_courses.html" %}
{% include "templates/blocks/gallery.html" %}
{% include "templates/blocks/game.html" %}
{% include "templates/blocks/teachers.html" %}
{% include "templates/blocks/partners.html" %}
{% endblock content %}

@ -35,7 +35,7 @@ class IndexView(TemplateView):
'course_items': Course.objects.filter(status=Course.PUBLISHED)[:6],
'school_schedules': SchoolSchedule.objects.all(),
'min_school_price': SchoolSchedule.objects.all().aggregate(Min('month_price'))['month_price__min'],
'authors': User.objects.filter(role=User.AUTHOR_ROLE, show_in_mainpage=True),
'teachers': User.objects.filter(role=User.TEACHER_ROLE, show_in_mainpage=True),
})
return context

Loading…
Cancel
Save