Actualización
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
{% import 'macro/macro.tpl'|get_template as display %}
|
||||
|
||||
{% if not categories is empty %}
|
||||
<div class="classic-courses">
|
||||
{% for category in categories %}
|
||||
{% if category.courses %}
|
||||
{% set course_content %}
|
||||
{% for item in category.courses %}
|
||||
<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 %}
|
||||
</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">
|
||||
{% set title %}
|
||||
{% if item.visibility == constant('COURSE_VISIBILITY_CLOSED') and not item.current_user_is_teacher %}
|
||||
{{ item.title }} {{ item.code_course }} {{ item.url_marker }}
|
||||
{% else %}
|
||||
<a href="{{ item.link }}">
|
||||
{{ item.title }} {{ item.code_course }} {{ item.url_marker }}
|
||||
</a>
|
||||
{{ item.notifications }}
|
||||
{% endif %}
|
||||
{% endset %}
|
||||
{{ title | remove_xss }}
|
||||
</h4>
|
||||
<div class="course-items-session">
|
||||
<div class="list-teachers">
|
||||
{% if item.teachers|length > 0 %}
|
||||
<img src="{{ 'teacher.png'|icon(16) }}" width="16" height="16">
|
||||
{% 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>
|
||||
|
||||
{% include 'user_portal/course_student_info.tpl'|get_template with { 'student_info': item.student_info } %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endset %}
|
||||
|
||||
{{ display.collapse(
|
||||
'course_category_' ~ category.id_category,
|
||||
category.title_category ~ '<div class="pull-right">'~ category.collapsable_link~ "</div>",
|
||||
course_content,
|
||||
false,
|
||||
category.collapsed == 0
|
||||
)
|
||||
}}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
{% if not courses is empty %}
|
||||
<div class="classic-courses">
|
||||
{% 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 %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<div class="pull-right">
|
||||
{{ item.unregister_button }}
|
||||
{% if item.edit_actions != '' %}
|
||||
{% 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 %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<h4 class="course-items-title">
|
||||
{% if item.visibility == constant('COURSE_VISIBILITY_CLOSED') and not item.current_user_is_teacher %}
|
||||
{{ item.title }} {{ item.code_course }} {{ item.url_marker }}
|
||||
{% else %}
|
||||
<a href="{{ item.link }}">
|
||||
{{ item.title }} {{ item.code_course }}
|
||||
</a>
|
||||
{{ item.url_marker }}
|
||||
{{ 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 %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% include 'user_portal/course_student_info.tpl'|get_template with { 'student_info': item.student_info } %}
|
||||
</div>
|
||||
<div class="category">
|
||||
{{ item.category }}
|
||||
</div>
|
||||
{% if 'show_different_course_language'| api_get_setting is same as 'true' %}
|
||||
<div class="course_language">
|
||||
{{ item.course_language }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="course_extrafields">
|
||||
{% if item.extrafields|length > 0 %}
|
||||
{% for extrafield in item.extrafields %}
|
||||
{% set counter = counter + 1 %}
|
||||
{% if counter > 1 %} | {% endif %}
|
||||
{{ extrafield.text }} : <strong>{{ extrafield.value }}</strong>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
189
main/template/default/user_portal/classic_session.tpl
Normal file
189
main/template/default/user_portal/classic_session.tpl
Normal file
@@ -0,0 +1,189 @@
|
||||
{% set session_image = 'window_list.png'|img(32, row.title) %}
|
||||
|
||||
{% for row in session %}
|
||||
<div class="panel panel-default">
|
||||
{% set collapsable = '' %}
|
||||
{% if not row.show_simple_session_info %}
|
||||
{% if row.course_list_session_style %}
|
||||
<div class="panel-heading">
|
||||
{% if row.course_list_session_style == 1 or row.course_list_session_style == 2 %}
|
||||
{# Session link #}
|
||||
{% if remove_session_url == true %}
|
||||
{{ session_image }} {{ row.title }}
|
||||
{% else %}
|
||||
{# Default link #}
|
||||
{% set session_link = _p.web_main ~ 'session/index.php?session_id=' ~ row.id %}
|
||||
{% if row.course_list_session_style == 2 and row.courses|length == 1 %}
|
||||
{# Linkt to first course #}
|
||||
{% set session_link = row.courses.0.link %}
|
||||
{% endif %}
|
||||
|
||||
<a href="{{ session_link }}">
|
||||
{{ session_image }} {{ row.title }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% elseif row.course_list_session_style == 4 %}
|
||||
{{ session_image }} {{ row.title }}
|
||||
{% elseif row.course_list_session_style == 3 %}
|
||||
{# Collapsible/Foldable panel #}
|
||||
<a role="button" data-toggle="collapse" data-parent="#page-content" href="#collapse_{{ row.id }}"
|
||||
aria-expanded="false" class="collapse-toogle--right collapsed">
|
||||
{{ session_image }} {{ row.title }}
|
||||
</a>
|
||||
{% if row.collapsable_link %}
|
||||
{% if row.collapsed == 1 %}
|
||||
{% set collapsable = 'collapse' %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% set collapsable = 'collapse' %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if row.show_actions %}
|
||||
<div class="pull-right">
|
||||
<a href="{{ _p.web_main ~ "session/resume_session.php?id_session=" ~ row.id }}">
|
||||
<img src="{{ "edit.png"|icon(22) }}" width="22" height="22" alt="{{ "Edit"|get_lang }}"
|
||||
title="{{ "Edit"|get_lang }}">
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if row.collapsable_link %}
|
||||
<div class="pull-right">
|
||||
{{ row.collapsable_link }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if row.collapsable_link %}
|
||||
{% if row.collapsed == 1 %}
|
||||
{% set collapsable = 'collapse' %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div class="session panel-body {{ collapsable }}" id="collapse_{{ row.id }}">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{% if row.show_description %}
|
||||
{{ row.description }}
|
||||
{% endif %}
|
||||
<ul class="info-session list-inline">
|
||||
{% if row.coach_name %}
|
||||
<li>
|
||||
<i class="fa fa-user" aria-hidden="true"></i>
|
||||
{{ row.coach_name }}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if hide_session_dates_in_user_portal == false %}
|
||||
{% if row.date %}
|
||||
<li>
|
||||
<i class="fa fa-calendar" aria-hidden="true"></i>
|
||||
{{ row.date }}
|
||||
</li>
|
||||
{% elseif row.duration %}
|
||||
<li>
|
||||
<i class="fa fa-calendar" aria-hidden="true"></i>
|
||||
{{ row.duration }}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
<div class="sessions-items">
|
||||
{% for item in row.courses %}
|
||||
<div class="courses">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
{% if item.requirements %}
|
||||
<span class="thumbnail">
|
||||
{{ item.html_image }}
|
||||
</span>
|
||||
{% else %}
|
||||
<a href="{{ item.link }}" class="thumbnail">
|
||||
{{ item.html_image }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<div class="pull-right">
|
||||
{{ item.unregister_button }}
|
||||
</div>
|
||||
{% if item.requirements %}
|
||||
<h4>{{ item.name }}</h4>
|
||||
{% else %}
|
||||
<h4>{{ item.title }}</h4>
|
||||
{% endif %}
|
||||
|
||||
<div class="list-teachers">
|
||||
{{ item.requirements }}
|
||||
|
||||
{% if item.coaches|length > 0 %}
|
||||
<img src="{{ 'teacher.png'|icon(16) }}" width="16" height="16">
|
||||
{% for coach in item.coaches %}
|
||||
{{ loop.index > 1 ? ' | ' }}
|
||||
<a href="{{ _p.web_ajax ~ 'user_manager.ajax.php?' ~ {'a': 'get_user_popup', 'hash': coach.hash, 'session_id': row.id, 'course_id': item.real_id }|url_encode() }}"
|
||||
data-title="{{ coach.full_name }}" class="ajax">
|
||||
{{ coach.firstname }}, {{ coach.lastname }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="category">
|
||||
{{ item.category }}
|
||||
</div>
|
||||
{% if 'show_different_course_language'| api_get_setting is same as 'true' %}
|
||||
<div class="course_language">
|
||||
{{ item.course_language }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="course_extrafields">
|
||||
{% if item.extrafields|length > 0 %}
|
||||
{% for extrafield in item.extrafields %}
|
||||
{% set counter = counter + 1 %}
|
||||
{% if counter > 1 %} | {% endif %}
|
||||
{{ extrafield.text }} : <strong>{{ extrafield.value }}</strong>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% include 'user_portal/course_student_info.tpl'|get_template with { 'student_info': item.student_info } %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="panel-heading">
|
||||
<a href="{{ _p.web_main ~ 'session/index.php?session_id=' ~ row.id }}">
|
||||
<img id="session_img_{{ row.id }}" src="{{ "window_list.png"|icon(32) }}" alt="{{ row.title }}"
|
||||
title="{{ row.title }}">
|
||||
{{ row.title }}
|
||||
</a>
|
||||
</div>
|
||||
<!-- view simple info -->
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<a class="thumbnail" href="{{ _p.web_main ~ 'session/index.php?session_id=' ~ row.id }}">
|
||||
<img class="img-responsive"
|
||||
src="{{ row.image ? _p.web_upload ~ row.image : 'session_default.png'|icon() }}"
|
||||
alt="{{ row.title }}" title="{{ row.title }}">
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<div class="info-session">
|
||||
<p>{{ row.subtitle }}</p>
|
||||
{% if row.show_description %}
|
||||
<div class="description">
|
||||
{{ row.description }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end view simple info -->
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
25
main/template/default/user_portal/course_categories.tpl
Normal file
25
main/template/default/user_portal/course_categories.tpl
Normal file
@@ -0,0 +1,25 @@
|
||||
<p class="lead">{{ 'MyCoursePageCategoryIntroduction'|get_lang }}</p>
|
||||
<ul class="media-list">
|
||||
{% for category in course_categories %}
|
||||
{% if category %}
|
||||
<li class="media">
|
||||
<div class="media-left">
|
||||
<a href="{{ _p.web_self ~ '?' ~ {'category':category.code}|url_encode }}">
|
||||
<img src="{{ category.image ? _p.web_upload ~ category.image : 'session_default.png'|icon(128) }}"
|
||||
alt="{{ category.name }}" width="200" class="media-object">
|
||||
</a>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">{{ category.name }}</h4>
|
||||
<p>{{ category.code }}</p>
|
||||
{% if category.description %}
|
||||
<p>{{ category.description }}</p>
|
||||
{% endif %}
|
||||
<a href="{{ _p.web_self ~ '?' ~ {'category':category.code}|url_encode }}" class="btn btn-default">
|
||||
{{ 'View'|get_lang }} <span class="fa fa-arrow-right" aria-hidden="true"></span>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
35
main/template/default/user_portal/course_student_info.tpl
Normal file
35
main/template/default/user_portal/course_student_info.tpl
Normal file
@@ -0,0 +1,35 @@
|
||||
{% if student_info %}
|
||||
{% if not student_info.progress is null or not student_info.score is null or not student_info.certificate is null %}
|
||||
{% set num_columns = (student_info.progress is null ? 0 : 1) + (student_info.score is null ? 0 : 1) + (student_info.certificate is null ? 0 : 1) %}
|
||||
<div class="course-student-info">
|
||||
<div class="student-info">
|
||||
<hr>
|
||||
<div class="row">
|
||||
{% if not student_info.progress is null %}
|
||||
<div class="{{ num_columns == 1 ? 'col-xs-12' : (num_columns == 2 ? 'col-xs-9' : 'col-xs-6') }}">
|
||||
<strong>{{ 'CourseAdvance'|get_lang }}</strong>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar"
|
||||
aria-valuenow="{{ student_info.progress }}" aria-valuemin="0" aria-valuemax="100"
|
||||
style="width: {{ student_info.progress }}%;">
|
||||
{{ 'XPercentCompleted'|get_lang|format(student_info.progress) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if not student_info.score is null %}
|
||||
<div class="col-xs-3">
|
||||
<div>{{ "StudentCourseScoreX" | get_lang | format(student_info.score) }}</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if not student_info.certificate is null %}
|
||||
<div class="col-xs-3">
|
||||
<i class="fa fa-certificate text-warning" aria-hidden="true"></i>
|
||||
{{ "StudentCourseCertificateX" | get_lang | format(student_info.certificate) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
@@ -0,0 +1,34 @@
|
||||
{% if student_info %}
|
||||
{% if not student_info.progress is null or not student_info.score is null or not student_info.certificate is null %}
|
||||
{% set num_columns = (student_info.progress is null ? 0 : 1) + (student_info.score is null ? 0 : 1) + (student_info.certificate is null ? 0 : 1) %}
|
||||
<div class="course-student-info">
|
||||
<div class="student-info">
|
||||
<hr>
|
||||
{% if not student_info.progress is null %}
|
||||
<strong>{{ 'CourseAdvance'|get_lang }}</strong>
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar"
|
||||
aria-valuenow="{{ student_info.progress }}" aria-valuemin="0" aria-valuemax="100"
|
||||
style="width: {{ student_info.progress }}%;">
|
||||
{{ 'XPercentCompleted'|get_lang|format(student_info.progress) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
{% if not student_info.score is null %}
|
||||
<div class="col-xs-6">
|
||||
{{ "StudentCourseScoreX" | get_lang | format(student_info.score) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if not student_info.certificate is null %}
|
||||
<div class="col-xs-6 {% if num_columns >= 2 %}text-right{% endif %}">
|
||||
<i class="fa fa-certificate text-warning" aria-hidden="true"></i>
|
||||
{{ "StudentCourseCertificateX" | get_lang | format(student_info.certificate) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
122
main/template/default/user_portal/grid_courses_with_category.tpl
Normal file
122
main/template/default/user_portal/grid_courses_with_category.tpl
Normal file
@@ -0,0 +1,122 @@
|
||||
<div class="grid-courses">
|
||||
{% for category in categories %}
|
||||
{% set nameCategory = category.title_category %}
|
||||
{% set idCategory = category.id_category %}
|
||||
<div id="category_{{ idCategory }}" class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
{{ nameCategory }}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
{% for item in category.courses %}
|
||||
<div class="col-xs-12 col-sm-6 col-md-4">
|
||||
<div class="items">
|
||||
<div class="image">
|
||||
{% set title %}
|
||||
{% if item.is_special_course %}
|
||||
<div class="pin">{{ item.icon }}</div>
|
||||
{% endif %}
|
||||
{% if item.visibility == constant('COURSE_VISIBILITY_CLOSED') and not item.current_user_is_teacher %}
|
||||
<img src="{{ item.image }}" class="img-responsive">
|
||||
{% else %}
|
||||
<a title="{{ item.title }}" href="{{ item.link }}">
|
||||
<img src="{{ item.image }}" alt="{{ item.title }}" class="img-responsive">
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if item.category != '' %}
|
||||
<span class="category">{{ item.category }}</span>
|
||||
<div class="cribbon"></div>
|
||||
{% endif %}
|
||||
{% if item.edit_actions != '' %}
|
||||
<div class="admin-actions">
|
||||
{% 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 %}
|
||||
{% endset %}
|
||||
{{ title | remove_xss }}
|
||||
</div>
|
||||
<div class="description">
|
||||
<div class="block-title">
|
||||
<h4 class="title" title="{{ item.title }}">
|
||||
{% if item.visibility == constant('COURSE_VISIBILITY_CLOSED') and not item.current_user_is_teacher %}
|
||||
{{ item.title_cut }}
|
||||
<span class="code-title">{{ item.code_course }}</span>{{ item.url_marker }}
|
||||
{% else %}
|
||||
<a title="{{ item.title }}" href="{{ item.link }}">{{ item.title_cut }}</a>
|
||||
<span class="code-title">{{ item.code_course }}</span>{{ item.url_marker }}
|
||||
{% endif %}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="block-author">
|
||||
{% if item.teachers | length > 6 %}
|
||||
<a id="plist-{{ loop.index }}" data-trigger="focus" tabindex="0" role="button" class="btn btn-default panel_popover" data-toggle="popover" title="{{ 'CourseTeachers' | get_lang }}" data-html="true">
|
||||
<i class="fa fa-graduation-cap" aria-hidden="true"></i>
|
||||
</a>
|
||||
<div id="popover-content-plist-{{ loop.index }}" class="hide">
|
||||
{% for teacher in item.teachers %}
|
||||
<div class="popover-teacher">
|
||||
<a href="{{ teacher.url }}" class="ajax"
|
||||
data-title="{{ teacher.firstname }} {{ teacher.lastname }}" >
|
||||
<img title="{{ teacher.firstname }} {{ teacher.lastname }}" src="{{ teacher.avatar }}"/>
|
||||
</a>
|
||||
<div class="teachers-details">
|
||||
<h5>
|
||||
<a href="{{ teacher.url }}" class="ajax"
|
||||
data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
|
||||
{{ teacher.firstname }} {{ teacher.lastname }}
|
||||
</a>
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% for teacher in item.teachers %}
|
||||
{% if item.teachers | length <= 2 %}
|
||||
<a href="{{ teacher.url }}" class="ajax"
|
||||
data-title="{{ teacher.firstname }} {{ teacher.lastname }}" title="{{ teacher.firstname }} {{ teacher.lastname }}">
|
||||
<img title="{{ teacher.firstname }} {{ teacher.lastname }}" src="{{ teacher.avatar }}"/>
|
||||
</a>
|
||||
<div class="teachers-details">
|
||||
<h5>
|
||||
<a href="{{ teacher.url }}" class="ajax"
|
||||
data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
|
||||
{{ teacher.firstname }} {{ teacher.lastname }}
|
||||
</a>
|
||||
</h5>
|
||||
<p>{{ 'Teacher' | get_lang }}</p>
|
||||
</div>
|
||||
{% elseif item.teachers | length <= 6 %}
|
||||
<a href="{{ teacher.url }}" class="ajax"
|
||||
data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
|
||||
<img title="{{ teacher.firstname }} {{ teacher.lastname }}" src="{{ teacher.avatar }}"/>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if item.notifications %}
|
||||
<div class="notifications">{{ item.notifications }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% include 'user_portal/grid_course_student_info.tpl'|get_template with { 'student_info':item.student_info } %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -0,0 +1,129 @@
|
||||
{% if not courses is empty %}
|
||||
<div class="grid-courses">
|
||||
<div class="row">
|
||||
{% for item in courses %}
|
||||
<div class="col-xs-12 col-sm-6 col-md-4">
|
||||
<div class="items my-courses">
|
||||
<div class="image">
|
||||
{% set title %}
|
||||
{% if item.is_special_course %}
|
||||
<div class="pin">{{ item.icon }}</div>
|
||||
{% endif %}
|
||||
{% if item.visibility == constant('COURSE_VISIBILITY_CLOSED') and not item.current_user_is_teacher %}
|
||||
<img src="{{ item.image }}" class="img-responsive">
|
||||
{% else %}
|
||||
{% set title %}
|
||||
<a title="{{ item.title }}" href="{{ item.link }}">
|
||||
<img src="{{ item.image }}" alt="{{ item.title }}" class="img-responsive">
|
||||
</a>
|
||||
{% endset %}
|
||||
{{ title | remove_xss }}
|
||||
{% endif %}
|
||||
{% if item.category != '' %}
|
||||
<span class="category">{{ item.category }}</span>
|
||||
<div class="cribbon"></div>
|
||||
{% endif %}
|
||||
{% if 'show_different_course_language'| api_get_setting is same as 'true' and not item.is_special_course %}
|
||||
<span class="course-language">{{ item.course_language }}</span>
|
||||
<div class="cribbon cribbon-course-language"></div>
|
||||
{% endif %}
|
||||
{% if item.edit_actions != '' %}
|
||||
<div class="admin-actions">
|
||||
{% 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 %}
|
||||
{% endset %}
|
||||
{{ title | remove_xss }}
|
||||
</div>
|
||||
<div class="description">
|
||||
<div class="block-title">
|
||||
{% set title %}
|
||||
<h4 class="title" title="{{ item.title }}">
|
||||
{% if item.visibility == constant('COURSE_VISIBILITY_CLOSED') and not item.current_user_is_teacher %}
|
||||
{{ item.title_cut }}
|
||||
<span class="code-title">{{ item.code_course }}</span>{{ item.url_marker }}
|
||||
{% else %}
|
||||
<a title="{{ item.title }}" href="{{ item.link }}">{{ item.title_cut }}</a>
|
||||
<span class="code-title">{{ item.code_course }}</span>{{ item.url_marker }}
|
||||
{% endif %}
|
||||
</h4>
|
||||
{% endset %}
|
||||
{{ title | remove_xss }}
|
||||
</div>
|
||||
<div class="block-author">
|
||||
{% if item.teachers | length > 6 %}
|
||||
<a id="plist-{{ loop.index }}"
|
||||
data-trigger="focus" tabindex="0" role="button"
|
||||
class="btn btn-default panel_popover" data-toggle="popover"
|
||||
title="{{ 'CourseTeachers' | get_lang }}" data-html="true">
|
||||
<i class="fa fa-graduation-cap" aria-hidden="true"></i>
|
||||
</a>
|
||||
<div id="popover-content-plist-{{ loop.index }}" class="hide">
|
||||
{% for teacher in item.teachers %}
|
||||
<div class="popover-teacher">
|
||||
<a href="{{ teacher.url }}" class="ajax"
|
||||
data-title="{{ teacher.firstname }} {{ teacher.lastname }}" >
|
||||
<img title="{{ teacher.firstname }} {{ teacher.lastname }}" src="{{ teacher.avatar }}"/>
|
||||
</a>
|
||||
<div class="teachers-details">
|
||||
<h5>
|
||||
<a href="{{ teacher.url }}" class="ajax"
|
||||
data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
|
||||
{{ teacher.firstname }} {{ teacher.lastname }}
|
||||
</a>
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% for teacher in item.teachers %}
|
||||
{% if item.teachers | length <= 2 %}
|
||||
<a href="{{ teacher.url }}" class="ajax"
|
||||
data-title="{{ teacher.firstname }} {{ teacher.lastname }}" title="{{ teacher.firstname }} {{ teacher.lastname }}">
|
||||
<img title="{{ teacher.firstname }} {{ teacher.lastname }}" src="{{ teacher.avatar }}"/>
|
||||
</a>
|
||||
<div class="teachers-details">
|
||||
<h5>
|
||||
<a href="{{ teacher.url }}" class="ajax"
|
||||
data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
|
||||
{{ teacher.firstname }} {{ teacher.lastname }}
|
||||
</a>
|
||||
</h5>
|
||||
<p>{{ 'Teacher' | get_lang }}</p>
|
||||
</div>
|
||||
{% elseif item.teachers | length <= 6 %}
|
||||
<a href="{{ teacher.url }}" class="ajax"
|
||||
data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
|
||||
<img title="{{ teacher.firstname }} {{ teacher.lastname }}" src="{{ teacher.avatar }}"/>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if item.notifications %}
|
||||
<div class="notifications">{{ item.notifications }}</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% include 'user_portal/grid_course_student_info.tpl'|get_template with { 'student_info':item.student_info } %}
|
||||
|
||||
{{ item.unregister_button }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
226
main/template/default/user_portal/grid_session.tpl
Normal file
226
main/template/default/user_portal/grid_session.tpl
Normal file
@@ -0,0 +1,226 @@
|
||||
{% set group_courses = 'view_grid_courses_grouped_categories_in_sessions'| api_get_configuration_value %}
|
||||
|
||||
{% macro course_block(course, show_category) %}
|
||||
<div class="col-xs-12 col-sm-6 col-md-4">
|
||||
<div class="items items-sessions">
|
||||
<div class="image">
|
||||
{% set title %}
|
||||
{% if course.visibility == constant('COURSE_VISIBILITY_CLOSED') or course.requirements %}
|
||||
<span title="{{ course.name }}" >
|
||||
<img src="{{ course.image }}" class="img-responsive">
|
||||
</span>
|
||||
{% else %}
|
||||
<a title="{{ course.name }}" href="{{ course.link }}">
|
||||
<img src="{{ course.image }}" class="img-responsive">
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endset %}
|
||||
{{ title | remove_xss }}
|
||||
|
||||
{% if course.category != '' and show_category %}
|
||||
<span class="category">{{ course.category }}</span>
|
||||
<div class="cribbon"></div>
|
||||
{% endif %}
|
||||
{% if 'show_different_course_language'| api_get_setting is same as 'true' %}
|
||||
<span class="course-language grid-course">{{ course.course_language }}</span>
|
||||
<div class="cribbon cribbon-course-language-grid"></div>
|
||||
{% endif %}
|
||||
{% if course.edit_actions %}
|
||||
<div class="admin-actions">
|
||||
{% if course.document == '' %}
|
||||
<a class="btn btn-default btn-sm" href="{{ course.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="{{ course.edit_actions }}">
|
||||
<i class="fa fa-pencil" aria-hidden="true"></i>
|
||||
</a>
|
||||
{{ course.document }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="description">
|
||||
<div class="block-title">
|
||||
<h4 class="title">
|
||||
{% set title %}
|
||||
{% if course.visibility == constant('COURSE_VISIBILITY_CLOSED') or course.requirements %}
|
||||
{{ course.name }}
|
||||
<span class="code-title">{{ course.visual_code }}</span>
|
||||
{% else %}
|
||||
{{ course.title }}
|
||||
{% endif %}
|
||||
{% endset %}
|
||||
{{ title | remove_xss }}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="block-author">
|
||||
{{ course.requirements }}
|
||||
{% if course.coaches | length > 2 %}
|
||||
<a
|
||||
id="plist-{{ course.real_id }}"
|
||||
data-trigger="focus"
|
||||
tabindex="0" role="button"
|
||||
class="btn btn-default panel_popover"
|
||||
data-toggle="popover"
|
||||
title="{{ 'CourseTeachers' | get_lang }}"
|
||||
data-html="true"
|
||||
>
|
||||
<i class="fa fa-graduation-cap" aria-hidden="true"></i>
|
||||
</a>
|
||||
<div id="popover-content-plist-{{ course.real_id }}" class="hide">
|
||||
{% endif %}
|
||||
|
||||
{% for teacher in course.coaches %}
|
||||
{% if course.coaches | length > 2 %}
|
||||
<div class="popover-teacher">
|
||||
<a href="{{ teacher.url }}" class="ajax">
|
||||
<img src="{{ teacher.avatar }}"/>
|
||||
</a>
|
||||
<div class="teachers-details">
|
||||
<h5>
|
||||
{{ teacher.firstname }} {{ teacher.lastname }}
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<a href="{{ teacher.url }}" class="ajax"
|
||||
data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
|
||||
<img src="{{ teacher.avatar }}"/>
|
||||
</a>
|
||||
<div class="teachers-details">
|
||||
<h5>
|
||||
<a href="{{ teacher.url }}" class="ajax"
|
||||
data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
|
||||
{{ teacher.firstname }} {{ teacher.lastname }}
|
||||
</a>
|
||||
</h5>
|
||||
<p>{{ "Teacher"|get_lang }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if course.coaches | length > 2 %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="notifications">
|
||||
{{ course.notifications }}
|
||||
</div>
|
||||
|
||||
{% include 'user_portal/grid_course_student_info.tpl'|get_template with { 'student_info':course.student_info } %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% import _self as blocks %}
|
||||
|
||||
{% set session_image = 'window_list.png'|img(32, row.title) %}
|
||||
|
||||
{% for row in session %}
|
||||
{% set collapsable = '' %}
|
||||
<div id="session-{{ item.id }}" class="session panel panel-default">
|
||||
{% if row.course_list_session_style %}
|
||||
{# If not style then no show header #}
|
||||
<div class="panel-heading">
|
||||
|
||||
{% if row.course_list_session_style == 1 or row.course_list_session_style == 2 %}
|
||||
{# Session link #}
|
||||
{% if remove_session_url == true %}
|
||||
{{ session_image }} {{ row.title }}
|
||||
{% else %}
|
||||
{# Default link #}
|
||||
{% set session_link = _p.web_main ~ 'session/index.php?session_id=' ~ row.id %}
|
||||
{% if row.course_list_session_style == 2 and row.courses|length == 1 %}
|
||||
{# Linkt to first course #}
|
||||
{% set session_link = row.courses.0.link %}
|
||||
{% endif %}
|
||||
<a href="{{ session_link }}">
|
||||
{{ session_image }} {{ row.title }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% elseif row.course_list_session_style == 4 %}
|
||||
{{ session_image }} {{ row.title }}
|
||||
{% elseif row.course_list_session_style == 3 %}
|
||||
{# Collapsible panel #}
|
||||
{# Foldable #}
|
||||
<a role="button" data-toggle="collapse" data-parent="#page-content" href="#collapse_{{ row.id }}"
|
||||
aria-expanded="false" class="collapse-toogle--right collapsed">
|
||||
{{ session_image }} {{ row.title }}
|
||||
</a>
|
||||
{% set collapsable = 'collapse' %}
|
||||
{% endif %}
|
||||
{% if row.show_actions %}
|
||||
<div class="pull-right">
|
||||
<a href="{{ _p.web_main ~ "session/resume_session.php?id_session=" ~ row.id }}">
|
||||
<img src="{{ "edit.png"|icon(22) }}" width="22" height="22" alt="{{ "Edit"|get_lang }}"
|
||||
title="{{ "Edit"|get_lang }}">
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if row.collapsable_link %}
|
||||
<div class="pull-right">
|
||||
{{ row.collapsable_link }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if row.collapsable_link %}
|
||||
{% if row.collapsed == 1 %}
|
||||
{% set collapsable = 'collapse' %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div class="session panel-body {{ collapsable }}" id="collapse_{{ row.id }}">
|
||||
{% if row.show_description %}
|
||||
{{ row.description }}
|
||||
{% endif %}
|
||||
<ul class="info-session list-inline">
|
||||
{% if row.coach_name %}
|
||||
<li>
|
||||
<i class="fa fa-user" aria-hidden="true"></i>
|
||||
{{ row.coach_name }}
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if hide_session_dates_in_user_portal == false %}
|
||||
{% if row.date %}
|
||||
<li>
|
||||
<i class="fa fa-calendar" aria-hidden="true"></i> {{ row.date }}
|
||||
</li>
|
||||
{% elseif row.duration %}
|
||||
<li>
|
||||
<i class="fa fa-calendar" aria-hidden="true"></i> {{ row.duration }}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
<div class="grid-courses">
|
||||
{% if not group_courses %}
|
||||
<div class="row">
|
||||
{% for item in row.courses %}
|
||||
{{ blocks.course_block(item, true) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
{% for category_code in row.course_categories %}
|
||||
<h4>{{ category_code }}</h4>
|
||||
<div class="row">
|
||||
{% for course in row.courses %}
|
||||
{% if course.category == category_code %}
|
||||
{{ blocks.course_block(course, false) }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
60
main/template/default/user_portal/session_category.tpl
Normal file
60
main/template/default/user_portal/session_category.tpl
Normal file
@@ -0,0 +1,60 @@
|
||||
{% set fold_session_category = 'user_portal_foldable_session_category'|api_get_configuration_value %}
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
{% if fold_session_category %}
|
||||
<a class="thumbnail" role="button" data-toggle="collapse" aria-expanded="false"
|
||||
href="#collapse-category-{{ session_category.id }}"
|
||||
aria-controls="collapse-category-{{ session_category.id }}">
|
||||
<img src="{{ "sessions_category.png"|icon(48) }}" width="48" height="48"
|
||||
alt="{{ session_category.title }}" title="{{ session_category.title }}">
|
||||
</a>
|
||||
{% else %}
|
||||
{% if session_category.show_actions %}
|
||||
<a href="{{ _p.web_main ~ 'session/session_category_edit.php?id=' ~ session_category.id }}"
|
||||
class="thumbnail">
|
||||
<img src="{{ "sessions_category.png"|icon(48) }}" width="48" height="48"
|
||||
alt="{{ session_category.title }}" title="{{ session_category.title }}">
|
||||
</a>
|
||||
{% else %}
|
||||
<img src="{{ "sessions_category.png"|icon(48) }}" width="48" height="48"
|
||||
alt="{{ session_category.title }}" title="{{ session_category.title }}">
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
{% if session_category.show_actions %}
|
||||
<div class="pull-right">
|
||||
<a href="{{ _p.web_main ~ 'session/session_category_edit.php?id=' ~ session_category.id }}">
|
||||
<img src="{{ "edit.png"|icon(22) }}" width="22" height="22" alt="{{ "Edit"|get_lang }}"
|
||||
title="{{ "Edit"|get_lang }}">
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if fold_session_category %}
|
||||
<a role="button" data-toggle="collapse" href="#collapse-category-{{ session_category.id }}"
|
||||
aria-expanded="false" aria-controls="collapse-category-{{ session_category.id }}">
|
||||
<h4 class="title">{{ session_category.title }}</h4>
|
||||
</a>
|
||||
{% else %}
|
||||
<h4 class="title">{{ session_category.title }}</h4>
|
||||
{% endif %}
|
||||
|
||||
{% if session_category.subtitle %}
|
||||
<div class="subtitle-session">{{ session_category.subtitle }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{# session_category.sessions is generated with the session.tpl #}
|
||||
{% if fold_session_category %}
|
||||
<div class="collapse" id="collapse-category-{{ session_category.id }}">
|
||||
{{ session_category.sessions }}
|
||||
</div>
|
||||
{% else %}
|
||||
{{ session_category.sessions }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
10
main/template/default/user_portal/terms.tpl
Normal file
10
main/template/default/user_portal/terms.tpl
Normal file
@@ -0,0 +1,10 @@
|
||||
{% extends 'layout/layout_1_col.tpl'|get_template %}
|
||||
{% import 'default/macro/macro.tpl' as display %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-md-12">
|
||||
{% if term %}
|
||||
{{ display.panel('TermsAndConditions'|get_lang, term.content, term.date_text ) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user