update course list classic - refs #2681
parent
53a70c3eca
commit
df08d0c58f
@ -1,99 +1,108 @@ |
||||
{% import '@ChamiloTheme/Macros/box.html.twig' as macro %} |
||||
|
||||
{% autoescape false %} |
||||
|
||||
{% if not courses is empty %} |
||||
<div class="classic-courses"> |
||||
<div class="course-list"> |
||||
{% for item in courses %} |
||||
<div class="panel panel-default"> |
||||
<div class="panel-body"> |
||||
<div class="row"> |
||||
<div class="col-md-2"> |
||||
{% if item.visibility == constant('COURSE_VISIBILITY_CLOSED') and not item.current_user_is_teacher %} |
||||
<span class="thumbnail"> |
||||
{% if item.thumbnails != '' %} |
||||
<img src="{{ item.thumbnails }}" title="{{ item.title }}" |
||||
alt="{{ item.title }}"/> |
||||
{% else %} |
||||
{{ 'blackboard.png' | img(48, item.title ) }} |
||||
{% endif %} |
||||
</span> |
||||
{% else %} |
||||
<a href="{{ item.link }}" class="thumbnail"> |
||||
{% if item.thumbnails != '' %} |
||||
<img src="{{ item.thumbnails }}" title="{{ item.title }}" |
||||
alt="{{ item.title }}"/> |
||||
{% else %} |
||||
{{ 'blackboard.png' | img(48, item.title ) }} |
||||
{% endif %} |
||||
|
||||
{% set image %} |
||||
{% if item.visibility == constant('COURSE_VISIBILITY_CLOSED') and not item.current_user_is_teacher %} |
||||
<span class="thumbnail"> |
||||
{% if item.thumbnails != '' %} |
||||
<img src="{{ item.thumbnails }}" title="{{ item.title }}" |
||||
alt="{{ item.title }}"/> |
||||
{% else %} |
||||
{{ 'blackboard.png' | img(48, item.title ) }} |
||||
{% endif %} |
||||
</span> |
||||
{% else %} |
||||
<a href="{{ item.link }}" class="thumbnail"> |
||||
{% if item.thumbnails != '' %} |
||||
<img src="{{ item.thumbnails }}" title="{{ item.title }}" |
||||
alt="{{ item.title }}"/> |
||||
{% else %} |
||||
{{ 'blackboard.png' | img(48, item.title ) }} |
||||
{% endif %} |
||||
</a> |
||||
{% endif %} |
||||
{% endset %} |
||||
|
||||
{% set title %} |
||||
{% if item.edit_actions != '' %} |
||||
<div class="float-right"> |
||||
{% if item.document == '' %} |
||||
<a class="btn btn-outline-secondary btn-sm" href="{{ item.edit_actions }}"> |
||||
<i class="fas fa-pencil-alt"></i> |
||||
</a> |
||||
{% else %} |
||||
<div class="btn-group" role="group"> |
||||
<a class="btn btn-outline-secondary btn-sm" href="{{ item.edit_actions }}"> |
||||
<i class="fas fa-pencil-alt"></i> |
||||
</a> |
||||
{% endif %} |
||||
</div> |
||||
<div class="col-md-10"> |
||||
{% if item.edit_actions != '' %} |
||||
<div class="pull-right"> |
||||
{% if item.document == '' %} |
||||
<a class="btn btn-default btn-sm" href="{{ item.edit_actions }}"> |
||||
<i class="fa fa-pencil" aria-hidden="true"></i> |
||||
</a> |
||||
{% else %} |
||||
<div class="btn-group" role="group"> |
||||
<a class="btn btn-default btn-sm" href="{{ item.edit_actions }}"> |
||||
<i class="fa fa-pencil" aria-hidden="true"></i> |
||||
</a> |
||||
{{ item.document }} |
||||
</div> |
||||
{% endif %} |
||||
</div> |
||||
{% endif %} |
||||
<h4 class="course-items-title"> |
||||
{% if item.visibility == constant('COURSE_VISIBILITY_CLOSED') and not item.current_user_is_teacher %} |
||||
{{ item.title }} {{ item.code_course }} |
||||
{% else %} |
||||
<a href="{{ item.link }}"> |
||||
{{ item.title }} {{ item.code_course }} |
||||
</a> |
||||
{{ item.notifications }} |
||||
{% if item.is_special_course %} |
||||
{{ 'klipper.png' | img(22, 'CourseAutoRegister'|get_lang ) }} |
||||
{% endif %} |
||||
{% endif %} |
||||
</h4> |
||||
<div class="course-items-session"> |
||||
<div class="list-teachers"> |
||||
{% if item.teachers|length > 0 %} |
||||
{{ 'teacher.png' | img(16, 'Professor'|get_lang ) }} |
||||
{% for teacher in item.teachers %} |
||||
{% set counter = counter + 1 %} |
||||
{% if counter > 1 %} | {% endif %} |
||||
<a href="{{ teacher.url }}" class="ajax" |
||||
data-title="{{ teacher.firstname }} {{ teacher.lastname }}"> |
||||
{{ teacher.firstname }} {{ teacher.lastname }} |
||||
</a> |
||||
{% endfor %} |
||||
{{ item.document }} |
||||
</div> |
||||
{% endif %} |
||||
</div> |
||||
{% endif %} |
||||
|
||||
<h5 class="title"> |
||||
{% if item.visibility == constant('COURSE_VISIBILITY_CLOSED') and not item.current_user_is_teacher %} |
||||
{{ item.title }} {{ item.code_course }} |
||||
{% else %} |
||||
<a href="{{ item.link }}"> |
||||
{{ item.title }} {{ item.code_course }} |
||||
</a> |
||||
{{ item.notifications }} |
||||
{% if item.is_special_course %} |
||||
{{ 'klipper.png' | img(22, 'CourseAutoRegister'|get_lang ) }} |
||||
{% endif %} |
||||
{% endif %} |
||||
</h5> |
||||
{% endset %} |
||||
|
||||
{% set content %} |
||||
<div class="list-teachers"> |
||||
{% if item.teachers|length > 0 %} |
||||
{{ 'teacher.png' | img(16, 'Professor'|get_lang ) }} |
||||
{% for teacher in item.teachers %} |
||||
{% set counter = counter + 1 %} |
||||
{% if counter > 1 %} | {% endif %} |
||||
<a href="{{ teacher.url }}" class="ajax" |
||||
data-title="{{ teacher.firstname }} {{ teacher.lastname }}"> |
||||
{{ teacher.firstname }} {{ teacher.lastname }} |
||||
</a> |
||||
{% endfor %} |
||||
{% endif %} |
||||
</div> |
||||
<div class="student-progress"> |
||||
{% if item.student_info %} |
||||
{% if (item.student_info.progress is not null) and (item.student_info.score is not null) %} |
||||
<div class="course-student-info"> |
||||
<div class="student-info"> |
||||
{% if (item.student_info.progress is not null) %} |
||||
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }} |
||||
{% endif %} |
||||
</div> |
||||
{% if item.student_info %} |
||||
{% if (item.student_info.progress is not null) and (item.student_info.score is not null) %} |
||||
<div class="course-student-info"> |
||||
<div class="student-info"> |
||||
{% if (item.student_info.progress is not null) %} |
||||
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }} |
||||
{% endif %} |
||||
|
||||
{% if (item.student_info.score is not null) %} |
||||
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }} |
||||
{% endif %} |
||||
{% if (item.student_info.score is not null) %} |
||||
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }} |
||||
{% endif %} |
||||
|
||||
{% if (item.student_info.certificate is not null) %} |
||||
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }} |
||||
{% endif %} |
||||
</div> |
||||
</div> |
||||
{% if (item.student_info.certificate is not null) %} |
||||
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }} |
||||
{% endif %} |
||||
{% endif %} |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
{% endif %} |
||||
{% endif %} |
||||
</div> |
||||
</div> |
||||
|
||||
{% endset %} |
||||
|
||||
{{ macro.box_course_classic(item.course_id, title, content, image) }} |
||||
|
||||
|
||||
|
||||
{% endfor %} |
||||
</div> |
||||
{% endif %} |
||||
|
Loading…
Reference in new issue