diff --git a/templates/course.html b/templates/course.html index aaaaed5..7f08e18 100755 --- a/templates/course.html +++ b/templates/course.html @@ -118,7 +118,7 @@
{% if i.head.lessons_length > 0 %} {% if i.head.button %} - + {% else %} {% endif %} @@ -143,10 +143,14 @@ {% if i.head.lessons_length > 0 %} {% if i.head.button %} + {% if flow or flow == None %} + {% else %} + + {% endif %} {% else %} {% endif %} @@ -163,7 +167,7 @@ {{ i.head.title|safe }} - {% if i.head.status.flag != 'N' %} + {% if i.head.status.flag != 'N' and flow or flow == None %} {{ i.head.status.title }} @@ -192,12 +196,17 @@ @@ -280,7 +289,7 @@ {% if i.head.button %}
{% if flow or flow == None %} - + + {% endif %}
{% endif %} @@ -332,6 +348,23 @@ }); $('[data-toggle="tooltip"]').tooltip() + // Проверка доступности уроков(старт потока) + // если поток открыт редирект на урок + $('.flow').on('click', function(e){ + e.preventDefault(); + var path = document.location.pathname; + $.get(path, function(data){ + _flow = $(data).find('.flow').attr('href'); + if (_flow === '#'){ + $('#flowAccess').modal('show'); + } + else { + document.location.href = _flow; + } + //console.log(_flow); + }); + }); + if(flow == 'False'){ $('#flowAccess').modal('show'); } diff --git a/templates/index.html b/templates/index.html index 372174e..2f2fe73 100755 --- a/templates/index.html +++ b/templates/index.html @@ -58,7 +58,10 @@ {% for i in courses %}
+ {% comment %} + {% endcomment %} +
{{ i.level.title }}