upgrade
This commit is contained in:
64
main/template/default/catalog/course_catalog.tpl
Normal file
64
main/template/default/catalog/course_catalog.tpl
Normal file
@@ -0,0 +1,64 @@
|
||||
{{ tabs }}
|
||||
|
||||
<div class="search-courses">
|
||||
{{ frm_filter }}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.input-group .form-control {
|
||||
z-index: auto !important;
|
||||
}
|
||||
/* WIP: To be move in base.css */
|
||||
.search-courses .form-inline-box .input-group {
|
||||
width: 80%;
|
||||
padding-bottom: 14px;
|
||||
z-index: auto;
|
||||
}
|
||||
.search-courses .form-inline-box .input-group label {
|
||||
margin-bottom: 0px;
|
||||
z-index: auto;
|
||||
}
|
||||
</style>
|
||||
<div>
|
||||
{{ 'TotalNumberOfAvailableCourses'|get_lang }} :
|
||||
<strong>{{ total_number_of_courses }}</strong>
|
||||
</div>
|
||||
<div>
|
||||
{{ 'NumberOfMatchingCourses'|get_lang }} :
|
||||
<strong>{{ total_number_of_matching_courses }}</strong>
|
||||
</div>
|
||||
<div class="col-md-12 catalog-pagination-top">
|
||||
{{ pagination }}
|
||||
</div>
|
||||
|
||||
<div class="grid-courses row">
|
||||
{% for course in courses %}
|
||||
<div class="col-xs-12 col-sm-6 col-md-4">
|
||||
<div class="items items-courses">
|
||||
{% include 'catalog/course_item_catalog.tpl'|get_template %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
{{ pagination }}
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('.star-rating li a').on('click', function(event) {
|
||||
var id = $(this).parents('ul').attr('id');
|
||||
$('#vote_label2_' + id).html('{{ 'Loading'|get_lang }}');
|
||||
|
||||
$.ajax({
|
||||
url: $(this).attr('data-link'),
|
||||
success: function(data) {
|
||||
$('#rating_wrapper_'+id).html(data);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
{{ jquery_ready_content }}
|
||||
});
|
||||
</script>
|
||||
125
main/template/default/catalog/course_item_catalog.tpl
Normal file
125
main/template/default/catalog/course_item_catalog.tpl
Normal file
@@ -0,0 +1,125 @@
|
||||
{% block course_item %}
|
||||
{% block course_image %}
|
||||
<div class="image">
|
||||
{% block course_thumbnail %}
|
||||
{% set class= '' %}
|
||||
{% if 'ajax' in course.image_url %}
|
||||
{% set class= 'ajax' %}
|
||||
{% endif %}
|
||||
<a
|
||||
href="{{ course.image_url }}"
|
||||
data-size="lg"
|
||||
data-title="{{ course.title }}"
|
||||
title="{{ course.title }}"
|
||||
class="{{ class }}"
|
||||
>
|
||||
<img class="img-responsive" src="{{ course.thumbnail }}" alt="{{ course.title }}"/>
|
||||
</a>
|
||||
{% endblock %}
|
||||
|
||||
{% if course.category_title %}
|
||||
<span class="category">
|
||||
<a href="{{ course.category_code_link }}">
|
||||
{{ course.category_title }}
|
||||
</a>
|
||||
</span>
|
||||
<div class="cribbon"></div>
|
||||
{% endif %}
|
||||
|
||||
{% if 'show_different_course_language'| api_get_setting is same as 'true' %}
|
||||
<span class="course-language course-language-catalog">
|
||||
{{ course.course_language }}
|
||||
</span>
|
||||
<div class="cribbon cribbon-course-language-catalog"></div>
|
||||
{% endif %}
|
||||
|
||||
{% block course_description_button %}
|
||||
<div class="user-actions">
|
||||
{{ course.description_button }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block course_description %}
|
||||
<div class="description">
|
||||
{% block course_title %}
|
||||
<div class="block-title">
|
||||
<h4 class="title">
|
||||
{% set class= '' %}
|
||||
{% if 'ajax' in course.title_url %}
|
||||
{% set class= 'ajax' %}
|
||||
{% endif %}
|
||||
|
||||
<a
|
||||
data-size="lg"
|
||||
data-title="{{ course.title }}"
|
||||
title="{{ course.title }}"
|
||||
href="{{ course.title_url }}"
|
||||
class="{{ class }}"
|
||||
>
|
||||
{{ course.title }}
|
||||
</a>
|
||||
{% if course.admin_url %}
|
||||
<a href="{{ course.admin_url }}">
|
||||
{{ 'edit.png'|img(22, 'Edit'|get_lang) }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</h4>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block course_rating %}
|
||||
{{ course.rating }}
|
||||
{% endblock %}
|
||||
|
||||
{% block course_extras %}
|
||||
{% if course.extra_data %}
|
||||
<div class="toolbar row">
|
||||
<div class="col-sm-12">
|
||||
{% for field in course.extra_data %}
|
||||
{% if field.value_as_array %}
|
||||
<div class="panel-tags">
|
||||
<ul class="list-inline course-tags">
|
||||
<li> {{ field.text }} :</li>
|
||||
{% for tag in field.value_as_array %}
|
||||
<li class="label label-info">
|
||||
<span>
|
||||
<a href="{{ catalog_url_no_extra_fields }}&extra_{{ field.variable }}%5B%5D={{ tag }}" >
|
||||
{{ tag }}
|
||||
</a>
|
||||
</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
{{ field.text }} : {{ field.value }} <br />
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block course_teacher_info %}
|
||||
{{ course.teacher_info }}
|
||||
{% endblock %}
|
||||
|
||||
{% block course_buy_course %}
|
||||
{{ course.buy_course }}
|
||||
{% endblock %}
|
||||
|
||||
{% block course_toolbar %}
|
||||
<div class="toolbar">
|
||||
{% if course.already_registered_formatted %}
|
||||
{{ course.unregister_formatted }}
|
||||
{{ course.already_registered_formatted }}
|
||||
{% else %}
|
||||
{{ course.subscribe_formatted }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
227
main/template/default/catalog/session_catalog.tpl
Normal file
227
main/template/default/catalog/session_catalog.tpl
Normal file
@@ -0,0 +1,227 @@
|
||||
<script>
|
||||
$(function () {
|
||||
$('#date').datepicker({
|
||||
dateFormat: 'yy-mm-dd'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- header catalog session -->
|
||||
<div class="search-session">
|
||||
<div class="row">
|
||||
{% if catalog_settings.sessions.by_title %}
|
||||
<div class="col-md-4">
|
||||
<form method="post" action="{{ _p.web_main }}auth/courses.php?action=search_session_title">
|
||||
<label>{{ "Name"|get_lang }}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="keyword" title="{{ 'Name'|get_lang }}" class="form-control"
|
||||
value="{{ keyword }}"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="submit">
|
||||
<em class="fa fa-search"></em> {{ 'Search'|get_lang }}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if catalog_settings.sessions.by_date %}
|
||||
<div class="col-md-4">
|
||||
<form method="post" action="{{ _p.web_main }}auth/courses.php?action=display_sessions">
|
||||
<div class="form-group">
|
||||
<label>{{ "ByDate"|get_lang }}</label>
|
||||
<div class="input-group">
|
||||
<input type="date" name="date" id="date" title="{{ 'Date'|get_lang }}"
|
||||
class="form-control" value="{{ search_date }}" readonly>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="submit">
|
||||
<em class="fa fa-search"></em> {{ 'Search'|get_lang }}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if catalog_settings.sessions.by_tag %}
|
||||
<div class="col-md-4">
|
||||
<form method="post" action="{{ _p.web_main }}auth/courses.php?action=search_tag">
|
||||
<label>{{ "ByTag"|get_lang }}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="search_tag" title="{{ 'ByTag'|get_lang }}" class="form-control"
|
||||
value="{{ search_tag }}"/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="submit">
|
||||
<em class="fa fa-search"></em> {{ 'Search'|get_lang }}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<!-- new view session grib -->
|
||||
<div class="row">
|
||||
<div class="grid-courses col-md-12">
|
||||
<div class="row">
|
||||
{% for item in sessions %}
|
||||
<div class="col-md-4 col-sm-6 col-xs-12">
|
||||
<div id="session-{{ item.id }}" class="items items-courses items-sessions">
|
||||
<div class="image">
|
||||
<a href="{{ _p.web ~ 'session/' ~ item.id ~ '/about/' }}" title="{{ item.name }}">
|
||||
<img class="img-responsive" src="{{ item.image ? _p.web_upload ~ item.image : 'session_default.png'|icon() }}"
|
||||
alt="{{ item.name }}">
|
||||
</a>
|
||||
{% if item.category != '' %}
|
||||
<span class="category">{{ item.category }}</span>
|
||||
<div class="cribbon"></div>
|
||||
{% endif %}
|
||||
<div class="admin-actions">
|
||||
{% if item.edit_actions != '' %}
|
||||
<a class="btn btn-default btn-sm" href="{{ item.edit_actions }}">
|
||||
<i class="fa fa-pencil" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if item.is_subscribed %}
|
||||
{{ already_subscribed_label }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="description">
|
||||
<div class="block-title">
|
||||
<h4 class="title">
|
||||
<a href="{{ _p.web ~ 'session/' ~ item.id ~ '/about/' }}" title="{{ item.name }}">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
{% if show_tutor and item.coach_id %}
|
||||
<div class="block-author">
|
||||
<div class="author-card">
|
||||
<a href="{{ item.coach_url }}" class="ajax" data-title="{{ item.coach_name }}">
|
||||
<img src="{{ item.coach_avatar }}" alt="{{ item.coach_name }}">
|
||||
</a>
|
||||
<div class="teachers-details">
|
||||
<h5>
|
||||
<a href="{{ item.coach_url }}" class="ajax" data-title="{{ item.coach_name }}">
|
||||
{{ item.coach_name }}
|
||||
</a>
|
||||
</h5>
|
||||
<p>{{ 'SessionGeneralCoach'|get_lang }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if catalog_settings.sessions.show_session_info %}
|
||||
<div class="block-info">
|
||||
<ul class="info list-inline">
|
||||
<li class="course_label_number_courses">
|
||||
<i class="fa fa-book" aria-hidden="true"></i>
|
||||
{{ item.nbr_courses ~ ' ' ~ 'Courses'|get_lang }}
|
||||
</li>
|
||||
<li class="course_label_number_users">
|
||||
<i class="fa fa-user" aria-hidden="true"></i>
|
||||
{{ item.nbr_users ~ ' ' ~ 'NbUsers'|get_lang }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if catalog_settings.sessions.show_session_date %}
|
||||
<div class="block-date">
|
||||
{{ item.duration ? 'SessionDurationXDaysLeft'|get_lang|format(item.duration) : item.date }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="toolbar row">
|
||||
{% if item.price %}
|
||||
<div class="col-sm-4">
|
||||
{{ item.price }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if _u.logged %}
|
||||
<div class="col-sm-8">
|
||||
<div class="btn-group btn-group-sm" role="group">
|
||||
{% if not item.sequences is empty %}
|
||||
<a class="btn btn-default btn-sm" role="button"
|
||||
title="{{ 'SeeSequences'|get_lang }}" data-toggle="popover"
|
||||
id="session-{{ item.id }}-sequences">
|
||||
<i class="fa fa-sitemap" aria-hidden="true"></i>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if item.is_subscribed == false %}
|
||||
{{ item.subscribe_button }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% if _u.logged %}
|
||||
<script>
|
||||
$('#session-{{ item.id }}-sequences').popover({
|
||||
placement: 'bottom',
|
||||
html: true,
|
||||
trigger: 'click',
|
||||
content: function () {
|
||||
{% if item.sequences %}
|
||||
var content = '';
|
||||
|
||||
{% for sequence in item.sequences %}
|
||||
content += '<p class="lead">{{ sequence.name }}</p>';
|
||||
{% if sequence.requirements %}
|
||||
content += '<p><em class="fa fa-sort-amount-desc"></em> {{ 'RequiredSessions'|get_lang }}</p>';
|
||||
content += '<ul>';
|
||||
|
||||
{% for requirement in sequence.requirements %}
|
||||
content += '<li>';
|
||||
content += '<a href="{{ _p.web ~ 'session/' ~ requirement.id ~ '/about/' }}">{{ requirement.name }}</a>';
|
||||
content += '</li>';
|
||||
{% endfor %}
|
||||
|
||||
content += '</ul>';
|
||||
{% endif %}
|
||||
|
||||
{% if sequence.dependencies %}
|
||||
content += '<p><em class="fa fa-sort-amount-desc"></em> {{ 'DependentSessions'|get_lang }}</p>';
|
||||
content += '<ul>';
|
||||
|
||||
{% for dependency in sequence.dependencies %}
|
||||
content += '<li>';
|
||||
content += '<a href="{{ _p.web ~ 'session/' ~ dependency.id ~ '/about/' }}">{{ dependency.name }}</a>';
|
||||
content += '</li>';
|
||||
{% endfor %}
|
||||
|
||||
content += '</ul>';
|
||||
{% endif %}
|
||||
|
||||
{% if item.sequences|length > 1 %}
|
||||
content += '<hr>';
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
return content;
|
||||
{% else %}
|
||||
return "{{ 'NoDependencies'|get_lang }}";
|
||||
{% endif %}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="col-xs-12">
|
||||
<div class="alert alert-warning">
|
||||
{{ 'NoResults'|get_lang }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- end view session grib -->
|
||||
{{ catalog_pagination }}
|
||||
Reference in New Issue
Block a user