add course list classic and grid tpl BT#11017

ofaj
Alex Aragon 9 years ago
parent 7e2e475014
commit 4ff4c48ee0
  1. 1
      app/Resources/public/css/base.css
  2. 15
      main/inc/lib/userportal.lib.php
  3. 51
      main/template/default/user_portal/classic_courses.tpl
  4. 51
      main/template/default/user_portal/grid_courses.tpl

@ -4861,6 +4861,7 @@ div#chat-remote-video video {
margin: 0;
padding: 0;
display: inline-block;
font-size: 12px;
}
.classic-courses .teachers li{
display: inline-block;

@ -1055,11 +1055,18 @@ class IndexManager
$user_id,
$this->load_directories_preview
);
if($_configuration['view_grid_courses']==true){
$this->tpl->assign('special_courses', $specialCourses);
$this->tpl->assign('courses', $courses);
$listCourse = $this->tpl->fetch(
$this->tpl->get_template('/user_portal/grid_courses.tpl'));
} else {
$this->tpl->assign('special_courses', $specialCourses);
$this->tpl->assign('courses', $courses);
$listCourse = $this->tpl->fetch(
$this->tpl->get_template('/user_portal/classic_courses.tpl'));
}
$this->tpl->assign('special_courses', $specialCourses);
$this->tpl->assign('courses', $courses);
$listCourse = $this->tpl->fetch(
$this->tpl->get_template('/user_portal/main_courses.tpl'));
$courseCount = $specialCourses['course_count'] + $courses['course_count'];

@ -0,0 +1,51 @@
<!-- view classic -->
{% for course in courses %}
<div class="classic-courses">
{% for item in course %}
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="col-md-2">
<a class="thumbnail">
{% if item.thumbnails != '' %}
<img src="{{ item.thumbnails }}" title="{{ item.title }}" alt="{{ item.title }}"/>
{% else %}
{{ 'blackboard.png' | img(48, item.title ) }}
{% endif %}
</a>
</div>
<div class="col-md-10">
{% if item.edit_actions != '' %}
<div class="pull-right"><a class="btn btn-default btn-sm" href="{{ item.edit_actions }}"><i class="fa fa-pencil" aria-hidden="true"></i></a></div>
{% endif %}
<h4 class="course-items-title">
{% if item.visibility == constant('COURSE_VISIBILITY_CLOSED') %}
{{ item.title }}
{% else %}
<a href="{{ item.link }}">
{{ item.title }}
</a>
{{ item.notifications }}
{% endif %}
</h4>
<div class="course-items-session">
{{ 'teacher.png' | img(16, 'Professor'|get_lang ) }}
<ul class="teachers">
{% for teacher in item.teachers %}
<li>
{% set counter = counter + 1 %}
{% if counter > 1 %} | {% endif %}
<a href="{{ teacher.url }}" class="ajax" data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
{{ teacher.firstname }} {{ teacher.lastname }}
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
{% endfor %}

@ -1,54 +1,3 @@
<!-- view classic -->
{% for course in courses %}
<div class="classic-courses">
{% for item in course %}
<div class="panel panel-default">
<div class="panel-body">
<div class="row">
<div class="col-md-2">
<a class="thumbnail">
{% if item.thumbnails != '' %}
<img src="{{ item.thumbnails }}" title="{{ item.title }}" alt="{{ item.title }}"/>
{% else %}
{{ 'blackboard.png' | img(48, item.title ) }}
{% endif %}
</a>
</div>
<div class="col-md-10">
{% if item.edit_actions != '' %}
<div class="pull-right"><a class="btn btn-default btn-sm" href="{{ item.edit_actions }}"><i class="fa fa-pencil" aria-hidden="true"></i></a></div>
{% endif %}
<h4 class="course-items-title">
{% if item.visibility == constant('COURSE_VISIBILITY_CLOSED') %}
{{ item.title }}
{% else %}
<a href="{{ item.link }}">
{{ item.title }}
</a>
{{ item.notifications }}
{% endif %}
</h4>
<div class="course-items-session">
{{ 'teacher.png' | img(16, 'Professor'|get_lang ) }}
<ul class="teachers">
{% for teacher in item.teachers %}
<li>
{% set counter = counter + 1 %}
{% if counter > 1 %} | {% endif %}
<a href="{{ teacher.url }}" class="ajax" data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
{{ teacher.firstname }} {{ teacher.lastname }}
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
{% endfor %}
<!-- new view course special -->
<div class="grid-courses">
<div class="row">
Loading…
Cancel
Save