Actualización
This commit is contained in:
71
main/template/default/admin/career_dashboard.tpl
Normal file
71
main/template/default/admin/career_dashboard.tpl
Normal file
@@ -0,0 +1,71 @@
|
||||
{% extends 'layout/layout_1_col.tpl'|get_template %}
|
||||
|
||||
{% block content %}
|
||||
{{ form_filter }}
|
||||
|
||||
{% for item in data %}
|
||||
<div id="career-{{ item.id }}" class="career panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4>
|
||||
{% if _u.is_admin %}
|
||||
<a href="{{ _p.web }}main/admin/careers.php?action=edit&id={{ item.id }}">
|
||||
{{ item.name }}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ item.name }}
|
||||
{% endif %}
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{{ item.description }}
|
||||
<table class="table promotions">
|
||||
<thead class="title">
|
||||
<th>{{ 'Promotions' | get_lang }}</th>
|
||||
<th>{{ 'StudyCycle' | get_lang }} </th>
|
||||
<th>{{ 'Courses' | get_lang }} </th>
|
||||
</thead>
|
||||
{% for promotions in item.career %}
|
||||
{% for prom in promotions %}
|
||||
{% set line = prom.sessions|length + 1 %}
|
||||
<tr>
|
||||
<td class="promo" rowspan="{{ line }}">
|
||||
<h4 id="promotion-id-{{ prom.id }}">
|
||||
<a title="{{ prom.name }}" href="{{ _p.web }}main/admin/promotions.php?action=edit&id={{ prom.id }}">
|
||||
{{ prom.name }}
|
||||
</a>
|
||||
</h4>
|
||||
</td>
|
||||
{% if line == 1 %}
|
||||
<td> </td><td> </td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% for session in prom.sessions %}
|
||||
{% set sessionid = session.data.id %}
|
||||
<tr>
|
||||
<td class="cycles">
|
||||
<h4 id="session-id-{{ sessionid }}">
|
||||
<a title="{{ session.data.name }}" href="{{ _p.web }}main/session/resume_session.php?id_session={{ sessionid }}">
|
||||
{{ session.data.name }}
|
||||
</a>
|
||||
</h4>
|
||||
</td>
|
||||
<td class="courses">
|
||||
<ul>
|
||||
{% for course in session.courses %}
|
||||
<li>
|
||||
<a href="{{ _p.web }}courses/{{ course.directory }}/index.php?id_session={{ sessionid }}" title="{{ course.title }}">
|
||||
{{ course.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,6 @@
|
||||
{% extends 'layout/layout_1_col.tpl'|get_template %}
|
||||
{% block content %}
|
||||
{{ form_filter }}
|
||||
{% import 'default/macro/macro.tpl' as display %}
|
||||
{{ display.careers_panel(data, _u.is_admin) }}
|
||||
{% endblock %}
|
||||
23
main/template/default/admin/email_tester.tpl
Normal file
23
main/template/default/admin/email_tester.tpl
Normal file
@@ -0,0 +1,23 @@
|
||||
<div class="row">
|
||||
{% if errors is empty %}
|
||||
<div class="col-md-12">
|
||||
{{ form }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="col-md-6">
|
||||
{{ form }}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h4 class="page-header">{{ 'Errors'|get_lang }}</h4>
|
||||
<ul>
|
||||
{% for error in errors %}
|
||||
<li>
|
||||
{{ 'Email: %s. %s ago'|format(error.mail, error.time) }}
|
||||
<pre>{{ error.reason|replace({'\n': '<br>'}) }}</pre>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
68
main/template/default/admin/gradebook_dependency.tpl
Normal file
68
main/template/default/admin/gradebook_dependency.tpl
Normal file
@@ -0,0 +1,68 @@
|
||||
{% extends 'layout/layout_1_col.tpl'|get_template %}
|
||||
|
||||
{% block content %}
|
||||
<h3>
|
||||
{{ gradebook_category.name }}
|
||||
{% if gradebook_category.courseCode is not empty %}
|
||||
({{ gradebook_category.courseCode }})
|
||||
{% endif %}
|
||||
</h3>
|
||||
{{ 'MinimumGradebookToValidate' | get_lang }} : {{ min_to_validate }}
|
||||
<br />
|
||||
{{ 'MandatoryCourses' | get_lang }}
|
||||
{% for course in mandatory_courses %}
|
||||
<th>
|
||||
{{ course.title }} ({{ course.code }})
|
||||
</th>
|
||||
{% endfor %}
|
||||
<hr>
|
||||
<table class="table">
|
||||
<thead class="title">
|
||||
<tr>
|
||||
<th>{{ 'Users' | get_lang }}</th>
|
||||
{% for course in courses %}
|
||||
<th>
|
||||
{{ course.title }} ({{ course.code }})
|
||||
</th>
|
||||
{% endfor %}
|
||||
<th>{{ 'RestCoursesSubscribedResults' | get_lang }}</th>
|
||||
<th>{{ 'Progress' | get_lang }} Max 20 (Mandatory courses)</th>
|
||||
<th>{{ 'Progress' | get_lang }} Max 80 (Rest of courses)</th>
|
||||
<th>{{ 'Total' | get_lang }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
<td>{{ user.user_info.complete_name }}</td>
|
||||
|
||||
{% for course in courses %}
|
||||
<td>
|
||||
{% if user.result_dependencies[course.code] %}
|
||||
<img src="{{ 'check-circle.png'|icon(22) }}" />
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endfor %}
|
||||
|
||||
<td>
|
||||
{{ user.course_list_passed_out_dependency }} /
|
||||
{{ user.course_list_passed_out_dependency_count }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ user.result_mandatory_20 }}
|
||||
</td>
|
||||
<td>
|
||||
{{ user.result_not_mandatory_80 }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{% if user.final_result %}
|
||||
<img src="{{ 'check-circle.png'|icon(22) }}" />
|
||||
{% else %}
|
||||
<img src="{{ 'warning.png'|icon(22) }}" />
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endblock %}
|
||||
38
main/template/default/admin/gradebook_list.tpl
Normal file
38
main/template/default/admin/gradebook_list.tpl
Normal file
@@ -0,0 +1,38 @@
|
||||
{% extends 'layout/layout_1_col.tpl'|get_template %}
|
||||
|
||||
{% block content %}
|
||||
{{ form }}
|
||||
|
||||
{% if gradebook_list %}
|
||||
<table class="table">
|
||||
<thead class="title">
|
||||
<tr>
|
||||
<th>{{ 'Name' | get_lang }}</th>
|
||||
<th>{{ 'Course' | get_lang }}</th>
|
||||
<th>{{ 'Actions' | get_lang }} </th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for item in gradebook_list %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ item.name | e }}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.courseCode }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ current_url }}&action=edit&id={{ item.id }}">
|
||||
<img src="{{ 'edit.png'|icon(22) }}" />
|
||||
</a>
|
||||
|
||||
<a href="{{ _p.web_main }}admin/gradebook_dependency.php?id={{ item.id }}">
|
||||
<img src="{{ '2rightarrow.png'|icon(22) }}" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
{{ gradebook_list }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
43
main/template/default/admin/pagination.tpl
Normal file
43
main/template/default/admin/pagination.tpl
Normal file
@@ -0,0 +1,43 @@
|
||||
{% if pageCount > 1 %}
|
||||
<ul class="pagination">
|
||||
{% if first is defined and current != first %}
|
||||
<li class="first">
|
||||
<a href="{{ current_url }}&{{ pageParameterName ~ '=' ~first }}"><<
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if previous is defined %}
|
||||
<li class="previous">
|
||||
<a class="hidden-xs" href="{{ current_url }}&{{ pageParameterName ~ '=' ~previous }}">
|
||||
<
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% for page in pagesInRange %}
|
||||
{% if page != current %}
|
||||
<li class="page">
|
||||
<a href="{{ current_url }}&{{ pageParameterName ~ '=' ~page }}">{{ page }}</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="current active">
|
||||
<a>{{ page }} <span class="sr-only">(current)</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if next is defined %}
|
||||
<li class="next">
|
||||
<a class="hidden-xs" href="{{ current_url }}&{{ pageParameterName ~ '=' ~next }}">></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if last is defined and current != last %}
|
||||
<li class="last">
|
||||
<a href="{{ current_url }}&{{ pageParameterName ~ '=' ~last }}">>></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
25
main/template/default/admin/questions.tpl
Normal file
25
main/template/default/admin/questions.tpl
Normal file
@@ -0,0 +1,25 @@
|
||||
{% extends 'layout/layout_1_col.tpl'|get_template %}
|
||||
{% import 'default/macro/macro.tpl' as display %}
|
||||
|
||||
{% block content %}
|
||||
{{ toolbar }}
|
||||
{{ form }}
|
||||
{# {% for question in pagination %}#}
|
||||
{% for i in start..end %}
|
||||
{% if pagination[i] is defined %}
|
||||
{% set question = pagination[i] %}
|
||||
{{ display.collapse(
|
||||
question.iid,
|
||||
'#' ~ question.courseCode ~'-'~ question.iid ~ ' - ' ~ question.question,
|
||||
question.questionData,
|
||||
false,
|
||||
false
|
||||
)
|
||||
}}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if question_count > pagination_length %}
|
||||
{{ pagination }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
348
main/template/default/admin/resource_sequence.tpl
Normal file
348
main/template/default/admin/resource_sequence.tpl
Normal file
@@ -0,0 +1,348 @@
|
||||
{% extends 'layout/layout_1_col.tpl'|get_template %}
|
||||
|
||||
{% block content %}
|
||||
{{ tabs }}
|
||||
<script>
|
||||
var url = '{{ _p.web_ajax }}sequence.ajax.php?type={{ sequence_type }}';
|
||||
var parentList = [];
|
||||
var resourceId = 0;
|
||||
var sequenceId = 0;
|
||||
|
||||
function useAsReference(sequenceId, itemId) {
|
||||
var id = itemId || $("#item option:selected").val();
|
||||
sequenceId = $("#sequence_id option:selected").val();
|
||||
|
||||
// Cleaning parent list.
|
||||
parentList = [];
|
||||
|
||||
// Check if data exists and load parents
|
||||
$.ajax({
|
||||
url: url + '&a=load_resource&load_resource_type=parent&id=' + id + '&sequence_id='+sequenceId,
|
||||
success: function (data) {
|
||||
if (data) {
|
||||
var loadingResources = new Array(),
|
||||
listLoaded = data.split(',');
|
||||
|
||||
listLoaded.forEach(function(value) {
|
||||
var loadResource = $.ajax(url, {
|
||||
data: {
|
||||
a: 'get_icon',
|
||||
id: value,
|
||||
sequence_id: sequenceId,
|
||||
show_delete: 1
|
||||
},
|
||||
success: function() {
|
||||
parentList.push(value);
|
||||
}
|
||||
});
|
||||
|
||||
loadingResources.push(loadResource);
|
||||
});
|
||||
|
||||
if (loadingResources.length) {
|
||||
$.when.apply($, loadingResources).done(function() {
|
||||
if (loadingResources.length === 1) {
|
||||
$('#parents').append(arguments[0]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var i;
|
||||
|
||||
for (i = 0; i < arguments.length; i++) {
|
||||
$('#parents').append(arguments[i][0]);
|
||||
|
||||
if (i !== arguments.length - 1) {
|
||||
$('#parents').append('<em class="fa fa-plus fa-3x sequence-plus-icon"></em>');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Check if data exists and load children
|
||||
$.ajax({
|
||||
url: url + '&a=load_resource&load_resource_type=children&id=' + id + '&sequence_id='+sequenceId,
|
||||
success: function (data) {
|
||||
if (data) {
|
||||
var listLoaded = data.split(',');
|
||||
listLoaded.forEach(function(value) {
|
||||
$.ajax({
|
||||
url: url + '&a=get_icon&id='+ value+'&sequence_id='+sequenceId,
|
||||
success:function(data){
|
||||
$('#children').append(data);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Cleaning
|
||||
$('#parents').html('');
|
||||
$('#children').html('');
|
||||
|
||||
$.ajax({
|
||||
url: url + '&a=get_icon&id='+ id+'&sequence_id='+sequenceId,
|
||||
success:function(data){
|
||||
$('#resource').html(data);
|
||||
parentList.push(id);
|
||||
resourceId = id;
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: url + '&a=graph&sequence_id='+sequenceId,
|
||||
success: function (data) {
|
||||
$('#show_graph').html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
// By default "set requirement" is set to false
|
||||
sequenceId = $("#sequence_id option:selected" ).val();
|
||||
|
||||
// Load parents
|
||||
$('#parents').on('click', 'a.delete_vertex, a.undo_delete', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var self = $(this),
|
||||
parent = self.parent(),
|
||||
vertexId = self.attr('data-id') || 0;
|
||||
|
||||
if (!vertexId) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (self.is('.delete_vertex')) {
|
||||
self.hide();
|
||||
parent.find('.undo_delete').show();
|
||||
|
||||
self.parents('.parent').addClass('parent-deleted');
|
||||
} else if (self.is('.undo_delete')) {
|
||||
self.hide();
|
||||
parent.find('.delete_vertex').show();
|
||||
|
||||
self.parents('.parent').removeClass('parent-deleted');
|
||||
}
|
||||
});
|
||||
|
||||
$('#parents, #resource, #children').on('click', '.parent .sequence-id', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var itemId = $(this).parents('.parent').data('id') || 0;
|
||||
|
||||
if (!itemId) {
|
||||
return;
|
||||
}
|
||||
|
||||
$('button[name="set_requirement"]').prop('disabled', false);
|
||||
$('#requirements').prop('disabled', false);
|
||||
$('button[name="save_resource"]').prop('disabled', false);
|
||||
|
||||
useAsReference(sequenceId, itemId);
|
||||
});
|
||||
|
||||
// Button use as reference
|
||||
$('button[name="use_as_reference"]').click(function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (!sequenceId) {
|
||||
return;
|
||||
}
|
||||
|
||||
$('#pnl-preview').show();
|
||||
$('button[name="set_requirement"], #requirements, button[name="save_resource"]').prop('disabled', false);
|
||||
$('#requirements').selectpicker('refresh');
|
||||
|
||||
useAsReference(sequenceId);
|
||||
});
|
||||
|
||||
// Button set requirement
|
||||
$('button[name="set_requirement"]').click(function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var requirementsSelectedEl = $("#requirements option:selected");
|
||||
|
||||
if (0 === requirementsSelectedEl.length || !sequenceId) {
|
||||
return;
|
||||
}
|
||||
|
||||
requirementsSelectedEl.each(function() {
|
||||
var id = $(this).val();
|
||||
if ($.inArray(id, parentList) == -1) {
|
||||
$.ajax({
|
||||
url: url + '&a=get_icon&id=' + id + '&sequence_id='+sequenceId,
|
||||
success: function (data) {
|
||||
$('#parents').append(data);
|
||||
parentList.push(id);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Button save
|
||||
$('button[name="save_resource"]').click(function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (!sequenceId) {
|
||||
return;
|
||||
}
|
||||
|
||||
var self = $(this).prop('disabled', true);
|
||||
|
||||
// parse to integer the parents IDs
|
||||
parentList = parentList.map(function(id) {
|
||||
return parseInt(id);
|
||||
});
|
||||
|
||||
var deletingVertex = new Array();
|
||||
|
||||
// Delete all vertex confirmed to be deleted.
|
||||
$('#parents .parent.parent-deleted').each(function() {
|
||||
var self = $(this),
|
||||
vertexId = self.data('id') || 0,
|
||||
deleteVertex;
|
||||
|
||||
deleteVertex = $.ajax(url, {
|
||||
data: {
|
||||
a: 'delete_vertex',
|
||||
id: resourceId,
|
||||
vertex_id: vertexId,
|
||||
sequence_id: sequenceId
|
||||
},
|
||||
success: function() {
|
||||
parentList.splice($.inArray(vertexId, parentList), 1);
|
||||
}
|
||||
});
|
||||
|
||||
deletingVertex.push(deleteVertex);
|
||||
});
|
||||
|
||||
$.when.apply($, deletingVertex).done(function() {
|
||||
if (resourceId != 0) {
|
||||
var params = decodeURIComponent(parentList);
|
||||
|
||||
var savingResource = $.ajax(url, {
|
||||
data: {
|
||||
a: 'save_resource',
|
||||
id: resourceId,
|
||||
parents: params,
|
||||
sequence_id: sequenceId
|
||||
}
|
||||
});
|
||||
|
||||
$.when(savingResource).done(function(response) {
|
||||
$('#global-modal')
|
||||
.find('.modal-dialog')
|
||||
.removeClass('modal-lg')
|
||||
.addClass('modal-sm');
|
||||
$('#global-modal')
|
||||
.find('.modal-body')
|
||||
.html(response);
|
||||
$('#global-modal').modal('show');
|
||||
|
||||
self.prop('disabled', false);
|
||||
|
||||
useAsReference(sequenceId);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('select#sequence_id').on('change', function() {
|
||||
sequenceId = $(this).val();
|
||||
|
||||
if (sequenceId > 0) {
|
||||
$('#sequence-title').text(
|
||||
$(this).children(':selected').text()
|
||||
);
|
||||
$('#sequence_name').text(
|
||||
$(this).children(':selected').text()
|
||||
);
|
||||
$('#show_graph').html('');
|
||||
$('#pnl-configuration').show();
|
||||
$('#pnl-preview').hide();
|
||||
$('button[name="set_requirement"], #requirements, button[name="save_resource"]').prop('disabled', true);
|
||||
$('#item, button[name="use_as_reference"]').prop('disabled', false);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$('#pnl-configuration').hide();
|
||||
});
|
||||
|
||||
$('form[name="frm_select_delete"]').on('submit', function (e) {
|
||||
var confirmDelete = confirm('{{ 'AreYouSureToDeleteJS'|get_lang }}');
|
||||
|
||||
if (!confirmDelete) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
$('select#sequence_id').trigger('change');
|
||||
});
|
||||
</script>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="section-title-sequence">{{ 'SequenceSelection' | get_lang }}</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{{ create_sequence }}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{{ select_sequence }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="pnl-configuration" class="panel panel-default" style="display: none;">
|
||||
<div class="panel-body">
|
||||
<div class="section-title-sequence">{{ 'SequenceConfiguration' | get_lang }}: <b><span id="sequence_name"></span></b></div>
|
||||
<div class="row">
|
||||
{{ configure_sequence }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="pnl-preview" class="panel panel-default" style="display: none;">
|
||||
<div class="panel-body">
|
||||
<div class="section-title-sequence">{{ 'SequencePreview' | get_lang }} —
|
||||
<span id="sequence-title"></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<h4 class="title-sequence">
|
||||
{{ 'ItemsTheReferenceDependsOn' | get_lang }}
|
||||
</h4>
|
||||
<div id="parents">
|
||||
</div>
|
||||
<div class="border-sequence">
|
||||
<div class="arrow-sequence"></div>
|
||||
</div>
|
||||
<h4 class="title-sequence">{{ 'Item' | get_lang }}</h4>
|
||||
<div id="resource">
|
||||
</div>
|
||||
<div class="border-sequence">
|
||||
<div class="arrow-sequence"></div>
|
||||
</div>
|
||||
<h4 class="title-sequence">{{ 'Dependencies' | get_lang }}</h4>
|
||||
<div id="children">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<h4 class="title-sequence">{{ 'GraphDependencyTree' | get_lang }}</h4>
|
||||
<div id="show_graph"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{ save_sequence }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
137
main/template/default/admin/settings_index.tpl
Normal file
137
main/template/default/admin/settings_index.tpl
Normal file
@@ -0,0 +1,137 @@
|
||||
{% set admin_chamilo_announcements_disable = 'admin_chamilo_announcements_disable'|api_get_configuration_value %}
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
setTimeout(function(){
|
||||
$.ajax({
|
||||
url: '{{ web_admin_ajax_url }}?a=version',
|
||||
success: function (version) {
|
||||
$(".admin-block-version").html(version);
|
||||
}
|
||||
});
|
||||
}, 3000);
|
||||
|
||||
{% if _u.is_admin %}
|
||||
(function (CKEDITOR) {
|
||||
CKEDITOR.replace('extra_content');
|
||||
|
||||
var extraContentEditor = CKEDITOR.instances.extra_content;
|
||||
|
||||
$('button.admin-edit-block').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var $self = $(this);
|
||||
|
||||
var extraContent = $.ajax('{{ _p.web_ajax }}admin.ajax.php', {
|
||||
type: 'post',
|
||||
data: {
|
||||
a: 'get_extra_content',
|
||||
block: $self.data('id')
|
||||
}
|
||||
});
|
||||
|
||||
$.when(extraContent).done(function (content) {
|
||||
extraContentEditor.setData(content);
|
||||
$('#extra-block').val($self.data('id'));
|
||||
$('#modal-extra-title').text($self.data('label'));
|
||||
|
||||
$('#modal-extra').modal('show');
|
||||
});
|
||||
});
|
||||
})(window.CKEDITOR);
|
||||
|
||||
{% if not admin_chamilo_announcements_disable %}
|
||||
$
|
||||
.ajax('{{ web_admin_ajax_url }}?a=get_latest_news')
|
||||
.then(function (response) {
|
||||
if (!response.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
$('#chamilo-news').show(150);
|
||||
$('#chamilo-news-content').html(response);
|
||||
});
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
});
|
||||
</script>
|
||||
|
||||
<section id="settings" class="row">
|
||||
{% set columns = 2 %}
|
||||
{% for block_item in blocks %}
|
||||
{% if block_item.items %}
|
||||
<div id="tabs-{{ loop.index }}" class="settings-block col-md-6">
|
||||
<div class="panel panel-default {{ block_item.class }}">
|
||||
<div class="panel-heading">
|
||||
{{ block_item.icon }} {{ block_item.label }}
|
||||
{% if block_item.editable and _u.is_admin %}
|
||||
<button type="button" class="btn btn-link btn-sm admin-edit-block pull-right"
|
||||
data-label="{{ block_item.label }}" data-id="{{ block_item.class }}">
|
||||
<img src="{{ "edit.png"|icon(22) }}" width="22" height="22" alt="{{ "Edit"|get_lang }}"
|
||||
title="{{ "Edit"|get_lang }}"/>
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div style="display: block;">
|
||||
{{ block_item.search_form }}
|
||||
</div>
|
||||
{% if block_item.items is not null %}
|
||||
<div class="block-items-admin">
|
||||
<ul class="list-items-admin">
|
||||
{% for url in block_item.items %}
|
||||
<li{% if url.class %} class="{{ url.class }}"{% endif %}>
|
||||
<a href="{{ url.url }}">
|
||||
{{ url.label }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if block_item.extra is not null %}
|
||||
<div>
|
||||
{{ block_item.extra }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if block_item.extraContent %}
|
||||
<div>{{ block_item.extraContent }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</section>
|
||||
|
||||
{% if not admin_chamilo_announcements_disable %}
|
||||
<section id="chamilo-news" style="display: none;">
|
||||
<div class="alert alert-info">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div id="chamilo-news-content"></div>
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
{% if _u.is_admin %}
|
||||
<div class="modal fade" id="modal-extra">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="{{ 'Close'|get_lang }}">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modal-extra-title">{{ 'Blocks'|get_lang }}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{{ extraDataForm }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
47
main/template/default/admin/skill.tpl
Normal file
47
main/template/default/admin/skill.tpl
Normal file
@@ -0,0 +1,47 @@
|
||||
<h3>{{ 'Skills' | get_lang }}</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ _p.web_main }}{{ 'admin/skill_profile.php' }}">
|
||||
{{ 'SkillLevelProfiles' | get_lang }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ _p.web_main }}{{ 'admin/skill_level.php' }}">
|
||||
{{ 'SkillLevels' | get_lang }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form }}
|
||||
<table class="table table-hover table-striped data_table">
|
||||
<tr>
|
||||
<th>
|
||||
{{ 'Name' | get_lang }}
|
||||
</th>
|
||||
<th>
|
||||
{{ 'Profile' | get_lang }}
|
||||
</th>
|
||||
<th>
|
||||
{{ 'Actions' | get_lang }}
|
||||
</th>
|
||||
</tr>
|
||||
{% for item in list %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ item.name }}
|
||||
{% if item.shortCode %}
|
||||
({{ item.shortCode }})
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{{ item.profile }}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ _p.web_main }}admin/skill.php?action=edit&id={{ item.id }}">
|
||||
<img src="{{ 'edit.png'|icon(22) }}">
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{% endfor %}
|
||||
</table>
|
||||
25
main/template/default/admin/skill_level.tpl
Normal file
25
main/template/default/admin/skill_level.tpl
Normal file
@@ -0,0 +1,25 @@
|
||||
{{ form }}
|
||||
|
||||
<table class="table table-hover table-striped data_table">
|
||||
<tr>
|
||||
<th>{{ 'Name' | get_lang }}</th>
|
||||
<th>{{ 'ShortName' | get_lang }}</th>
|
||||
<th>{{ 'Profile' | get_lang }}</th>
|
||||
<th>{{ 'Actions' | get_lang }}</th>
|
||||
</tr>
|
||||
{% for item in list %}
|
||||
<tr>
|
||||
<td>{{ item.name }}</td>
|
||||
<td>{{ item.shortName }}</td>
|
||||
<td> {{ item.profile }}</td>
|
||||
<td>
|
||||
<a href="{{ _p.web_main }}admin/skill_level.php?action=edit&id={{ item.id }}">
|
||||
<img src="{{ 'edit.png'|icon(22) }}">
|
||||
</a>
|
||||
<a href="{{ _p.web_main }}admin/skill_level.php?action=delete&id={{ item.id }}">
|
||||
<img src="{{ 'delete.png'|icon(22) }}">
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
54
main/template/default/admin/skill_profile.tpl
Normal file
54
main/template/default/admin/skill_profile.tpl
Normal file
@@ -0,0 +1,54 @@
|
||||
{{ form }}
|
||||
|
||||
<table class="table table-hover table-striped data_table">
|
||||
<tr>
|
||||
<th>{{ 'Name' | get_lang }}</th>
|
||||
<th>{{ 'SkillLevel' | get_lang }}</th>
|
||||
<th>{{ 'Actions' | get_lang }}</th>
|
||||
</tr>
|
||||
{% for item in list %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ item.name }}
|
||||
</td>
|
||||
<td>
|
||||
<ul>
|
||||
{% for level in item.levels %}
|
||||
<li>
|
||||
{{ level }}
|
||||
|
||||
{% if loop.first %}
|
||||
<img src="{{ 'up_na.png'|icon(22) }}">
|
||||
{% else %}
|
||||
<a href="{{ _p.web_main }}admin/skill_profile.php?action=move_up&level_id={{ level.id }}&id={{ item.id }}">
|
||||
<img src="{{ 'up.png'|icon(22) }}">
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if loop.last %}
|
||||
<img src="{{ 'down_na.png'|icon(22) }}">
|
||||
{% else %}
|
||||
<a href="{{ _p.web_main }}admin/skill_profile.php?action=move_down&level_id={{ level.id }}&id={{ item.id }}">
|
||||
<img src="{{ 'down.png'|icon(22) }}">
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ _p.web_main }}admin/skill_profile.php?action=edit&id={{ item.id }}">
|
||||
<img src="{{ 'edit.png'|icon(22) }}" alt="{{ 'Edit' | get_lang }}" title="{{ 'Edit' | get_lang }}"> </a>
|
||||
|
||||
<a href="{{ _p.web_main }}admin/skill_profile.php?action=delete&id={{ item.id }}">
|
||||
<img src="{{ 'delete.png'|icon(22) }}" alt="{{ 'Delete' | get_lang }}" title="{{ 'Delete' | get_lang }}">
|
||||
</a>
|
||||
|
||||
<a href="{{ _p.web_main }}admin/skill_level.php?action=add&profile_id={{ item.id }}">
|
||||
<img src="{{ 'add.png'|icon(22) }}" alt="{{ 'AddLevel' | get_lang }}" title="{{ 'AddLevel' | get_lang }}">
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
</table>
|
||||
53
main/template/default/admin/teacher_time_report.tpl
Normal file
53
main/template/default/admin/teacher_time_report.tpl
Normal file
@@ -0,0 +1,53 @@
|
||||
<script>
|
||||
$(function () {
|
||||
$('#course').on('change', function () {
|
||||
$('#session').prop('selectedIndex', 0);
|
||||
$('#teacher').prop('selectedIndex', 0);
|
||||
});
|
||||
|
||||
$('#session').on('change', function () {
|
||||
$('#course').prop('selectedIndex', 0);
|
||||
$('#teacher').prop('selectedIndex', 0);
|
||||
});
|
||||
|
||||
$('#teacher').on('change', function () {
|
||||
$('#course').prop('selectedIndex', 0);
|
||||
$('#session').prop('selectedIndex', 0);
|
||||
});
|
||||
|
||||
$('#daterange').on('apply.daterangepicker', function (ev, picker) {
|
||||
$('[name="from"]').val(picker.startDate.format('YYYY-MM-DD'));
|
||||
$('[name="until"]').val(picker.endDate.format('YYYY-MM-DD'));
|
||||
}).on('cancel.daterangepicker', function (ev, picker) {
|
||||
$('#daterange, [name="from"], [name="until"]').val('');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{{ form }}
|
||||
<h3 class="page-header">{{ report_title }} <small>{{ report_sub_title }}</small></h3>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
{% if with_filter %}
|
||||
<th>{{ 'Session' | get_lang }}</th>
|
||||
<th>{{ 'Course' | get_lang }}</th>
|
||||
{% endif %}
|
||||
<th>{{ 'Coach' | get_lang }}</th>
|
||||
<th class="text-center">{{ 'TotalTime' | get_lang }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in rows %}
|
||||
<tr>
|
||||
{% if with_filter %}
|
||||
<td>{{ row.session ? row.session.name : ' ' }}</td>
|
||||
<td>{{ row.course.name }}</td>
|
||||
{% endif %}
|
||||
<td>{{ row.coach.complete_name }} ({{ row.coach.username}})</td>
|
||||
<td class="text-center">{{ row.total_time }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,73 @@
|
||||
{{ form }}
|
||||
|
||||
{% if session %}
|
||||
<h3 class="page-header">{{ session.name }}</h3>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'OfficialCode'|get_lang }}</th>
|
||||
<th>{{ 'CoachName'|get_lang }}</th>
|
||||
<th>{{ 'TimeSpentOnThePlatform'|get_lang }}</th>
|
||||
<th>{{ 'FirstLoginInPlatform'|get_lang }}</th>
|
||||
<th>{{ 'LatestLoginInPlatform'|get_lang }}</th>
|
||||
|
||||
{% for course_code in courses %}
|
||||
<th>{{ course_code }}</th>
|
||||
<th>{{ 'NumberOfWorks'|get_lang }}</th>
|
||||
<th>{{ 'LastWork'|get_lang }}</th>
|
||||
<th>{{ 'TimeReportForCourseX'|get_lang|format(course_code) }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for user in users %}
|
||||
<tr>
|
||||
{% for data in user %}
|
||||
<td>{{ data }}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{% for row in data %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'OfficialCode'|get_lang }}</th>
|
||||
<th>{{ 'Name'|get_lang }}</th>
|
||||
<th>{{ 'TimeSpentOnThePlatform'|get_lang }}</th>
|
||||
<th>{{ 'FirstLoginInPlatform'|get_lang }}</th>
|
||||
<th>{{ 'LatestLoginInPlatform'|get_lang }}</th>
|
||||
|
||||
{% for course in row.courses %}
|
||||
<th>{{ course.code }}</th>
|
||||
<th>{{ 'NumberOfWorks'|get_lang }}</th>
|
||||
<th>{{ 'LastWork'|get_lang }}</th>
|
||||
<th>{{ 'TimeReportForCourseX'|get_lang|format(course_code) }}</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{ row.code }}</td>
|
||||
<td>{{ row.complete_name }}</td>
|
||||
<td>{{ row.time_in_platform }}</td>
|
||||
<td>{{ row.first_connection }}</td>
|
||||
<td>{{ row.last_connection }}</td>
|
||||
|
||||
{% for course in row.courses %}
|
||||
<td>{{ course.number_of_students }}</td>
|
||||
<td>{{ course.number_of_works }}</td>
|
||||
<td>{{ course.last_work }}</td>
|
||||
<td>{{ course.time_spent_of_course }}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
29
main/template/default/admin/user_information.tpl
Normal file
29
main/template/default/admin/user_information.tpl
Normal file
@@ -0,0 +1,29 @@
|
||||
{% import 'default/macro/macro.tpl' as display %}
|
||||
|
||||
<div class="details">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
{{ display.panel('', display.reporting_user_box(user), '') }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="list-card">
|
||||
{{ display.card_widget('FirstLoginInPlatform'|get_lang, user.first_connection, 'calendar') }}
|
||||
{{ display.card_widget('LatestLoginInPlatform'|get_lang, user.last_connection, 'calendar') }}
|
||||
{{ display.card_widget('LatestLoginInAnyCourse'|get_lang, user.last_connection_in_course, 'calendar') }}
|
||||
{% if user.legal %}
|
||||
{{ display.card_widget('LegalAccepted'|get_lang, user.legal.datetime, 'gavel', user.legal.icon) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if social_tool %}
|
||||
<div class="list-box-widget">
|
||||
{{ display.box_widget('Friends'|get_lang, user.social.friends, 'users') }}
|
||||
{{ display.box_widget('InvitationSent'|get_lang, user.social.invitation_sent, 'paper-plane') }}
|
||||
{{ display.box_widget('InvitationReceived'|get_lang, user.social.invitation_received, 'smile-o') }}
|
||||
{{ display.box_widget('WallMessagesPosted'|get_lang, user.social.messages_posted, 'comments') }}
|
||||
{{ display.box_widget('MessagesSent'|get_lang, user.social.messages_sent, 'envelope') }}
|
||||
{{ display.box_widget('MessagesReceived'|get_lang, user.social.message_received, 'envelope-open-o') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
66
main/template/default/agenda/event_list.tpl
Normal file
66
main/template/default/agenda/event_list.tpl
Normal file
@@ -0,0 +1,66 @@
|
||||
{{ agenda_actions }}
|
||||
|
||||
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
|
||||
{% for event in agenda_events %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab" id="heading-{{ event.id }}">
|
||||
{% if is_allowed_to_edit and show_action %}
|
||||
<div class="pull-right">
|
||||
{% if event.visibility == 1 %}
|
||||
<a class="btn btn-default btn-xs"
|
||||
href="{% if url %}{{ url }}{% else %}{{ event.url }}{% endif %}&action=change_visibility&visibility=0&id={{ event.real_id }}&type={{ event.type }}">
|
||||
<img title="{{ 'Invisible' }}" src="{{ 'visible.png'|icon(22) }}">
|
||||
</a>
|
||||
{% else %}
|
||||
{% if event.type == 'course' or event.type == 'session' %}
|
||||
<a class="btn btn-default btn-xs"
|
||||
href="{% if url %}{{ url }}{% else %}{{ event.url }}{% endif %}&action=change_visibility&visibility=1&id={{ event.real_id }}&type={{ event.type }}">
|
||||
<img title="{{ 'Visible' }}" src="{{ 'invisible.png'|icon(22) }}">
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h4 class="panel-title">
|
||||
<a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion"
|
||||
href="#collapse-{{ event.id }}" aria-expanded="false" aria-controls="collapse-{{ event.id }}">
|
||||
{{ event.title }}
|
||||
<br>
|
||||
<small>
|
||||
{{ event.start_date_localtime }}
|
||||
|
||||
‐
|
||||
|
||||
{% if event.allDay %}
|
||||
{{ 'AllDay' | get_lang }}
|
||||
{% else %}
|
||||
{{ event.end_date_localtime }}
|
||||
{% endif %}
|
||||
</small>
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse-{{ event.id }}" class="panel-collapse collapse" role="tabpanel"
|
||||
aria-labelledby="heading-{{ event.id }}">
|
||||
<ul class="list-group">
|
||||
{% if event.description %}
|
||||
<li class="list-group-item">
|
||||
{{ event.description }}
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if event.comment %}
|
||||
<li class="list-group-item">
|
||||
{{ event.comment }}
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if event.attachment %}
|
||||
<li class="list-group-item">{{ event.attachment }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
1255
main/template/default/agenda/month.tpl
Normal file
1255
main/template/default/agenda/month.tpl
Normal file
File diff suppressed because it is too large
Load Diff
70
main/template/default/agenda/planification.tpl
Normal file
70
main/template/default/agenda/planification.tpl
Normal file
@@ -0,0 +1,70 @@
|
||||
{% extends 'layout/layout_1_col.tpl'|get_template %}
|
||||
|
||||
{% set user_id = student_id == _u.id ? 0 : student_id %}
|
||||
|
||||
{% block content %}
|
||||
{{ toolbar }}
|
||||
|
||||
<nav aria-label="...">
|
||||
<ul class="pager">
|
||||
<li class="previous">
|
||||
<a href="{{ _p.web_self ~ '?' ~ {"year": search_year - 1, "user": user_id }|url_encode }}">
|
||||
<span aria-hidden="true">←</span> {{ search_year - 1 }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="current">
|
||||
{{ search_year }}
|
||||
</li>
|
||||
<li class="next">
|
||||
<a href="{{ _p.web_self ~ '?' ~ {"year": search_year + 1, "user": user_id }|url_encode }}">
|
||||
{{ search_year + 1 }} <span aria-hidden="true">→</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% if sessions|length > 0 %}
|
||||
<div class="table-responsive" id="calendar-session-planification">
|
||||
<table class="table table-hover table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-session">{{ 'Session'|get_lang }}</th>
|
||||
{% for i in 1..52 %}
|
||||
<th class="col-week text-center" title="{{ 'WeekX'|get_lang|format(i) }}"><span>{{ i }}</span></th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for session in sessions %}
|
||||
<tr>
|
||||
<td class="col-session" title="{{ session.name }}">
|
||||
<a href="{{ _p.web ~ 'session/' ~ session.id ~ '/about/' }}">
|
||||
{{ session.name }}
|
||||
</a>
|
||||
</td>
|
||||
|
||||
{% if session.start > 0 %}
|
||||
<td class="col-week" colspan="{{ session.start }}"> </td>
|
||||
{% endif %}
|
||||
|
||||
<td class="col-week text-center {{ session.start_in_last_year or session.no_start ? 'in_last_year' : '' }} {{ session.end_in_next_year or session.no_end ? 'in_next_year' : '' }}"
|
||||
colspan="{{ session.duration }}" title="{{ session.human_date }}"
|
||||
style="background-color: {{ colors[loop.index0] }}">
|
||||
<span>
|
||||
<span class="sr-only">{{ session.human_date }}</span>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
{% if session.duration + session.start < 52 %}
|
||||
<td class="col-week" colspan="{{ 52 - session.duration - session.start }}"> </td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-warning">
|
||||
{{ 'ThereIsNotStillASession'|get_lang }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
82
main/template/default/agenda/student_boss_planification.tpl
Normal file
82
main/template/default/agenda/student_boss_planification.tpl
Normal file
@@ -0,0 +1,82 @@
|
||||
{% extends 'layout/layout_1_col.tpl'|get_template %}
|
||||
|
||||
{% set user_id = student_id == _u.id ? 0 : student_id %}
|
||||
|
||||
{% block content %}
|
||||
{{ toolbar }}
|
||||
<nav aria-label="...">
|
||||
<ul class="pager">
|
||||
<li class="previous">
|
||||
<a href="{{ _p.web_self ~ '?' ~ {"year": search_year - 1, "user": user_id, "order": current_order } |url_encode }}">
|
||||
<span aria-hidden="true">←</span> {{ search_year - 1 }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="current">
|
||||
{{ search_year }}
|
||||
</li>
|
||||
<li class="next">
|
||||
<a href="{{ _p.web_self ~ '?' ~ {"year": search_year + 1, "user": user_id, "order": current_order }|url_encode }}">
|
||||
{{ search_year + 1 }} <span aria-hidden="true">→</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
{% if students|length > 0 %}
|
||||
<div class="table-responsive" id="calendar-session-planification">
|
||||
<table class="table table-bordered table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-session">
|
||||
<a href=" {{ _p.web_self ~ '?' ~ {"year": search_year, "user": user_id, "order": order }|url_encode }} ">
|
||||
{{ 'Student'|get_lang }}
|
||||
</a>
|
||||
</th>
|
||||
<th>{{ 'Session'|get_lang }}</th>
|
||||
{% for i in 1..52 %}
|
||||
<th class="col-week text-center" title="{{ 'WeekX'|get_lang|format(i) }}"><span>{{ i }}</span></th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for student in students %}
|
||||
{% for session in student.sessions %}
|
||||
<tr>
|
||||
<td class="col-session">
|
||||
{% if loop.index0 == 0 %}
|
||||
{{ student.complete_name }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td >
|
||||
{% if loop.index0 == 0 %}
|
||||
{{ student.sessions | length }}
|
||||
{% endif %}
|
||||
</td>
|
||||
{% if session.start > 0 %}
|
||||
<td class="col-week" colspan="{{ session.start }}"> </td>
|
||||
{% endif %}
|
||||
|
||||
<td class="col-week text-center {{ session.start_in_last_year or session.no_start ? 'in_last_year' : '' }} {{ session.end_in_next_year or session.no_end ? 'in_next_year' : '' }}"
|
||||
colspan="{{ session.duration }}" title="{{ session.name | e('html') }} - {{ session.human_date }}"
|
||||
style="background-color: {{ session.color }}">
|
||||
<span>
|
||||
<span class="sr-only">{{ session.name | e('html') }} - {{ session.human_date }}</span>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
{% if session.duration + session.start < 52 %}
|
||||
<td class="col-week" colspan="{{ 52 - session.duration - session.start }}"> </td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{{ legend }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-warning">
|
||||
{{ 'ThereIsNotStillASession'|get_lang }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
51
main/template/default/announcement/slider.tpl
Normal file
51
main/template/default/announcement/slider.tpl
Normal file
@@ -0,0 +1,51 @@
|
||||
<style>
|
||||
.announcement_short {
|
||||
height: 300px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="carousel-announcement" class="carousel slide" data-ride="carousel">
|
||||
<!-- Indicators -->
|
||||
<ol class="carousel-indicators">
|
||||
{% for announcement in announcements %}
|
||||
<li data-target="#carousel-announcement" data-slide-to="{{ loop.index0 }}" {% if loop.index0 == 0 %} class="active" {% endif %}></li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
|
||||
<!-- Wrapper for slides -->
|
||||
<div class="carousel-inner" role="listbox">
|
||||
{% for announcement in announcements %}
|
||||
<div class="item {% if loop.index0 == 0 %} active {% endif %}">
|
||||
<div class="carousel-caption">
|
||||
{{ announcement.title }}
|
||||
</div>
|
||||
<div class="carousel-content">
|
||||
{% if announcement.readMore %}
|
||||
<div class="block-text">
|
||||
<div class="announcement_short">
|
||||
{{ announcement.content }}
|
||||
</div>
|
||||
<a href="{{ _p.web }}news_list.php?id={{ announcement.id }}" class="link-more">{{ "More" | get_lang }}</a>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="block-image">
|
||||
{{ announcement.content }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<!-- Controls -->
|
||||
<a class="left carousel-control" href="#carousel-announcement" role="button" data-slide="prev">
|
||||
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
|
||||
<span class="sr-only">Previous</span>
|
||||
</a>
|
||||
<a class="right carousel-control" href="#carousel-announcement" role="button" data-slide="next">
|
||||
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
|
||||
<span class="sr-only">Next</span>
|
||||
</a>
|
||||
</div>
|
||||
16
main/template/default/announcement/view.tpl
Normal file
16
main/template/default/announcement/view.tpl
Normal file
@@ -0,0 +1,16 @@
|
||||
<div class="page-header">
|
||||
<h4>{{ "SystemAnnouncements" | get_lang }}</h4>
|
||||
</div>
|
||||
|
||||
{% if not announcement is empty %}
|
||||
<article id="announcement-{{ announcement.id }}}">
|
||||
<div class="page-header">
|
||||
<h3>{{ announcement.title }}</h3>
|
||||
{{ announcement.content }}
|
||||
</div>
|
||||
</article>
|
||||
{% else %}
|
||||
<div class="alert alert-danger" role="alert">
|
||||
{{ "NoResults" | get_lang }}
|
||||
</div>
|
||||
{% endif %}
|
||||
11
main/template/default/attendance/my_missing_signatures.tpl
Normal file
11
main/template/default/attendance/my_missing_signatures.tpl
Normal file
@@ -0,0 +1,11 @@
|
||||
<h3>
|
||||
{{ 'MyMissingSignatures' | get_lang }}
|
||||
</h3>
|
||||
{% for presence in presences %}
|
||||
<h4>{{ presence.title }}</h4>
|
||||
<ul>
|
||||
{% for calendar in presence.calendars %}
|
||||
<li>{{ calendar.date_time }} {{ calendar.buttonToSign }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
10
main/template/default/auth/confirm_session_subscription.tpl
Normal file
10
main/template/default/auth/confirm_session_subscription.tpl
Normal file
@@ -0,0 +1,10 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-3 col-sm-offset-3">
|
||||
<a href="{{ _p.web_main }}auth/courses.php?{{ {'action':'subscribe_to_session', 'session_id':session_id, 'confirm':'1'}|url_encode() }}" class="btn btn-success btn-block">
|
||||
{{ 'Yes'|get_lang }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<button type="button" class="btn btn-danger btn-block" data-dismiss="modal">{{ 'No'|get_lang }}</button>
|
||||
</div>
|
||||
</div>
|
||||
18
main/template/default/auth/hrm_courses.tpl
Normal file
18
main/template/default/auth/hrm_courses.tpl
Normal file
@@ -0,0 +1,18 @@
|
||||
{% for user in users %}
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
<img src="{{ user.picture_url }}" alt="{{ user.complete_name }}">
|
||||
{{ user.complete_name }}
|
||||
<small>{{ user.username }}</small>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% if not user.course_list %}
|
||||
<div class="alert alert-warning">{{ 'UserHasNoCourse'|get_lang }}</div>
|
||||
{% else %}
|
||||
{{ user.course_list }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
14
main/template/default/auth/inscription.tpl
Normal file
14
main/template/default/auth/inscription.tpl
Normal file
@@ -0,0 +1,14 @@
|
||||
{%
|
||||
extends hide_header == true
|
||||
? 'layout/blank.tpl'|get_template
|
||||
: 'layout/layout_1_col.tpl'|get_template
|
||||
%}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{{ inscription_header }}
|
||||
{{ inscription_content }}
|
||||
{{ form }}
|
||||
{{ text_after_registration }}
|
||||
|
||||
{% endblock %}
|
||||
10
main/template/default/auth/readme.txt
Normal file
10
main/template/default/auth/readme.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
The following files were sent to the main/auth folder to improve the template option in this section
|
||||
|
||||
|
||||
list files:
|
||||
|
||||
-catalog_layout.php
|
||||
-categories_list.php
|
||||
-courses_categories.php
|
||||
-courses-list.php
|
||||
-layout.php
|
||||
124
main/template/default/blog/blog.tpl
Normal file
124
main/template/default/blog/blog.tpl
Normal file
@@ -0,0 +1,124 @@
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="sidebar">
|
||||
<div id="calendar-blog" class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
{{ 'Calendar'|get_lang }}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{{ calendar }}
|
||||
</div>
|
||||
</div>
|
||||
<div id="search-blog" class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
{{ 'Search'|get_lang }}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="blog.php?{{ _p.web_cid_query }}" method="get" enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
<input type="hidden" name="cidReq" value="{{ course_code }}"/>
|
||||
<input type="hidden" name="id_session" value="{{ session_id }}"/>
|
||||
<input type="hidden" name="blog_id" value="{{ id_blog }}"/>
|
||||
<input type="hidden" name="action" value="view_search_result"/>
|
||||
<input type="text" class="form-control" size="20" name="q" value="{{ search | remove_xss }}"/>
|
||||
</div>
|
||||
<button class="btn btn-default btn-block" type="submit">
|
||||
<em class="fa fa-search"></em> {{ 'Search'|get_lang }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div id="task-blog" class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
{{ 'MyTasks'|get_lang }}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{{ task }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9">
|
||||
<div class="blog">
|
||||
<div id="blog-header">
|
||||
{% if not search %}
|
||||
<div class="title">
|
||||
<h1>{{ title }}</h1>
|
||||
</div>
|
||||
<div class="description">
|
||||
{{ description }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="title">
|
||||
<h1>{{ search }}</h1>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div id="list-articles">
|
||||
{% for item in articles %}
|
||||
<article id="post-{{ item.id_post }}" class="article-post">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<h3 class="title-post">
|
||||
<a href="{{ _p.web_self ~ '?' ~ _p.web_cid_query ~ '&' ~ {'action':'view_post', 'blog_id':item.id_blog, 'post_id':item.id_post}|url_encode }}#add_comment"
|
||||
title="{{ item.title }}">
|
||||
{{ item.title | remove_xss }}
|
||||
</a>
|
||||
</h3>
|
||||
<div class="info-post">
|
||||
<span class="date"><i class="fa fa-clock-o"></i> {{ item.post_date }}</span>
|
||||
<span class='comments'>
|
||||
<i class="fa fa-comment-o"></i> {{ item.n_comments }} {{ 'Comments' | get_lang }}
|
||||
</span>
|
||||
<span class="autor"><i class="fa fa-user"></i> {{ item.autor }}</span>
|
||||
<span class="score"><i class="fa fa-star"></i> {{ item.score_ranking }}</span>
|
||||
</div>
|
||||
|
||||
{% if item.extract %}
|
||||
<div id="post-extract-{{ item.id_post }}" class="show">
|
||||
<p>
|
||||
{{ item.extract }}
|
||||
<button type="button" class="btn btn-link btn-read-more" data-id="{{ item.id_post }}">
|
||||
{{ 'ReadMore'|get_lang }}
|
||||
</button>
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div id="post-content-{{ item.id_post }}" class="{{ item.extract ? 'hidden' : '' }}">
|
||||
{{ item.content | remove_xss }}
|
||||
</div>
|
||||
|
||||
{% if item.files %}
|
||||
<div class="well well-sm files">
|
||||
<i class="fa fa-paperclip" aria-hidden="true"></i>
|
||||
<a href="download.php?file={{ item.files.path }}">
|
||||
{{ item.files.filename | remove_xss }}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$('.btn-read-more').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var postId = $(this).data('id') || 0;
|
||||
|
||||
if (!postId) {
|
||||
return;
|
||||
}
|
||||
|
||||
$('#post-extract-' + postId).removeClass('show').addClass('hidden');
|
||||
$('#post-content-' + postId).removeClass('hidden').addClass('show');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
7
main/template/default/blog/layout.tpl
Normal file
7
main/template/default/blog/layout.tpl
Normal file
@@ -0,0 +1,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="blog">
|
||||
{{ content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
184
main/template/default/blog/post.tpl
Normal file
184
main/template/default/blog/post.tpl
Normal file
@@ -0,0 +1,184 @@
|
||||
{% macro comment_template(item) %}
|
||||
<div class="media {{ item.iid }}">
|
||||
<div class="media-left">
|
||||
<a href="{{ item.user_info.profile_url }}">
|
||||
<img class="media-object thumbnail avatar"
|
||||
src="{{ item.user_info.avatar }}"
|
||||
alt="{{ item.user_info.complete_name }}">
|
||||
</a>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<div class="pull-right">
|
||||
{{ item.actions }}
|
||||
</div>
|
||||
<h4 class="media-heading"
|
||||
id="comment-{{ item.iid }}-title">
|
||||
{{ item.title | remove_xss }}
|
||||
</h4>
|
||||
<ul class="info-post list-inline">
|
||||
<li class="date">
|
||||
<i class="fa fa-clock-o"></i> {{ item.comment_date }}
|
||||
</li>
|
||||
<li class="autor">
|
||||
<i class="fa fa-user"></i>
|
||||
<a href="{{ item.user_info.profile_url }}">
|
||||
{{ item.user_info.complete_name }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="score">
|
||||
<i class="fa fa-star"
|
||||
aria-hidden="true"></i> {{ item.score_ranking }}
|
||||
</li>
|
||||
</ul>
|
||||
<div id="comment-{{ item.iid }}-content">
|
||||
{{ item.content | remove_xss }}
|
||||
</div>
|
||||
{% if item.files %}
|
||||
<aside class="well well-sm files">
|
||||
<i class="fa fa-paperclip" aria-hidden="true"></i>
|
||||
<a href="download.php?file={{ item.files.path }}">
|
||||
{{ item.files.filename | remove_xss }}
|
||||
</a>
|
||||
<p>{{ item.files.comment | remove_xss }}</p>
|
||||
</aside>
|
||||
{% endif %}
|
||||
|
||||
<div class="ranking">
|
||||
{{ item.form_ranking }}
|
||||
</div>
|
||||
|
||||
{% import _self as nested %}
|
||||
|
||||
{% for item2 in item.comments %}
|
||||
{{ nested.comment_template(item2) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% import _self as nested %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="sidebar">
|
||||
<div id="calendar-blog" class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
{{ 'Calendar'|get_lang }}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{{ calendar }}
|
||||
</div>
|
||||
</div>
|
||||
<div id="search-blog" class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
{{ 'Search'|get_lang }}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form action="blog.php" method="get" enctype="multipart/form-data">
|
||||
<div class="form-group">
|
||||
<input type="hidden" name="blog_id" value="{{ id_blog }}"/>
|
||||
<input type="hidden" name="action" value="view_search_result"/>
|
||||
<input type="text" class="form-control" size="20" name="q" value="{{ search | remove_xss }}"/>
|
||||
</div>
|
||||
<button class="btn btn-default btn-block" type="submit">
|
||||
<em class="fa fa-search"></em> {{ 'Search'|get_lang }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div id="task-blog" class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
{{ 'MyTasks'|get_lang }}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{{ task }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="blog" id="post-{{ post.id_post }}">
|
||||
<div class="panel panel-default" id="blog-header">
|
||||
<div class="panel-heading">
|
||||
<div id="post-action" class="text-right">
|
||||
<div class="btn-group btn-group-sm" role="group" aria-label="{{ 'Actions'|get_lang }}">
|
||||
{{ post.actions }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<article>
|
||||
<div class="article-header">
|
||||
<div class="title">
|
||||
<h1 title="{{ post.title }}">{{ post.title | remove_xss }}</h1>
|
||||
</div>
|
||||
<ul class="info-post list-inline">
|
||||
<li class="date">
|
||||
<i class="fa fa-clock-o" aria-hidden="true"></i> {{ post.post_date }}
|
||||
</li>
|
||||
<li class="comments">
|
||||
<i class="fa fa-comment-o"
|
||||
aria-hidden="true"></i> {{ 'XComments'|get_lang|format(post.n_comments) }}
|
||||
</li>
|
||||
<li class="autor">
|
||||
<i class="fa fa-user" aria-hidden="true"></i>
|
||||
<a href="{{ _p.web }}main/social/profile.php?u={{ post.id_author }}">
|
||||
{{ post.author }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="score">
|
||||
<i class="fa fa-star" aria-hidden="true"></i> {{ post.score_ranking }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="content-post">
|
||||
{{ post.content | remove_xss }}
|
||||
</div>
|
||||
{% if post.files %}
|
||||
<aside class="well well-sm files">
|
||||
<i class="fa fa-paperclip" aria-hidden="true"></i>
|
||||
<a href="download.php?file={{ post.files.path }}">{{ post.files.filename }}</a>
|
||||
</aside>
|
||||
{% endif %}
|
||||
|
||||
{{ post.frm_rating ?: '' }}
|
||||
</article>
|
||||
<div class="comments-post">
|
||||
<h3 class="title">{{ 'XComments'|get_lang|format(post.n_comments) }}</h3>
|
||||
<div id="list-comments" class="media-list">
|
||||
{% for item in post.comments %}
|
||||
{{ nested.comment_template(item) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-post">
|
||||
{{ post.form_html }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$('.btn-reply-to').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var id = $(this).data('id') || 0;
|
||||
|
||||
if (!id) {
|
||||
return;
|
||||
}
|
||||
|
||||
var $frm = $('form#add_post'),
|
||||
title = $('#comment-' + id + '-title'),
|
||||
content = $('#comment-' + id + '-content');
|
||||
|
||||
$frm.find('[name="comment_parent_id"]').val(id);
|
||||
$frm.find('[name="title"]').val('Re: ' + title.text().trim());
|
||||
CKEDITOR.instances.comment.setData('<blockquote>' + content.text().trim() + '</blockquote><br>');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
165
main/template/default/career/diagram.tpl
Normal file
165
main/template/default/career/diagram.tpl
Normal file
@@ -0,0 +1,165 @@
|
||||
<script>
|
||||
mxBasePath = '{{ _p.web_lib }}mxgraph/src/';
|
||||
</script>
|
||||
<style>
|
||||
#graphContainer svg {
|
||||
min-width: 100% !important;
|
||||
}
|
||||
</style>
|
||||
<script src="{{ _p.web_lib }}mxgraph/src/js/mxClient.js"></script>
|
||||
<script>
|
||||
// Overridden to define per-shape connection points
|
||||
mxGraph.prototype.getAllConnectionConstraints = function(terminal, source) {
|
||||
if (terminal != null && terminal.shape != null) {
|
||||
if (terminal.shape.stencil != null) {
|
||||
if (terminal.shape.stencil != null) {
|
||||
return terminal.shape.stencil.constraints;
|
||||
}
|
||||
} else if (terminal.shape.constraints != null) {
|
||||
return terminal.shape.constraints;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
|
||||
// Edges have no connection points
|
||||
mxPolyline.prototype.constraints = null;
|
||||
|
||||
// Program starts here. Creates a sample graph in the
|
||||
// DOM node with the specified ID. This function is invoked
|
||||
// from the onLoad event handler of the document (see below).
|
||||
function main(container)
|
||||
{
|
||||
// Checks if the browser is supported
|
||||
if (!mxClient.isBrowserSupported()) {
|
||||
// Displays an error message if the browser is not supported.
|
||||
mxUtils.error('Browser is not supported!', 200, false);
|
||||
} else {
|
||||
// Disables the built-in context menu
|
||||
mxEvent.disableContextMenu(container);
|
||||
|
||||
// Creates the graph inside the given container
|
||||
var graph = new mxGraph(container);
|
||||
graph.setConnectable(true);
|
||||
graph.setHtmlLabels(true);
|
||||
|
||||
// Blocks the selection of elements
|
||||
graph.setEnabled(false);
|
||||
|
||||
// Enables connect preview for the default edge style
|
||||
graph.connectionHandler.createEdgeState = function(me) {
|
||||
var edge = graph.createEdge(null, null, null, null, null);
|
||||
|
||||
return new mxCellState(this.graph.view, edge, this.graph.getCellStyle(edge));
|
||||
};
|
||||
|
||||
// Specifies the default edge style
|
||||
graph.getStylesheet().getDefaultEdgeStyle()['edgeStyle'] = 'orthogonalEdgeStyle';
|
||||
|
||||
// Enables rubberband selection
|
||||
new mxRubberband(graph);
|
||||
|
||||
// Gets the default parent for inserting new cells. This
|
||||
// is normally the first child of the root (ie. layer 0).
|
||||
var parent = graph.getDefaultParent();
|
||||
|
||||
// Adds cells to the model in a single step
|
||||
graph.getModel().beginUpdate();
|
||||
try {
|
||||
//var v1 = graph.insertVertex(parent, null, 'Hello,', 20, 20, 80, 30);
|
||||
//var v2 = graph.insertVertex(parent, null, 'World!', 200, 150, 80, 30);
|
||||
//var e1 = graph.insertEdge(parent, null, '', v1, v2);
|
||||
{% for vertex in group_list %}
|
||||
{{ vertex }}
|
||||
{% endfor %}
|
||||
|
||||
{% for vertex in subgroup_list %}
|
||||
{{ vertex }}
|
||||
{% endfor %}
|
||||
|
||||
{% for vertex in vertex_list %}
|
||||
{% if 0 == iframe %}
|
||||
{{ vertex |replace({'iframe=1': 'iframe=0',})}}
|
||||
{% else %}
|
||||
{{ vertex }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% for vertex in connections %}
|
||||
{{ vertex }}
|
||||
{% endfor %}
|
||||
} finally {
|
||||
// Updates the display
|
||||
graph.getModel().endUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
main(document.getElementById('graphContainer'));
|
||||
|
||||
var svg1 = document.getElementsByTagName("svg")[0];
|
||||
var data = svg1.getBBox();
|
||||
var widthValue = data.width + 100;
|
||||
var heightValue = data.height + 100;
|
||||
|
||||
var att = document.createAttributeNS(null, "viewBox");
|
||||
att.value = '0 0 ' + widthValue + ' ' + heightValue;
|
||||
svg1.setAttributeNode(att);
|
||||
|
||||
$(".popup").qtip({
|
||||
content: {
|
||||
text: function(event, api) {
|
||||
var item = $(this);
|
||||
var itemId = $(this).attr("id");
|
||||
var desc = $(this).attr("data-description");
|
||||
var period = $(this).attr("data-period");
|
||||
var teacherText = $(this).attr("data-teacher-text");
|
||||
var teacher = $(this).attr("data-teacher");
|
||||
var score = $(this).attr("data-score");
|
||||
var value = $(this).attr("data-score-value");
|
||||
var info = $(this).attr("data-info");
|
||||
|
||||
var teacherLabel = '';
|
||||
if (teacher != '') {
|
||||
teacherLabel = teacherText + ': ' + teacher + '<br />';
|
||||
}
|
||||
|
||||
var textToShow = desc + '<br />' +
|
||||
period + '<br />' +
|
||||
teacherLabel +
|
||||
score + ': ' + value + '<br /><br />'+
|
||||
info + '<br />'
|
||||
;
|
||||
|
||||
return textToShow;
|
||||
}
|
||||
},
|
||||
events: {
|
||||
render: function(event, api) {
|
||||
var popup = $(api.elements.target);
|
||||
var bg = popup.attr("data-background-color");
|
||||
var color = popup.attr("data-color");
|
||||
var borderColor = popup.attr("data-border-color");
|
||||
// Grab the tooltip element from the API
|
||||
//var tooltip = api.elements.tooltip;
|
||||
|
||||
$(this).css('background-color', bg);
|
||||
$(this).css('color', color);
|
||||
$(this).css('border-color', borderColor);
|
||||
}
|
||||
},
|
||||
position: {
|
||||
my: 'bottom left', // Position my top left...
|
||||
at: 'top right', // at the bottom right of...
|
||||
adjust: {
|
||||
x: 0,
|
||||
y: 0
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{{ content }}
|
||||
6
main/template/default/career/diagram_full.tpl
Normal file
6
main/template/default/career/diagram_full.tpl
Normal file
@@ -0,0 +1,6 @@
|
||||
{% extends 'layout/layout_1_col.tpl'|get_template %}
|
||||
|
||||
{% block content %}
|
||||
{% set iframe = 0 %}
|
||||
{% include 'career/diagram.tpl' |get_template %}
|
||||
{% endblock %}
|
||||
6
main/template/default/career/diagram_iframe.tpl
Normal file
6
main/template/default/career/diagram_iframe.tpl
Normal file
@@ -0,0 +1,6 @@
|
||||
{% extends 'layout/no_layout.tpl'|get_template %}
|
||||
|
||||
{% block body %}
|
||||
{% set iframe = 1 %}
|
||||
{% include 'career/diagram.tpl' |get_template %}
|
||||
{% endblock %}
|
||||
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 }}
|
||||
386
main/template/default/chat/chat.tpl
Normal file
386
main/template/default/chat/chat.tpl
Normal file
@@ -0,0 +1,386 @@
|
||||
<div class="page-chat">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 col-md-5 col-lg-4">
|
||||
<ul class="row list-unstyled" id="chat-users"></ul>
|
||||
</div>
|
||||
<div class="col-sm-8 col-md-7 col-lg-8">
|
||||
<div id="chat-tabs">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
{% if not restrict_to_coach %}
|
||||
<li role="presentation" class="active">
|
||||
<a href="#all" aria-controls="all" role="tab" data-toggle="tab">{{ 'All'|get_lang }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane active" id="{{ restrict_to_coach ? '' : 'all' }}">
|
||||
<div class="course-chat chat-history" id="{{ restrict_to_coach ? '' : 'chat-history' }}"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile row">
|
||||
<div class="col-xs-12">
|
||||
<div class="message-form-chat">
|
||||
<div class="tabbable">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a href="#tab1" data-toggle="tab">{{ 'Write'|get_lang }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#tab2" id="preview" data-toggle="tab">{{ 'Preview'|get_lang }}</a>
|
||||
</li>
|
||||
<li>
|
||||
<button id="emojis" class="btn btn-link" type="button">
|
||||
<span class="sr-only">{{ 'Emoji'|get_lang }}</span>{{ emoji_smile }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab1">
|
||||
<div class="row">
|
||||
<div class="col-sm-9">
|
||||
<span class="sr-only">{{ 'Message'|get_lang }}</span>
|
||||
<textarea id="chat-writer" name="message"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<button id="chat-send-message" type="button" {{ restrict_to_coach ? 'disabled' : '' }}
|
||||
class="btn btn-primary">{{ 'Send'|get_lang }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab2">
|
||||
<div id="html-preview" class="emoji-wysiwyg-editor-preview"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<audio id="chat-alert" class="skip">
|
||||
<source src="{{ _p.web_main }}chat/sound/notification.wav" type="audio/wav"></source>
|
||||
<source src="{{ _p.web_main }}chat/sound/notification.ogg" type="audio/ogg"></source>
|
||||
<source src="{{ _p.web_main }}chat/sound/notification.mp3" type="audio/mpeg"></source>
|
||||
</audio>
|
||||
<script>
|
||||
$(function () {
|
||||
var ChChat = {
|
||||
_ajaxUrl: '{{ _p.web_ajax }}course_chat.ajax.php?{{ _p.web_cid_query }}',
|
||||
_historySize: -1,
|
||||
usersOnline: 0,
|
||||
currentFriend: 0,
|
||||
xToken: '{{ course_chat_sec_token }}',
|
||||
call: false,
|
||||
track: function () {
|
||||
return $
|
||||
.ajax({
|
||||
url: ChChat._ajaxUrl,
|
||||
method: 'GET',
|
||||
headers: { 'x-token': ChChat.xToken },
|
||||
data: {
|
||||
action: 'track',
|
||||
size: ChChat._historySize,
|
||||
users_online: ChChat.usersOnline,
|
||||
friend: ChChat.currentFriend
|
||||
}
|
||||
})
|
||||
.done(function (response, textStatus, jqXhr) {
|
||||
ChChat.xToken = jqXhr.getResponseHeader('x-token');
|
||||
|
||||
if (!response.status) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
if (response.data.history) {
|
||||
ChChat._historySize = response.data.oldFileSize;
|
||||
ChChat.setHistory(response.data.history);
|
||||
}
|
||||
|
||||
if (response.data.userList) {
|
||||
ChChat.usersOnline = response.data.usersOnline;
|
||||
ChChat.setConnectedUsers(response.data.userList);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
},
|
||||
setHistory: function (messageList) {
|
||||
var chatHistoryContainer = ChChat.currentFriend ? ('#chat-history-' + ChChat.currentFriend) : '#chat-history';
|
||||
|
||||
$(chatHistoryContainer)
|
||||
.html(messageList)
|
||||
.prop('scrollTop', function () {
|
||||
return this.scrollHeight;
|
||||
});
|
||||
$('#chat-alert').get(0).play();
|
||||
},
|
||||
setConnectedUsers: function (userList) {
|
||||
var html = '';
|
||||
|
||||
userList.forEach(function (user) {
|
||||
var buttonStatus = user.isConnected ? 'success' : 'muted',
|
||||
buttonTitle = user.isConnected ? '{{ 'StartAChat'|get_lang }}' : '{{ 'LeaveAMessage'|get_lang }}';
|
||||
|
||||
html += '<li class="col-xs-12">' +
|
||||
' <div class="chat-user" data-name="' + user.complete_name + '" data-user="' + user.id + '">' +
|
||||
' <img src="' + user.image_url + '" alt="' + user.complete_name + '" class="img-circle user-image-chat"/>' +
|
||||
' <ul class="list-unstyled">' +
|
||||
' <li>' + user.complete_name;
|
||||
|
||||
if (user.id != {{ _u.user_id }}) {
|
||||
html += ' <button type="button" class="btn btn-link btn-xs" title="' + buttonTitle + '" data-name="' + user.complete_name + '" data-user="' + user.id + '">' +
|
||||
' <i class="fa fa-comments text-' + buttonStatus + '"></i><span class="sr-only">' + buttonTitle + '</span>' +
|
||||
' </button>';
|
||||
}
|
||||
html += ' </li>' +
|
||||
|
||||
{% if not 'hide_username_in_course_chat'|api_get_configuration_value %}
|
||||
' <li><small>' + user.username + '</small></li>' +
|
||||
{% else %}
|
||||
' <li> </li>' +
|
||||
{% endif %}
|
||||
|
||||
' </ul>' +
|
||||
' </div>' +
|
||||
'</li>';
|
||||
});
|
||||
|
||||
$('#chat-users').html(html);
|
||||
},
|
||||
onPreviewListener: function () {
|
||||
$.ajax({
|
||||
url: ChChat._ajaxUrl,
|
||||
method: 'POST',
|
||||
headers: { 'x-token': ChChat.xToken },
|
||||
data: {
|
||||
action: 'preview',
|
||||
'message': $('textarea#chat-writer').val()
|
||||
}
|
||||
})
|
||||
.done(function (response, textStatus, jqXhr) {
|
||||
ChChat.xToken = jqXhr.getResponseHeader('x-token');
|
||||
|
||||
if (!response.status) {
|
||||
return;
|
||||
}
|
||||
|
||||
$('#html-preview').html(response.data.message);
|
||||
});
|
||||
},
|
||||
onSendMessageListener: function (e) {
|
||||
e.preventDefault();
|
||||
var textarea = $('textarea#chat-writer');
|
||||
if (!textarea.val().trim().length) {
|
||||
return;
|
||||
}
|
||||
|
||||
$(".emoji-wysiwyg-editor").prop('contenteditable', 'false');
|
||||
textarea.prop('disabled', true);
|
||||
var self = this;
|
||||
self.disabled = true;
|
||||
|
||||
$.ajax({
|
||||
method: 'POST',
|
||||
url: ChChat._ajaxUrl,
|
||||
headers: { 'x-token': ChChat.xToken },
|
||||
data: {
|
||||
action: 'write',
|
||||
message: textarea.val(),
|
||||
friend: ChChat.currentFriend
|
||||
}
|
||||
})
|
||||
.done(function (response, textStatus, jqXhr) {
|
||||
self.disabled = false;
|
||||
|
||||
ChChat.xToken = jqXhr.getResponseHeader('x-token');
|
||||
|
||||
textarea.prop('disabled', false);
|
||||
$(".emoji-wysiwyg-editor").prop('contenteditable', 'true');
|
||||
|
||||
if (!response.status) {
|
||||
return;
|
||||
}
|
||||
|
||||
textarea.val('');
|
||||
$(".emoji-wysiwyg-editor").html('');
|
||||
});
|
||||
},
|
||||
onResetListener: function (e) {
|
||||
if (!confirm("{{ 'ConfirmReset'|get_lang }}")) {
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
url: ChChat._ajaxUrl,
|
||||
method: 'GET',
|
||||
headers: { 'x-token': ChChat.xToken },
|
||||
data: {
|
||||
action: 'reset',
|
||||
friend: ChChat.currentFriend
|
||||
}
|
||||
})
|
||||
.done(function (response, textStatus, jqXhr) {
|
||||
ChChat.xToken = jqXhr.getResponseHeader('x-token');
|
||||
|
||||
if (!response.status) {
|
||||
return;
|
||||
}
|
||||
|
||||
ChChat.setHistory(response.data);
|
||||
});
|
||||
},
|
||||
init: function () {
|
||||
ChChat.track().done(function () {
|
||||
var chatTimeout = window.setTimeout(function () {
|
||||
window.clearTimeout(chatTimeout);
|
||||
|
||||
ChChat.init();
|
||||
}, 4000);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
hljs.initHighlightingOnLoad();
|
||||
|
||||
emojione.ascii = true;
|
||||
emojione.imagePathPNG = '{{ _p.web_lib }}javascript/emojione/png/';
|
||||
emojione.imagePathSVG = '{{ _p.web_lib }}javascript/emojione/svg/';
|
||||
emojione.imagePathSVGSprites = '{{ _p.web_lib }}javascript/emojione/sprites/';
|
||||
|
||||
var emojiStrategy = {{ emoji_strategy|json_encode }};
|
||||
|
||||
$.emojiarea.path = '{{ _p.web_lib }}javascript/emojione/png/';
|
||||
$.emojiarea.icons = {{ icons|json_encode }};
|
||||
|
||||
$('body').on('click', '#chat-reset', ChChat.onResetListener);
|
||||
$('#preview').on('click', ChChat.onPreviewListener);
|
||||
|
||||
$('#emojis').on('click', function () {
|
||||
$('[data-toggle="tab"][href="#tab1"]').show().tab('show');
|
||||
});
|
||||
|
||||
|
||||
$('textarea#chat-writer').emojiarea({button: '#emojis'});
|
||||
|
||||
$('body').delay(1500).find('.emoji-wysiwyg-editor').textcomplete([{
|
||||
match: /\B:([\-+\w]*)$/,
|
||||
search: function (term, callback) {
|
||||
var results = [];
|
||||
var results2 = [];
|
||||
var results3 = [];
|
||||
$.each(emojiStrategy, function (shortname, data) {
|
||||
if (shortname.indexOf(term) > -1) {
|
||||
results.push(shortname);
|
||||
} else {
|
||||
if ((data.aliases !== null) && (data.aliases.indexOf(term) > -1)) {
|
||||
results2.push(shortname);
|
||||
} else if ((data.keywords !== null) && (data.keywords.indexOf(term) > -1)) {
|
||||
results3.push(shortname);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (term.length >= 3) {
|
||||
results.sort(function (a, b) {
|
||||
return (a.length > b.length);
|
||||
});
|
||||
results2.sort(function (a, b) {
|
||||
return (a.length > b.length);
|
||||
});
|
||||
results3.sort();
|
||||
}
|
||||
|
||||
var newResults = results.concat(results2).concat(results3);
|
||||
callback(newResults);
|
||||
},
|
||||
template: function (shortname) {
|
||||
return '<img class="emojione" src="{{ _p.web_lib }}javascript/emojione/png/'
|
||||
+ emojiStrategy[shortname].unicode
|
||||
+ '.png"> :' + shortname + ':';
|
||||
},
|
||||
replace: function (shortname) {
|
||||
return ':' + shortname + ': ';
|
||||
},
|
||||
index: 1,
|
||||
maxCount: 10
|
||||
}], {});
|
||||
|
||||
$('button#chat-send-message').on('click', ChChat.onSendMessageListener);
|
||||
|
||||
if ({{ send_message_only_on_button }} == 0) {
|
||||
$('.emoji-wysiwyg-editor').keypress(function (e) {
|
||||
if (e.which == 13 && $(".emoji-wysiwyg-editor").prop('contenteditable') == 'true') {
|
||||
ChChat.onSendMessageListener(e);
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('#chat-users').on('click', 'div.chat-user', function (e) {
|
||||
e.preventDefault();
|
||||
var jSelf = $(this),
|
||||
userId = parseInt(jSelf.data('user')) || 0;
|
||||
|
||||
if (!userId) {
|
||||
return;
|
||||
}
|
||||
|
||||
var exists = false;
|
||||
|
||||
$('#chat-tabs ul.nav li').each(function (i, el) {
|
||||
if ($(el).data('user') == userId) {
|
||||
exists = true;
|
||||
}
|
||||
});
|
||||
|
||||
$('button#chat-send-message').prop('disabled', false);
|
||||
|
||||
if (exists) {
|
||||
$('#chat-tab-' + userId).tab('show');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$('#chat-tabs ul.nav-tabs').append('\
|
||||
<li role="presentation" data-user="' + userId + '">\
|
||||
<a id="chat-tab-' + userId + '" href="#chat-' + userId + '" aria-controls="chat-' + userId + '" role="tab" data-toggle="tab">' + jSelf.data('name') + '</a>\
|
||||
</li>\
|
||||
');
|
||||
|
||||
$('#chat-tabs .tab-content').append('\
|
||||
<div role="tabpanel" class="tab-pane" id="chat-' + userId + '">\
|
||||
<div class="course-chat chat-history" id="chat-history-' + userId + '"></div>\
|
||||
</div>\
|
||||
');
|
||||
|
||||
$('#chat-tab-' + userId).tab('show');
|
||||
});
|
||||
|
||||
$('#chat-tabs ul.nav-tabs').on('shown.bs.tab', 'li a', function (e) {
|
||||
var jSelf = $(this);
|
||||
var userId = parseInt(jSelf.parent().data('user')) || 0;
|
||||
if (!userId) {
|
||||
ChChat.currentFriend = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
ChChat.currentFriend = userId;
|
||||
|
||||
$(this).tab('show');
|
||||
});
|
||||
|
||||
$('.emoji-wysiwyg-editor').on('keyup', function (e) {
|
||||
if (e.ctrlKey && e.keyCode === 13) {
|
||||
$('button#chat-send-message').trigger('click');
|
||||
}
|
||||
});
|
||||
|
||||
ChChat.init();
|
||||
});
|
||||
</script>
|
||||
159
main/template/default/chat/video.tpl
Normal file
159
main/template/default/chat/video.tpl
Normal file
@@ -0,0 +1,159 @@
|
||||
<div id="chat-video-panel">
|
||||
<div class="alert alert-warning alert-dismissible fade in">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="{{ 'Close'|get_lang }}">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4>{{ 'Warning'|get_lang }}</h4>
|
||||
<div id="dlg-webrtc-help">
|
||||
<p>{{ 'WebRTCDialogHelp'|get_lang }}</p>
|
||||
<img src="{{ _p.web_lib ~ 'javascript/chat/img/webrtc_' ~ (navigator_is_firefox ? 'firefox' : 'chrome') }}.png"
|
||||
alt="{{ 'Permissions'|get_lang }}" class="img-thumbnail img-responsive">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-sm-7">
|
||||
<div class="thumbnail video-chat-user">
|
||||
<div id="chat-remote-video"></div>
|
||||
<div class="caption">
|
||||
<p class="text-muted text-center">{{ "ChatWithXUser"|get_lang|format(chat_user.complete_name) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-5">
|
||||
<div class="thumbnail">
|
||||
<div id="chat-local-video"></div>
|
||||
<div class="caption">
|
||||
<p class="text-muted text-center">{{ user_local.complete_name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="connection-status"></div>
|
||||
<div class="chat-friends">
|
||||
<div class="panel-group" id="blocklistFriends" role="tablist" aria-multiselectable="true">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab" id="headingOne">
|
||||
<h4 class="panel-title">
|
||||
<a role="button" data-toggle="collapse" data-parent="#blocklistFriends" href="#listFriends" aria-expanded="true" aria-controls="listFriends">
|
||||
{{ "SocialFriend" | get_lang }}
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="listFriends" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
|
||||
{{ block_friends }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
var VideoChat = {
|
||||
init: function () {
|
||||
var isCompatible = !!Modernizr.prefixed('RTCPeerConnection', window);
|
||||
|
||||
var notifyNotSupport = function () {
|
||||
$.get('{{ _p.web_ajax }}chat.ajax.php', {
|
||||
action: 'notify_not_support',
|
||||
to:{{ chat_user.id }}
|
||||
});
|
||||
};
|
||||
|
||||
var startVideoChat = function () {
|
||||
var webRTC = new SimpleWebRTC({
|
||||
localVideoEl: 'chat-local-video',
|
||||
remoteVideosEl: '',
|
||||
autoRequestMedia: true
|
||||
});
|
||||
|
||||
webRTC.on('readyToCall', function () {
|
||||
$('#dlg-webrtc-help').replaceWith("<p>" +
|
||||
"<em class=\"fa fa-warning\"></em> {{ 'AvoidChangingPageAsThisWillCutYourCurrentVideoChatSession'|get_lang }}" +
|
||||
"</p>");
|
||||
|
||||
webRTC.joinRoom('{{ room_name }}');
|
||||
});
|
||||
webRTC.on('videoAdded', function (video, peer) {
|
||||
$(video).addClass('skip');
|
||||
$('#chat-remote-video').html(video);
|
||||
|
||||
if (peer && peer.pc) {
|
||||
peer.pc.on('iceConnectionStateChange', function () {
|
||||
var alertDiv = $('<div>')
|
||||
.addClass('alert');
|
||||
|
||||
switch (peer.pc.iceConnectionState) {
|
||||
case 'checking':
|
||||
alertDiv
|
||||
.addClass('alert-info')
|
||||
.html('<em class="fa fa-spinner fa-spin"></em> ' + "{{ 'ConnectingToPeer'|get_lang }}");
|
||||
break;
|
||||
case 'connected':
|
||||
//no break
|
||||
case 'completed':
|
||||
alertDiv
|
||||
.addClass('alert-success')
|
||||
.html('<em class="fa fa-commenting"></em> ' + "{{ 'ConnectionEstablished'|get_lang }}");
|
||||
break;
|
||||
case 'disconnected':
|
||||
alertDiv
|
||||
.addClass('alert-info')
|
||||
.html('<em class="fa fa-frown-o"></em> ' + "{{ 'Disconnected'|get_lang }}");
|
||||
break;
|
||||
case 'failed':
|
||||
alertDiv
|
||||
.addClass('alert-danger')
|
||||
.html('<em class="fa fa-times"></em> ' + "{{ 'ConnectionFailed'|get_lang }}");
|
||||
break;
|
||||
case 'closed':
|
||||
alertDiv
|
||||
.addClass('alert-danger')
|
||||
.html('<em class="fa fa-close"></em> ' + "{{ 'ConnectionClosed'|get_lang }}");
|
||||
break;
|
||||
}
|
||||
|
||||
$('#connection-status').html(alertDiv);
|
||||
});
|
||||
}
|
||||
});
|
||||
webRTC.on('videoRemoved', function (video, peer) {
|
||||
video.src = '';
|
||||
});
|
||||
webRTC.on('iceFailed', function (peer) {
|
||||
var alertDiv = $('<div>')
|
||||
.addClass('alert-danger')
|
||||
.html('<em class="fa fa-close"></em> ' + "{{ 'LocalConnectionFailed'|get_lang }}");
|
||||
|
||||
$('#connection-status').html(alertDiv);
|
||||
});
|
||||
webRTC.on('connectivityError', function (peer) {
|
||||
var alertDiv = $('<div>')
|
||||
.addClass('alert-danger')
|
||||
.html('<em class="fa fa-close"></em> ' + "{{ 'RemoteConnectionFailed'|get_lang }}");
|
||||
|
||||
$('#connection-status').html(alertDiv);
|
||||
});
|
||||
};
|
||||
|
||||
if (!isCompatible) {
|
||||
notifyNotSupport();
|
||||
|
||||
$('#chat-video-panel').remove();
|
||||
return;
|
||||
}
|
||||
|
||||
$('#messages').remove();
|
||||
|
||||
startVideoChat();
|
||||
|
||||
window.onbeforeunload = function () {
|
||||
return "{{ 'AvoidChangingPageAsThisWillCutYourCurrentVideoChatSession'|get_lang }}";
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
$(function () {
|
||||
VideoChat.init();
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
15
main/template/default/common_cartridge/import_cc.tpl
Normal file
15
main/template/default/common_cartridge/import_cc.tpl
Normal file
@@ -0,0 +1,15 @@
|
||||
{{ info_msg }}
|
||||
<br />
|
||||
<div id="loader" class="text-center">
|
||||
|
||||
</div>
|
||||
<br />
|
||||
{{ form }}
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$(".btn-primary").click(function() {
|
||||
$("#loader").html('<div class="wobblebar-loader"></div><p> {{ 'ProcessingImportPleaseDontCloseThisWindowThisActionMayTakeLongTimePlaseWait' | get_lang }} </p>');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
34
main/template/default/course_description/edit.tpl
Normal file
34
main/template/default/course_description/edit.tpl
Normal file
@@ -0,0 +1,34 @@
|
||||
{{javascript}}
|
||||
|
||||
{% for message in messages %}
|
||||
{{ message }}
|
||||
{% endfor %}
|
||||
|
||||
{% if is_allowed_to_edit %}
|
||||
<div class="btn-toolbar actions-bar" >
|
||||
<div class="btn-group">
|
||||
<a href="{{root}}&action=listing" class="btn btn-default" title="{{'ImportCSV'|get_lang}}">
|
||||
<em class="size-32 icon-back"></em>
|
||||
</a>
|
||||
</div>
|
||||
<div class="btn-group edit new">
|
||||
{% for type in types %}
|
||||
<a href="{{root}}&action=add&description_type={{type.id}}" class="btn btn-default">
|
||||
<img title="{{type.title}}" alt="{{type.title}}" src="{{type.icon|icon(32)}} " width="32" height="32">
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if type.question %}
|
||||
<div class="normal-message">
|
||||
<div>
|
||||
<strong>{{'QuestionPlan'|get_lang}}</strong>
|
||||
</div>
|
||||
{{type.question}}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{{form.return_form()}}
|
||||
36
main/template/default/course_description/index.tpl
Normal file
36
main/template/default/course_description/index.tpl
Normal file
@@ -0,0 +1,36 @@
|
||||
{% for message in messages %}
|
||||
{{ message }}
|
||||
{% endfor %}
|
||||
{% for description in listing.descriptions %}
|
||||
{% if not description is empty %}
|
||||
<div id="description_{{ description.description_type }}" class="panel panel-default"
|
||||
data-id="{{ description.id }}" data-c_id="{{ description.c_id }}" data-type="course_description">
|
||||
<div class="panel-heading">
|
||||
{% if is_allowed_to_edit %}
|
||||
<div class="pull-right">
|
||||
{% if session_id == description.session_id %}
|
||||
<a href="{{ _p.web_self }}?action=edit&id={{ description.id }}&{{ _p.web_cid_query }}"
|
||||
title="{{ 'Edit'|get_lang }}">
|
||||
<img src="{{ 'edit.png'|icon(22) }}"/>
|
||||
</a>
|
||||
<a href="{{ _p.web_self }}?action=delete&id={{ description.id }}&{{ _p.web_cid_query }}"
|
||||
onclick = "javascript:return confirmation('{{ description.title_js | e('js') }}');"
|
||||
title="{{ 'Delete'|get_lang }}">
|
||||
<img src="{{ 'delete.png'|icon(22) }}"/>
|
||||
</a>
|
||||
{% else %}
|
||||
<img title="{{ 'EditionNotAvailableFromSession'|get_lang }}"
|
||||
alt="{{ 'EditionNotAvailableFromSession'|get_lang }}"
|
||||
src="{{ 'edit_na.png'|icon(22) }}" width="22" height="22"
|
||||
style="vertical-align:middle;">
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ description.title | remove_xss }}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{{ description.content | remove_xss }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
15
main/template/default/course_description/upload.tpl
Normal file
15
main/template/default/course_description/upload.tpl
Normal file
@@ -0,0 +1,15 @@
|
||||
{{javascript}}
|
||||
|
||||
{% for message in messages %}
|
||||
{{ message }}
|
||||
{% endfor %}
|
||||
|
||||
<div class="btn-toolbar actions-bar" >
|
||||
<div class="btn-group">
|
||||
<a href="{{root}}&action=listing" class="btn" title="{{'ImportCSV'|get_lang}}">
|
||||
<em class="size-32 icon-back"></em>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{form.return_form()}}
|
||||
239
main/template/default/course_home/about.tpl
Normal file
239
main/template/default/course_home/about.tpl
Normal file
@@ -0,0 +1,239 @@
|
||||
<div id="about-course">
|
||||
<div id="course-info-top">
|
||||
<h2 class="session-title">{{ course.title }}</h2>
|
||||
{% if not 'course_about_teacher_name_hide'|api_get_configuration_value %}
|
||||
<div class="course-short">
|
||||
<ul>
|
||||
<li class="author">{{ "Professors"|get_lang }}</li>
|
||||
{% for teacher in course.teachers %}
|
||||
<li>{{ teacher.complete_name }} | </li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% set course_video = '' %}
|
||||
{% for extra_field in course.extra_fields %}
|
||||
{% if extra_field.value.getField().getVariable() == 'video_url' %}
|
||||
{% set course_video = extra_field.value.getValue() %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-5">
|
||||
{% if course_video %}
|
||||
<div class="course-video">
|
||||
<div class="embed-responsive embed-responsive-16by9">
|
||||
{{ essence.replace(course_video) }}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="course-image">
|
||||
<img src="{{ course.image }}" class="img-responsive" />
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if not 'hide_social_media_links'|api_get_configuration_value %}
|
||||
<div class="share-social-media">
|
||||
<ul class="sharing-buttons">
|
||||
<li>
|
||||
{{ "ShareWithYourFriends"|get_lang }}
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://www.facebook.com/sharer/sharer.php?u={{ url }}"
|
||||
target="_blank" class="btn btn-facebook btn-inverse btn-xs">
|
||||
<em class="fa fa-facebook"></em> Facebook
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://twitter.com/home?{{ {'status': course.title ~ ' ' ~ url }|url_encode }}"
|
||||
target="_blank" class="btn btn-twitter btn-inverse btn-xs">
|
||||
<em class="fa fa-twitter"></em> Twitter
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://www.linkedin.com/shareArticle?{{ {'mini': 'true', 'url': url , 'title': course.title }|url_encode }}"
|
||||
target="_blank" class="btn btn-linkedin btn-inverse btn-xs">
|
||||
<em class="fa fa-linkedin"></em> Linkedin
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="course-description">
|
||||
{{ course.description | remove_xss }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if course.tags %}
|
||||
<div class="panel-tags">
|
||||
<ul class="list-inline course-tags">
|
||||
<li>{{ 'Tags'|get_lang }} :</li>
|
||||
{% for tag in course.tags %}
|
||||
<li class="tag-value">
|
||||
<span>{{ tag.getTag | remove_xss }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<section id="course-info-bottom" class="course">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<h3 class="sub-title">{{ "CourseInformation"|get_lang }}</h3>
|
||||
<div class="course-information">
|
||||
{% for topic in course.syllabus %}
|
||||
{% if topic.content != '' %}
|
||||
<div class="topics">
|
||||
<h4 class="title-info">
|
||||
<em class="fa fa-book"></em> {{ topic.title | remove_xss }}
|
||||
</h4>
|
||||
<div class="content-info">
|
||||
{{ topic.content | remove_xss }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
{% if allow_subscribe == true %}
|
||||
{% if is_premium == false %}
|
||||
<div class="session-subscribe">
|
||||
{# public course (open world) #}
|
||||
{% if 3 == course.visibility %}
|
||||
<a href="{{ _p.web }}courses/{{ course.code }}/index.php?id_session=0"
|
||||
class="btn btn-lg btn-success btn-block">
|
||||
{{ 'CourseHomepage'|get_lang }}
|
||||
</a>
|
||||
{% elseif _u.logged == 0 %}
|
||||
{% if 'allow_registration'|api_get_setting != 'false' %}
|
||||
<a
|
||||
href="{{ _p.web_main ~ 'auth/inscription.php' ~ redirect_to_session }}"
|
||||
class="btn btn-success btn-block btn-lg">
|
||||
<i class="fa fa-pencil" aria-hidden="true"></i>
|
||||
{{ 'SignUp'|get_lang }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{% elseif course.subscription %}
|
||||
<a href="{{ _p.web }}courses/{{ course.code }}/index.php?id_session=0"
|
||||
class="btn btn-lg btn-success btn-block">
|
||||
{{ 'CourseHomepage'|get_lang }}
|
||||
</a>
|
||||
{% else %}
|
||||
<a
|
||||
href="{{ _p.web }}courses/{{ course.code }}/index.php?action=subscribe&sec_token={{ token }}"
|
||||
class="btn btn-lg btn-success btn-block">
|
||||
{{ 'Subscribe'|get_lang }}
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="session-price">
|
||||
<div class="sale-price">
|
||||
{{ 'SalePrice'|get_lang }}
|
||||
</div>
|
||||
<div class="price-text">
|
||||
{{ is_premium.total_price_formatted }}
|
||||
</div>
|
||||
<div class="buy-box">
|
||||
<a
|
||||
href="{{ _p.web }}plugin/buycourses/src/process.php?i={{ is_premium.product_id }}&t={{ is_premium.product_type }}"
|
||||
class="btn btn-lg btn-primary btn-block">
|
||||
{{ 'BuyNow'|get_lang }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div class="session-subscribe">
|
||||
<button class="btn btn-lg btn-default btn-block" disabled>
|
||||
{{ 'Subscribe'|get_lang }}
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if has_requirements %}
|
||||
<div class="session-requirements">
|
||||
<h5>{{ 'RequiredCourses'|get_lang }}</h5>
|
||||
<p>
|
||||
{{ subscribe_button }}
|
||||
</p>
|
||||
{% for sequence in sequences %}
|
||||
{% if sequence.requirements %}
|
||||
<p>
|
||||
{{ sequence.name }} :
|
||||
{% for requirement in sequence.requirements %}
|
||||
<a href="{{ _p.web ~ 'course/' ~ requirement.getId ~ '/about/' }}">
|
||||
{{ requirement.title | remove_xss }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% if course.teachers and not 'course_about_teacher_name_hide'|api_get_configuration_value %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="panel-teachers">
|
||||
<h3 class="sub-title">{{ "Coaches"|get_lang }}</h3>
|
||||
</div>
|
||||
{% for teacher in course.teachers %}
|
||||
<div class="coach-information">
|
||||
<div class="coach-header">
|
||||
<div class="coach-avatar">
|
||||
<img class="img-circle img-responsive"
|
||||
src="{{ teacher.image }}"
|
||||
alt="{{ teacher.complete_name }}"
|
||||
>
|
||||
</div>
|
||||
<div class="coach-title">
|
||||
<h4>{{ teacher.complete_name }}</h4>
|
||||
<p> {{ teacher.diploma | remove_xss }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="open-area {{ course.teachers | length >= 2 ? 'open-more' : ' ' }}">
|
||||
{{ teacher.openarea | remove_xss }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.course-information').readmore({
|
||||
speed: 100,
|
||||
lessLink: '<a class="hide-content" href="#">{{ 'SetInvisible' | get_lang }}</a>',
|
||||
moreLink: '<a class="read-more" href="#">{{ 'ReadMore' | get_lang }}</a>',
|
||||
collapsedHeight: 730,
|
||||
heightMargin: 100
|
||||
});
|
||||
$('.open-more').readmore({
|
||||
speed: 100,
|
||||
lessLink: '<a class="hide-content" href="#">{{ 'SetInvisible' | get_lang }}</a>',
|
||||
moreLink: '<a class="read-more" href="#">{{ 'ReadMore' | get_lang }}</a>',
|
||||
collapsedHeight: 90,
|
||||
heightMargin: 20
|
||||
});
|
||||
});
|
||||
</script>
|
||||
38
main/template/default/course_home/activity.tpl
Normal file
38
main/template/default/course_home/activity.tpl
Normal file
@@ -0,0 +1,38 @@
|
||||
{% for block in blocks %}
|
||||
{% if block.title %}
|
||||
<div class="page-header">
|
||||
<h4 class="title-tools">{{ block.title }}</h4>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="row {{ block.class }}">
|
||||
{% if 'homepage_view'|api_get_setting == 'activity' %}
|
||||
{% for item in block.content %}
|
||||
<div class="offset2 col-md-4 course-tool">
|
||||
{{ item.extra }}
|
||||
{{ item.visibility }}
|
||||
{{ item.only_icon_small }}
|
||||
{{ item.link }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if 'homepage_view'|api_get_setting == 'activity_big' %}
|
||||
{% for item in block.content %}
|
||||
<div class="col-xs-6 col-sm-4 col-md-3">
|
||||
<div class="course-tool">
|
||||
<div class="big_icon">
|
||||
{{ item.tool.image }}
|
||||
</div>
|
||||
<div class="content">
|
||||
{{ item.visibility }}
|
||||
{{ item.extra }}
|
||||
{{ item.link }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
34
main/template/default/course_home/vertical_activity.tpl
Normal file
34
main/template/default/course_home/vertical_activity.tpl
Normal file
@@ -0,0 +1,34 @@
|
||||
{% for block in blocks %}
|
||||
<div class="{{ block.class ?: 'courseadminview-activity-3col' }}">
|
||||
{% if block.title %}
|
||||
<span class="viewcaption">{{ block.title }}</span>
|
||||
{% endif %}
|
||||
|
||||
{% for item in block.content %}
|
||||
{% if loop.index0 == 0 %}
|
||||
<ul>
|
||||
{% endif %}
|
||||
|
||||
<li class="course-tool">
|
||||
{{ item.extra }}
|
||||
{{ item.visibility }}
|
||||
|
||||
{% set a_params = '' %}
|
||||
|
||||
{% for foo, bar in item.url_params %}
|
||||
{% set a_params = a_params ~ [foo, bar]|join('="') ~ '" ' %}
|
||||
{% endfor %}
|
||||
|
||||
<a {{ a_params }} >
|
||||
<img src="{{ item.tool.image|replace({'.gif': '.png'})|icon() }}" alt="{{ item.name }}"
|
||||
id="toolimage_{{ item.tool.iid }}">
|
||||
</a>
|
||||
{{ item.link }}
|
||||
</li>
|
||||
|
||||
{% if block.content|length == loop.index %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
8
main/template/default/course_progress/layout.tpl
Normal file
8
main/template/default/course_progress/layout.tpl
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ actions }}
|
||||
<div class="blog">
|
||||
{{ content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,30 @@
|
||||
{% set inc = 0 %}
|
||||
{% for item in data %}
|
||||
<div>
|
||||
<div style="border: 1px solid #000;padding:1%;background-color: #D9EDF7;color:#31708f;">
|
||||
<h1 style="text-decoration: underline;">{{ item.title }}</h1>
|
||||
{{ item.content }}
|
||||
</div>
|
||||
<div style="width: 100%;border: 1px solid #000;background-color: #F5F5F5;">
|
||||
<div style="padding:1%;">
|
||||
<h1 style="text-decoration: underline;">{{ "ThematicPlan"|get_lang }}</h1>
|
||||
{% for plan in item.thematic_plan %}
|
||||
<h3>{{ plan.title }}</h3>
|
||||
{{ plan.description }}<br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div style="border-top: 1px solid #000;padding:1%;">
|
||||
<h1 style="text-decoration: underline;">{{ "ThematicAdvance"|get_lang }}</h1>
|
||||
{% for advance in item.thematic_advance %}
|
||||
<h4>{{ advance.duration }} {{ "MinHours" | get_lang }}</h4>
|
||||
{{ advance.start_date | api_convert_and_format_date(2) }}<br>
|
||||
{{ advance.content }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% set inc = inc + 1 %}
|
||||
{% if (inc < data|length) %}
|
||||
<pagebreak>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
@@ -0,0 +1,37 @@
|
||||
<div style="border: 1px solid #000;">
|
||||
<div style="float: left; width: 17%;padding:2%;font-weight: bold;">
|
||||
{{ "Thematic"|get_lang }}
|
||||
</div>
|
||||
<div style="float: left; width: 27%;padding:2%;font-weight: bold;">
|
||||
{{ "ThematicPlan"|get_lang }}
|
||||
</div>
|
||||
<div style="float: left; width: 27%;padding:2%;font-weight: bold;">
|
||||
{{ "ThematicAdvance"|get_lang }}
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<div style="border: 1px solid #000;">
|
||||
<div style="float: left; width: 17%;padding:2%;">
|
||||
<h4 style="margin-bottom: 10px;">{{ theme.title }}</h4>
|
||||
<br>
|
||||
{{ theme.content }}
|
||||
</div>
|
||||
<div style="float: left; width: 27%;padding:2%;">
|
||||
{% for plan in plans %}
|
||||
<br>
|
||||
<h4>{{ plan.title }}</h4>
|
||||
<br>
|
||||
{{ plan.description }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div style="float: left; width: 27%;padding:2%;">
|
||||
{% for advance in advances %}
|
||||
<h4 style="margin-bottom: 10px;">
|
||||
{{ advance.duration }} {{ "MinHours" | get_lang }}
|
||||
</h4>
|
||||
<p>{{ advance.start_date|api_convert_and_format_date(2) }}</p>
|
||||
{{ advance.content }}
|
||||
<br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
126
main/template/default/course_progress/progress.tpl
Normal file
126
main/template/default/course_progress/progress.tpl
Normal file
@@ -0,0 +1,126 @@
|
||||
{{ actions }}
|
||||
{{ message }}
|
||||
{{ flash_messages }}
|
||||
{% if data is not empty %}
|
||||
{% set tutor = false|api_is_allowed_to_edit(true) %}
|
||||
<div id="course-progress" class="thematic">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="bar-progress">
|
||||
<div class="pull-right">
|
||||
<div class="score-progress">
|
||||
<h3>{{ 'Progress' | get_lang }}: <span id="div_result">{{ score_progress }}</span> %</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table width="100%" class="table table-hover">
|
||||
<tr>
|
||||
<th style="width: 25%">{{ 'Thematic' | get_lang }}</th>
|
||||
<th style="width: 40%">{{ 'ThematicPlan' | get_lang }}</th>
|
||||
<th style="width: 35%">{{ 'ThematicAdvance' | get_lang }}</th>
|
||||
</tr>
|
||||
{% for item in data %}
|
||||
<tr>
|
||||
<td id="id-thematic-{{ item.id }}">
|
||||
{% if session_star is empty %}
|
||||
<h3>{{ item.title }}</h3>
|
||||
{% else %}
|
||||
<h3>{{ item.title }} {{ session_star }}</h3>
|
||||
{% endif %}
|
||||
{{ item.content }}
|
||||
<div class="btn-group btn-group-sm">
|
||||
{{ item.toolbar }}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{% if tutor %}
|
||||
<div class="pull-right">
|
||||
<a title="{{ 'EditThematicPlan' | get_lang }}" href="index.php?{{ _p.web_cid_query }}&origin=thematic_details&action=thematic_plan_list&thematic_id={{ item.id }}&width=700&height=500'" class="btn btn-default">
|
||||
<i class="fa fa-pencil" aria-hidden="true"></i>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="thematic_plan_{{ item.id }}">
|
||||
{% if item.thematic_plan is empty %}
|
||||
<div class="alert-thematic">
|
||||
<div class="alert alert-info" role="alert">{{ 'StillDoNotHaveAThematicPlan' | get_lang }}</div>
|
||||
</div>
|
||||
{% else %}
|
||||
{% for subitem in item.thematic_plan %}
|
||||
<h4>{{ subitem.title }}</h4>
|
||||
<p>{{ subitem.description }}</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{% if tutor %}
|
||||
<div class="pull-right">
|
||||
<a title="{{ 'NewThematicAdvance' | get_lang }}" href="index.php?{{ _p.web_cid_query }}&action=thematic_advance_add&thematic_id={{ item.id }}" class="btn btn-default">
|
||||
<i class="fa fa-plus-circle" aria-hidden="true"></i>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="thematic-advance">
|
||||
<table width="100%" class="table">
|
||||
{% if item.thematic_advance is not empty %}
|
||||
{% for advance in item.thematic_advance %}
|
||||
<tr>
|
||||
<td style="width: 90%" class="thematic_advance_content" id="thematic_advance_content_id_{{ advance.id }}">
|
||||
<div id="thematic_advance_{{ advance.id }}">
|
||||
<strong>{{ advance.start_date | format_date }}</strong>
|
||||
{{ advance.content }}
|
||||
</div>
|
||||
{% if tutor %}
|
||||
<div class="toolbar-actions">
|
||||
<div id="thematic_advance_tools_{{ advance.id }}" class="thematic_advance_actions">
|
||||
<div class="btn-group btn-group-sm">
|
||||
<a class="btn btn-default btn-sm" href="index.php?{{ _p.web_cid_query }}&action=thematic_advance_edit&thematic_id={{ item.id }}&thematic_advance_id={{ advance.id }}" title="{{ 'Edit' |get_lang }}">
|
||||
<i class="fa fa-pencil" aria-hidden="true"></i>
|
||||
</a>
|
||||
<a class="btn btn-default btn-sm" onclick="javascript:if(!confirm('{{ 'AreYouSureToDelete' | get_lang }}')) return false;" href="index.php?{{ _p.web_cid_query }}&action=thematic_advance_delete&thematic_id={{ item.id }}&thematic_advance_id={{ advance.id }}" title="{{ 'Delete' |get_lang }}">
|
||||
<i class="fa fa-trash" aria-hidden="true"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
{% if advance.done_advance == 1 %}
|
||||
{% set color = "background-color:#E5EDF9;" %}
|
||||
{% else %}
|
||||
{% set color = "background-color:#FFFFFF;" %}
|
||||
{% endif %}
|
||||
{% if tutor %}
|
||||
<td style="width: 10%; {{ color }}" id="td_done_thematic_{{ advance.id }}">
|
||||
{% set check = "" %}
|
||||
{% if item.last_done == advance.id %}
|
||||
{% set check = "checked" %}
|
||||
{% endif %}
|
||||
<center>
|
||||
<input type="radio" class="done_thematic" id="done_thematic_{{ advance.id }}" name="done_thematic" value="{{ advance.id }}" {{ check }} onclick="update_done_thematic_advance(this.value)">
|
||||
</center>
|
||||
{% else %}
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="alert alert-info" role="alert">{{ 'ThereIsNoAThematicAdvance' | get_lang }}</div>
|
||||
{% endif %}
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-info" role="alert">{{ 'ThereIsNoAThematicSection' | get_lang }}</div>
|
||||
{% endif %}
|
||||
15
main/template/default/coursecopy/import_moodle.tpl
Normal file
15
main/template/default/coursecopy/import_moodle.tpl
Normal file
@@ -0,0 +1,15 @@
|
||||
{{ info_msg }}
|
||||
<br />
|
||||
<div id="loader" class="text-center">
|
||||
|
||||
</div>
|
||||
<br />
|
||||
{{ form }}
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$(".btn-primary").click(function() {
|
||||
$("#loader").html('<div class="wobblebar-loader"></div><p> {{ 'ProcessingImportPleaseDontCloseThisWindowThisActionMayTakeLongTimePlaseWait' | get_lang }} </p>');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
53
main/template/default/create_course/add_course.tpl
Normal file
53
main/template/default/create_course/add_course.tpl
Normal file
@@ -0,0 +1,53 @@
|
||||
{% if just_created == 1%}
|
||||
<h3>{{ 'JustCreated'|get_lang }} {{ course_title }}</h3>
|
||||
<hr />
|
||||
{% endif %}
|
||||
|
||||
<h3>{{ 'ThingsToDo'|get_lang }}</h3>
|
||||
<br />
|
||||
<div id="course_thing_to_do" class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="thumbnail">
|
||||
{{ 'info.png' | img(64, 'AddCourseDescription'|get_lang ) }}
|
||||
<div class="caption">
|
||||
<a href="{{ _p.web_main }}course_description/index.php?cidReq={{ course_id }}" class="btn btn-default">
|
||||
<em class="fa fa-info-circle"></em> {{'AddCourseDescription'|get_lang}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="thumbnail">
|
||||
{{ 'folder_document.png' | img(64, 'UploadADocument'|get_lang ) }}
|
||||
<div class="caption">
|
||||
<a href="{{ _p.web_main }}document/document.php?cidReq={{ course_id }}" class="btn btn-default">
|
||||
<em class="fa fa-paper-plane"></em> {{'UploadADocument'|get_lang}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="thumbnail">
|
||||
{{ 'forum.png' | img(64, 'AddForum'|get_lang ) }}
|
||||
|
||||
<div class="caption">
|
||||
<a href="{{ _p.web_main }}forum/index.php?cidReq={{ course_id }}" class="btn btn-default">
|
||||
<em class="fa fa-users"></em> {{ 'AddForum'|get_lang }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if ("allow_user_course_subscription_by_course_admin" | api_get_setting) == 'true' or _u.is_admin == 1 %}
|
||||
<div class="col-md-3">
|
||||
<div class="thumbnail">
|
||||
{{ 'user.png' | img(64, 'SubscribeUserToCourse'|get_lang ) }}
|
||||
<div class="caption">
|
||||
<a href="{{ _p.web_main }}user/subscribe_user.php?cidReq={{ course_id }}" class="btn btn-default">
|
||||
<em class="fa fa-user-plus"></em> {{ 'SubscribeUserToCourse'|get_lang }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
48
main/template/default/custompage/login.tpl
Normal file
48
main/template/default/custompage/login.tpl
Normal file
@@ -0,0 +1,48 @@
|
||||
<div class="custompage">
|
||||
<div class="limiter">
|
||||
<div class="container-login">
|
||||
<div class="wrap-login width-login">
|
||||
<form class="login100-form validate-form" action="{{ _p.web }}" method="post">
|
||||
<div class="logo">
|
||||
<img width="250px" class="img-responsive" title="{{ _s.site_name }}" src="{{ _p.web_css_theme }}images/header-logo.svg">
|
||||
</div>
|
||||
<h3 class="title">{{ 'Login'|get_lang() }}</h3>
|
||||
{{ mgs_flash }}
|
||||
{% if error %}
|
||||
<div class="alert alert-warning" role="alert">
|
||||
{{ error }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="form-group">
|
||||
<label for="user">{{ 'LoginOrEmailAddress'|get_lang() }}</label>
|
||||
<input type="text" class="form-control" id="user" name="login" ">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">{{ 'Password'|get_lang() }}</label>
|
||||
<input type="password" class="form-control" name="password" id="password" >
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary btn-block">
|
||||
{{ 'LoginEnter'|get_lang() }}
|
||||
</button>
|
||||
{% if url_register %}
|
||||
<a href="{{ url_register }}" class="btn btn-success btn-block" >
|
||||
{{ 'Registration'|get_lang() }}
|
||||
</a >
|
||||
{% endif %}
|
||||
<div class="last-password">
|
||||
<a href="{{ url_lost_password }}">
|
||||
{{ 'LostPassword'|get_lang() }}
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
<div class="software-name">
|
||||
<a href="{{_p.web}}" target="_blank">
|
||||
{{ "PoweredByX" |get_lang | format(_s.software_name) }}
|
||||
</a>© {{ "now"|date("Y") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
17
main/template/default/custompage/lostpassword.tpl
Normal file
17
main/template/default/custompage/lostpassword.tpl
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="custompage">
|
||||
<div class="limiter">
|
||||
<div class="container-login">
|
||||
<div class="wrap-login width-register">
|
||||
<div class="logo">
|
||||
<img width="250px" class="img-responsive" title="{{ _s.site_name }}" src="{{ _p.web_css_theme }}images/header-logo.svg">
|
||||
</div>
|
||||
{{ form }}
|
||||
<div class="software-name">
|
||||
<a href="{{_p.web}}" target="_blank">
|
||||
{{ "PoweredByX" |get_lang | format(_s.software_name) }}
|
||||
</a>© {{ "now"|date("Y") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
18
main/template/default/custompage/registration.tpl
Normal file
18
main/template/default/custompage/registration.tpl
Normal file
@@ -0,0 +1,18 @@
|
||||
<div class="custompage">
|
||||
<div class="limiter">
|
||||
<div class="container-login">
|
||||
<div class="wrap-login width-register">
|
||||
<div class="logo">
|
||||
<img width="250px" class="img-responsive" title="{{ _s.site_name }}" src="{{ _p.web_css_theme }}images/header-logo.svg">
|
||||
</div>
|
||||
<h3 class="title">{{ 'UserRegistrationTitle'|get_lang() }}</h3>
|
||||
{{ form }}
|
||||
<div class="software-name">
|
||||
<a href="{{_p.web}}" target="_blank">
|
||||
{{ "PoweredByX" |get_lang | format(_s.software_name) }}
|
||||
</a>© {{ "now"|date("Y") }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
21
main/template/default/dashboard/index.tpl
Normal file
21
main/template/default/dashboard/index.tpl
Normal file
@@ -0,0 +1,21 @@
|
||||
{% if blocklist == '' %}
|
||||
<div id="columns">
|
||||
<div class="row">
|
||||
{% if columns|length > 0 %}
|
||||
{% for key, column in columns %}
|
||||
<div id="{{ key }}" class="col-md-6">
|
||||
{% for item in column %}
|
||||
{{ item }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="alert alert-info" role="alert">
|
||||
{{ 'YouHaveNotEnabledBlocks'| get_lang }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
{{ blocklist }}
|
||||
{% endif %}
|
||||
94
main/template/default/document/record_audio.tpl
Normal file
94
main/template/default/document/record_audio.tpl
Normal file
@@ -0,0 +1,94 @@
|
||||
<div class="alert alert-warning">
|
||||
<span class="fa fa-warning fa-fw" aria-hidden="true"></span> {{ 'WamiNeedFilename'|get_lang }}
|
||||
</div>
|
||||
|
||||
<div id="record-audio-recordrtc" class="row text-center">
|
||||
<form>
|
||||
<div class="row">
|
||||
<div class="col-sm-4 col-sm-offset-4">
|
||||
<div class="form-group">
|
||||
<span class="fa fa-microphone fa-5x fa-fw" aria-hidden="true"></span>
|
||||
<span class="sr-only">{{ 'RecordAudio'|get_lang }}</span>
|
||||
<div id="timer" style="display: none">
|
||||
<h2>
|
||||
<div class="label label-danger">
|
||||
<span id="hour">00</span>
|
||||
<span class="divider">:</span>
|
||||
<span id="minute">00</span>
|
||||
<span class="divider">:</span>
|
||||
<span id="second">00</span>
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" name="audio_title" id="audio-title-rtc" class="form-control" placeholder="{{ 'InputNameHere'|get_lang }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<div class="form-group">
|
||||
<button class="btn btn-primary" type="button" id="btn-start-record">
|
||||
<span class="fa fa-circle fa-fw" aria-hidden="true"></span> {{ 'StartRecordingAudio'|get_lang }}
|
||||
</button>
|
||||
<button class="btn btn-danger hidden" type="button" id="btn-stop-record" disabled>
|
||||
<span class="fa fa-square fa-fw" aria-hidden="true"></span> {{ 'StopRecordingAudio'|get_lang }}
|
||||
</button>
|
||||
<button class="btn btn-success hidden" type="button" id="btn-save-record"
|
||||
data-loadingtext="{{ 'Uploading'|get_lang }}" disabled>
|
||||
<span class="fa fa-send fa-fw" aria-hidden="true"></span> {{ 'SaveRecordedAudio'|get_lang }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<audio class="skip hidden center-block" controls id="record-preview"></audio>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="row" id="record-audio-wami">
|
||||
<div class="col-sm-3 col-sm-offset-3">
|
||||
<br>
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<input type="text" name="audio_title" id="audio-title-wami" class="form-control" placeholder="{{ 'InputNameHere'|get_lang }}">
|
||||
</div>
|
||||
<div class="form-group text-center">
|
||||
<button class="btn btn-primary" type="button" id="btn-activate-wami">
|
||||
<span class="fa fa-check fa-fw" aria-hidden=""></span> {{ 'Activate'|get_lang }}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div id="record-audio-wami-container" class="wami-container"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
RecordAudio.init(
|
||||
{
|
||||
blockId: '#record-audio-recordrtc',
|
||||
btnStartId: '#btn-start-record',
|
||||
btnPauseId: '#btn-pause-record',
|
||||
btnPlayId: '#btn-play-record',
|
||||
btnStopId: '#btn-stop-record',
|
||||
btnSaveId: '#btn-save-record',
|
||||
plyrPreviewId: '#record-preview',
|
||||
cidReq :'{{ _p.web_cid_query }}',
|
||||
directory: '{{ directory }}',
|
||||
reload_page: 1,
|
||||
type: 'document'
|
||||
},
|
||||
{
|
||||
blockId: '#record-audio-wami',
|
||||
containerId: 'record-audio-wami-container',
|
||||
directory: '{{ directory }}',
|
||||
userId: {{ user_id }},
|
||||
type: 'document'
|
||||
},
|
||||
null
|
||||
);
|
||||
});
|
||||
</script>
|
||||
48
main/template/default/document/recycle.tpl
Normal file
48
main/template/default/document/recycle.tpl
Normal file
@@ -0,0 +1,48 @@
|
||||
{% macro bytesToSize(bytes) %}
|
||||
{% spaceless %}
|
||||
{% set kilobyte = 1024 %}
|
||||
{% set megabyte = kilobyte * 1024 %}
|
||||
{% set gigabyte = megabyte * 1024 %}
|
||||
{% set terabyte = gigabyte * 1024 %}
|
||||
|
||||
{% if bytes < kilobyte %}
|
||||
{{ bytes ~ ' B' }}
|
||||
{% elseif bytes < megabyte %}
|
||||
{{ (bytes / kilobyte)|number_format(2, '.') ~ ' KB' }}
|
||||
{% elseif bytes < gigabyte %}
|
||||
{{ (bytes / megabyte)|number_format(2, '.') ~ ' MB' }}
|
||||
{% elseif bytes < terabyte %}
|
||||
{{ (bytes / gigabyte)|number_format(2, '.') ~ ' GB' }}
|
||||
{% else %}
|
||||
{{ (bytes / terabyte)|number_format(2, '.') ~ ' TB' }}
|
||||
{% endif %}
|
||||
{% endspaceless %}
|
||||
{% endmacro %}
|
||||
|
||||
{% if files %}
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>{{ 'Path' | get_lang }}</th>
|
||||
<th>{{ 'Size' | get_lang }}</th>
|
||||
<th>{{ 'Actions' | get_lang }}</th>
|
||||
</tr>
|
||||
{% for file in files %}
|
||||
<tr>
|
||||
<td>
|
||||
{{ file.path }}
|
||||
</td>
|
||||
<td>
|
||||
{{ _self.bytesToSize(file.size) }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a href="{{ web_self }}?{{web_cid_query}}&action=download&id={{ file.id }}" class="btn btn-default">{{ 'Download' | get_lang }}</a>
|
||||
<a href="{{ web_self }}?{{web_cid_query}}&action=delete&id={{ file.id }}" class="btn btn-danger">{{ 'Delete' | get_lang }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% else %}
|
||||
{{ 'NoData' | get_lang }}
|
||||
{% endif %}
|
||||
|
||||
39
main/template/default/document/webcam.tpl
Normal file
39
main/template/default/document/webcam.tpl
Normal file
@@ -0,0 +1,39 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-6 text-center">
|
||||
<h3>{{ 'LocalInputImage'|get_lang }}</h3>
|
||||
<div class="webcamclip_bg center-block">
|
||||
<div id="chamilo-camera" class="embed-responsive-item"></div>
|
||||
</div>
|
||||
<form class="text-center">
|
||||
<br/>
|
||||
<button id="btnCapture" class="btn btn-danger">
|
||||
<span class="fa fa-camera" aria-hidden="true"></span>
|
||||
{{ 'Snapshot'|get_lang }}
|
||||
</button>
|
||||
<button id="btnClean" class="btn btn-success">
|
||||
<span class="fa fa-refresh" aria-hidden="true"></span>
|
||||
{{ 'Clean'|get_lang }}
|
||||
</button>
|
||||
<button id="btnSave" class="btn btn-primary">
|
||||
<span class="fa fa-save" aria-hidden="true"></span>
|
||||
{{ 'Save'|get_lang }}
|
||||
</button>
|
||||
||
|
||||
<button id="btnAuto" class="btn btn-default">
|
||||
{{ 'Auto'|get_lang }}
|
||||
</button>
|
||||
<button id="btnStop" class="btn btn-default">
|
||||
{{ 'Stop'|get_lang }}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div id="upload_results" class="center-block" style="background-color:#ffffff;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
RecordWebcam.init({
|
||||
urlReceiver: '{{ _p.web_main }}document/webcam_receiver.php?{{ _p.web_cid_query }}&webcamname='
|
||||
+ escape('{{ filename }}') + '&webcamdir={{ webcam_dir }}&webcamuserid={{ user_id }}'
|
||||
});
|
||||
</script>
|
||||
84
main/template/default/exercise/oral_expression.tpl
Normal file
84
main/template/default/exercise/oral_expression.tpl
Normal file
@@ -0,0 +1,84 @@
|
||||
|
||||
<div id="record-audio-recordrtc-{{ question_id }}" class="row">
|
||||
<div class="col-sm-4 col-sm-offset-4">
|
||||
<div class="form-group text-center">
|
||||
<span class="fa fa-microphone fa-5x fa-fw" aria-hidden="true"></span>
|
||||
<span class="sr-only">{{ 'RecordAudio'|get_lang }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group text-center">
|
||||
<div id="timer" style="display: none">
|
||||
<h2>
|
||||
<div class="label label-danger">
|
||||
<span id="hour">00</span>
|
||||
<span class="divider">:</span>
|
||||
<span id="minute">00</span>
|
||||
<span class="divider">:</span>
|
||||
<span id="second">00</span>
|
||||
</div>
|
||||
</h2>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary" type="button" id="btn-start-record-{{ question_id }}">
|
||||
<span class="fa fa-circle fa-fw" aria-hidden="true"></span> {{ 'StartRecordingAudio'|get_lang }}
|
||||
</button>
|
||||
<button class="btn btn-primary hidden" type="button" id="btn-pause-record-{{ question_id }}" disabled>
|
||||
<span class="fa fa-pause fa-fw" aria-hidden="true"></span> {{ 'PauseRecordingAudio'|get_lang }}
|
||||
</button>
|
||||
<button class="btn btn-primary hidden" type="button" id="btn-play-record-{{ question_id }}" disabled>
|
||||
<span class="fa fa-play fa-fw" aria-hidden="true"></span> {{ 'PlayRecordingAudio'|get_lang }}
|
||||
</button>
|
||||
<button class="btn btn-danger hidden" type="button" id="btn-stop-record-{{ question_id }}" disabled>
|
||||
<span class="fa fa-square fa-fw" aria-hidden="true"></span> {{ 'StopRecordingAudio'|get_lang }}
|
||||
</button>
|
||||
<button class="btn btn-success hidden" type="button" id="btn-save-record-{{ question_id }}"
|
||||
data-loadingtext="{{ 'Uploading'|get_lang }}"
|
||||
disabled>
|
||||
<span class="fa fa-send fa-fw" aria-hidden="true"></span> {{ 'SaveRecordedAudio'|get_lang }}
|
||||
</button>
|
||||
<button id="hide_description_{{ question_id }}" type="button" class="btn btn-default advanced_options" data-toggle="button" aria-pressed="false" autocomplete="off">
|
||||
<em class="fa fa-bars"></em> {{ 'AddText' | get_lang }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="form-group text-center">
|
||||
<audio class="skip hidden center-block" controls id="record-preview-{{ question_id }}"></audio>
|
||||
</div>
|
||||
<div class="well">
|
||||
{{ 'OralExpressionHelpText' | get_lang }}
|
||||
</div>
|
||||
<div class="record-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id="record-audio-wami-{{ question_id }}">
|
||||
<div class="col-sm-4 col-sm-offset-4 text-center">
|
||||
<div id="record-audio-wami-container-{{ question_id }}" class="wami-container"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).on('ready', function () {
|
||||
RecordAudio.init({
|
||||
blockId: '#record-audio-recordrtc-{{ question_id }}',
|
||||
btnStartId: '#btn-start-record-{{ question_id }}',
|
||||
btnPauseId: '#btn-pause-record-{{ question_id }}',
|
||||
btnPlayId: '#btn-play-record-{{ question_id }}',
|
||||
btnStopId: '#btn-stop-record-{{ question_id }}',
|
||||
plyrPreviewId: '#record-preview-{{ question_id }}',
|
||||
directory: '{{ directory }}',
|
||||
type: 'document'
|
||||
}, {
|
||||
blockId: '#record-audio-wami-{{ question_id }}',
|
||||
containerId: 'record-audio-wami-container-{{ question_id }}',
|
||||
directory: '{{ directory }}',
|
||||
userId: {{ user_id }},
|
||||
type: 'document'
|
||||
}, '{{ file_name }}');
|
||||
|
||||
if (0 === $('#hide_description_{{ question_id }}_options').length) {
|
||||
$('#hide_description_{{ question_id }}').remove();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
162
main/template/default/exercise/partials/result_exercise.tpl
Normal file
162
main/template/default/exercise/partials/result_exercise.tpl
Normal file
@@ -0,0 +1,162 @@
|
||||
<div class="question-result">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
{% if 'save_titles_as_html'|api_get_configuration_value %}
|
||||
{{ data.title | remove_xss }}
|
||||
{% else %}
|
||||
<h3>{{ data.title | remove_xss }}</h3>
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="user-avatar">
|
||||
<img src="{{ data.avatar }}">
|
||||
</div>
|
||||
<div class="user-info">
|
||||
<strong>{{ data.name_url }}</strong>
|
||||
<br />
|
||||
{% if signature %}
|
||||
<img src="{{ signature }}" />
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="group-data">
|
||||
<div class="list-data username">
|
||||
<span class="item">{{ 'Username'|get_lang }}</span>
|
||||
<i class="fa fa-fw fa-user" aria-hidden="true"></i> {{ data.username }}
|
||||
</div>
|
||||
|
||||
{% if data.start_date %}
|
||||
<div class="list-data start-date">
|
||||
<span class="item">{{ 'StartDate'|get_lang }}</span>
|
||||
<i class="fa fa-fw fa-calendar" aria-hidden="true"></i> {{ data.start_date }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if data.duration %}
|
||||
<div class="list-data duration">
|
||||
<span class="item">{{ 'Duration'|get_lang }}</span>
|
||||
<i class="fa fa-fw fa-clock-o" aria-hidden="true"></i> {{ data.duration }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if data.ip %}
|
||||
<div class="list-data ip">
|
||||
<span class="item">{{ 'IP'|get_lang }}</span>
|
||||
<i class="fa fa-fw fa-laptop" aria-hidden="true"></i> {{ data.ip }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if allow_signature %}
|
||||
<div class="list-data">
|
||||
<span class="item"></span>
|
||||
<a id="sign" class="btn btn-primary" href="javascript:void(0)">
|
||||
<em class="fa fa-pencil"></em> {{ 'Sign'| get_plugin_lang('ExerciseSignaturePlugin') }}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if allow_export_pdf %}
|
||||
<br />
|
||||
<div class="list-data">
|
||||
<span class="item"></span>
|
||||
<a href="{{ export_url }}" class="btn btn-default">
|
||||
<img src="{{ 'export_pdf.png'|icon(32) }}" /> {{ 'ExportResponseReport'| get_lang }}
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<hr />
|
||||
<div id="quiz_saved_answers_container">
|
||||
{% if data.number_of_answers_saved != data.number_of_answers %}
|
||||
<span class="label label-warning">
|
||||
<strong>{{ 'XAnswersSavedByUsersFromXTotal'|get_lang|format(data.number_of_answers_saved, data.number_of_answers) }}</strong>
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="label label-success">
|
||||
<strong>{{ 'XAnswersSavedByUsersFromXTotal'|get_lang|format(data.number_of_answers_saved, data.number_of_answers) }}</strong>
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
{% if 'quiz_confirm_saved_answers'|api_get_configuration_value %}
|
||||
{% set enable_form = data.track_confirmation.updatedAt is empty and data.track_confirmation.userId == _u.id %}
|
||||
<form class="form-horizontal" action="#" id="quiz_confirm_saved_answers_form">
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input
|
||||
type="checkbox"
|
||||
name="quiz_confirm_saved_answers_check"
|
||||
{% if not enable_form %}disabled{% endif %} {% if data.track_confirmation.confirmed %}checked{% endif %}
|
||||
>
|
||||
{{ 'QuizConfirmSavedAnswers'|get_lang }}
|
||||
</label>
|
||||
</div>
|
||||
{% if enable_form %}
|
||||
<span class="help-block">{{ 'QuizConfirmSavedAnswersHelp'|get_lang }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% if enable_form %}
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<input type="hidden" name="tc_id" value="{{ data.track_confirmation.id }}">
|
||||
<button type="submit" class="btn btn-primary" disabled>
|
||||
<span class="fa fa-save fa-fw" aria-hidden="true"></span> {{ 'Save'|get_lang }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if 'quiz_confirm_saved_answers'|api_get_configuration_value %}
|
||||
{% set enable_form = data.track_confirmation.updatedAt is empty and data.track_confirmation.userId == _u.id %}
|
||||
{% if enable_form %}
|
||||
<script>
|
||||
$(function () {
|
||||
var form = $('#quiz_confirm_saved_answers_form');
|
||||
var checkbox = form.find('[type="checkbox"]');
|
||||
var button = form.find(':submit');
|
||||
|
||||
checkbox.on('change', function () {
|
||||
button.prop('disabled', !this.checked);
|
||||
});
|
||||
|
||||
form.on('submit', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
if (!checkbox.is(':checked')) {
|
||||
return;
|
||||
}
|
||||
|
||||
var xhrData = form.serialize();
|
||||
|
||||
button.prop('disabled', true);
|
||||
checkbox.prop('disabled', true);
|
||||
|
||||
$.post(
|
||||
'{{ _p.web_ajax }}exercise.ajax.php?a=quiz_confirm_saved_answers',
|
||||
xhrData
|
||||
).done(function () {
|
||||
button.parents('.form-group').remove();
|
||||
|
||||
$('#quiz_end_message').show();
|
||||
}).fail(function (response) {
|
||||
button.replaceWith(response.responseText);
|
||||
});
|
||||
})
|
||||
|
||||
$('#quiz_end_message').hide();
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
150
main/template/default/exercise/reading_comprehension.tpl
Normal file
150
main/template/default/exercise/reading_comprehension.tpl
Normal file
@@ -0,0 +1,150 @@
|
||||
<div id="question-{{ id }}" class="question-reading-comprehension-container">
|
||||
<div class="question-reading-comprehension-overlay"></div>
|
||||
{% if exercise_type == 1 %} {# all in one page #}
|
||||
<button type="button" class="btn btn-default btn-lg" id="question-{{ id }}-start">
|
||||
{{ 'StartTimeWindow'|get_lang }}
|
||||
<span class="fa fa-play" aria-hidden="true"></span>
|
||||
</button>
|
||||
{% endif %}
|
||||
<div id="question-{{ id }}-text" class="center-block question-reading-comprehension-text" onselectstart="return false">
|
||||
{{ text }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.question-reading-comprehension-container {
|
||||
position: relative;
|
||||
}
|
||||
.question-reading-comprehension-container button {
|
||||
left: 50%;
|
||||
margin-left: -60px;
|
||||
margin-top: -23px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: 120px;
|
||||
}
|
||||
.question-reading-comprehension-container .question-reading-comprehension-overlay {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
.question-reading-comprehension-text {
|
||||
text-align: justify;
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.question-reading-comprehension-text .text-highlight {
|
||||
color: transparent;
|
||||
-webkit-text-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
|
||||
-khtml-text-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
|
||||
-moz-text-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
|
||||
-ms-text-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
|
||||
text-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
|
||||
-webkit-transition: color .12s linear, text-shadow .12s linear;
|
||||
-khtml-transition: color .12s linear, text-shadow .12s linear;
|
||||
-moz-transition: color .12s linear, text-shadow .12s linear;
|
||||
-ms-transition: color .12s linear, text-shadow .12s linear;
|
||||
transition: color .12s linear, text-shadow .12s linear;
|
||||
}
|
||||
.question-reading-comprehension-text .text-highlight.active {
|
||||
color: #000;
|
||||
-webkit-text-shadow: none;
|
||||
-khtml-text-shadow: none;
|
||||
-moz-text-shadow: none;
|
||||
-ms-text-shadow: none;
|
||||
text-shadow: none;
|
||||
-webkit-transition: color .12s linear, text-shadow .12s linear;
|
||||
-khtml-transition: color .12s linear, text-shadow .12s linear;
|
||||
-moz-transition: color .12s linear, text-shadow .12s linear;
|
||||
-ms-transition: color .12s linear, text-shadow .12s linear;
|
||||
transition: color .12s linear, text-shadow .12s linear;
|
||||
}
|
||||
.question-reading-comprehension-text .text-highlight.border {
|
||||
color: #bbb;
|
||||
-webkit-text-shadow: none;
|
||||
-khtml-text-shadow: none;
|
||||
-moz-text-shadow: none;
|
||||
-ms-text-shadow: none;
|
||||
text-shadow: none;
|
||||
-webkit-transition: color .12s linear, text-shadow .12s linear;
|
||||
-khtml-transition: color .12s linear, text-shadow .12s linear;
|
||||
-moz-transition: color .12s linear, text-shadow .12s linear;
|
||||
-ms-transition: color .12s linear, text-shadow .12s linear;
|
||||
transition: color .12s linear, text-shadow .12s linear;
|
||||
}
|
||||
.question-reading-comprehension-text br {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.radio.hide-reading-answers, .question_title.hide-reading-answers {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
$(document).on('ready', function () {
|
||||
var index = 0,
|
||||
$questionTexts = $('#question-{{ id }}-text .text-highlight'),
|
||||
$btnFinish = $('#question_div_{{ id }} .form-actions button.question-validate-btn'),
|
||||
total = $questionTexts.length,
|
||||
timeOuId = null;
|
||||
|
||||
function updateView()
|
||||
{
|
||||
$questionTexts.removeClass('active border');
|
||||
|
||||
if (index == total - 1) {
|
||||
$('#question_div_{{ id }} .radio, #question_div_{{ id }} .question_title').removeClass('hide-reading-answers');
|
||||
|
||||
$btnFinish.show();
|
||||
}
|
||||
|
||||
if (index >= total) {
|
||||
window.clearInterval(timeOuId);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var prev = index > 0 ? $('#question-{{ id }}-text .text-highlight').get(index - 1) : null,
|
||||
current = $questionTexts.get(index),
|
||||
next = index < total ? $('#question-{{ id }}-text .text-highlight').get(index + 1) : null;
|
||||
|
||||
$(current).addClass('active');
|
||||
|
||||
if (prev) {
|
||||
$(prev).addClass('border');
|
||||
}
|
||||
|
||||
if (next) {
|
||||
$(next).addClass('border');
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
function startQuestion() {
|
||||
updateView();
|
||||
|
||||
timeOuId = window.setInterval(updateView, {{ refresh_time }} * 1000);
|
||||
}
|
||||
|
||||
$btnFinish.hide();
|
||||
|
||||
{% if exercise_type == 1 %}
|
||||
$('#question-{{ id }}-start').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
startQuestion();
|
||||
|
||||
$(this).remove();
|
||||
});
|
||||
{% else %}
|
||||
startQuestion();
|
||||
{% endif %}
|
||||
});
|
||||
</script>
|
||||
100
main/template/default/exercise/result.tpl
Normal file
100
main/template/default/exercise/result.tpl
Normal file
@@ -0,0 +1,100 @@
|
||||
{# Displayed from exercise_result.php #}
|
||||
|
||||
{{ page_top }}
|
||||
{{ page_content }}
|
||||
{{ page_bottom }}
|
||||
|
||||
{% if allow_signature %}
|
||||
<div id="sign_popup" style="display: none">
|
||||
<div id="signature_area" class="well">
|
||||
<canvas width="400px"></canvas>
|
||||
</div>
|
||||
<span class="loading" style="display: none"><i class="fas fa-spinner"></i></span>
|
||||
|
||||
<span id="save_controls">
|
||||
<button id="sign_popup_save" class="btn btn-primary" type="submit">
|
||||
<em class="fa fa-save"></em> {{ 'Save'|get_lang }}
|
||||
</button>
|
||||
<button id="sign_popup_clean" class="btn btn-default" type="submit">
|
||||
<em class="fa fa-eraser"></em> {{ 'Clean'|get_lang }}
|
||||
</button>
|
||||
</span>
|
||||
<span id="close_controls" style="display: none">
|
||||
<span id="sign_results"></span>
|
||||
<hr />
|
||||
<button id="sign_popup_close" class="btn btn-default" type="submit">
|
||||
{{ 'Close'|get_lang }}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var imageFormat = 'image/png';
|
||||
var canvas = document.querySelector("canvas");
|
||||
var signaturePad = new SignaturePad(canvas);
|
||||
var dataURL = signaturePad.toDataURL(imageFormat);
|
||||
var url = "{{ _p.web_ajax }}exercise.ajax.php?{{ _p.web_cid_query }}";
|
||||
var exeId = "{{ exe_id }}";
|
||||
|
||||
$(function() {
|
||||
$("#sign_popup_close").on("click", function() {
|
||||
$("#sign_popup").dialog("close");
|
||||
$('#loading').hide();
|
||||
$('#save_controls').show();
|
||||
$('#close_controls').hide();
|
||||
$('#signature_area').show();
|
||||
});
|
||||
|
||||
$("#sign_popup_clean").on("click", function() {
|
||||
signaturePad.clear();
|
||||
});
|
||||
|
||||
$("#sign_popup_save").on("click", function() {
|
||||
if (signaturePad.isEmpty()) {
|
||||
alert('{{ 'ProvideASignatureFirst'| get_plugin_lang('ExerciseSignaturePlugin') | e('js') }}');
|
||||
return false;
|
||||
}
|
||||
|
||||
var dataURL = signaturePad.toDataURL(imageFormat);
|
||||
$.ajax({
|
||||
beforeSend: function(result) {
|
||||
$('#loading').show();
|
||||
},
|
||||
type: "POST",
|
||||
url: url,
|
||||
data: "a=sign_attempt&exe_id="+exeId+"&file="+dataURL,
|
||||
success: function(data) {
|
||||
$('#loading').hide();
|
||||
$('#save_controls').hide();
|
||||
$('#close_controls').show();
|
||||
$('#signature_area').hide();
|
||||
|
||||
signaturePad.clear();
|
||||
if (1 == data) {
|
||||
$('#sign_results').html('{{ 'Saved' | get_lang }}');
|
||||
$('#sign').hide();
|
||||
//$('#sign').html('{{ 'SignatureSaved' | get_lang }}');
|
||||
} else {
|
||||
$('#sign_results').html('{{ 'Error' | get_lang }}');
|
||||
}
|
||||
$('#close_controls').show();
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
$("#sign").on("click", function() {
|
||||
$("#sign_popup").dialog({
|
||||
autoOpen: false,
|
||||
width: 500,
|
||||
height: 'auto',
|
||||
//position: { my: 'left top', at: 'right top'}, //of: $target
|
||||
close: function(){
|
||||
//$("div#"+div_show_id).remove();
|
||||
//$("div#"+div_content_id).remove();
|
||||
}
|
||||
});
|
||||
$("#sign_popup").dialog("open");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
255
main/template/default/exercise/submit.js.tpl
Normal file
255
main/template/default/exercise/submit.js.tpl
Normal file
@@ -0,0 +1,255 @@
|
||||
<script>
|
||||
|
||||
var DraggableAnswer = {
|
||||
gallery: null,
|
||||
trash: null,
|
||||
deleteItem: function (item, insertHere) {
|
||||
if (insertHere.find(".exercise-draggable-answer-option").length > 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
item.fadeOut(function () {
|
||||
var $list = $('ul', insertHere).length
|
||||
? $('ul', insertHere)
|
||||
: $('<ul>').addClass('gallery list-unstyled').appendTo(insertHere);
|
||||
|
||||
var droppedId = item.attr('id'),
|
||||
dropedOnId = insertHere.attr('id'),
|
||||
originSelectId = 'window_' + droppedId + '_select',
|
||||
value = dropedOnId.split('_')[2];
|
||||
|
||||
$('#' + originSelectId + ' option')
|
||||
.filter(function (index) {
|
||||
var position = insertHere.prop('id').split('_')[2];
|
||||
|
||||
return index === parseInt(position);
|
||||
})
|
||||
.prop("selected", true);
|
||||
|
||||
item.appendTo($list).fadeIn();
|
||||
});
|
||||
},
|
||||
recycleItem: function (item) {
|
||||
var droppedId = item.attr('id'),
|
||||
originSelectId = 'window_' + droppedId + '_select',
|
||||
idParts = droppedId.split('_'),
|
||||
questionId = parseInt(idParts[0]) || 0;
|
||||
|
||||
if (!questionId) {
|
||||
return;
|
||||
}
|
||||
|
||||
item.fadeOut(function () {
|
||||
item
|
||||
.appendTo(DraggableAnswer.gallery.filter('[data-question="' + questionId + '"]'))
|
||||
.fadeIn();
|
||||
});
|
||||
|
||||
$('#' + originSelectId + ' option').prop('selected', false);
|
||||
$('#' + originSelectId + ' option:first').prop('selected', true);
|
||||
},
|
||||
init: function (gallery, trash) {
|
||||
this.gallery = gallery;
|
||||
this.trash = trash;
|
||||
|
||||
$("li.touch-items", DraggableAnswer.gallery).draggable({
|
||||
revert: "invalid",
|
||||
containment: "document",
|
||||
helper: "clone",
|
||||
cursor: "move"
|
||||
});
|
||||
|
||||
DraggableAnswer.trash.droppable({
|
||||
accept: ".exercise-draggable-answer > li.touch-items",
|
||||
drop: function (e, ui) {
|
||||
DraggableAnswer.deleteItem(ui.draggable, $(this));
|
||||
}
|
||||
});
|
||||
|
||||
DraggableAnswer.gallery.droppable({
|
||||
drop: function (e, ui) {
|
||||
DraggableAnswer.recycleItem(ui.draggable, $(this));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var MatchingDraggable = {
|
||||
colorDestination: '#316B31',
|
||||
curviness: 0,
|
||||
connectorType: 'Straight',
|
||||
initialized: false,
|
||||
init: function (questionId) {
|
||||
var windowQuestionSelector = '.window' + questionId + '_question',
|
||||
countConnections = $(windowQuestionSelector).length,
|
||||
colorArray = [],
|
||||
colorArrayDestination = [];
|
||||
|
||||
if (countConnections > 0) {
|
||||
colorArray = $.xcolor.analogous("#da0", countConnections);
|
||||
colorArrayDestination = $.xcolor.analogous("#51a351", countConnections);
|
||||
} else {
|
||||
colorArray = $.xcolor.analogous("#da0", 10);
|
||||
colorArrayDestination = $.xcolor.analogous("#51a351", 10);
|
||||
}
|
||||
|
||||
jsPlumb.importDefaults({
|
||||
DragOptions: {cursor: 'pointer', zIndex: 2000},
|
||||
PaintStyle: {strokeStyle: '#000'},
|
||||
EndpointStyle: {strokeStyle: '#316b31'},
|
||||
Endpoint: 'Rectangle',
|
||||
Anchors: ['TopCenter', 'TopCenter']
|
||||
});
|
||||
|
||||
var exampleDropOptions = {
|
||||
tolerance: 'touch',
|
||||
hoverClass: 'dropHover',
|
||||
activeClass: 'dragActive'
|
||||
};
|
||||
|
||||
var destinationEndPoint = {
|
||||
endpoint: ["Dot", {radius: 15}],
|
||||
paintStyle: {fillStyle: MatchingDraggable.colorDestination},
|
||||
isSource: false,
|
||||
connectorStyle: {strokeStyle: MatchingDraggable.colorDestination, lineWidth: 8},
|
||||
connector: [
|
||||
MatchingDraggable.connectorType,
|
||||
{curviness: MatchingDraggable.curviness}
|
||||
],
|
||||
maxConnections: 1000,
|
||||
isTarget: true,
|
||||
dropOptions: exampleDropOptions,
|
||||
beforeDrop: function (params) {
|
||||
jsPlumb.select({source: params.sourceId}).each(function (connection) {
|
||||
jsPlumb.detach(connection);
|
||||
});
|
||||
|
||||
var selectId = params.sourceId + "_select";
|
||||
var value = params.targetId.split("_")[2];
|
||||
|
||||
$("#" + selectId + " option")
|
||||
.removeAttr('selected')
|
||||
.filter(function (index) {
|
||||
return index === parseInt(value);
|
||||
})
|
||||
.attr("selected", true);
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
var count = 0;
|
||||
var sourceDestinationArray = [];
|
||||
|
||||
$(windowQuestionSelector).each(function (index) {
|
||||
var windowId = $(this).attr("id");
|
||||
var scope = windowId + "scope";
|
||||
var destinationColor = colorArray[count].getHex();
|
||||
|
||||
var sourceEndPoint = {
|
||||
endpoint: [
|
||||
"Dot",
|
||||
{radius: 15}
|
||||
],
|
||||
paintStyle: {
|
||||
fillStyle: destinationColor
|
||||
},
|
||||
isSource: true,
|
||||
connectorStyle: {
|
||||
strokeStyle: "#8a8888",
|
||||
lineWidth: 8
|
||||
},
|
||||
connector: [
|
||||
MatchingDraggable.connectorType,
|
||||
{curviness: MatchingDraggable.curviness}
|
||||
],
|
||||
maxConnections: 1,
|
||||
isTarget: false,
|
||||
dropOptions: exampleDropOptions,
|
||||
scope: scope
|
||||
};
|
||||
|
||||
sourceDestinationArray[count + 1] = sourceEndPoint;
|
||||
|
||||
count++;
|
||||
|
||||
jsPlumb.addEndpoint(
|
||||
windowId,
|
||||
{
|
||||
anchor: ['RightMiddle', 'RightMiddle', 'RightMiddle', 'RightMiddle']
|
||||
},
|
||||
sourceEndPoint
|
||||
);
|
||||
|
||||
var destinationCount = 0;
|
||||
|
||||
$(windowQuestionSelector).each(function (index) {
|
||||
var windowDestinationId = $(this).attr("id");
|
||||
destinationEndPoint.scope = scope;
|
||||
destinationEndPoint.paintStyle.fillStyle = colorArrayDestination[destinationCount].getHex();
|
||||
destinationCount++;
|
||||
|
||||
jsPlumb.addEndpoint(
|
||||
windowDestinationId + "_answer",
|
||||
{
|
||||
anchors: ['LeftMiddle', 'LeftMiddle', 'LeftMiddle', 'LeftMiddle']
|
||||
},
|
||||
destinationEndPoint
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
MatchingDraggable.attachBehaviour();
|
||||
},
|
||||
attachBehaviour: function () {
|
||||
if (!MatchingDraggable.initialized) {
|
||||
MatchingDraggable.initialized = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
jsPlumb.ready(function () {
|
||||
if ($(".drag_question").length > 0) {
|
||||
MatchingDraggable.init();
|
||||
|
||||
$(document).scroll(function () {
|
||||
jsPlumb.repaintEverything();
|
||||
});
|
||||
|
||||
$(window).resize(function () {
|
||||
jsPlumb.repaintEverything();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function shuffleArray(array) {
|
||||
for (var i = array.length - 1; i > 0; i--) {
|
||||
var j = Math.floor(Math.random() * (i + 1));
|
||||
var temp = array[i];
|
||||
array[i] = array[j];
|
||||
array[j] = temp;
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
// if shuffle answers
|
||||
if ('{{ shuffle_answers }}' == '1') {
|
||||
$('.exercise-draggable-answer').each(function(){
|
||||
// get current ul
|
||||
var $ul = $(this);
|
||||
var li = $ul.find('.touch-items');
|
||||
var liContents = [];
|
||||
li.each(function() {
|
||||
liContents.push($(this));
|
||||
});
|
||||
shuffleArray(liContents);
|
||||
$ul.empty().html(liContents);
|
||||
});
|
||||
}
|
||||
|
||||
DraggableAnswer.init(
|
||||
$(".exercise-draggable-answer"),
|
||||
$(".droppable")
|
||||
);
|
||||
});
|
||||
</script>
|
||||
9
main/template/default/export/alt_pdf_footer.tpl
Normal file
9
main/template/default/export/alt_pdf_footer.tpl
Normal file
@@ -0,0 +1,9 @@
|
||||
<table border="0" class="full-width border-top page-footer">
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<strong>{{ _s.institution }}</strong>
|
||||
<br>
|
||||
<strong>{PAGENO} / {nb}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
10
main/template/default/export/pdf_footer.tpl
Normal file
10
main/template/default/export/pdf_footer.tpl
Normal file
@@ -0,0 +1,10 @@
|
||||
<table border="0" width="100%" class="full-width border-top page-footer">
|
||||
<tr>
|
||||
<td width="80%" class="text-left">
|
||||
<strong>{{ _s.institution }}</strong>
|
||||
</td>
|
||||
<td width="30%" class="text-right" style="text-align: right;">
|
||||
<strong>{PAGENO} / {nb}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
11
main/template/default/export/pdf_header.tpl
Normal file
11
main/template/default/export/pdf_header.tpl
Normal file
@@ -0,0 +1,11 @@
|
||||
<table border="0" width="100%" class="pdf-header">
|
||||
<tr>
|
||||
<td width="30%">
|
||||
{{ organization }}
|
||||
</td>
|
||||
<td width="80%" style="text-align: right; font-size: 12px; color: #666666;">
|
||||
<strong>{{ teacher_name }}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
123
main/template/default/export/table_pdf.tpl
Normal file
123
main/template/default/export/table_pdf.tpl
Normal file
@@ -0,0 +1,123 @@
|
||||
{% if pdf_title %}
|
||||
<h2>{{ pdf_title }}</h2>
|
||||
{% endif %}
|
||||
|
||||
{% if pdf_description %}
|
||||
{{ pdf_description }}
|
||||
<br/><br/>
|
||||
{% endif %}
|
||||
|
||||
<table align="center" width="100%" class="table table-hover table-striped table-bordered data_table">
|
||||
{% if pdf_student_info %}
|
||||
<tr>
|
||||
<td style="background-color: #E5E5E5; text-align: left; width:130px; ">
|
||||
<strong>{{ "Student"|get_lang }}</strong>
|
||||
</td>
|
||||
<td>
|
||||
{{ pdf_student_info.complete_name }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if pdf_teachers %}
|
||||
<tr>
|
||||
<td style="background-color: #E5E5E5; text-align: left; width:130px;">
|
||||
<strong>{{ "Teacher"|get_lang }}</strong>
|
||||
</td>
|
||||
<td>
|
||||
{{ pdf_teachers }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{% if pdf_session_info %}
|
||||
<tr>
|
||||
<td style="background-color: #E5E5E5; text-align: left; width:130px;" {{ pdf_session_info.description ? '' : 'colspan="2"' }}>
|
||||
<strong>{{ "Session"|get_lang }}</strong> {{ pdf_session_info.name }}
|
||||
</td>
|
||||
|
||||
{% if pdf_session_info.description %}
|
||||
<td>
|
||||
<strong>{{ "Description"|get_lang }}</strong> {{ pdf_session_info.description }}
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
|
||||
{% if pdf_session_info.access_start_date != '' and pdf_session_info.access_end_date is not empty and pdf_session_info.access_end_date != '0000-00-00' %}
|
||||
<tr>
|
||||
<td style="background-color: #E5E5E5; text-align: left; width:130px;">
|
||||
<strong>{{ "PeriodToDisplay"|get_lang }}</strong>
|
||||
</td>
|
||||
<td>
|
||||
{{ "FromDateXToDateY"| get_lang|format(pdf_session_info.access_start_date_to_local_time, pdf_session_info.access_end_date_to_local_time ) }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if pdf_course_info %}
|
||||
<tr>
|
||||
<td style="background-color: #E5E5E5; text-align: left; width:130px;">
|
||||
<strong>{{ "Course"|get_lang }}</strong>
|
||||
</td>
|
||||
<td>
|
||||
{{ pdf_course_info.title }} ({{ pdf_course_info.code }})
|
||||
</td>
|
||||
</tr>
|
||||
{% if pdf_course_category %}
|
||||
<tr>
|
||||
<td><strong>{{ "Category"|get_lang }}</strong></td>
|
||||
<td> {{ pdf_course_category }} </td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if pdf_date %}
|
||||
<tr>
|
||||
<td style="background-color: #E5E5E5; text-align: left; width:130px;">
|
||||
<strong>{{ "Date"|get_lang }}</strong>
|
||||
</td>
|
||||
<td>
|
||||
{{ pdf_date }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
{% if extra_rows %}
|
||||
{% for row in extra_rows %}
|
||||
<tr>
|
||||
<td style="background-color: #E5E5E5; text-align: left; width:130px;">
|
||||
<strong>{{ row.label }}</strong>
|
||||
</td>
|
||||
<td>
|
||||
{{ row.content }}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</table>
|
||||
<br/>
|
||||
|
||||
{% if show_grade_generated_date == true %}
|
||||
<h5 align="right" class="generated_date">
|
||||
{{ 'GradeGeneratedOnX'|get_lang|format("now"| date("d/m/Y")) }}
|
||||
</h5>
|
||||
{% endif %}
|
||||
|
||||
{{ pdf_content }}
|
||||
|
||||
{% if not add_signatures is empty %}
|
||||
<br/>
|
||||
<br/>
|
||||
<table class="table">
|
||||
<tr>
|
||||
{% for signature in add_signatures %}
|
||||
<td class="text-center">
|
||||
_____________________________
|
||||
<br/>
|
||||
{{ signature|get_lang }}
|
||||
</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
8
main/template/default/extrafield/translate.tpl
Normal file
8
main/template/default/extrafield/translate.tpl
Normal file
@@ -0,0 +1,8 @@
|
||||
{{ form }}
|
||||
<script>
|
||||
$(document).on('ready', function () {
|
||||
$('select[name="sub_language"]').on('change', function () {
|
||||
location.href += '&sub_language=' + this.value;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
111
main/template/default/forum/global_list.tpl
Normal file
111
main/template/default/forum/global_list.tpl
Normal file
@@ -0,0 +1,111 @@
|
||||
{% extends 'layout/layout_1_col.tpl'|get_template %}
|
||||
{% block content %}
|
||||
|
||||
|
||||
{% if 'allow_forum_category_language_filter'|api_get_configuration_value %}
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
// default
|
||||
$('.category-forum ').hide();
|
||||
$('.{{ default_user_language }}').show();
|
||||
$('#extra_language').attr('data-width', '200px');
|
||||
$('#extra_language option[value=""]').text('{{ 'Any' | get_lang | escape('js') }}');
|
||||
$('#extra_language').on('change', function() {
|
||||
var selectedLanguageArray = $(this).val();
|
||||
$('.category-forum ').hide();
|
||||
$.each(selectedLanguageArray, function(index, selectedLanguage) {
|
||||
if (selectedLanguage == '') {
|
||||
$('.category-forum ').show();
|
||||
} else {
|
||||
$('.'+ selectedLanguage).show();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{{ form_content }}
|
||||
{{ search_filter }}
|
||||
|
||||
{% if data is not empty %}
|
||||
{% for item in data %}
|
||||
{% set category_language_array = [] %}
|
||||
{% set category_language = '' %}
|
||||
{% for extra_field in item.extra_fields %}
|
||||
{% if extra_field.variable == 'language' %}
|
||||
{% set category_language_array = extra_field.value | split(';') %}
|
||||
{% set category_language = extra_field.value | replace({';': ' ' }) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<div class="category-forum {{ category_language }}" id="category_{{ item.id }}">
|
||||
<div class="pull-right">
|
||||
{{ item.tools }}
|
||||
</div>
|
||||
<h3>
|
||||
{{ 'forum_blue.png'|img(32) }}
|
||||
<a href="{{ item.url }}" title="{{ item.title }}">{{ item.title }}{{ item.icon_session }}</a>
|
||||
{% for category_language_item in category_language_array %}
|
||||
<span class="flag-icon flag-icon-{{ languages[category_language_item | lower] }}"></span>
|
||||
{% endfor %}
|
||||
</h3>
|
||||
<div class="forum-description">
|
||||
{{ item.description }}
|
||||
</div>
|
||||
{% for subitem in item.forums %}
|
||||
<div class="forum_display">
|
||||
<div class="panel panel-default forum">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<div class="toolbar">
|
||||
{{ subitem.tools }}
|
||||
</div>
|
||||
</div>
|
||||
<h3 class="title">
|
||||
{{ 'forum_yellow.png'|img(32) }}
|
||||
<a href="{{ subitem.url }}" title="{{ subitem.title }}" class="{{ subitem.visibility != '1' ? 'text-muted': '' }}">{{ subitem.title }}</a>
|
||||
{% if subitem.forum_of_group != 0 %}
|
||||
<a class="forum-goto" href="../group/group_space.php?{{ _p.web_cid_query }}&gidReq={{ subitem.forum_of_group }}">
|
||||
{{ "forum.png"|img(22) }} {{ "GoTo"|get_lang }} {{ subitem.forum_group_title }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{{ subitem.icon_session }}
|
||||
</h3>
|
||||
{% if subitem.last_poster_id is not empty %}
|
||||
<div class="forum-date">
|
||||
<i class="fa fa-comments" aria-hidden="true"></i>
|
||||
{{ subitem.last_poster_date }}
|
||||
« {{ subitem.last_post_title }} »
|
||||
{{ "By"|get_lang }}
|
||||
{{ subitem.last_poster_user }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="description">
|
||||
{{ subitem.description }}
|
||||
</div>
|
||||
|
||||
{{ subitem.last_post_text }}
|
||||
|
||||
{{ subitem.alert }}
|
||||
{% if subitem.moderation is not empty %}
|
||||
<span class="label label-warning">
|
||||
{{ "PostsPendingModeration"|get_lang }}: {{ subitem.moderation }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="alert alert-warning">
|
||||
{{ 'NoForumInThisCategory'|get_lang }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
167
main/template/default/forum/list.tpl
Normal file
167
main/template/default/forum/list.tpl
Normal file
@@ -0,0 +1,167 @@
|
||||
{% import 'default/macro/macro.tpl' as display %}
|
||||
{% extends 'layout/layout_1_col.tpl'|get_template %}
|
||||
|
||||
{% block content %}
|
||||
{% if 'allow_forum_category_language_filter'|api_get_configuration_value %}
|
||||
<script>
|
||||
$(function () {
|
||||
// default
|
||||
$('.category-forum ').hide();
|
||||
|
||||
{% if default_user_language %}
|
||||
$('.{{ default_user_language }}').show();
|
||||
{% endif %}
|
||||
|
||||
$('#extra_language').attr('data-width', '200px');
|
||||
$('#extra_language option[value=""]').text('{{ 'Any' | get_lang | escape('js') }}');
|
||||
$('#extra_language').on('change', function() {
|
||||
var selectedLanguageArray = $(this).val();
|
||||
$('.category-forum ').hide();
|
||||
$.each(selectedLanguageArray, function(index, selectedLanguage) {
|
||||
if (selectedLanguage == '') {
|
||||
$('.category-forum ').show();
|
||||
} else {
|
||||
$('.'+ selectedLanguage).show();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
{{ form_content }}
|
||||
{{ search_filter }}
|
||||
|
||||
{% set fold_forum_categories = 'forum_fold_categories'|api_get_configuration_value %}
|
||||
|
||||
{% if data is not empty %}
|
||||
{% for item in data %}
|
||||
{% set category_language_array = [] %}
|
||||
{% set category_language = '' %}
|
||||
{% for extra_field in item.extra_fields %}
|
||||
{% if extra_field.variable == 'language' %}
|
||||
{% set category_language_array = extra_field.value | split(';') %}
|
||||
{% set category_language = extra_field.value | replace({';': ' ' }) %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if fold_forum_categories %}
|
||||
{% set panel_icon %}
|
||||
<a href="{{ item.url }}" title="{{ item.title | remove_xss }}">
|
||||
<span class="open">{{ 'forum_blue.png'|img(32) }}</span>
|
||||
</a>
|
||||
{% endset %}
|
||||
|
||||
{% set panel_title %}
|
||||
{{ item.title }}{{ item.icon_session }}
|
||||
{% for category_language_item in category_language_array %}
|
||||
<span class="flag-icon flag-icon-{{ languages[category_language_item | lower] }}"></span>
|
||||
{% endfor %}
|
||||
{% endset %}
|
||||
{% else %}
|
||||
{% set panel_title %}
|
||||
<a href="{{ item.url }}" title="{{ item.title }}">
|
||||
<span class="open">{{ 'forum_blue.png'|img(32) }}</span>
|
||||
{{ item.title | remove_xss }}
|
||||
{{ item.icon_session }}
|
||||
</a>
|
||||
{% for category_language_item in category_language_array %}
|
||||
<span class="flag-icon flag-icon-{{ languages[category_language_item | lower] }}"></span>
|
||||
{% endfor %}
|
||||
<div class="pull-right">
|
||||
{{ item.tools }}
|
||||
</div>
|
||||
{% endset %}
|
||||
{% endif %}
|
||||
|
||||
{% set panel_content %}
|
||||
<div class="forum-description">
|
||||
{{ item.description }}
|
||||
</div>
|
||||
{% for subitem in item.forums %}
|
||||
<div class="forum_display">
|
||||
<div class="panel panel-default forum">
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-4 col-md-3">
|
||||
<div class="number-post">
|
||||
<a href="{{ subitem.url }}" title="{{subitem.title}}">
|
||||
{% if subitem.forum_image is not empty %}
|
||||
<img src="{{ subitem.forum_image }}" width="48px">
|
||||
{% else %}
|
||||
{% if subitem.forum_of_group == 0 %}
|
||||
{{ 'forum_group.png'|img(48) }}
|
||||
{% else %}
|
||||
{{ 'forum.png'|img(48) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</a>
|
||||
<p>{{ 'ForumThreads'| get_lang }}: {{ subitem.number_threads }} </p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-8 col-md-9">
|
||||
<div class="pull-right">
|
||||
<div class="toolbar">
|
||||
{{ subitem.tools }}
|
||||
</div>
|
||||
</div>
|
||||
<h3 class="title">
|
||||
{{ 'forum_yellow.png'|img(32) }}
|
||||
<a
|
||||
href="{{ subitem.url }}"
|
||||
title="{{ subitem.title | remove_xss }}"
|
||||
class="{{ subitem.visibility != '1' ? 'text-muted': '' }}"
|
||||
>
|
||||
{{ subitem.title | remove_xss }}
|
||||
</a>
|
||||
{% if subitem.forum_of_group != 0 %}
|
||||
<a class="forum-goto" href="../group/group_space.php?{{ _p.web_cid_query }}&gidReq={{ subitem.forum_of_group }}">
|
||||
{{ "forum.png"|img(22) }} {{ "GoTo"|get_lang }} {{ subitem.forum_group_title }}
|
||||
</a>
|
||||
{% endif %}
|
||||
{{ subitem.icon_session }}
|
||||
</h3>
|
||||
{% if subitem.last_poster_id is not empty %}
|
||||
<div class="forum-date">
|
||||
<i class="fa fa-comments" aria-hidden="true"></i>
|
||||
{{ subitem.last_poster_date }}
|
||||
« {{ subitem.last_post_title }} »
|
||||
{{ "By"|get_lang }}
|
||||
{{ subitem.last_poster_user }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="description">
|
||||
{{ subitem.description | remove_xss }}
|
||||
</div>
|
||||
|
||||
{{ subitem.last_post_text }}
|
||||
{{ subitem.alert }}
|
||||
|
||||
{% if subitem.moderation is not empty %}
|
||||
<span class="label label-warning">
|
||||
{{ "PostsPendingModeration"|get_lang }}: {{ subitem.moderation }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endset %}
|
||||
|
||||
|
||||
<div class="category-forum {{ category_language }}" id="category_{{ item.id }}">
|
||||
{% if fold_forum_categories %}
|
||||
{{ display.collapse('category_' ~ item.id, panel_title, panel_content, false, fold_forum_categories, item.tools, panel_icon ) }}
|
||||
{% else %}
|
||||
{{ display.panel(panel_title, panel_content) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="alert alert-warning">
|
||||
{{ 'NoForumInThisCategory'|get_lang }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
69
main/template/default/forum/posts.tpl
Normal file
69
main/template/default/forum/posts.tpl
Normal file
@@ -0,0 +1,69 @@
|
||||
{% import 'default/macro/macro.tpl' as display %}
|
||||
{% extends 'layout/layout_1_col.tpl'|get_template %}
|
||||
|
||||
{% block content %}
|
||||
{% if origin == 'learnpath' %}
|
||||
<div style="height:15px"> </div>
|
||||
{% endif %}
|
||||
|
||||
{% if forum_actions %}
|
||||
<div class="actions">
|
||||
{{ forum_actions }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% for post in posts %}
|
||||
{% set post_data %}
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
{{ post.user_data }}
|
||||
</div>
|
||||
{% set highlight = '' %}
|
||||
{% if post.current %}
|
||||
{% set highlight = 'alert alert-danger' %}
|
||||
{% endif %}
|
||||
|
||||
{% set highlight_revision = '' %}
|
||||
{% if post.is_a_revision %}
|
||||
{% set highlight_revision = 'forum_revision' %}
|
||||
{% endif %}
|
||||
|
||||
<div class="col-md-10 {{ highlight }} ">
|
||||
{{ post.post_title }}
|
||||
|
||||
{% if post.is_a_revision %}
|
||||
{{ 'ProposedRevision' | get_lang }} {{ post.flag_revision }}
|
||||
{% endif %}
|
||||
|
||||
<div class="{{ highlight_revision }} ">
|
||||
{{ post.post_data }}
|
||||
</div>
|
||||
|
||||
{{ post.post_attachments }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4"></div>
|
||||
<div class="col-md-8 text-right">
|
||||
{{ post.post_buttons }}
|
||||
</div>
|
||||
</div>
|
||||
{% endset %}
|
||||
|
||||
{% if view_mode == 'nested' %}
|
||||
<div class="col-md-offset-{{ post.indent_cnt }} forum-post">
|
||||
{{ display.panel('', post_data) }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="col-md-12 forum-post">
|
||||
{{ display.panel('', post_data) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
{{ form }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
83
main/template/default/gamification/my_progress.tpl
Normal file
83
main/template/default/gamification/my_progress.tpl
Normal file
@@ -0,0 +1,83 @@
|
||||
<div class="my-progress row">
|
||||
<div class="col-md-3">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<div class="profile-user">
|
||||
{{ user_avatar }}
|
||||
<div class="username">{{ user.getCompleteName() }}</div>
|
||||
<div class="star-progress">
|
||||
<span class="pull-right">{{ 'XPoints'|get_lang|format(gamification_points) }}</span>
|
||||
|
||||
{% if gamification_stars > 0 %}
|
||||
{% for i in 1..gamification_stars %}
|
||||
<em class="fa fa-star"></em>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if 4 - gamification_stars > 0 %}
|
||||
{% for i in 1..(4 - gamification_stars) %}
|
||||
<em class="fa fa-star in"></em>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="progress">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="{{ gamification_progress }}" aria-valuemin="0" aria-valuemax="100" style="width: {{ gamification_progress }}%">
|
||||
<span class="sr-only">{{ gamification_progress }} Complete (success)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-percentage text-right">{{ 'XPercent'|get_lang|format(gamification_progress) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
{{ 'ShowProgress'|get_lang }}
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<ul class="list-course">
|
||||
{% for session in sessions %}
|
||||
<li><a href="{{ _p.self ~ '?' ~ {"session_id": session.getId}|url_encode() }}" class="list-course-item {{ current_session and session.getId == current_session.getId ? 'active' }}">
|
||||
<em class="fa fa-chevron-circle-right"></em> {{ session.getName }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9">
|
||||
{% if current_session %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><em class="fa fa-book"></em> {{ current_session.getName() }}</div>
|
||||
<div class="panel-body">
|
||||
{% for course_id, course in session_data %}
|
||||
<h3><img src="{{ 'session.png'|icon(32) }}"/> {{ course.title }}</h3>
|
||||
<div class="panel-group" id="course-accordion" role="tablist" aria-multiselectable="true">
|
||||
{% for stats_url in course.stats %}
|
||||
{% set panel_id = course_id ~ '-' ~ loop.index %}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab" id="heading-{{ panel_id }}">
|
||||
<h4 class="panel-title">
|
||||
<a role="button" data-toggle="collapse" data-parent="#course-accordion" href="#collapse-{{ panel_id }}" aria-expanded="true" aria-controls="collapse-{{ panel_id }}">
|
||||
{{ stats_url.0 }}
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse-{{ panel_id }}" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="heading-{{ panel_id }}">
|
||||
<div class="panel-body">
|
||||
<div class="embed-container">
|
||||
<iframe src="{{ _p.web_main ~ stats_url.1 }}"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
10
main/template/default/glossary/export_pdf.tpl
Normal file
10
main/template/default/glossary/export_pdf.tpl
Normal file
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<h2>{{ 'Glossary'|get_lang }}</h2>
|
||||
{% for item in items %}
|
||||
<h4>{{ item.0 }}</h4>
|
||||
{{ item.1 }}
|
||||
{% endfor %}
|
||||
</body>
|
||||
</html>
|
||||
121
main/template/default/glossary/glossary_auto.js.tpl
Normal file
121
main/template/default/glossary/glossary_auto.js.tpl
Normal file
@@ -0,0 +1,121 @@
|
||||
{% if add_ready %}
|
||||
$(document).ready(function() {
|
||||
$(window).on("load", function () {
|
||||
{% endif %}
|
||||
var my_text = $(".glossary-content").html();
|
||||
var ajaxRequestUrl = "{{ _p.web }}main/glossary/glossary_ajax_request.php?{{ _p.web_cid_query }}";
|
||||
var imageSource = "{{ _p.web }}main/inc/lib/javascript/indicator.gif";
|
||||
var indicatorImage ='<img src="' + imageSource + '" />';
|
||||
var termsArray = new Array(); // needed in this function for a wide scope
|
||||
var termsArrayCopy = new Array();
|
||||
|
||||
$.ajax({
|
||||
contentType: "application/x-www-form-urlencoded",
|
||||
beforeSend: function(content_object) {},
|
||||
type: "POST",
|
||||
url: ajaxRequestUrl,
|
||||
data: "glossary_data=true",
|
||||
success: function(datas) {
|
||||
if (datas.length==0) {
|
||||
return false;
|
||||
}
|
||||
// glossary terms
|
||||
data_terms=datas.split("[|.|_|.|-|.|]");
|
||||
var complex_array = new Array();
|
||||
var cp_complex_array = new Array();
|
||||
for(i=0;i<data_terms.length;i++) {
|
||||
specific_terms=data_terms[i].split("__|__|");
|
||||
var real_term = specific_terms[1]; // glossary term
|
||||
var real_code = specific_terms[0]; // glossary id
|
||||
termsArray[real_code] = real_term;
|
||||
termsArrayCopy[real_code] = real_term;
|
||||
}
|
||||
|
||||
termsArray.reverse();
|
||||
|
||||
for (var my_index in termsArray) {
|
||||
n = termsArray[my_index];
|
||||
if (n == null) {
|
||||
n = '';
|
||||
} else {
|
||||
for (var cp_my_index in termsArrayCopy) {
|
||||
cp_data = termsArrayCopy[cp_my_index];
|
||||
if (cp_data == null) {
|
||||
cp_data = '';
|
||||
} else {
|
||||
if (cp_data == n) {
|
||||
my_index = cp_my_index;
|
||||
}
|
||||
}
|
||||
}
|
||||
$('body').removeHighlight().highlight(n, my_index);
|
||||
}
|
||||
}
|
||||
|
||||
//mouse on click
|
||||
$("body").on("click", ".glossary-ajax", function(e) {
|
||||
random_id = Math.round(Math.random()*100);
|
||||
div_show_id = "div_show_id";
|
||||
div_content_id = "div_content_id";
|
||||
|
||||
$(this).append("<div id="+div_show_id+"><div id="+div_content_id+"> </div></div>");
|
||||
var $target = $(this);
|
||||
|
||||
//$("#"+div_show_id).dialog("destroy");
|
||||
$("#"+div_show_id).dialog({
|
||||
autoOpen: false,
|
||||
width: 600,
|
||||
height: 200,
|
||||
position: { my: 'left top', at: 'right top', of: $target },
|
||||
close: function(){
|
||||
$("div#"+div_show_id).remove();
|
||||
$("div#"+div_content_id).remove();
|
||||
}
|
||||
});
|
||||
|
||||
notebook_id = $(this).attr("name");
|
||||
data_notebook = notebook_id.split("link");
|
||||
my_glossary_id = data_notebook[1];
|
||||
|
||||
$.ajax({
|
||||
contentType: "application/x-www-form-urlencoded",
|
||||
beforeSend: function(content_object) {
|
||||
$("div#"+div_content_id).html(indicatorImage);
|
||||
},
|
||||
type: "POST",
|
||||
url: ajaxRequestUrl,
|
||||
data: "glossary_id="+my_glossary_id,
|
||||
success: function(datas) {
|
||||
$("div#"+div_content_id).html(datas);
|
||||
|
||||
// Make sure the dialog opens also with links to other
|
||||
// glossary terms
|
||||
for (var my_index in termsArray) {
|
||||
n = termsArray[my_index];
|
||||
if (n == null) {
|
||||
n = '';
|
||||
} else {
|
||||
for (var cp_my_index in termsArrayCopy) {
|
||||
cp_data = termsArrayCopy[cp_my_index];
|
||||
if (cp_data == null) {
|
||||
cp_data = '';
|
||||
} else {
|
||||
if (cp_data == n) {
|
||||
my_index = cp_my_index;
|
||||
}
|
||||
}
|
||||
}
|
||||
$("div#"+div_content_id).highlight(n, my_index);
|
||||
}
|
||||
}
|
||||
$("#"+div_show_id).dialog("open");
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
{% if add_ready %}
|
||||
});
|
||||
});
|
||||
|
||||
{% endif %}
|
||||
49
main/template/default/glossary/glossary_manual.js.tpl
Normal file
49
main/template/default/glossary/glossary_manual.js.tpl
Normal file
@@ -0,0 +1,49 @@
|
||||
var ajaxRequestUrl = "{{ _p.web }}main/glossary/glossary_ajax_request.php?{{ _p.web_cid_query }}";
|
||||
var imageSource = "{{ _p.web_main }}" + "inc/lib/javascript/indicator.gif";
|
||||
var indicatorImage ='<img src="' + imageSource + '" />';
|
||||
|
||||
{% if add_ready %}
|
||||
$(document).ready(function() {
|
||||
{% endif %}
|
||||
$("body").on("click", ".glossary", function() {
|
||||
is_glossary_name = $(this).html();
|
||||
random_id = Math.round(Math.random()*100);
|
||||
div_show_id = "div_show_id";
|
||||
div_content_id = "div_content_id";
|
||||
|
||||
var $target = $(this);
|
||||
var title = $target.text();
|
||||
|
||||
$(this).append("<div id="+div_show_id+" title="+title+" ><div id="+div_content_id+"> </div></div>");
|
||||
|
||||
|
||||
//$("#"+div_show_id).dialog("destroy");
|
||||
$("#"+div_show_id).dialog({
|
||||
autoOpen: false,
|
||||
width: 500,
|
||||
height: 'auto',
|
||||
position: { my: 'left top', at: 'right top', of: $target },
|
||||
close: function(){
|
||||
$("div#"+div_show_id).remove();
|
||||
$("div#"+div_content_id).remove();
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
contentType: "application/x-www-form-urlencoded",
|
||||
beforeSend: function(result) {
|
||||
$("div#"+div_content_id).html(indicatorImage);
|
||||
},
|
||||
type: "POST",
|
||||
url: ajaxRequestUrl,
|
||||
data: "glossary_name="+is_glossary_name,
|
||||
success: function(data) {
|
||||
$("div#"+div_content_id).html(data);
|
||||
$("#"+div_show_id).dialog("open");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
{% if add_ready %}
|
||||
});
|
||||
{% endif %}
|
||||
92
main/template/default/gradebook/certificate_report.tpl
Normal file
92
main/template/default/gradebook/certificate_report.tpl
Normal file
@@ -0,0 +1,92 @@
|
||||
<script>
|
||||
$(document).on('ready', function () {
|
||||
$('select#session').on('change', function () {
|
||||
var sessionId = parseInt(this.value, 10),
|
||||
$selectCourse = $('select#course');
|
||||
|
||||
$selectCourse.empty();
|
||||
|
||||
$.get('{{ _p.web_main }}inc/ajax/course.ajax.php', {
|
||||
a: 'display_sessions_courses',
|
||||
session: sessionId
|
||||
}, function (courseList) {
|
||||
$('<option>', {
|
||||
value: 0,
|
||||
text: "{{ 'Select' | get_lang }}"
|
||||
}).appendTo($selectCourse);
|
||||
|
||||
if (courseList.length > 0) {
|
||||
$.each(courseList, function (index, course) {
|
||||
$('<option>', {
|
||||
value: course.id,
|
||||
text: course.name
|
||||
}).appendTo($selectCourse);
|
||||
});
|
||||
}
|
||||
}, 'json');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
{{ search_by_session_form }}
|
||||
|
||||
<hr>
|
||||
|
||||
{{ search_form }}
|
||||
|
||||
{% if not certificate_students is empty %}
|
||||
<h2 class="page-header">{{ "GradebookListOfStudentsCertificates" | get_lang }}</h2>
|
||||
{% if not export_all_link is null %}
|
||||
<div class="actions">
|
||||
<a href="#" id="btn-export-all">
|
||||
{{ 'pdf.png'|img(32, 'ExportAllCertificatesToPDF'|get_lang) }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{{ export_all_link }}
|
||||
{% endif %}
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Student' | get_lang }}</th>
|
||||
<th>{{ 'Sesion' | get_lang }}</th>
|
||||
<th>{{ 'Course' | get_lang }}</th>
|
||||
<th>{{ 'Date' | get_lang }}</th>
|
||||
<th>{{ 'Certificate' | get_lang }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>{{ 'Student' | get_lang }}</th>
|
||||
<th>{{ 'Sesion' | get_lang }}</th>
|
||||
<th>{{ 'Course' | get_lang }}</th>
|
||||
<th>{{ 'Date' | get_lang }}</th>
|
||||
<th>{{ 'Certificate' | get_lang }}</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
{% for student in certificate_students %}
|
||||
<tr>
|
||||
<td>{{ student.fullName }}</td>
|
||||
<td>{{ student.sessionName }}</td>
|
||||
<td>{{ student.courseName }}</td>
|
||||
<td>
|
||||
{% for certificate in student.certificates %}
|
||||
<p>{{ certificate.createdAt }}</p>
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>
|
||||
{% for certificate in student.certificates %}
|
||||
<a href="{{ _p.web }}certificates/index.php?id={{ certificate.id }}" class="btn btn-default">
|
||||
<em class="fa fa-floppy-o"></em> {{ 'Certificate' | get_lang }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<p class="alert alert-info">{{ 'NoResults' | get_lang }}</p>
|
||||
{% endif %}
|
||||
102
main/template/default/gradebook/custom_certificate.tpl
Normal file
102
main/template/default/gradebook/custom_certificate.tpl
Normal file
@@ -0,0 +1,102 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ 'Certificate' | get_lang }}</title>
|
||||
</head>
|
||||
<body>
|
||||
<table border="0" bgcolor="#92c647" cellpadding="0" cellspacing="0" align="center" width="80%">
|
||||
<tr>
|
||||
<td bgcolor="#92c647"><img src="{{ _p.web_css_theme }}images/header_top.png" style="display: block;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
||||
<tr>
|
||||
<td bgcolor="#92c647" width=58 height=91>
|
||||
<img src="{{ _p.web_css_theme }}images/lado-b.png" style="display:block;">
|
||||
</td>
|
||||
<td bgcolor="#92c647" width=700 height=91 style="font-family:CourierSans-Light; font-weight: bold; line-height: 47px; color:#FFF; padding-bottom: 10px; font-size: 45px;">
|
||||
{{ 'CertificateHeader' | get_lang }}
|
||||
</td>
|
||||
<td bgcolor="#92c647" width=58 height=91>
|
||||
<img src="{{ _p.web_css_theme }}images/lado-header.png" style="display:block;">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table bgcolor="#FFFFFF" border="0" cellspacing="0" cellpadding="0" width="100%" height=900>
|
||||
<tr>
|
||||
<td bgcolor="#92c647" height=755><img src="{{ _p.web_css_theme }}images/lado-a.png" style="display:block;"></td>
|
||||
<td height=755 style="font-family:CourierSans-Light; line-height: 22px; color:#40ad49; padding: 40px; font-size: 18px;" valign="top">
|
||||
<h3 style="color: #672290; font-size: 24px;">
|
||||
{{ complete_name }}
|
||||
</h3>
|
||||
<p style="font-size: 16px;">
|
||||
{{ 'UserHasParticipateDansDePlatformeXTheContratDateXCertificateDateXTimeX' | get_lang | format(_s.site_name, certificate_generated_date_no_time, terms_validation_date_no_time, time_in_platform_in_hours)}}
|
||||
</p>
|
||||
<br />
|
||||
<p style="font-size: 16px;">{{ 'ThisTrainingHasXHours' | get_lang | format(time_in_platform_in_hours)}}</p><br />
|
||||
<p style="font-size: 16px;">
|
||||
{{ 'TimeSpentInLearningPaths' | get_lang }} : {{ time_spent_in_lps }}
|
||||
</p>
|
||||
<br />
|
||||
<p style="font-size: 16px;">{{ 'TheContentsAreValidated' | get_lang }}:</p>
|
||||
{#{% if sessions %}#}
|
||||
{#<ul style="color: #672290; font-size: 16px;">#}
|
||||
{#{% for session in sessions %}#}
|
||||
{#<li> {{ session.session_name }}</li>#}
|
||||
{#{% endfor %}#}
|
||||
{#</ul>#}
|
||||
{#{% endif %}#}
|
||||
{% if courses %}
|
||||
<ul style="color: #672290; font-size: 16px;">
|
||||
{% for course in courses %}
|
||||
<li>{{ course }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<br />
|
||||
|
||||
{% if skills %}
|
||||
<h4 style="color: #672290; font-size: 16px;">{{ complete_name }}</h4>
|
||||
<p style="color:#40ad49; font-size: 16px;">{{ 'SkillsValidated' | get_lang }}:</p>
|
||||
<ul style="color: #672290; font-size: 16px;">
|
||||
{% for skill in skills %}
|
||||
<li>{{ skill.name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<br />
|
||||
{% endif %}
|
||||
|
||||
<p style="color:#40ad49; font-size: 16px;">Berlin/Paris, {{ 'The' | get_lang }} <span style="font-weight: bold; color: #672290;">{{ certificate_generated_date_no_time }}</span><br />
|
||||
{{ 'ThePlatformTeam' | get_lang }}</p>
|
||||
<br />
|
||||
</td>
|
||||
<td height=755 bgcolor="#92c647">
|
||||
<img src="{{ _p.web_css_theme }}images/lado-b.png" style="display:block;">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table border="0" cellspacing="0" cellpadding="0" width="100%" height=91>
|
||||
<tr>
|
||||
<td bgcolor="#92c647" width=58 height=91><img src="{{ _p.web_css_theme }}images/lado-b.png" style="display:block;"></td>
|
||||
<td bgcolor="#92c647" width=500 height=91 style="font-family:CourierSans-Light; line-height: 18px; color:#FFF;">
|
||||
{{ 'CertificateFooter' | get_lang }}
|
||||
</td>
|
||||
<td bgcolor="#92c647" width=245 height=91><img src="{{ _p.web_css_theme }}images/lado-footer.png" style="display:block;"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
81
main/template/default/gradebook/my_certificates.tpl
Normal file
81
main/template/default/gradebook/my_certificates.tpl
Normal file
@@ -0,0 +1,81 @@
|
||||
{% if course_list is not empty %}
|
||||
<h2 class="page-header">{{ "Courses"|get_lang }}</h2>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ "Course"|get_lang }}</th>
|
||||
<th class="text-right">{{ "Score"|get_lang }}</th>
|
||||
<th class="text-center">{{ "Date"|get_lang }}</th>
|
||||
<th width="10%" class="text-right"> </th>
|
||||
<th width="10%" class="text-right"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in course_list %}
|
||||
<tr>
|
||||
<td>{{ row.course }}</td>
|
||||
<td class="text-right">{{ row.score }}</td>
|
||||
<td class="text-center">{{ row.date }}</td>
|
||||
|
||||
{% if allow_export %}
|
||||
<td class="text-right">
|
||||
<a href="{{ row.pdf }}" target="_blank" class="btn btn-primary btn-block">
|
||||
<i class="fa fa-file-pdf-o" aria-hidden="true"></i>
|
||||
{{ 'DownloadCertificatePdf'|get_lang }}
|
||||
</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
||||
<td class="text-right">
|
||||
<a href="{{ row.link }}" target="_blank" class="btn btn-default btn-block">
|
||||
<em class="fa fa-external-link"></em> {{ 'Certificate'|get_lang }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if session_list is not empty %}
|
||||
<h2 class="page-header">{{ "Sessions"|get_lang }}</h2>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ "Session"|get_lang }}</th>
|
||||
<th>{{ "Course"|get_lang }}</th>
|
||||
<th class="text-right">{{ "Score"|get_lang }}</th>
|
||||
<th class="text-center">{{ "Date"|get_lang }}</th>
|
||||
<th width="10%" class="text-right"> </th>
|
||||
<th width="10%" class="text-right"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in session_list %}
|
||||
<tr>
|
||||
<td>{{ row.session }}</td>
|
||||
<td>{{ row.course }}</td>
|
||||
<td class="text-right">{{ row.score }}</td>
|
||||
<td class="text-center">{{ row.date }}</td>
|
||||
{% if allow_export %}
|
||||
<td class="text-right">
|
||||
<a href="{{ row.pdf }}" target="_blank" class="btn btn-primary btn-block">
|
||||
<i class="fa fa-file-pdf-o" aria-hidden="true"></i>
|
||||
{{ 'DownloadCertificatePdf'|get_lang }}
|
||||
</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
<td class="text-right">
|
||||
<a href="{{ row.link }}" target="_blank" class="btn btn-default btn-block">
|
||||
<em class="fa fa-external-link"></em> {{ 'Certificate'|get_lang }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
96
main/template/default/gradebook/search.tpl
Normal file
96
main/template/default/gradebook/search.tpl
Normal file
@@ -0,0 +1,96 @@
|
||||
{{ search_form }}
|
||||
|
||||
{% if user_list is not empty %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ "FirstName"|get_lang }}</th>
|
||||
<th>{{ "LastName"|get_lang }}</th>
|
||||
<th class="text-right"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for user in user_list %}
|
||||
<tr>
|
||||
<td>{{ user.firstname }}</td>
|
||||
<td>{{ user.lastname }}</td>
|
||||
<td class="text-right">
|
||||
<a href="{{ _p.web_main }}gradebook/search.php?id={{ user.id }}" class="btn btn-default">
|
||||
<em class="fa fa-external-link"></em> {{ "Certificates"|get_lang }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if course_list is not empty or session_list is not empty %}
|
||||
<h2>{{ user_info.complete_name }}</h2>
|
||||
|
||||
{% if course_list is not empty %}
|
||||
<h3 class="page-header">{{ "Courses"|get_lang }}</h3>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ "Course"|get_lang }}</th>
|
||||
<th class="text-right">{{ "Score"|get_lang }}</th>
|
||||
<th class="text-center">{{ "Date"|get_lang }}</th>
|
||||
<th class="text-right"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in course_list %}
|
||||
<tr>
|
||||
<td>{{ row.course }}</td>
|
||||
<td class="text-right">{{ row.score }}</td>
|
||||
<td class="text-center">{{ row.date }}</td>
|
||||
<td class="text-right">
|
||||
<a href="{{ row.link }}" target="_blank" class="btn btn-default">
|
||||
<em class="fa fa-external-link"></em> {{ 'Certificate'|get_lang }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if session_list is not empty %}
|
||||
<h3 class="page-header">{{ "Sessions"|get_lang }}</h3>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ "Session"|get_lang }}</th>
|
||||
<th>{{ "Course"|get_lang }}</th>
|
||||
<th class="text-right">{{ "Score"|get_lang }}</th>
|
||||
<th class="text-center">{{ "Date"|get_lang }}</th>
|
||||
<th class="text-right"> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in session_list %}
|
||||
<tr>
|
||||
<td>{{ row.session }}</td>
|
||||
<td>{{ row.course }}</td>
|
||||
<td class="text-right">{{ row.score }}</td>
|
||||
<td class="text-center">{{ row.date }}</td>
|
||||
<td class="text-right">
|
||||
<a href="{{ row.link }}" target="_blank" class="btn btn-default">
|
||||
<em class="fa fa-external-link"></em> {{ 'Certificate'|get_lang }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
69
main/template/default/gradebook/skill_rel_user.tpl
Normal file
69
main/template/default/gradebook/skill_rel_user.tpl
Normal file
@@ -0,0 +1,69 @@
|
||||
<div {{ html_content_extra_class }}>
|
||||
<h3>{{ user.complete_name_with_username }}</h3>
|
||||
<br />
|
||||
<script>
|
||||
$(function() {
|
||||
$(".assign_user_to_skill").on("click", function() {
|
||||
var skillId = $(this).attr('data-skill-id');
|
||||
var link = $(this);
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
async: false,
|
||||
url: "{{ assign_user_url }}&skill_id="+skillId+"&user_id={{ user.id }}&course_id={{ course_id }}&session_id={{ session_id }}",
|
||||
success: function(result) {
|
||||
link.removeClass('btn-danger');
|
||||
link.removeClass('btn-success');
|
||||
if (result == 'danger') {
|
||||
link.addClass('btn-danger');
|
||||
link.html('{{ 'NotYetAchieved' | get_lang }}');
|
||||
} else {
|
||||
link.addClass('btn-success');
|
||||
link.html('{{ 'Achieved' | get_lang }}');
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>{{ 'Skill' | get_lang }}</th>
|
||||
<th>{{ 'Occurrences' | get_lang }}</th>
|
||||
<th>{{ 'Conclusion' | get_lang }}</th>
|
||||
</tr>
|
||||
|
||||
{% for skill in skills %}
|
||||
<tr>
|
||||
<td>{{ skill.name }}</td>
|
||||
<td>
|
||||
{% for item in items[skill.id] %}
|
||||
{% set status = 'danger' %}
|
||||
{% if item.info.status %}
|
||||
{% set status = 'success' %}
|
||||
{% endif %}
|
||||
<span class="label label-{{ status }}">
|
||||
<a href="{{ item.info.url_activity }}" target="_blank">
|
||||
{{ item.info.name }}
|
||||
</a>
|
||||
</span>
|
||||
{% endfor %}
|
||||
</td>
|
||||
<td>
|
||||
{% set class = 'danger' %}
|
||||
{% set text = 'NotYetAchieved' %}
|
||||
|
||||
{% if conclusion_list[skill.id] %}
|
||||
{% set class = 'success' %}
|
||||
{% set text = 'Achieved' %}
|
||||
{% endif %}
|
||||
|
||||
<a data-skill-id="{{ skill.id }}" href="javascript:void(0);" class="assign_user_to_skill btn btn-{{ class }}">
|
||||
{{ text | get_lang }}
|
||||
</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
154
main/template/default/javascript/editor/ckeditor/config_js.tpl
Normal file
154
main/template/default/javascript/editor/ckeditor/config_js.tpl
Normal file
@@ -0,0 +1,154 @@
|
||||
/* Ckeditor global configuration file */
|
||||
|
||||
CKEDITOR.editorConfig = function (config) {
|
||||
// Define changes to default configuration here.
|
||||
// For complete reference see:
|
||||
// http://docs.ckeditor.com/#!/api/CKEDITOR.config
|
||||
|
||||
// Remove some buttons provided by the standard plugins, which are
|
||||
// not needed in the Standard(s) toolbar.
|
||||
//config.removeButtons = 'Underline,Subscript,Superscript';
|
||||
|
||||
// Set the most common block elements.
|
||||
config.format_tags = 'p;h1;h2;h3;h4;h5;h6;pre';
|
||||
|
||||
// Simplify the dialog windows.
|
||||
config.removeDialogTabs = 'image:advanced;link:advanced';
|
||||
|
||||
config.templates_files = [
|
||||
'{{ _p.web_main ~ 'inc/lib/elfinder/templates.php'}}'
|
||||
];
|
||||
//Style for default CKEditor Chamilo LMS
|
||||
config.stylesSet = [
|
||||
{
|
||||
name : 'Title 1',
|
||||
element : 'h1',
|
||||
attributes : { 'class': 'ck ck-title' }
|
||||
},
|
||||
{
|
||||
name : 'Title 2',
|
||||
element : 'h2',
|
||||
attributes : { 'class': 'ck ck-title2' }
|
||||
},
|
||||
{
|
||||
name : 'Alert Success',
|
||||
element : 'div',
|
||||
attributes : { 'class': 'alert alert-success' }
|
||||
},
|
||||
{
|
||||
name : 'Alert Info',
|
||||
element : 'div',
|
||||
attributes : { 'class': 'alert alert-info' }
|
||||
},
|
||||
{
|
||||
name : 'Alert Warning',
|
||||
element : 'div',
|
||||
attributes : { 'class': 'alert alert-warning' }
|
||||
},
|
||||
{
|
||||
name : 'Alert Danger',
|
||||
element : 'div',
|
||||
attributes : { 'class': 'alert alert-danger' }
|
||||
},
|
||||
{
|
||||
name : 'Section Article' ,
|
||||
element : 'h3' ,
|
||||
attributes : { 'class': 'ck ck-article' }
|
||||
}, {
|
||||
name : 'Paragraph box' ,
|
||||
element : 'p' ,
|
||||
attributes: { 'class': 'ck-paragraph-box' }
|
||||
}, {
|
||||
name : 'Superscript' ,
|
||||
element : 'sup'
|
||||
},
|
||||
{
|
||||
name : 'Subscript' ,
|
||||
element : 'sub'
|
||||
},
|
||||
{
|
||||
name : 'Strikethrough' ,
|
||||
element : 'del'
|
||||
},
|
||||
{
|
||||
name : 'Underlined' ,
|
||||
element : 'ins'
|
||||
},
|
||||
{
|
||||
name : 'Stand Out' ,
|
||||
element : 'span',
|
||||
attributes: { 'class':'ck-stand-out'}
|
||||
},
|
||||
{
|
||||
name : 'Separate Style 1' ,
|
||||
element : 'hr',
|
||||
attributes: { 'class':'ck-style1'}
|
||||
},
|
||||
{
|
||||
name : 'Separate Style 2' ,
|
||||
element : 'hr',
|
||||
attributes: { 'class':'ck-style2'}
|
||||
},
|
||||
{
|
||||
name : 'Separate Style 3' ,
|
||||
element : 'hr',
|
||||
attributes: { 'class':'ck-style3'}
|
||||
}
|
||||
];
|
||||
|
||||
{% if moreButtonsInMaximizedMode %}
|
||||
config.toolbar = 'minToolbar';
|
||||
config.smallToolbar = 'minToolbar';
|
||||
config.maximizedToolbar = 'maxToolbar';
|
||||
{% endif %}
|
||||
|
||||
// File manager (elFinder)
|
||||
config.filebrowserBrowseUrl = '{{ _p.web_lib ~ 'elfinder/filemanager.php?' }}{{ course_condition }}';
|
||||
config.videobrowserBrowseUrl = '{{ _p.web_lib ~ 'elfinder/filemanager.php?' }}{{ course_condition }}';
|
||||
|
||||
{% if enter_mode %}
|
||||
config.enterMode = {{ enter_mode }};
|
||||
{% endif %}
|
||||
|
||||
// Allows to use "class" attribute inside divs and spans.
|
||||
config.allowedContent = true;
|
||||
// Option to set the "styles" menu
|
||||
config.contentsCss = [
|
||||
'{{ bootstrap_css }}',
|
||||
'{{ font_awesome_css }}',
|
||||
'{{ css_editor }}',
|
||||
];
|
||||
|
||||
config.language_list = ['{{ language_list }}'];
|
||||
|
||||
config.qMarkersRollsUrl = '{{ _p.web_ajax }}exercise.ajax.php?a=get_quiz_embeddable';
|
||||
|
||||
var videoTypesMap = {
|
||||
dailymotion: 'DailyMotion',
|
||||
facebook: 'Facebook',
|
||||
twitch: 'Twitch',
|
||||
vimeo: 'Vimeo',
|
||||
youtube: 'YouTube'
|
||||
};
|
||||
config.videoTypes = [
|
||||
[ 'MP4', 'video/mp4' ],
|
||||
[ 'WebM', 'video/webm' ],
|
||||
];
|
||||
{% set video_renderers = 'video_player_renderers'|api_get_configuration_value %}
|
||||
{% if video_renderers and video_renderers.renderers %}
|
||||
{{ video_renderers.renderers|json_encode }}.forEach(function(rendererName) {
|
||||
if (videoTypesMap.hasOwnProperty(rendererName)) {
|
||||
config.videoTypes.push( [videoTypesMap[rendererName], 'video/' + rendererName] );
|
||||
}
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
config.font_names = "{{ font_names }}";
|
||||
};
|
||||
|
||||
// Sets default target to "_blank" in link plugin
|
||||
CKEDITOR.on('dialogDefinition', function (ev) {
|
||||
if (ev.data.name == 'link'){
|
||||
ev.data.definition.getContents('target').get('linkTargetType')['default']='_blank';
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,5 @@
|
||||
{% extends 'layout/no_layout.tpl'|get_template %}
|
||||
|
||||
{% block body %}
|
||||
{% include 'javascript/editor/elfinder_standalone.tpl'|get_template %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,6 @@
|
||||
CKEDITOR.addTemplates("default",
|
||||
{
|
||||
imagesPath: ' ',
|
||||
templates:
|
||||
{{ templates }}
|
||||
});
|
||||
@@ -0,0 +1,43 @@
|
||||
{% set finderFolder = _p.web ~ 'vendor/studio-42/elfinder/' %}
|
||||
<!-- elFinder CSS (REQUIRED) -->
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="{{ finderFolder }}css/elfinder.full.css">
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="{{ finderFolder }}css/theme.css">
|
||||
|
||||
<!-- elFinder JS (REQUIRED) -->
|
||||
<script type="text/javascript" src="{{ finderFolder }}js/elfinder.full.js"></script>
|
||||
|
||||
<!-- elFinder translation (OPTIONAL) -->
|
||||
{{ elfinder_translation_file }}
|
||||
|
||||
<script charset="utf-8">
|
||||
// Helper function to get parameters from the query string.
|
||||
function getUrlParam(paramName) {
|
||||
var reParam = new RegExp('(?:[\?&]|&)' + paramName + '=([^&]+)', 'i');
|
||||
var match = window.location.search.match(reParam);
|
||||
return (match && match.length > 1) ? match[1] : '';
|
||||
}
|
||||
|
||||
$().ready(function() {
|
||||
var funcNum = getUrlParam('CKEditorFuncNum');
|
||||
var elf = $('#elfinder').elfinder({
|
||||
url : '{{ _p.web_lib ~ 'elfinder/connectorAction.php?' }}{{ course_condition }}', // connector URL (REQUIRED)
|
||||
getFileCallback : function(file) {
|
||||
if (window.opener) {
|
||||
if (window.opener.CKEDITOR) {
|
||||
window.opener.CKEDITOR.tools.callFunction(funcNum, file.url);
|
||||
}
|
||||
|
||||
if (window.opener.addImageToQuestion) {
|
||||
window.opener.addImageToQuestion(file.url, {{ question_id }});
|
||||
}
|
||||
}
|
||||
|
||||
window.close();
|
||||
},
|
||||
startPathHash: 'l2_Lw', // Sets the course driver as default
|
||||
resizable: false,
|
||||
lang: '{{ elfinder_lang }}'
|
||||
}).elfinder('instance');
|
||||
});
|
||||
</script>
|
||||
<div id="elfinder"></div>
|
||||
16
main/template/default/layout/blank.tpl
Normal file
16
main/template/default/layout/blank.tpl
Normal file
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<!--[if lt IE 7]> <html lang="{{document_language}}" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
||||
<!--[if IE 7]> <html lang="{{document_language}}" class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
||||
<!--[if IE 8]> <html lang="{{document_language}}" class="no-js lt-ie9"> <![endif]-->
|
||||
<!--[if gt IE 8]><!--><html lang="{{document_language}}" class="no-js"> <!--<![endif]-->
|
||||
<head>
|
||||
{% include 'layout/head.tpl'|get_template %}
|
||||
</head>
|
||||
<body dir="{{text_direction}}" class="{{section_name}}">
|
||||
<div class="page-blank">
|
||||
{% block content %}
|
||||
{{ content }}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
15
main/template/default/layout/blank_no_header.tpl
Normal file
15
main/template/default/layout/blank_no_header.tpl
Normal file
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<!--[if lt IE 7]> <html lang="{{document_language}}" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
||||
<!--[if IE 7]> <html lang="{{document_language}}" class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
||||
<!--[if IE 8]> <html lang="{{document_language}}" class="no-js lt-ie9"> <![endif]-->
|
||||
<!--[if gt IE 8]><!--><html lang="{{document_language}}" class="no-js"> <!--<![endif]-->
|
||||
<head>
|
||||
</head>
|
||||
<body dir="{{text_direction}}" class="{{section_name}}">
|
||||
<div class="page-blank">
|
||||
{% block content %}
|
||||
{{ content }}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
8
main/template/default/layout/course_navigation.tpl
Normal file
8
main/template/default/layout/course_navigation.tpl
Normal file
@@ -0,0 +1,8 @@
|
||||
{# Course navigation icons - these are two optional features that have to be enabled through admin settings #}
|
||||
{% if show_header == true %}
|
||||
{% if show_course_navigation_menu is not null %}
|
||||
<div class="nav-tools">
|
||||
{{ show_course_navigation_menu }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
30
main/template/default/layout/head.tpl
Normal file
30
main/template/default/layout/head.tpl
Normal file
@@ -0,0 +1,30 @@
|
||||
<meta charset="{{ system_charset }}" />
|
||||
<link href="https://chamilo.org/chamilo-lms/" rel="help" />
|
||||
<link href="https://chamilo.org/the-association/" rel="author" />
|
||||
<link href="https://www.gnu.org/licenses/gpl-3.0.en.html" rel="license" />
|
||||
<!-- Force latest IE rendering engine or ChromeFrame if installed -->
|
||||
<!--[if IE]>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<![endif]-->
|
||||
{{ prefetch }}
|
||||
{{ favico }}
|
||||
<link rel="apple-touch-icon" href="{{ _p.web }}apple-touch-icon.png" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="generator" content="{{ _s.software_name }} {{ _s.system_version|slice(0,1) }}" />
|
||||
{# Use the latest engine in ie8/ie9 or use google chrome engine if available #}
|
||||
{# Improve usability in portal devices #}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ title_string }}</title>
|
||||
{{ social_meta }}
|
||||
{{ css_static_file_to_string }}
|
||||
{{ js_file_to_string }}
|
||||
{{ extra_headers }}
|
||||
|
||||
{% if _s.language_interface %}
|
||||
<script src="{{ _p.web }}web/build/main.{{ _s.language_interface }}.js"></script>
|
||||
{% else %}{# language_interface *should* always be defined, so we should never come here #}
|
||||
<script src="{{ _p.web }}web/build/main.js"></script>
|
||||
{% endif %}
|
||||
|
||||
{{ css_custom_file_to_string }}
|
||||
{{ css_style_print }}
|
||||
56
main/template/default/layout/hot_course_item.tpl
Normal file
56
main/template/default/layout/hot_course_item.tpl
Normal file
@@ -0,0 +1,56 @@
|
||||
{% for item in hot_courses %}
|
||||
{% if item.title %}
|
||||
<div class="col-xs-12 col-sm-6 col-md-4">
|
||||
<div class="items items-hotcourse">
|
||||
<div class="image">
|
||||
{% set title %}
|
||||
<a title="{{ item.title}}" href="{{ _p.web }}course/{{ item.real_id }}/about">
|
||||
<img src="{{ item.course_image_large }}" class="img-responsive" alt="{{ item.title }}">
|
||||
</a>
|
||||
{% endset %}
|
||||
{{ title | remove_xss }}
|
||||
|
||||
{% if item.categoryName != '' %}
|
||||
<span class="category">{{ item.categoryName }}</span>
|
||||
<div class="cribbon"></div>
|
||||
{% endif %}
|
||||
<div class="user-actions">{{ item.description_button }}</div>
|
||||
</div>
|
||||
<div class="description">
|
||||
<div class="block-title">
|
||||
{% set title %}
|
||||
<h5 class="title">
|
||||
{% if item.is_course_student or item.is_course_teacher %}
|
||||
<a alt="{{ item.title }}" title="{{ item.title }}" href="{{ _p.web }}courses/{{ item.directory }}/">
|
||||
{{ item.title_cut}}
|
||||
</a>
|
||||
{% else %}
|
||||
<a alt="{{ item.title }}" title="{{ item.title }}" href="{{ _p.web }}course/{{ item.real_id }}/about">
|
||||
{{ item.title_cut}}
|
||||
</a>
|
||||
{% endif %}
|
||||
</h5>
|
||||
{% endset %}
|
||||
{{ title | remove_xss }}
|
||||
</div>
|
||||
<div class="ranking">
|
||||
{{ item.rating_html }}
|
||||
</div>
|
||||
<div class="toolbar row">
|
||||
<div class="col-sm-4">
|
||||
{% if item.price %}
|
||||
{{ item.price }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="btn-group" role="group">
|
||||
{{ item.register_button }}
|
||||
{{ item.unsubscribe_button }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
23
main/template/default/layout/hot_course_item_popup.tpl
Normal file
23
main/template/default/layout/hot_course_item_popup.tpl
Normal file
@@ -0,0 +1,23 @@
|
||||
{% for hot_course in hot_courses %}
|
||||
{% if hot_course.extra_info.title %}
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="thumbnail">
|
||||
<img src="{{ hot_course.extra_info.course_image }}" alt="{{ hot_course.extra_info.title }}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<div class="categories-course-description">
|
||||
<h3>{{ hot_course.extra_info.title }}</h3>
|
||||
<h5>{{ hot_course.extra_info.teachers }}</h5>
|
||||
{# hot_course.extra_info.rating_html #}
|
||||
</div>
|
||||
<p>
|
||||
{{ hot_course.extra_info.description_button }}
|
||||
{{ hot_course.extra_info.go_to_course_button }}
|
||||
{{ hot_course.extra_info.register_button }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
23
main/template/default/layout/hot_courses.tpl
Normal file
23
main/template/default/layout/hot_courses.tpl
Normal file
@@ -0,0 +1,23 @@
|
||||
{% if hot_courses is not null and hot_courses is not empty %}
|
||||
<section class="hot-courses">
|
||||
<div class="page-header">
|
||||
<h4>
|
||||
{{ "HottestCourses"|get_lang}}
|
||||
{% if _u.is_admin %}
|
||||
<span class="pull-right">
|
||||
<a title="{{ "Hide"|get_lang }}"
|
||||
alt="{{ "Hide"|get_lang }}"
|
||||
href="{{ _p.web_main }}admin/settings.php?search_field=show_hot_courses&submit_button=&_qf__search_settings=&category=search_setting">
|
||||
<i class="fa fa-eye" aria-hidden="true"></i>
|
||||
</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
</h4>
|
||||
</div>
|
||||
<div id="list-hot-courses" class="grid-courses">
|
||||
<div class="row">
|
||||
{% include 'layout/hot_course_item.tpl'|get_template %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
47
main/template/default/layout/layout_1_col.tpl
Normal file
47
main/template/default/layout/layout_1_col.tpl
Normal file
@@ -0,0 +1,47 @@
|
||||
{% extends 'layout/page.tpl'|get_template %}
|
||||
|
||||
{% block body %}
|
||||
{% if plugin_main_top %}
|
||||
<div class="row">
|
||||
<div id="plugin_main_top" class="col-md-12">
|
||||
{{ plugin_main_top }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if plugin_content_top %}
|
||||
<div class="row">
|
||||
<div id="plugin_content_top" class="col-md-12">
|
||||
{{ plugin_content_top }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-12">
|
||||
{% include 'layout/page_body.tpl'|get_template %}
|
||||
{% block content %}
|
||||
{% if content is not null %}
|
||||
<section id="main_content">
|
||||
{{ content }}
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if plugin_content_bottom %}
|
||||
<div class="row">
|
||||
<div id="plugin_content_bottom" class="col-md-12">
|
||||
{{ plugin_content_bottom }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if plugin_main_bottom %}
|
||||
<div class="row">
|
||||
<div id="plugin_main_bottom" class="col-md-12">
|
||||
{{ plugin_main_bottom }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
173
main/template/default/layout/layout_2_col.tpl
Normal file
173
main/template/default/layout/layout_2_col.tpl
Normal file
@@ -0,0 +1,173 @@
|
||||
{% extends 'layout/page.tpl'|get_template %}
|
||||
{% import 'default/macro/macro.tpl' as display %}
|
||||
{% set sidebar_hide = 'sidebar_hide'|api_get_configuration_value %}
|
||||
|
||||
{% block body %}
|
||||
{% if plugin_main_top %}
|
||||
{{ display.pluginPanel('main-top', plugin_main_top) }}
|
||||
{% endif %}
|
||||
<div class="row">
|
||||
<div class="col-md-9 col-md-push-3">
|
||||
<div class="page-content">
|
||||
{% if plugin_content_top %}
|
||||
<div class="page-content-top">
|
||||
{{ plugin_content_top }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{{ sniff_notification }}
|
||||
|
||||
{% block page_body %}
|
||||
{% include 'layout/page_body.tpl'|get_template %}
|
||||
{% endblock %}
|
||||
|
||||
{% if home_welcome %}
|
||||
<article id="home-welcome">
|
||||
{{ home_welcome }}
|
||||
</article>
|
||||
{% endif %}
|
||||
|
||||
{% if home_include %}
|
||||
<article id="home-include">
|
||||
{{ home_include }}
|
||||
</article>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if welcome_to_course_block %}
|
||||
<article id="homepage-course">
|
||||
{{ welcome_to_course_block }}
|
||||
</article>
|
||||
{% endif %}
|
||||
|
||||
{% block content %}
|
||||
{% if content is not null %}
|
||||
<section id="page" class="{{ course_history_page }}">
|
||||
{{ content }}
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% if announcements_block %}
|
||||
<article id="homepage-announcements">
|
||||
{{ announcements_block }}
|
||||
</article>
|
||||
{% endif %}
|
||||
|
||||
{% if course_category_block %}
|
||||
<article id="homepage-course-category">
|
||||
{{ course_category_block }}
|
||||
</article>
|
||||
{% endif %}
|
||||
{% include 'layout/hot_courses.tpl'|get_template %}
|
||||
{% include 'session/sessions_current.tpl'|get_template %}
|
||||
{% if plugin_content_bottom %}
|
||||
<div id="plugin_content_bottom">
|
||||
{{ plugin_content_bottom }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-md-pull-9">
|
||||
<div class="sidebar">
|
||||
{% if plugin_menu_top %}
|
||||
{{ display.pluginSidebar('sidebar-top', plugin_menu_top) }}
|
||||
{% endif %}
|
||||
|
||||
{% include 'layout/login_form.tpl'|get_template %}
|
||||
|
||||
{% if not sidebar_hide %}
|
||||
|
||||
{% if _u.logged == 1 %}
|
||||
{{ user_image_block }}
|
||||
{% endif %}
|
||||
|
||||
<!-- BLOCK PROFILE -->
|
||||
{% if profile_block %}
|
||||
{{ display.collapseMenu('profile', 'Profile'|get_lang, profile_block) }}
|
||||
{% endif %}
|
||||
|
||||
<!-- BLOCK COURSE -->
|
||||
{% if course_block %}
|
||||
{{ display.collapseMenu('courses', 'Courses'|get_lang, course_block) }}
|
||||
{% endif %}
|
||||
|
||||
<!-- BLOCK SKILLS -->
|
||||
{% if skills_block %}
|
||||
{{ display.collapseMenu('skills', 'Skills'|get_lang, skills_block) }}
|
||||
{% endif %}
|
||||
|
||||
<!-- BLOCK WORK -->
|
||||
{% if student_publication_block %}
|
||||
{{ display.collapseMenu('student_publications', 'StudentPublications'|get_lang, student_publication_block) }}
|
||||
{% endif %}
|
||||
|
||||
{% if grade_book_sidebar %}
|
||||
<div class="panel-group" id="skill" role="tablist" aria-multiselectable="true">
|
||||
<div class="panel panel-default" id="gradebook_block">
|
||||
<div class="panel-heading" role="tab">
|
||||
<h4 class="panel-title">
|
||||
<a role="button" data-toggle="collapse"
|
||||
data-parent="#skill"
|
||||
href="#skillCollapse"
|
||||
aria-expanded="true"
|
||||
aria-controls="skillCollapse">
|
||||
{{ 'Gradebook' | get_lang }}
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div style="" aria-expanded="true" id="skillCollapse" class="panel-collapse collapse in" role="tabpanel">
|
||||
<div class="panel-body">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item {{ item.class }}">
|
||||
{{ 'Progress' | get_lang }} : {{ grade_book_progress }} %
|
||||
<br />
|
||||
{% for badge in grade_book_badge_list %}
|
||||
<div class="badge_sidebar">
|
||||
{% for skill in badge.skills %}
|
||||
{% if badge.finished %}
|
||||
<img class="badge_sidebar_image " src ="{{ skill.icon_big }}" />
|
||||
{% else %}
|
||||
<img class="badge_sidebar_image badge_sidebar_image_transparency"
|
||||
src = "{{ skill.icon_big }}" />
|
||||
{% endif %}
|
||||
<div class="badge_sidebar_title">
|
||||
{{ skill.name }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{{ certificates_search_block }}
|
||||
<!-- BLOCK NOTICE -->
|
||||
{% if notice_block %}
|
||||
{{ display.collapse('notice', 'Notice'|get_lang, notice_block) }}
|
||||
{% endif %}
|
||||
<!-- BLOCK HELP -->
|
||||
{% if help_block %}
|
||||
{{ display.collapse('help', 'MenuGeneral'|get_lang, help_block, true) }}
|
||||
{% endif %}
|
||||
<!-- BLOCK LINKS NAVIGATION -->
|
||||
{% if navigation_links %}
|
||||
{{ display.collapseFor('navigation_sidebar', 'MainNavigation'|get_lang, navigation_links) }}
|
||||
{% endif %}
|
||||
{{ search_block }}
|
||||
{{ classes_block }}
|
||||
|
||||
{% if plugin_menu_bottom %}
|
||||
{{ display.pluginSidebar('sidebar-bottom', plugin_menu_bottom) }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if plugin_main_bottom %}
|
||||
{{ display.pluginPanel('main-bottom', plugin_main_bottom) }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
21
main/template/default/layout/layout_3_col.tpl
Normal file
21
main/template/default/layout/layout_3_col.tpl
Normal file
@@ -0,0 +1,21 @@
|
||||
{% extends 'layout/page.tpl'|get_template %}
|
||||
{% block body %}
|
||||
<div id="maincontent" class="maincontent">
|
||||
{{ plugin_courses_block }}
|
||||
{{ home_page_block }}
|
||||
{{ message }}
|
||||
{{ content }}
|
||||
{{ announcements_block }}
|
||||
</div>
|
||||
<div id="menu-wrapper">
|
||||
{{ login_block }}
|
||||
{{ profile_block }}
|
||||
{{ account_block }}
|
||||
{{ teacher_block }}
|
||||
{{ notice_block }}
|
||||
{{ navigation_course_links }}
|
||||
{{ plugin_courses_right_block }}
|
||||
{{ search_block }}
|
||||
{{ classes_block }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
42
main/template/default/layout/login_form.tpl
Normal file
42
main/template/default/layout/login_form.tpl
Normal file
@@ -0,0 +1,42 @@
|
||||
{% if _u.logged == 0 %}
|
||||
{% if login_form %}
|
||||
<div id="login-block" class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
{{ login_language_form }}
|
||||
{% if plugin_login_top is not null %}
|
||||
<div id="plugin_login_top">
|
||||
{{ plugin_login_top }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{{ login_failed }}
|
||||
{{ login_form }}
|
||||
|
||||
{% if "allow_lostpassword" | api_get_setting == 'true' or "allow_registration" | api_get_setting == 'true' %}
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
{% if "allow_registration" | api_get_setting != 'false' %}
|
||||
<li><a href="{{ _p.web_main }}auth/inscription.php"> {{ 'SignUp' | get_lang }} </a></li>
|
||||
{% endif %}
|
||||
|
||||
{% if "allow_lostpassword" | api_get_setting == 'true' %}
|
||||
{% set pass_reminder_link = 'pass_reminder_custom_link'|api_get_configuration_value %}
|
||||
{% set lost_password_link = _p.web_main ~ 'auth/lostPassword.php' %}
|
||||
|
||||
{% if not pass_reminder_link is empty %}
|
||||
{% set lost_password_link = pass_reminder_link %}
|
||||
{% endif %}
|
||||
|
||||
<li><a href="{{ lost_password_link }}"> {{ 'LostPassword' | get_lang }} </a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if plugin_login_bottom is not null %}
|
||||
<div id="plugin_login_bottom">
|
||||
{{ plugin_login_bottom }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
930
main/template/default/layout/main.js.tpl
Normal file
930
main/template/default/layout/main.js.tpl
Normal file
@@ -0,0 +1,930 @@
|
||||
|
||||
var ajax_url = _p.web_ajax + 'chat.ajax.php';
|
||||
var online_button = '<img src="' + _p.web_img + 'statusonline.png">';
|
||||
var offline_button = '<img src="' + _p.web_img + 'statusoffline.png">';
|
||||
var connect_lang = '{{ "ChatConnected"|get_lang | escape('js')}}';
|
||||
var disconnect_lang = '{{ "ChatDisconnected"|get_lang | escape('js')}}';
|
||||
var chatLang = '{{ "GlobalChat"|get_lang | escape('js')}}';
|
||||
var sessionRemainingSeconds = 0;
|
||||
var sessionCounterInterval;
|
||||
var sessionClosing = false;
|
||||
|
||||
{% if 'hide_chat_video'|api_get_configuration_value %}
|
||||
var hide_chat_video = true;
|
||||
{% else %}
|
||||
var hide_chat_video = false;
|
||||
{% endif %}
|
||||
|
||||
$(function() {
|
||||
addMainEvent(window, 'unload', courseLogout ,false);
|
||||
|
||||
$("#open-view-list").click(function(){
|
||||
$("#student-list-work").fadeIn(300);
|
||||
});
|
||||
$("#closed-view-list").click(function(){
|
||||
$("#student-list-work").fadeOut(300);
|
||||
});
|
||||
|
||||
checkBrand();
|
||||
|
||||
var id;
|
||||
$(window).resize(function() {
|
||||
clearTimeout(id);
|
||||
id = setTimeout(doneResizing, 200);
|
||||
});
|
||||
|
||||
// Removes the yellow input in Chrome
|
||||
if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0) {
|
||||
$(window).on("load", function () {
|
||||
$('input:-webkit-autofill').each(function(){
|
||||
var text = $(this).val();
|
||||
var name = $(this).attr('name');
|
||||
$(this).after(this.outerHTML).remove();
|
||||
$('input[name=' + name + ']').val(text);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$(".accordion_jquery").accordion({
|
||||
autoHeight: false,
|
||||
active: false, // all items closed by default
|
||||
collapsible: true,
|
||||
header: ".accordion-heading"
|
||||
});
|
||||
|
||||
// Start modals
|
||||
// class='ajax' loads a page in a modal
|
||||
$('body').on('click', 'a.ajax', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var globalModal = $('#global-modal');
|
||||
if ($(this).hasClass('no-close-button')) {
|
||||
globalModal.find('.close').hide();
|
||||
}
|
||||
|
||||
if ($(this).hasClass('no-header')) {
|
||||
globalModal.find('.modal-header').hide();
|
||||
}
|
||||
|
||||
var blockDiv = $(this).attr('data-block-closing');
|
||||
if (blockDiv != '') {
|
||||
globalModal.attr('data-backdrop', 'static');
|
||||
globalModal.attr('data-keyboard', 'false');
|
||||
}
|
||||
var contentUrl = this.href;
|
||||
var self = $(this);
|
||||
|
||||
if (contentUrl == 'javascript:void(0);') {
|
||||
var
|
||||
modalSize = self.data('size'),
|
||||
modalWidth = self.data('width'),
|
||||
modalTitle = self.data('title');
|
||||
modalContent = self.data('content');
|
||||
|
||||
globalModal.find('.modal-title').text(modalTitle);
|
||||
globalModal.find('.modal-body').html(modalContent);
|
||||
globalModal.modal('show');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (contentUrl) {
|
||||
var loadModalContent = $.get(contentUrl);
|
||||
|
||||
$.when(loadModalContent).done(function (modalContent) {
|
||||
var modalDialog = globalModal.find('.modal-dialog'),
|
||||
modalSize = self.data('size') || get_url_params(contentUrl, 'modal_size'),
|
||||
modalWidth = self.data('width') || get_url_params(contentUrl, 'width'),
|
||||
modalTitle = self.data('title') || ' ';
|
||||
|
||||
modalDialog.removeClass('modal-lg modal-sm').css('width', '');
|
||||
if (modalSize && modalSize.length != 0) {
|
||||
switch (modalSize) {
|
||||
case 'lg':
|
||||
modalDialog.addClass('modal-lg');
|
||||
break;
|
||||
case 'sm':
|
||||
modalDialog.addClass('modal-sm');
|
||||
break;
|
||||
}
|
||||
} else if (modalWidth) {
|
||||
modalDialog.css('width', modalWidth + 'px');
|
||||
}
|
||||
|
||||
globalModal.find('.modal-title').text(modalTitle);
|
||||
globalModal.find('.modal-body').html(modalContent);
|
||||
globalModal.modal('show');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Expands an image modal
|
||||
$('a.expand-image').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
var title = $(this).attr('title');
|
||||
var image = new Image();
|
||||
image.onload = function() {
|
||||
if (title) {
|
||||
$('#expand-image-modal').find('.modal-title').text(title);
|
||||
} else {
|
||||
$('#expand-image-modal').find('.modal-title').html(' ');
|
||||
}
|
||||
|
||||
$('#expand-image-modal').find('.modal-body').html(image);
|
||||
$('#expand-image-modal').modal({
|
||||
show: true
|
||||
});
|
||||
};
|
||||
image.src = this.href;
|
||||
});
|
||||
|
||||
// Delete modal
|
||||
$('#confirm-delete').on('show.bs.modal', function(e) {
|
||||
$(this).find('.btn-ok').attr('href', $(e.relatedTarget).data('href'));
|
||||
var message = '{{ 'AreYouSureToDeleteJS' | get_lang | escape('js')}} <strong>' + $(e.relatedTarget).data('item-title') + '</strong>';
|
||||
|
||||
if ($(e.relatedTarget).data('item-question')) {
|
||||
message = $(e.relatedTarget).data('item-question');
|
||||
}
|
||||
|
||||
$('.debug-url').html(message);
|
||||
});
|
||||
// End modals
|
||||
|
||||
// old jquery.menu.js
|
||||
$('#navigation a').stop().animate({
|
||||
'marginLeft':'50px'
|
||||
},1000);
|
||||
|
||||
$('#navigation div').hover(
|
||||
function () {
|
||||
$('a',$(this)).stop().animate({
|
||||
'marginLeft':'1px'
|
||||
},200);
|
||||
},
|
||||
function () {
|
||||
$('a',$(this)).stop().animate({
|
||||
'marginLeft':'50px'
|
||||
},200);
|
||||
}
|
||||
);
|
||||
|
||||
/* Make responsive image maps */
|
||||
$('map').imageMapResize();
|
||||
|
||||
jQuery.fn.filterByText = function(textbox) {
|
||||
return this.each(function() {
|
||||
var select = this;
|
||||
var options = [];
|
||||
$(select).find('option').each(function() {
|
||||
options.push({value: $(this).val(), text: $(this).text()});
|
||||
});
|
||||
$(select).data('options', options);
|
||||
|
||||
$(textbox).bind('change keyup', function() {
|
||||
var options = $(select).empty().data('options');
|
||||
var search = $.trim($(this).val());
|
||||
var regex = new RegExp(search,"gi");
|
||||
|
||||
$.each(options, function(i) {
|
||||
var option = options[i];
|
||||
if(option.text.match(regex) !== null) {
|
||||
$(select).append(
|
||||
$('<option>').text(option.text).val(option.value)
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$("[data-toggle=popover]").each(function(i, obj) {
|
||||
$(this).popover({
|
||||
html: true,
|
||||
content: function() {
|
||||
var id = $(this).attr('id')
|
||||
return $('#popover-content-' + id).html();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('.scrollbar-inner').scrollbar();
|
||||
|
||||
// Date time settings.
|
||||
moment.locale('{{ locale }}');
|
||||
$.datepicker.setDefaults($.datepicker.regional["{{ locale }}"]);
|
||||
$.datepicker.regional["local"] = $.datepicker.regional["{{ locale }}"];
|
||||
|
||||
// Fix old calls of "inc/lib/mediaplayer/player.swf" and convert to <audio> tag, then rendered by media element js
|
||||
// see BT#13405
|
||||
$('embed').each( function () {
|
||||
var flashVars = $(this).attr('flashvars');
|
||||
if (flashVars && flashVars.indexOf("file") == -1) {
|
||||
var audioId = Math.floor( Math.random()*99999 );
|
||||
flashVars = flashVars.replace('&autostart=false', '');
|
||||
flashVars = flashVars.replace('&autostart=true', '');
|
||||
var audioDiv = '<audio id="'+audioId+'" controls="controls" style="width:400px;" width:"400px;" src="'+flashVars+'" ><source src="'+flashVars+'" type="audio/mp3" ></source></audio>';
|
||||
$(this).hide();
|
||||
$(this).after(audioDiv);
|
||||
}
|
||||
});
|
||||
|
||||
// Chosen select
|
||||
$(".chzn-select").chosen({
|
||||
disable_search_threshold: 10,
|
||||
no_results_text: '{{ 'SearchNoResultsFound' | get_lang | escape('js') }}',
|
||||
placeholder_text_multiple: '{{ 'SelectSomeOptions' | get_lang | escape('js') }}',
|
||||
placeholder_text_single: '{{ 'SelectAnOption' | get_lang | escape('js') }}',
|
||||
width: "100%"
|
||||
});
|
||||
|
||||
// Bootstrap tabs.
|
||||
$('.tab-wrapper a').click(function (e) {
|
||||
e.preventDefault();
|
||||
$(this).tab('show');
|
||||
|
||||
//$('#tabs a:first').tab('show') // Select first tab
|
||||
});
|
||||
|
||||
// Fixes bug when loading links inside a tab.
|
||||
$('.tab-wrapper .tab-pane a').unbind();
|
||||
|
||||
/**
|
||||
* Advanced options
|
||||
* Usage
|
||||
* <a id="link" href="url">Advanced</a>
|
||||
* <div id="link_options">
|
||||
* hidden content :)
|
||||
* </div>
|
||||
* */
|
||||
$(".advanced_options").on("click", function (event) {
|
||||
event.preventDefault();
|
||||
var id = $(this).attr('id') + '_options';
|
||||
var button = $(this);
|
||||
$("#" + id).toggle();
|
||||
});
|
||||
|
||||
/**
|
||||
* <a class="advanced_options_open" href="http://" rel="div_id">Open</a>
|
||||
* <a class="advanced_options_close" href="http://" rel="div_id">Close</a>
|
||||
* <div id="div_id">Div content</div>
|
||||
* */
|
||||
$(".advanced_options_open").on("click", function (event) {
|
||||
event.preventDefault();
|
||||
var id = $(this).attr('rel');
|
||||
$("#" + id).show();
|
||||
});
|
||||
|
||||
$(".advanced_options_close").on("click", function (event) {
|
||||
event.preventDefault();
|
||||
var id = $(this).attr('rel');
|
||||
$("#" + id).hide();
|
||||
});
|
||||
|
||||
// Adv multi-select search input.
|
||||
$('.select_class_filter').each( function () {
|
||||
var inputId = $(this).attr('id');
|
||||
inputId = inputId.replace('-filter', '');
|
||||
$("#" + inputId).filterByText($("#" + inputId + "-filter"));
|
||||
});
|
||||
|
||||
{% set video_context_menu_hidden = 'video_context_menu_hidden'|api_get_configuration_value %}
|
||||
|
||||
// Mediaelement
|
||||
if ( {{ show_media_element }} == 1) {
|
||||
$('video:not(.skip), audio:not(.skip)').mediaelementplayer({
|
||||
pluginPath: _p.web_lib + 'javascript/mediaelement/',
|
||||
//renderers: ['html5', 'flash_video', 'native_flv'],
|
||||
features: ['{{ video_features }}'],
|
||||
success: function(mediaElement, originalNode, instance) {
|
||||
{% if video_context_menu_hidden %}
|
||||
$('.mejs__container').on('contextmenu', function(e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
{{ quiz_markers_rolls_js }}
|
||||
}
|
||||
{% if is_vrview_enabled %}
|
||||
, vrPath: _p.web + 'web/assets/vrview/build/vrview.js'
|
||||
{% endif %}
|
||||
});
|
||||
}
|
||||
{% if video_context_menu_hidden %}
|
||||
$('video').on('contextmenu', function(e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
// Table highlight.
|
||||
$("form .data_table input:checkbox").click(function () {
|
||||
if ($(this).is(":checked")) {
|
||||
$(this).parentsUntil("tr").parent().addClass("row_selected");
|
||||
} else {
|
||||
$(this).parentsUntil("tr").parent().removeClass("row_selected");
|
||||
}
|
||||
});
|
||||
|
||||
/* For non HTML5 browsers */
|
||||
if ($("#formLogin".length > 1)) {
|
||||
$("input[name=login]").focus();
|
||||
}
|
||||
|
||||
// Tool tip (in exercises)
|
||||
var tip_options = {
|
||||
placement: 'right'
|
||||
};
|
||||
$('.boot-tooltip').tooltip(tip_options);
|
||||
var more = '{{ 'SeeMore' | get_lang | escape('js') }}';
|
||||
var close = '{{ 'Close' | get_lang | escape('js') }}';
|
||||
|
||||
$('.list-teachers').readmore({
|
||||
speed: 75,
|
||||
moreLink: '<a href="#">' + more + '</a>',
|
||||
lessLink: '<a href="#">' + close + '</a>',
|
||||
collapsedHeight: 35,
|
||||
blockCSS: 'display: block; width: 100%;'
|
||||
});
|
||||
|
||||
$('.star-rating li a').on('click', function(event) {
|
||||
var id = $(this).parents('ul').attr('id');
|
||||
$('#vote_label2_' + id).html("{{'Loading'|get_lang| escape('js')}}");
|
||||
$.ajax({
|
||||
url: $(this).attr('data-link'),
|
||||
success: function(data) {
|
||||
$("#rating_wrapper_"+id).html(data);
|
||||
if (data == 'added') {
|
||||
//$('#vote_label2_' + id).html("{{'Saved'|get_lang | escape('js')}}");
|
||||
}
|
||||
if (data == 'updated') {
|
||||
//$('#vote_label2_' + id).html("{{'Saved'|get_lang| escape('js')}}");
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#notifications").load(_p.web_ajax + "online.ajax.php?a=get_users_online");
|
||||
|
||||
$('video:not(.skip)').attr('preload', 'metadata');
|
||||
|
||||
function socialLikes() {
|
||||
{% if 'social_enable_messages_feedback'|api_get_configuration_value %}
|
||||
$('body').on('click', '.social-like', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var $self = $(this),
|
||||
status = $self.data('status') || '',
|
||||
group = $self.data('group') || 0,
|
||||
message = $self.data('message') || 0;
|
||||
|
||||
$.getJSON(
|
||||
'{{ _p.web_ajax }}social.ajax.php',
|
||||
{'a': 'like_message', 'group': group, 'id': message, 'status': status}
|
||||
).then(function (response) {
|
||||
if (!response) {
|
||||
return;
|
||||
}
|
||||
|
||||
var $count = $self.children('span'),
|
||||
currentCount = parseInt($count.text()) || 0;
|
||||
|
||||
if ('like' === status) {
|
||||
var $dislike = $self.next(),
|
||||
$dislikeCount = $dislike.children('span'),
|
||||
dislikeCount = parseInt($dislikeCount.text()) || 0;
|
||||
|
||||
$count.text(++currentCount);
|
||||
|
||||
if ($dislike.is('.btn-danger')) {
|
||||
$dislikeCount.text(dislikeCount <= 0 ? 0 : --dislikeCount);
|
||||
$dislike.removeClass('btn-danger');
|
||||
}
|
||||
|
||||
$self.addClass('btn-primary');
|
||||
} else if ('dislike' === status) {
|
||||
var $like = $self.prev(),
|
||||
$likeCount = $like.children('span'),
|
||||
likeCount = parseInt($likeCount.text()) || 0;
|
||||
|
||||
$count.text(++currentCount);
|
||||
|
||||
if ($like.is('.btn-primary')) {
|
||||
$likeCount.text(likeCount <= 0 ? 0 : --likeCount);
|
||||
$like.removeClass('btn-primary');
|
||||
}
|
||||
|
||||
$self.addClass('btn-danger');
|
||||
}
|
||||
});
|
||||
});
|
||||
{% endif %}
|
||||
}
|
||||
|
||||
socialLikes();
|
||||
|
||||
{% if 'enable_message_tags'|api_get_configuration_value %}
|
||||
// Used in MessageManager::addTagsFormToInbox
|
||||
$('#frm_inbox_tags').on('submit', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var $submit = $(this).find(':submit');
|
||||
var selectedData = $('#form_message_inbox_id input[name="id[]"]').serialize();
|
||||
|
||||
if (selectedData.length <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
selectedData += '&'
|
||||
+ $('#extra_tags').select2('data').map(function (obj) {
|
||||
return encodeURI('tags[]=' + obj.id)
|
||||
}).join('&');
|
||||
|
||||
$submit.prop('disabled', true);
|
||||
|
||||
$.post(_p.web_ajax + 'message.ajax.php?a=add_tags', selectedData, function () {
|
||||
window.location.reload();
|
||||
});
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
if (window.self === window.top) {
|
||||
checkSessionTime();
|
||||
}
|
||||
});
|
||||
|
||||
$(window).resize(function() {
|
||||
checkBrand();
|
||||
});
|
||||
|
||||
$(document).scroll(function() {
|
||||
var valor = $('body').outerHeight() - 700;
|
||||
if ($(this).scrollTop() > 100) {
|
||||
$('.bottom_actions').addClass('bottom_actions_fixed');
|
||||
} else {
|
||||
$('.bottom_actions').removeClass('bottom_actions_fixed');
|
||||
}
|
||||
|
||||
if ($(this).scrollTop() > valor) {
|
||||
$('.bottom_actions').removeClass('bottom_actions_fixed');
|
||||
} else {
|
||||
$('.bottom_actions').addClass('bottom_actions_fixed');
|
||||
}
|
||||
|
||||
// Exercise warning fixed at the top
|
||||
var fixed = $("#exercise_clock_warning");
|
||||
if (fixed.length) {
|
||||
if (!fixed.attr('data-top')) {
|
||||
// If already fixed, then do nothing
|
||||
if (fixed.hasClass('subnav-fixed')) return;
|
||||
// Remember top position
|
||||
var offset = fixed.offset();
|
||||
fixed.attr('data-top', offset.top);
|
||||
fixed.css('width', '100%');
|
||||
}
|
||||
|
||||
if (fixed.attr('data-top') - fixed.outerHeight() <= $(this).scrollTop()) {
|
||||
fixed.addClass('navbar-fixed-top');
|
||||
fixed.css('width', '100%');
|
||||
} else {
|
||||
fixed.removeClass('navbar-fixed-top');
|
||||
fixed.css('width', '100%');
|
||||
}
|
||||
}
|
||||
|
||||
// Admin -> Settings toolbar.
|
||||
if ($('body').width() > 959) {
|
||||
if ($('.new_actions').length) {
|
||||
if (!$('.new_actions').attr('data-top')) {
|
||||
// If already fixed, then do nothing
|
||||
if ($('.new_actions').hasClass('new_actions-fixed')) return;
|
||||
// Remember top position
|
||||
var offset = $('.new_actions').offset();
|
||||
|
||||
var more_top = 0;
|
||||
if ($('.subnav').hasClass('new_actions-fixed')) {
|
||||
more_top = 50;
|
||||
}
|
||||
$('.new_actions').attr('data-top', offset.top + more_top);
|
||||
}
|
||||
// Check if the height is enough before fixing the icons menu (or otherwise removing it)
|
||||
// Added a 30px offset otherwise sometimes the menu plays ping-pong when scrolling to
|
||||
// the bottom of the page on short pages.
|
||||
if ($('.new_actions').attr('data-top') - $('.new_actions').outerHeight() <= $(this).scrollTop() + 30) {
|
||||
$('.new_actions').addClass('new_actions-fixed');
|
||||
} else {
|
||||
$('.new_actions').removeClass('new_actions-fixed');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function get_url_params(q, attribute) {
|
||||
var hash;
|
||||
if (q != undefined) {
|
||||
q = q.split('&');
|
||||
for(var i = 0; i < q.length; i++){
|
||||
hash = q[i].split('=');
|
||||
if (hash[0] == attribute) {
|
||||
return hash[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function checkBrand() {
|
||||
if ($('.subnav').length) {
|
||||
if ($(window).width() >= 969) {
|
||||
$('.subnav .brand').hide();
|
||||
} else {
|
||||
$('.subnav .brand').show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function setCheckbox(value, table_id) {
|
||||
checkboxes = $("#"+table_id+" input:checkbox");
|
||||
$.each(checkboxes, function(index, checkbox) {
|
||||
checkbox.checked = value;
|
||||
if (value) {
|
||||
$(checkbox).parentsUntil("tr").parent().addClass("row_selected");
|
||||
} else {
|
||||
$(checkbox).parentsUntil("tr").parent().removeClass("row_selected");
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function action_click(element, table_id) {
|
||||
var d = $("#"+table_id);
|
||||
if (!confirm('{{ "ConfirmYourChoice"|get_lang | escape('js')}}')) {
|
||||
return false;
|
||||
} else {
|
||||
var action =$(element).attr("data-action");
|
||||
$('#'+table_id+' input[name="action"] ').attr("value", action);
|
||||
d.submit();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic function to replace the deprecated jQuery toggle function
|
||||
* @param inId : id of block to hide / unhide
|
||||
* @param inIdTxt : id of the button
|
||||
* @param inTxtHide : text one of the button
|
||||
* @param inTxtUnhide : text two of the button
|
||||
* @todo : allow to detect if text is from a button or from a <a>
|
||||
*/
|
||||
function hideUnhide(inId, inIdTxt, inTxtHide, inTxtUnhide) {
|
||||
if ($('#'+inId).css("display") == "none") {
|
||||
$('#'+inId).show(400);
|
||||
$('#'+inIdTxt).attr("value", inTxtUnhide);
|
||||
} else {
|
||||
$('#'+inId).hide(400);
|
||||
$('#'+inIdTxt).attr("value", inTxtHide);
|
||||
}
|
||||
}
|
||||
|
||||
function expandColumnToogle(buttonSelector, col1Info, col2Info) {
|
||||
$(buttonSelector).on('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
col1Info = $.extend({
|
||||
selector: '',
|
||||
width: 4
|
||||
}, col1Info);
|
||||
col2Info = $.extend({
|
||||
selector: '',
|
||||
width: 8
|
||||
}, col2Info);
|
||||
|
||||
if (!col1Info.selector || !col2Info.selector) {
|
||||
return;
|
||||
}
|
||||
|
||||
var col1 = $(col1Info.selector),
|
||||
col2 = $(col2Info.selector);
|
||||
|
||||
$('#expand').toggleClass('hide');
|
||||
$('#contract').toggleClass('hide');
|
||||
|
||||
if (col2.is('.col-md-' + col2Info.width)) {
|
||||
col2.removeClass('col-md-' + col2Info.width).addClass('col-md-12');
|
||||
col1.removeClass('col-md-' + col1Info.width).addClass('hide');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
col2.removeClass('col-md-12').addClass('col-md-' + col2Info.width);
|
||||
col1.removeClass('hide').addClass('col-md-' + col1Info.width);
|
||||
});
|
||||
}
|
||||
|
||||
// Load ckeditor plugins
|
||||
if (typeof CKEDITOR !== 'undefined') {
|
||||
// External plugins not part of the default Ckeditor package.
|
||||
var plugins = [
|
||||
'asciimath',
|
||||
'asciisvg',
|
||||
'audio',
|
||||
'blockimagepaste',
|
||||
'ckeditor_wiris',
|
||||
'dialogui',
|
||||
'glossary',
|
||||
'leaflet',
|
||||
'mapping',
|
||||
'maximize',
|
||||
'mathjax',
|
||||
'oembed',
|
||||
'toolbar',
|
||||
'toolbarswitch',
|
||||
'video',
|
||||
'wikilink',
|
||||
'wordcount',
|
||||
'youtube',
|
||||
'flash',
|
||||
'inserthtml',
|
||||
'qmarkersrolls',
|
||||
'ckeditor_vimeo_embed',
|
||||
'image2_chamilo'
|
||||
];
|
||||
|
||||
plugins.forEach(function (plugin) {
|
||||
CKEDITOR.plugins.addExternal(
|
||||
plugin,
|
||||
_p.web_lib + '{{ 'javascript/ckeditor/plugins/' }}' + plugin + '/'
|
||||
);
|
||||
});
|
||||
|
||||
/**
|
||||
* Function use to load templates in a div
|
||||
**/
|
||||
var showTemplates = function (ckeditorName) {
|
||||
var editorName = 'content';
|
||||
if (ckeditorName && ckeditorName.length > 0) {
|
||||
editorName = ckeditorName;
|
||||
}
|
||||
CKEDITOR.editorConfig(CKEDITOR.config);
|
||||
CKEDITOR.loadTemplates(CKEDITOR.config.templates_files, function (a) {
|
||||
var templatesConfig = CKEDITOR.getTemplates("default");
|
||||
var $templatesUL = $("<ul>");
|
||||
if (templatesConfig) {
|
||||
$.each(templatesConfig.templates, function () {
|
||||
var template = this;
|
||||
var $templateLi = $("<li>");
|
||||
var templateHTML = "<img src=\"" + templatesConfig.imagesPath + template.image + "\" ><div>";
|
||||
templateHTML += "<b>" + template.title + "</b>";
|
||||
|
||||
if (template.description) {
|
||||
templateHTML += "<div class=description>" + template.description + "</div>";
|
||||
}
|
||||
templateHTML += "</div>";
|
||||
|
||||
$("<a>", {
|
||||
href: "#",
|
||||
html: templateHTML,
|
||||
click: function (e) {
|
||||
e.preventDefault();
|
||||
if (CKEDITOR.instances[editorName]) {
|
||||
CKEDITOR.instances[editorName].setData(template.html, function () {
|
||||
this.checkDirty();
|
||||
});
|
||||
}
|
||||
}
|
||||
}).appendTo($templateLi);
|
||||
$templatesUL.append($templateLi);
|
||||
});
|
||||
}
|
||||
$templatesUL.appendTo("#frmModel");
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
function doneResizing() {
|
||||
var widthWindow = $(window).width();
|
||||
if ((widthWindow>=1024) && (widthWindow>=768)) {
|
||||
$("#profileCollapse").addClass("in");
|
||||
$("#courseCollapse").addClass("in");
|
||||
$("#skillsCollapse").addClass("in");
|
||||
$("#sn-sidebar-collapse").addClass("in");
|
||||
$("#user_image_block").removeClass("text-muted");
|
||||
} else {
|
||||
$("#profileCollapse").removeClass("in");
|
||||
$("#courseCollapse").removeClass("in");
|
||||
$("#skillsCollapse").removeClass("in");
|
||||
$("#sn-avatar-one").removeClass("in");
|
||||
$("#user_image_block").addClass("text-muted");
|
||||
}
|
||||
}
|
||||
|
||||
function addMainEvent(elm, evType, fn, useCapture) {
|
||||
if (elm.addEventListener) {
|
||||
elm.addEventListener(evType, fn, useCapture);
|
||||
return true;
|
||||
} else if (elm.attachEvent) {
|
||||
elm.attachEvent('on' + evType, fn);
|
||||
} else {
|
||||
elm['on'+evType] = fn;
|
||||
}
|
||||
}
|
||||
|
||||
function copyTextToClipBoard(elementId)
|
||||
{
|
||||
/* Get the text field */
|
||||
var copyText = document.getElementById(elementId);
|
||||
|
||||
/* Select the text field */
|
||||
copyText.select();
|
||||
|
||||
/* Copy the text inside the text field */
|
||||
document.execCommand("copy");
|
||||
}
|
||||
|
||||
function checkSessionTime()
|
||||
{
|
||||
fetch('/main/inc/ajax/session_clock.ajax.php?action=time')
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error('Server error: ' + response.statusText);
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
if (data.sessionTimeLeft <= 0) {
|
||||
if (!document.getElementById('session-checker-overlay')) {
|
||||
clearInterval(sessionCounterInterval);
|
||||
|
||||
var counterOverlay = document.getElementById('session-count-overlay');
|
||||
if (counterOverlay) {
|
||||
counterOverlay.remove();
|
||||
}
|
||||
|
||||
var now = new Date();
|
||||
var day = String(now.getDate()).padStart(2, '0');
|
||||
var month = String(now.getMonth() + 1).padStart(2, '0');
|
||||
var year = now.getFullYear();
|
||||
var hour = String(now.getHours()).padStart(2, '0');
|
||||
var minutes = String(now.getMinutes()).padStart(2, '0');
|
||||
|
||||
var dateTimeSessionExpired = day + '/' + month + '/' + year + ' ' + hour + ':' + minutes;
|
||||
|
||||
document.body.insertAdjacentHTML('afterbegin', '<div id="session-checker-overlay" style="position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,1);display:flex;justify-content:center;align-items:center;z-index:1000;"><div id="session-checker-modal" style="background:white;padding:20px;border-radius:5px;box-shadow:0010pxrgba(0,0,0,0.5);width:35%;text-align:center;"><p style="margin-bottom:20px;">{{ 'SessionExpiredAt' | get_lang | escape('js')}} ' + dateTimeSessionExpired + '.</p><button class="btn btn-primary" onclick="window.location.pathname = \'/\';">OK</button></div></div>');
|
||||
}
|
||||
} else if (data.sessionTimeLeft <= 110) {
|
||||
sessionRemainingSeconds = data.sessionTimeLeft - 5;
|
||||
|
||||
if (sessionRemainingSeconds < 0) {
|
||||
sessionRemainingSeconds = 0;
|
||||
}
|
||||
|
||||
if (!document.getElementById('session-count-overlay')) {
|
||||
document.body.insertAdjacentHTML('afterbegin', '<div id="session-count-overlay" style="position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.5);display:flex;justify-content:center;align-items:center;z-index:1000;"><div id="session-checker-modal" style="background:white;padding:20px;border-radius:5px;box-shadow:0010pxrgba(0,0,0,0.5);width:35%;text-align:center;"><p id="session-counter" style="margin-bottom:20px;">{{ 'DueToInactivityTheSessionIsGoingToClose' | get_lang | escape('js')}} ' + sessionRemainingSeconds + ' {{ 'Seconds' | get_lang | escape('js')}}</p><button class="btn btn-primary" id="btn-session-extend" onclick="extendSession();">{{ 'KeepGoing' | get_lang | escape('js')}}</button></div></div>');
|
||||
|
||||
sessionCounterInterval = setInterval(updateSessionTimeCounter, 1000);
|
||||
}
|
||||
setTimeout(checkSessionTime, 60000);
|
||||
} else {
|
||||
clearInterval(sessionCounterInterval);
|
||||
|
||||
var counterOverlay = document.getElementById('session-count-overlay');
|
||||
if (counterOverlay) {
|
||||
counterOverlay.remove();
|
||||
}
|
||||
|
||||
setTimeout(checkSessionTime, 60000);
|
||||
}
|
||||
})
|
||||
.catch(error => console.error('Error:', error));
|
||||
}
|
||||
|
||||
function extendSession() {
|
||||
fetch('/main/inc/ajax/online.ajax.php')
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error('Server error: ' + response.statusText);
|
||||
}
|
||||
return response;
|
||||
})
|
||||
.then(data => {
|
||||
console.log('Session extended');
|
||||
|
||||
clearInterval(sessionCounterInterval);
|
||||
|
||||
var counterOverlay = document.getElementById('session-count-overlay');
|
||||
if (counterOverlay) {
|
||||
counterOverlay.remove();
|
||||
}
|
||||
})
|
||||
.catch(error => console.error('Error:', error));
|
||||
}
|
||||
|
||||
function updateSessionTimeCounter() {
|
||||
var sessionCounter = document.getElementById('session-counter');
|
||||
if (sessionRemainingSeconds > 3) {
|
||||
sessionCounter.innerHTML = '{{ 'DueToInactivityTheSessionIsGoingToClose' | get_lang | escape('js')}} ' + sessionRemainingSeconds + ' {{ 'Seconds' | get_lang | escape('js')}}';
|
||||
sessionRemainingSeconds--;
|
||||
} else if (sessionRemainingSeconds <= 3 && sessionRemainingSeconds > 1) {
|
||||
var currentUrl = window.location.href;
|
||||
if (currentUrl.includes('lp_controller.php') && currentUrl.includes('lp_id=') && currentUrl.includes('action=view')) {
|
||||
|
||||
if (!sessionClosing) {
|
||||
var btnSessionExtend = document.getElementById('btn-session-extend');
|
||||
if (btnSessionExtend) {
|
||||
btnSessionExtend.remove();
|
||||
}
|
||||
|
||||
document.getElementById('session-counter').innerHTML = '{{ 'SessionIsClosing' | get_lang | escape('js')}}';
|
||||
|
||||
setTimeout(function() {
|
||||
fetch('/main/inc/ajax/session_clock.ajax.php?action=logout')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (!document.getElementById('session-checker-overlay')) {
|
||||
clearInterval(sessionCounterInterval);
|
||||
|
||||
var counterOverlay = document.getElementById('session-count-overlay');
|
||||
if (counterOverlay) {
|
||||
counterOverlay.remove();
|
||||
}
|
||||
|
||||
var now = new Date();
|
||||
var day = String(now.getDate()).padStart(2, '0');
|
||||
var month = String(now.getMonth() + 1).padStart(2, '0');
|
||||
var year = now.getFullYear();
|
||||
var hour = String(now.getHours()).padStart(2, '0');
|
||||
var minutes = String(now.getMinutes()).padStart(2, '0');
|
||||
|
||||
var dateTimeSessionExpired = day + '/' + month + '/' + year + ' ' + hour + ':' + minutes;
|
||||
|
||||
document.body.insertAdjacentHTML('afterbegin', '<div id="session-checker-overlay" style="position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,1);display:flex;justify-content:center;align-items:center;z-index:1000;"><div id="session-checker-modal" style="background:white;padding:20px;border-radius:5px;box-shadow:0010pxrgba(0,0,0,0.5);width:35%;text-align:center;"><p style="margin-bottom:20px;">{{ 'SessionExpiredAt' | get_lang | escape('js')}} ' + dateTimeSessionExpired + '.</p><button class="btn btn-primary" onclick="window.location.pathname = \'/\';">OK</button></div></div>');
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
}, 1000);
|
||||
|
||||
lastCall();
|
||||
}
|
||||
sessionClosing = true;
|
||||
}
|
||||
else {
|
||||
if (!sessionClosing) {
|
||||
var btnSessionExtend = document.getElementById('btn-session-extend');
|
||||
if (btnSessionExtend) {
|
||||
btnSessionExtend.remove();
|
||||
}
|
||||
|
||||
document.getElementById('session-counter').innerHTML = '{{ 'SessionIsClosing' | get_lang | escape('js')}}';
|
||||
|
||||
setTimeout(function() {
|
||||
fetch('/main/inc/ajax/session_clock.ajax.php?action=logout')
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (!document.getElementById('session-checker-overlay')) {
|
||||
clearInterval(sessionCounterInterval);
|
||||
|
||||
var counterOverlay = document.getElementById('session-count-overlay');
|
||||
if (counterOverlay) {
|
||||
counterOverlay.remove();
|
||||
}
|
||||
|
||||
var now = new Date();
|
||||
var day = String(now.getDate()).padStart(2, '0');
|
||||
var month = String(now.getMonth() + 1).padStart(2, '0');
|
||||
var year = now.getFullYear();
|
||||
var hour = String(now.getHours()).padStart(2, '0');
|
||||
var minutes = String(now.getMinutes()).padStart(2, '0');
|
||||
|
||||
var dateTimeSessionExpired = day + '/' + month + '/' + year + ' ' + hour + ':' + minutes;
|
||||
|
||||
document.body.insertAdjacentHTML('afterbegin', '<div id="session-checker-overlay" style="position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,1);display:flex;justify-content:center;align-items:center;z-index:1000;"><div id="session-checker-modal" style="background:white;padding:20px;border-radius:5px;box-shadow:0010pxrgba(0,0,0,0.5);width:35%;text-align:center;"><p style="margin-bottom:20px;">{{ 'SessionExpiredAt' | get_lang | escape('js')}} ' + dateTimeSessionExpired + '.</p><button class="btn btn-primary" onclick="window.location.pathname = \'/\';">OK</button></div></div>');
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
}, 1000);
|
||||
}
|
||||
sessionClosing = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
clearInterval(sessionCounterInterval);
|
||||
|
||||
var counterOverlay = document.getElementById('session-count-overlay');
|
||||
if (counterOverlay) {
|
||||
counterOverlay.remove();
|
||||
}
|
||||
|
||||
var now = new Date();
|
||||
var day = String(now.getDate()).padStart(2, '0');
|
||||
var month = String(now.getMonth() + 1).padStart(2, '0');
|
||||
var year = now.getFullYear();
|
||||
var hour = String(now.getHours()).padStart(2, '0');
|
||||
var minutes = String(now.getMinutes()).padStart(2, '0');
|
||||
|
||||
var dateTimeSessionExpired = day + '/' + month + '/' + year + ' ' + hour + ':' + minutes;
|
||||
|
||||
document.body.insertAdjacentHTML('afterbegin', '<div id="session-checker-overlay" style="position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,1);display:flex;justify-content:center;align-items:center;z-index:1000;"><div id="session-checker-modal" style="background:white;padding:20px;border-radius:5px;box-shadow:0010pxrgba(0,0,0,0.5);width:35%;text-align:center;"><p style="margin-bottom:20px;">{{ 'SessionExpiredAt' | get_lang | escape('js')}} ' + dateTimeSessionExpired + '.</p><button class="btn btn-primary" onclick="window.location.pathname = \'/\';">OK</button></div></div>');
|
||||
}
|
||||
}
|
||||
206
main/template/default/layout/menu.tpl
Normal file
206
main/template/default/layout/menu.tpl
Normal file
@@ -0,0 +1,206 @@
|
||||
<!-- Fixed navbar -->
|
||||
{% if _u.logged == 1 and not user_in_anon_survey %}
|
||||
<script>
|
||||
$(function () {
|
||||
$.get('{{ _p.web_main }}inc/ajax/message.ajax.php?a=get_count_message', function(data) {
|
||||
var countNotifications = (data.ms_friends + data.ms_groups + data.ms_inbox);
|
||||
if (countNotifications === 0 || isNaN(countNotifications)) {
|
||||
$("#count_message_li").addClass('hidden');
|
||||
} else {
|
||||
$("#count_message_li").removeClass('hidden');
|
||||
$("#count_message").append(countNotifications);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
<nav class="navbar navbar-default">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="pull-right navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
|
||||
{% if _u.logged == 1 and notification_event == 1 %}
|
||||
<button id="user-dropdown" type="button" class="menu-dropdown pull-right navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#user-dropdown-menu" aria-expanded="false" aria-controls="navbar">
|
||||
<img class="img-circle" src="{{ _u.avatar_small }}" alt="{{ _u.complete_name }}"/>
|
||||
<span class="caret"></span>
|
||||
|
||||
<ul id="user-dropdown-menu" class="dropdown-menu" role="menu" aria-labelledby="user-dropdown">
|
||||
<li class="user-header">
|
||||
<div class="text-center">
|
||||
<a href="{{ profile_url }}">
|
||||
<img class="img-circle" src="{{ _u.avatar_medium }}" alt="{{ _u.complete_name }}"/>
|
||||
<p class="name">{{ _u.complete_name }}</p>
|
||||
</a>
|
||||
<p><em class="fa fa-envelope-o" aria-hidden="true"></em> {{ _u.email }}</p>
|
||||
</div>
|
||||
</li>
|
||||
<li role="separator" class="divider"></li>
|
||||
{% if message_url %}
|
||||
<li class="user-body">
|
||||
<a title="{{ "Inbox"|get_lang }}" href="{{ message_url }}">
|
||||
<em class="fa fa-envelope" aria-hidden="true"></em> {{ "Inbox"|get_lang }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if pending_survey_url %}
|
||||
<li class="user-body">
|
||||
<a href="{{ pending_survey_url }}">
|
||||
<em class="fa fa-pie-chart"></em> {{ 'PendingSurveys'|get_lang }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if certificate_url %}
|
||||
<li class="user-body">
|
||||
<a title="{{ "MyCertificates"|get_lang }}" href="{{ certificate_url }}">
|
||||
<em class="fa fa-graduation-cap"
|
||||
aria-hidden="true"></em> {{ "MyCertificates"|get_lang }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
<li class="user-body">
|
||||
<a id="logout_button" title="{{ "Logout"|get_lang }}" href="{{ logout_link }}">
|
||||
<em class="fa fa-sign-out"></em> {{ "Logout"|get_lang }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</button>
|
||||
|
||||
{% if _u.logged == 1 %}
|
||||
<button id="notifications-dropdown" type="button" class="pull-right menu-dropdown navbar-toggle collapsed"
|
||||
data-toggle="collapse" data-target="#notification-menu" aria-expanded="false" aria-controls="navbar">
|
||||
<em id="notificationsIcon" class="fa fa-bell-o " aria-hidden="true"></em>
|
||||
{# hide red button loading #}
|
||||
<span id="notificationsBadge" class="label label-danger">
|
||||
<em class="fa fa-spinner fa-pulse fa-fw" aria-hidden="true"></em>
|
||||
</span>
|
||||
<div id="notification-menu"
|
||||
class="dropdown-menu notification-dropdown-menu" aria-labelledby="notifications-dropdown">
|
||||
<h5 class="dropdown-header">
|
||||
<em class="fa fa-bell-o" aria-hidden="true"></em> <span class="fw-600 c-grey-900">
|
||||
{{ 'Notifications' | get_lang }}
|
||||
</span>
|
||||
</h5>
|
||||
<a id="notificationsLoader" class="dropdown-item dropdown-notification" href="#">
|
||||
<p class="notification-solo text-center">
|
||||
<em id="notificationsIcon" class="fa fa-spinner fa-pulse fa-fw" aria-hidden="true"></em>
|
||||
{{ 'Loading' | get_lang }}
|
||||
</p>
|
||||
</a>
|
||||
<ul id="notificationsContainer" class="notifications-container"></ul>
|
||||
<a id="notificationEmpty" class="dropdown-item dropdown-notification" href="#">
|
||||
<p class="notification-solo text-center"> {{ 'NoNewNotification' | get_lang }}</p>
|
||||
</a>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<button id="count_message_li" type="button" class="pull-right navbar-toggle collapsed menu-dropdown" aria-expanded="true">
|
||||
<a href="{{ message_url }}">
|
||||
<span id="count_message" class="badge badge-warning"></span>
|
||||
</a>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<a class="navbar-brand" href="{{ _p.web }}"> <em class="fa fa-home"></em> </a>
|
||||
</div>
|
||||
|
||||
<div id="navbar" class="collapse navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
{% for item in menu %}
|
||||
{% set show_item = true %}
|
||||
{% if user_in_anon_survey and item.key != 'homepage' %}
|
||||
{% set show_item = false %}
|
||||
{% endif %}
|
||||
|
||||
{% if show_item %}
|
||||
<li class="{{ item.key }} {{ item.current }}">
|
||||
<a href="{{ item.url }}" {{ item.target ? 'target="' ~ item.target ~ '"' : '' }} title="{{ item.title }}">
|
||||
{{ item.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if _u.logged == 1 and not user_in_anon_survey %}
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{% if language_form %}
|
||||
<li class="dropdown language">
|
||||
{{ language_form }}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if notification_event == 0 %}
|
||||
{% if _u.status != 6 %}
|
||||
<li id="count_message_li" class="pull-left " style="float: left !important;" aria-expanded="true">
|
||||
<a href="{{ message_url }}">
|
||||
<span id="count_message" class="badge badge-warning"></span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown avatar-user" style="float:right">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
|
||||
aria-expanded="false">
|
||||
<img class="img-circle" src="{{ _u.avatar_small }}" alt="{{ _u.complete_name }}"/>
|
||||
<span class="username-movil">{{ _u.complete_name }}</span>
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li class="user-header">
|
||||
<div class="text-center">
|
||||
<a href="{{ profile_url }}">
|
||||
<img class="img-circle" src="{{ _u.avatar_medium }}" alt="{{ _u.complete_name }}"/>
|
||||
<p class="name">{{ _u.complete_name }}</p>
|
||||
</a>
|
||||
<p><em class="fa fa-envelope-o" aria-hidden="true"></em> {{ _u.email }}</p>
|
||||
</div>
|
||||
</li>
|
||||
<li role="separator" class="divider"></li>
|
||||
{% if message_url %}
|
||||
<li class="user-body">
|
||||
<a title="{{ "Inbox"|get_lang }}" href="{{ message_url }}">
|
||||
<em class="fa fa-envelope" aria-hidden="true"></em> {{ "Inbox"|get_lang }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if pending_survey_url %}
|
||||
<li class="user-body">
|
||||
<a href="{{ pending_survey_url }}">
|
||||
<em class="fa fa-pie-chart"></em> {{ 'PendingSurveys'|get_lang }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if certificate_url %}
|
||||
<li class="user-body">
|
||||
<a title="{{ "MyCertificates"|get_lang }}" href="{{ certificate_url }}">
|
||||
<em class="fa fa-graduation-cap"
|
||||
aria-hidden="true"></em> {{ "MyCertificates"|get_lang }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
<li class="user-body">
|
||||
<a id="logout_button" title="{{ "Logout"|get_lang }}" href="{{ logout_link }}">
|
||||
<em class="fa fa-sign-out"></em> {{ "Logout"|get_lang }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if notification_event == 1 %}
|
||||
{% include 'default/layout/notification.tpl' %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div><!--/.nav-collapse -->
|
||||
</div>
|
||||
</nav>
|
||||
50
main/template/default/layout/modals.tpl
Normal file
50
main/template/default/layout/modals.tpl
Normal file
@@ -0,0 +1,50 @@
|
||||
{# Global modal, load content by AJAX call to href attribute on anchor tag with 'ajax' class #}
|
||||
<div class="modal fade" id="global-modal" tabindex="-1" role="dialog" aria-labelledby="global-modal-title" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="{{ "Close" | get_lang }}">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="global-modal-title"> </h4>
|
||||
</div>
|
||||
<div class="modal-body" id="global-modal-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# Expands an image modal #}
|
||||
<div class="modal fade" id="expand-image-modal" tabindex="-1" role="dialog" aria-labelledby="expand-image-modal-title" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="{{ "Close" | get_lang }}"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title" id="expand-image-modal-title"> </h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# Delete modal #}
|
||||
<div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="confirm-delete-title" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title" id="confirm-delete-title">{{ 'Delete' | get_lang }}</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<p class="debug-url"></p>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ 'Cancel' | get_lang }}</button>
|
||||
<a id="delete_item" class="btn btn-danger btn-ok">{{ 'Delete' | get_lang }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
16
main/template/default/layout/no_layout.tpl
Normal file
16
main/template/default/layout/no_layout.tpl
Normal file
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<!--[if lt IE 7]> <html lang="{{document_language}}" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
||||
<!--[if IE 7]> <html lang="{{document_language}}" class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
||||
<!--[if IE 8]> <html lang="{{document_language}}" class="no-js lt-ie9"> <![endif]-->
|
||||
<!--[if gt IE 8]><!--><html lang="{{document_language}}" class="no-js"> <!--<![endif]-->
|
||||
<head>
|
||||
{% include 'layout/head.tpl'|get_template %}
|
||||
</head>
|
||||
<body dir="{{text_direction}}" class="{{section_name}}">
|
||||
<section id="content-scorm">
|
||||
{% block body %}
|
||||
{{ content }}
|
||||
{% endblock %}
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
231
main/template/default/layout/notification.tpl
Normal file
231
main/template/default/layout/notification.tpl
Normal file
@@ -0,0 +1,231 @@
|
||||
{% if _u.logged == 1 %}
|
||||
<script>
|
||||
$(function () {
|
||||
var count = 0;
|
||||
var lastCount = 0;
|
||||
var notifications = new Array();
|
||||
var intervalTime = 180000; // 3 minutes
|
||||
var intervalTime = 30000; // 30 seconds
|
||||
|
||||
$.getJSON('{{ _p.web_main }}inc/ajax/message.ajax.php?a=get_notifications', function(data) {
|
||||
$.each(data, function( key, value ) {
|
||||
notifications.push(value);
|
||||
count++;
|
||||
});
|
||||
appNotifications.init();
|
||||
});
|
||||
|
||||
function makeBadge(texte) {
|
||||
return "<span class=\"badge badge-default\">" + texte + "</span>";
|
||||
}
|
||||
|
||||
appNotifications = {
|
||||
init: function () {
|
||||
$("#notificationsBadge").hide();
|
||||
$("#notificationEmpty").hide();
|
||||
$("#notifications-dropdown").on('click', function () {
|
||||
var open = $("#notifications-dropdown").attr("aria-expanded");
|
||||
if (open === "false") {
|
||||
appNotifications.loadAll();
|
||||
}
|
||||
});
|
||||
appNotifications.loadAll();
|
||||
|
||||
setInterval(function () {
|
||||
appNotifications.loadNumber();
|
||||
}, intervalTime);
|
||||
|
||||
$('.notification-read-desktop').on('click', function (event) {
|
||||
appNotifications.markAsReadDesktop(event, $(this));
|
||||
});
|
||||
},
|
||||
loadAll: function () {
|
||||
//console.log('loadAll');
|
||||
//console.log('count : ' + count);
|
||||
if (count !== lastCount || count === 0) {
|
||||
appNotifications.load();
|
||||
}
|
||||
appNotifications.loadNumber();
|
||||
},
|
||||
badgeLoadingMask: function (show) {
|
||||
if (show === true) {
|
||||
$("#notificationsBadge").html(appNotifications.badgeSpinner);
|
||||
$("#notificationsBadge").show();
|
||||
|
||||
$("#notificationsBadgeMobile").html(count);
|
||||
$("#notificationsBadgeMobile").show();
|
||||
} else {
|
||||
$("#notificationsBadge").html(count);
|
||||
if (count > 0) {
|
||||
$("#notificationsIcon").removeClass("fa-bell-o");
|
||||
$("#notificationsIcon").addClass("fa-bell");
|
||||
$("#notificationsBadge").show();
|
||||
|
||||
$("#notificationsIconMobile").removeClass("fa-bell-o");
|
||||
$("#notificationsIconMobile").addClass("fa-bell");
|
||||
$("#notificationsBadgeMobile").show();
|
||||
} else {
|
||||
$("#notificationsIcon").addClass("fa-bell-o");
|
||||
$("#notificationsBadge").hide();
|
||||
// Mobile
|
||||
$("#notificationsIconMobile").addClass("fa-bell-o");
|
||||
$("#notificationsBadgeMobile").hide();
|
||||
}
|
||||
}
|
||||
},
|
||||
loadingMask: function (show) {
|
||||
if (show === true) {
|
||||
$("#notificationEmpty").hide();
|
||||
$("#notificationsLoader").show();
|
||||
} else {
|
||||
$("#notificationsLoader").hide();
|
||||
if (count > 0) {
|
||||
$("#notificationEmpty").hide();
|
||||
} else {
|
||||
$("#notificationEmpty").show();
|
||||
}
|
||||
}
|
||||
},
|
||||
loadNumber: function () {
|
||||
//console.log('loadNumber');
|
||||
$.get('{{ _p.web_main }}inc/ajax/message.ajax.php?a=get_count_notifications', function(data) {
|
||||
count = data;
|
||||
//console.log(count);
|
||||
|
||||
$("#notificationsBadge").html(count);
|
||||
|
||||
appNotifications.badgeLoadingMask(false);
|
||||
});
|
||||
},
|
||||
loadNotificationArray: function () {
|
||||
$('#notificationsContainer').html("");
|
||||
|
||||
var closeLink = '<div class="notification-read"><i class="fa fa-times" aria-hidden="true"></i></div>';
|
||||
for (i = 0; i < count; i++) {
|
||||
if (notifications[i]) {
|
||||
var template = $('#notificationTemplate').html();
|
||||
template = template.replace("{id}", notifications[i].id);
|
||||
template = template.replace("{link}", notifications[i].link);
|
||||
template = template.replace("{title}", notifications[i].title);
|
||||
template = template.replace("{content}", notifications[i].content);
|
||||
template = template.replace("{event_text}", notifications[i].event_text);
|
||||
|
||||
if (notifications[i].persistent == 1) {
|
||||
template = template.replace("{close_link}", '');
|
||||
} else {
|
||||
template = template.replace("{close_link}", closeLink);
|
||||
}
|
||||
$('#notificationsContainer').append(template);
|
||||
|
||||
if (!notifications[i].event_text) {
|
||||
$('#notificationsContainer li[id="' + notifications[i].id + '"] .notification-event-text').remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$('.notification-read').on('click', function (event) {
|
||||
appNotifications.markAsRead(event, $(this));
|
||||
});
|
||||
appNotifications.loadingMask(false);
|
||||
$("#notifications-dropdown").prop("disabled", false);
|
||||
},
|
||||
load: function () {
|
||||
appNotifications.loadingMask(true);
|
||||
$('#notificationsContainer').html("");
|
||||
lastCount = count;
|
||||
//console.log('load');
|
||||
//console.log(count);
|
||||
|
||||
$.getJSON('{{ _p.web_main }}inc/ajax/message.ajax.php?a=get_notifications', function(data) {
|
||||
$.each(data, function(key, value) {
|
||||
var add = true;
|
||||
|
||||
$.each(notifications, function(notificationKey, notificationValue) {
|
||||
if (value.id == notificationValue.id) {
|
||||
add = false;
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
if (add == true) {
|
||||
notifications.push(value);
|
||||
count++;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
setTimeout(function () {
|
||||
appNotifications.loadNotificationArray();
|
||||
}, 1000);
|
||||
},
|
||||
markAsRead: function (event, elem) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
if (document.activeElement) {
|
||||
document.activeElement.blur();
|
||||
}
|
||||
|
||||
var notificationId = elem.parent().parent().attr('id');
|
||||
//console.log('markAsRead id : ' + notificationId);
|
||||
$.ajax({
|
||||
url: '{{ _p.web_main }}inc/ajax/message.ajax.php?a=mark_notification_as_read&id='+notificationId,
|
||||
success: function (data) {
|
||||
//console.log(notifications);
|
||||
notifications = $.grep(notifications, function(value) {
|
||||
if (notificationId == value.id) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
//console.log(notifications);
|
||||
count--;
|
||||
|
||||
//console.log('count : ' + count);
|
||||
appNotifications.loadNotificationArray();
|
||||
}
|
||||
});
|
||||
},
|
||||
markAsReadDesktop: function (event, elem) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
elem.parent('.dropdown-notification').removeClass("notification-unread");
|
||||
elem.remove();
|
||||
|
||||
if (document.activeElement) {
|
||||
document.activeElement.blur();
|
||||
}
|
||||
count--;
|
||||
appNotifications.loadAll();
|
||||
},
|
||||
add: function () {
|
||||
lastCount = count;
|
||||
count++;
|
||||
},
|
||||
badgeSpinner: '<i class="fa fa-spinner fa-pulse fa-fw" aria-hidden="true"></i>'
|
||||
};
|
||||
//appNotifications.init();
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- template -->
|
||||
<script id="notificationTemplate" type="text/html">
|
||||
<li class="dropdown-notification" id="{id}">
|
||||
<a href="{link}" class="link">
|
||||
<div class="notifications-body">
|
||||
<div class="notification-title">
|
||||
<i class="fa fa-sticky-note-o" aria-hidden="true"></i>
|
||||
{title}
|
||||
</div>
|
||||
<div class="notification-content">{content}</div>
|
||||
<div class="notification-event-text">
|
||||
<i class="fa fa-calendar-o" aria-hidden="true"></i>
|
||||
{event_text}
|
||||
</div>
|
||||
</div>
|
||||
{close_link}
|
||||
</a>
|
||||
</li>
|
||||
</script>
|
||||
{% endif %}
|
||||
68
main/template/default/layout/page.tpl
Normal file
68
main/template/default/layout/page.tpl
Normal file
@@ -0,0 +1,68 @@
|
||||
<!DOCTYPE html>
|
||||
<!--[if lt IE 7]> <html lang="{{ document_language }}" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
||||
<!--[if IE 7]> <html lang="{{ document_language }}" class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
||||
<!--[if IE 8]> <html lang="{{ document_language }}" class="no-js lt-ie9"> <![endif]-->
|
||||
<!--[if gt IE 8]><!-->
|
||||
<html lang="{{ document_language }}" class="no-js"> <!--<![endif]-->
|
||||
<head>
|
||||
{% block head %}
|
||||
{% include 'layout/head.tpl'|get_template %}
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body class="{{ 'page_origin' ? ('page_origin_' ~ page_origin) : '' }}">
|
||||
<!-- START MAIN -->
|
||||
<main id="main" dir="{{ text_direction }}" class="{{ section_name }} {{ login_class }}">
|
||||
<noscript>{{ "NoJavascript"|get_lang }}</noscript>
|
||||
|
||||
{% if frmDisplayCookieUsageWarning %}
|
||||
<!-- START DISPLAY COOKIES VALIDATION -->
|
||||
<div class="toolbar-cookie alert-warning">
|
||||
{{ frmDisplayCookieUsageWarning }}
|
||||
</div>
|
||||
<!-- END DISPLAY COOKIES VALIDATION -->
|
||||
{% endif %}
|
||||
|
||||
{% if show_header == true %}
|
||||
<!-- START HEADER -->
|
||||
<header id="cm-header">
|
||||
{% include 'layout/page_header.tpl'|get_template %}
|
||||
</header>
|
||||
|
||||
{% endif %}
|
||||
|
||||
<!-- START CONTENT -->
|
||||
<section id="cm-content"{{ html_content_extra_class }}>
|
||||
<div class="container">
|
||||
{% if show_course_shortcut is not null %}
|
||||
<!-- TOOLS SHOW COURSE -->
|
||||
<div id="cm-tools" class="nav-tools">
|
||||
{{ show_course_shortcut }}
|
||||
</div>
|
||||
<!-- END TOOLS SHOW COURSE -->
|
||||
{% endif %}
|
||||
|
||||
{% block breadcrumb %}
|
||||
{{ breadcrumb }}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{{ content }}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</section>
|
||||
<!-- END CONTENT -->
|
||||
|
||||
{% if show_footer == true %}
|
||||
<!-- START FOOTER -->
|
||||
<footer class="footer">
|
||||
{% include 'layout/page_footer.tpl'|get_template %}
|
||||
</footer>
|
||||
<!-- END FOOTER -->
|
||||
{% endif %}
|
||||
|
||||
</main>
|
||||
<!-- END MAIN -->
|
||||
|
||||
{% include 'layout/modals.tpl'|get_template %}
|
||||
</body>
|
||||
</html>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user