Minor - format code.

pull/2487/head
jmontoyaa 8 years ago
parent 6c9c0c673b
commit 577210c635
  1. 2
      main/template/default/user_portal/classic_courses_with_category.tpl
  2. 9
      main/template/default/user_portal/classic_courses_without_category.tpl
  3. 84
      main/template/default/user_portal/classic_session.tpl
  4. 11
      main/template/default/user_portal/grid_courses_with_category.tpl
  5. 10
      main/template/default/user_portal/grid_courses_without_category.tpl
  6. 8
      main/template/default/user_portal/grid_session.tpl
  7. 2
      main/template/default/user_portal/session_category.tpl

@ -70,7 +70,6 @@
{% endfor %}
{% endif %}
</div>
{% if item.student_info %}
{% if (item.student_info.progress is not null) and (item.student_info.score is not null) %}
<div class="course-student-info">
@ -90,7 +89,6 @@
</div>
{% endif %}
{% endif %}
</div>
</div>
</div>

@ -69,24 +69,21 @@
{% endfor %}
{% endif %}
</div>
{% if item.student_info %}
{% if (item.student_info.progress is not null) and (item.student_info.score is not null) %}
<div class="course-student-info">
<div class="student-info">
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{% endif %}
</div>
</div>
{% endif %}

@ -10,9 +10,10 @@
{% else %}
<a href="{{ _p.web_main ~ 'session/index.php?session_id=' ~ row.id }}">
{% endif %}
<img id="session_img_{{ row.id }}" src="{{ "window_list.png"|icon(32) }}" width="32" height="32"
alt="{{ row.title }}" title="{{ row.title }}">
{{ row.title }}
<img id="session_img_{{ row.id }}" src="{{ "window_list.png"|icon(32) }}" width="32" height="32"
alt="{{ row.title }}" title="{{ row.title }}">
{{ row.title }}
</a>
{% elseif row.course_list_session_style == 2 %}
{# No link #}
@ -51,62 +52,59 @@
{{ row.coach_name }}
</li>
{% endif %}
<li>
<i class="fa fa-calendar" aria-hidden="true"></i>
{{ row.date ? row.date : row.duration }}
</li>
</ul>
<div class="sessions-items">
{% for item in row.courses %}
<div class="courses">
<div class="row">
<div class="col-md-2">
<a href="{{ item.link }}" class="thumbnail">
<img class="img-responsive"
src="{{ item.thumbnails ? item.thumbnails : item.icon }}">
</a>
</div>
<div class="col-md-10">
<h4>{{ item.title }}</h4>
<div class="list-teachers">
{% if item.coaches|length > 0 %}
<img src="{{ 'teacher.png'|icon(16) }}" width="16" height="16">
{% for coach in item.coaches %}
{{ loop.index > 1 ? ' | ' }}
<a href="{{ _p.web_ajax ~ 'user_manager.ajax.php?' ~ {'a': 'get_user_popup', 'user_id': coach.user_id}|url_encode() }}"
data-title="{{ coach.full_name }}" class="ajax">
{{ coach.firstname }}, {{ coach.lastname }}
</a>
{% endfor %}
{% endif %}
</div>
{% for item in row.courses %}
<div class="courses">
<div class="row">
<div class="col-md-2">
<a href="{{ item.link }}" class="thumbnail">
<img class="img-responsive"
src="{{ item.thumbnails ? item.thumbnails : item.icon }}">
</a>
</div>
<div class="col-md-10">
<h4>{{ item.title }}</h4>
<div class="list-teachers">
{% if item.coaches|length > 0 %}
<img src="{{ 'teacher.png'|icon(16) }}" width="16" height="16">
{% for coach in item.coaches %}
{{ loop.index > 1 ? ' | ' }}
<a href="{{ _p.web_ajax ~ 'user_manager.ajax.php?' ~ {'a': 'get_user_popup', 'user_id': coach.user_id}|url_encode() }}"
data-title="{{ coach.full_name }}" class="ajax">
{{ coach.firstname }}, {{ coach.lastname }}
</a>
{% endfor %}
{% endif %}
</div>
</div>
{% if item.student_info %}
{% if (item.student_info.progress is not null) and (item.student_info.score is not null) %}
<div class="course-student-info">
<div class="student-info">
{% if (item.student_info.progress is not null) %}
{% if item.student_info %}
{% if (item.student_info.progress is not null) and (item.student_info.score is not null) %}
<div class="course-student-info">
<div class="student-info">
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{% endif %}
{% endif %}
{% if (item.student_info.score is not null) %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{% endif %}
</div>
{% endif %}
</div>
{% endif %}
</div>
{% endif %}
</div>
{% endif %}
</div>
{% endfor %}
</div>
{% endfor %}
</div>
</div>
</div>

@ -64,32 +64,29 @@
{% endif %}
</h4>
<div class="notifications">{{ item.notifications }}</div>
{% if item.student_info %}
{% if (item.student_info.progress is not null) and (item.student_info.score is not null) %}
<div class="course-student-info">
<div class="student-info">
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
<span title="{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}">
<i class="fa fa-certificate" aria-hidden="true"></i>
{{ item.student_info.certificate }}
</span>
</span>
{% endif %}
</div>
</div>
{% endif %}
{% endif %}
</div>
</div>
</div>

@ -19,7 +19,7 @@
<span class="category">{{ item.category }}</span>
<div class="cribbon"></div>
{% endif %}
{% if item.edit_actions != '' %}
<div class="admin-actions">
{% if item.document == '' %}
@ -77,27 +77,23 @@
{% if (item.student_info.progress is not null) and (item.student_info.score is not null) %}
<div class="course-student-info">
<div class="student-info">
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
<span title="{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}">
<i class="fa fa-certificate" aria-hidden="true"></i>
{{ item.student_info.certificate }}
</span>
{% endif %}
</div>
</div>
{% endif %}
{% endif %}
</div>
</div>
</div>

@ -68,13 +68,13 @@
<div class="course-student-info">
<div class="student-info">
{% if (item.student_info.progress is not null) %}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{{ "StudentCourseProgressX" | get_lang | format(item.student_info.progress) }}
{% endif %}
{% if (item.student_info.score is not null) %}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{{ "StudentCourseScoreX" | get_lang | format(item.student_info.score) }}
{% endif %}
{% if (item.student_info.certificate is not null) %}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{{ "StudentCourseCertificateX" | get_lang | format(item.student_info.certificate) }}
{% endif %}
</div>
</div>
@ -106,7 +106,6 @@
{% if row.show_description %}
{{ row.description }}
{% endif %}
<ul class="info-session list-inline">
{% if row.coach_name %}
<li>
@ -114,7 +113,6 @@
{{ row.coach_name }}
</li>
{% endif %}
<li>
<i class="fa fa-calendar" aria-hidden="true"></i>
{{ row.date ? row.date : row.duration }}

@ -22,14 +22,12 @@
</a>
</div>
{% endif %}
<h4 class="title">{{ session_category.title }}</h4>
{% if session_category.subtitle %}
<div class="subtitle-session">{{ session_category.subtitle }}</div>
{% endif %}
</div>
</div>
{# session_category.sessions is generated with the session.tpl #}
{{ session_category.sessions }}
</div>

Loading…
Cancel
Save