Merge pull request #17909 from scmmishra/lms-template-fix

fix: template fix for null_card
This commit is contained in:
Anurag Mishra
2019-06-12 14:56:25 +05:30
committed by GitHub
4 changed files with 4 additions and 4 deletions

View File

@@ -96,7 +96,7 @@
{{ card(topic) }} {{ card(topic) }}
{% endfor %} {% endfor %}
{% if topics %} {% if topics %}
{% for n in range(((topics|length)%3)) %} {% for n in range( (3 - (topics|length)) %3) %}
{{ null_card() }} {{ null_card() }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}

View File

@@ -55,7 +55,7 @@
{{ program_card(program.program, program.has_access) }} {{ program_card(program.program, program.has_access) }}
{% endfor %} {% endfor %}
{% if featured_programs %} {% if featured_programs %}
{% for n in range((featured_programs|length)%3) %} {% for n in range( (3 - (featured_programs|length)) %3) %}
{{ null_card() }} {{ null_card() }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}

View File

@@ -77,7 +77,7 @@
{{ card(course) }} {{ card(course) }}
{% endfor %} {% endfor %}
{% if courses %} {% if courses %}
{% for n in range((courses|length)%3) %} {% for n in range( (3 - (courses|length)) %3) %}
{{ null_card() }} {{ null_card() }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}

View File

@@ -48,7 +48,7 @@
{{ card(content, loop.index, topic.contents|length) }} {{ card(content, loop.index, topic.contents|length) }}
{% endfor %} {% endfor %}
{% if contents %} {% if contents %}
{% for n in range((contents|length)%3) %} {% for n in range( (3 - (contents|length)) %3) %}
{{ null_card() }} {{ null_card() }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}