brotherton-erpnext/erpnext/www/lms/macros/card.html

35 lines
1.2 KiB
HTML
Raw Normal View History

{% macro program_card(program, has_access) %}
2019-06-06 10:32:38 +00:00
<div class="col-sm-4 mb-4 text-left">
2019-05-30 11:04:53 +00:00
<a href="/lms/program?program={{ program.name }}" class="no-decoration no-underline">
<div class="card h-100">
{% if program.hero_image %}
2019-06-07 07:33:46 +00:00
<div class="card-hero-img" style="background-image: url('{{ program.hero_image }}')"></div>
2019-05-30 11:04:53 +00:00
{% else %}
<div class="card-image-wrapper text-center">
<div class="image-body"><i class="fa fa-picture-o" aria-hidden="true"></i></div>
</div>
{% endif %}
<div class='card-body'>
<h5 class='card-title'>{{ program.program_name }}</h5>
2019-06-06 10:32:38 +00:00
<div class="text-muted">{{ program.description[:110] + '...' if program.description else '' }}</div>
2019-05-30 11:04:53 +00:00
</div>
2019-06-05 12:46:09 +00:00
{% if has_access or program.intro_video%}
2019-05-30 11:04:53 +00:00
<div class='card-footer'>
{% if has_access %} <span class="indicator green">{{_('Enrolled')}}</span>
{% elif program.intro_video %} <span><a href="{{ program.intro_video }}" target="blank">{{_('Watch Intro')}}</a></span>
{% endif %}
2019-05-30 11:04:53 +00:00
</div>
2019-06-05 12:46:09 +00:00
{% endif %}
2019-05-30 11:04:53 +00:00
</div>
</a>
</div>
2019-06-06 10:32:38 +00:00
{% endmacro %}
{% macro null_card() %}
<div class="col-sm-4 mb-4 text-left">
2019-06-10 05:23:25 +00:00
<div class="h-100 d-none d-sm-block" style="border: 1px solid rgba(209,216,221,0.5);border-radius: 0.25rem;background-color: rgb(250, 251, 252);">
2019-06-06 10:32:38 +00:00
</div>
</div>
{% endmacro %}