Course home: User category courses have same layout as other elements.

BT#18278
pull/3766/head^2
Julio Montoya 5 years ago
parent cc1da9c001
commit 6e703a761d
  1. 17
      app/Resources/public/css/base.css
  2. 6
      main/template/default/layout/main.js.tpl
  3. 97
      main/template/default/user_portal/grid_courses_with_category.tpl

@ -6580,23 +6580,6 @@ div#chat-remote-video video {
text-align: center;
}
.grid-courses .items .image .black-shadow {
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
box-sizing: border-box;
position: absolute;
background: rgba(0, 0, 0, 0.7) none repeat scroll 0 0;
padding: 40px 10px 10px;
}
.grid-courses .items .image .hovered-course {
opacity: 1;
transition: all 0.3s ease 0s;
}
.grid-courses .items .toolbar .info {
float: left;
font-size: 12px;

@ -195,12 +195,6 @@ $(function() {
});
};
$(".black-shadow").mouseenter(function() {
$(this).addClass('hovered-course');
}).mouseleave(function() {
$(this).removeClass('hovered-course');
});
$("[data-toggle=popover]").each(function(i, obj) {
$(this).popover({
html: true,

@ -12,32 +12,20 @@
<div class="col-xs-12 col-sm-6 col-md-4">
<div class="items">
<div class="image">
<img src="{{ item.image }}" class="img-responsive">
{% if item.is_special_course %}
<div class="pin">{{ item.icon }}</div>
{% endif %}
{% if item.visibility == constant('COURSE_VISIBILITY_CLOSED') and not item.current_user_is_teacher %}
<img src="{{ item.image }}" class="img-responsive">
{% else %}
<a title="{{ item.title }}" href="{{ item.link }}">
<img src="{{ item.image }}" alt="{{ item.title }}" class="img-responsive">
</a>
{% endif %}
{% if item.category != '' %}
<span class="category">{{ item.category }}</span>
<div class="cribbon"></div>
{% endif %}
<div class="black-shadow">
<div class="author-card">
{% for teacher in item.teachers %}
{% set counter = counter + 1 %}
{% if counter <= 3 %}
<a href="{{ teacher.url }}" class="ajax"
data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
<img src="{{ teacher.avatar }}"/>
</a>
<div class="teachers-details">
<h5>
<a href="{{ teacher.url }}" class="ajax"
data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
{{ teacher.firstname }} {{ teacher.lastname }}
</a>
</h5>
</div>
{% endif %}
{% endfor %}
</div>
</div>
{% if item.edit_actions != '' %}
<div class="admin-actions">
{% if item.document == '' %}
@ -56,16 +44,65 @@
{% endif %}
</div>
<div class="description">
<h4 class="title">
{% if item.visibility == constant('COURSE_VISIBILITY_CLOSED') and not item.current_user_is_teacher %}
{{ item.title }} {{ item.code_course }} {{ item.url_marker }}
{% else %}
<a href="{{ item.link }}">
{{ item.title }} {{ item.code_course }}
<div class="block-title">
<h4 class="title" title="{{ item.title }}">
{% if item.visibility == constant('COURSE_VISIBILITY_CLOSED') and not item.current_user_is_teacher %}
{{ item.title_cut }}
<span class="code-title">{{ item.code_course }}</span>{{ item.url_marker }}
{% else %}
<a title="{{ item.title }}" href="{{ item.link }}">{{ item.title_cut }}</a>
<span class="code-title">{{ item.code_course }}</span>{{ item.url_marker }}
{% endif %}
</h4>
</div>
<div class="block-author">
{% if item.teachers | length > 6 %}
<a id="plist-{{ loop.index }}" data-trigger="focus" tabindex="0" role="button" class="btn btn-default panel_popover" data-toggle="popover" title="{{ 'CourseTeachers' | get_lang }}" data-html="true">
<i class="fa fa-graduation-cap" aria-hidden="true"></i>
</a>
{{ item.url_marker }}
<div id="popover-content-plist-{{ loop.index }}" class="hide">
{% for teacher in item.teachers %}
<div class="popover-teacher">
<a href="{{ teacher.url }}" class="ajax"
data-title="{{ teacher.firstname }} {{ teacher.lastname }}" >
<img title="{{ teacher.firstname }} {{ teacher.lastname }}" src="{{ teacher.avatar }}"/>
</a>
<div class="teachers-details">
<h5>
<a href="{{ teacher.url }}" class="ajax"
data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
{{ teacher.firstname }} {{ teacher.lastname }}
</a>
</h5>
</div>
</div>
{% endfor %}
</div>
{% else %}
{% for teacher in item.teachers %}
{% if item.teachers | length <= 2 %}
<a href="{{ teacher.url }}" class="ajax"
data-title="{{ teacher.firstname }} {{ teacher.lastname }}" title="{{ teacher.firstname }} {{ teacher.lastname }}">
<img title="{{ teacher.firstname }} {{ teacher.lastname }}" src="{{ teacher.avatar }}"/>
</a>
<div class="teachers-details">
<h5>
<a href="{{ teacher.url }}" class="ajax"
data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
{{ teacher.firstname }} {{ teacher.lastname }}
</a>
</h5>
<p>{{ 'Teacher' | get_lang }}</p>
</div>
{% elseif item.teachers | length <= 6 %}
<a href="{{ teacher.url }}" class="ajax"
data-title="{{ teacher.firstname }} {{ teacher.lastname }}">
<img title="{{ teacher.firstname }} {{ teacher.lastname }}" src="{{ teacher.avatar }}"/>
</a>
{% endif %}
{% endfor %}
{% endif %}
</h4>
</div>
{% if item.notifications %}
<div class="notifications">{{ item.notifications }}</div>
{% endif %}

Loading…
Cancel
Save