Browse Source

Correcoes mensagem mais informacoes cursos

MOODLE_37_STABLE
thiagourias 5 years ago
parent
commit
4142f176e7
  1. 77
      classes/output/core/course_renderer.php
  2. 53
      scss/courselist.scss
  3. 2
      templates/head_front.mustache

77
classes/output/core/course_renderer.php

@ -169,7 +169,7 @@ class course_renderer extends \core_course_renderer {
$coursecount = 1;
$content .= html_writer::start_tag('div', array('class' => ' row card-deck my-4'));
foreach ($courses as $course) {
$content .= $this->coursecat_coursebox($chelper, $course, 'card mb-3 course-card-view boxCursos tamanhoBoxCursos');
$content .= $this->coursecat_coursebox($chelper, $course, 'card mb-3 course-card-view boxCursos tamanhoBoxCursos customPaddingBottom');
$coursecount ++;
}
$content .= html_writer::end_tag('div');
@ -288,23 +288,46 @@ class course_renderer extends \core_course_renderer {
$content .= html_writer::start_tag('div', array('class' => 'card-see-more text-center', 'style' => 'padding-bottom: 3px !important;'));
//$content .= html_writer::start_tag('div', array('class' => 'card-see-more text-center'));
}else{
$content .= html_writer::start_tag('div', array('class' => 'card-see-more text-center'));
}
if ($icons = enrol_get_course_info_icons($course)) {
$content .= html_writer::start_tag('div',
array('class' => 'btn btn-inscrever',
array('class' => 'btn btn-inscrever sizeBlock bottomAlign',
'onclick'=>"window.location.href='" . $courseurl . "';")
);
$content .= 'Inscrever';
$content .= html_writer::end_tag('div');
}else{
$content .= html_writer::start_tag('div',
array('class' => 'btn btn-inscrever sizeBlock disabledBotao bottomAlign')
);
$content .= 'Inscrever';
$content .= html_writer::end_tag('div');
}
if (!$displayCourseInfo) {
$content .= html_writer::start_tag('div', array('class' => 'btn btn-mais-info m-2',
'id' => "course-popover-{$course->id}", 'role' => 'button', 'data-region' => 'popover-region-toggle',
'data-toggle' => 'popover', 'data-placement' => 'right',
'data-content' => $chelper->get_course_formatted_summary($course,
array('noclean' => true, 'para' => false)), 'data-html' => 'true', 'tabindex' => '0', 'data-trigger' => 'focus'));
$content .= html_writer::start_tag('button', array('class' => 'btn btn-mais-info sizeBlock bottomAlign', 'data-toggle' => 'modal', 'data-target' => "#course-popover-{$course->id}", 'data-backdrop' => 'static'));
$content .= 'Mais informações';
$content .= html_writer::end_tag('button');
$content .= html_writer::start_tag('div', array('class' => 'modal fade', 'tab-index' => '-1', 'role' => 'dialog', 'id' => "course-popover-{$course->id}", 'aria-hidden' => 'true'));
$content .= html_writer::start_tag('div', array('class' => 'modal-dialog modal-dialog-centered maxWidthModal', 'role' => 'document'));
$content .= html_writer::start_tag('div', array('class' => 'modal-content'));
$content .= html_writer::start_tag('div', array('class' => 'modal-header'));
$content .= html_writer::start_tag('h5', array('class' => 'modal-title'));
$content .= "<div>". $coursenamelink ."</div>";
$content .= html_writer::end_tag('h5');
$content .= html_writer::end_tag('div');
$content .= html_writer::start_tag('div', array('class' => 'modal-body'));
$content .= html_writer::start_tag('div');
$content .= $chelper->get_course_formatted_summary($course,
array());
$content .= html_writer::end_tag('div');
$content .= html_writer::end_tag('div');
$content .= html_writer::start_tag('div', array('class' => 'modal-footer'));
$content .= html_writer::start_tag('button', array('class' => 'btn btnFechar', 'data-dismiss' => 'modal'));
$content .= 'Fechar';
$content .= html_writer::end_tag('button');
$content .= html_writer::end_tag('div');
$content .= html_writer::end_tag('div');
$content .= html_writer::end_tag('div');
}
$content .= html_writer::end_tag('div'); // End summary.
@ -407,3 +430,41 @@ class course_renderer extends \core_course_renderer {
// }
// }
//
//$content .= html_writer::start_tag('div', array('class' => 'btn btn-mais-info m-2',
// 'id' => "course-popover-{$course->id}", 'role' => 'button', 'data-trigger' => 'click',
// 'data-toggle' => 'popover', 'data-placement' => 'top',
// 'data-content' => $chelper->get_course_formatted_summary($course,
// array('noclean' => true, 'para' => false)), 'data-html' => 'true', 'tabindex' => '0'));
//$content .= 'Mais informações';
//$content .= html_writer::end_tag('div');
//
//$content .= html_writer::start_tag('button', array('class' => 'btn btn-primary', 'data-toggle' => 'modal', 'data-target' => '#{$course->id'));
//$content .= 'Mais informações';
//$content .= html_writer::end_tag('button');
//
//$content .= html_writer::start_tag('div', array('class' => 'modal fade', 'tab-index' => '-1', 'role' => 'dialog', 'data-target' => '#{$course->id', 'aria-hidden' => 'true'));
//$content .= html_writer::start_tag('div', array('class' => 'modal-dialog modal-dialog-centered', 'role' => 'document'));
//$content .= html_writer::start_tag('div', array('class' => 'modal-content'));
//$content .= html_writer::start_tag('div', array('class' => 'modal-body'));
//$content .= html_writer::end_tag('div');
//$content .= html_writer::start_tag('div', array('class' => 'modal-footer'));
//$content .= html_writer::start_tag('button', array('class' => 'btn btn-secondary', 'data-dismiss' => 'modal'));
//$content .= 'fechar';
//$content .= html_writer::end_tag('button');
//$content .= html_writer::end_tag('div');
//$content .= html_writer::end_tag('div');
//$content .= html_writer::end_tag('div');

53
scss/courselist.scss

@ -1,4 +1,18 @@
@media screen and
(min-width: 200px) and
(max-width: 765px){
@ -79,10 +93,16 @@ body#page-enrol-index {
}
}
.customPaddingBottom {
padding-bottom: 20px !important;
}
.bottomAlign{
bottom: 0;
position: relative;
}
.minheight{
background-position: top center !important;
min-height: 122px;
}
.boxCursos {
@ -108,6 +128,17 @@ body#page-enrol-index {
box-shadow: 0px 0px 14px -2px rgba(0,0,0,1);
}
.disabledBotao{
pointer-events: none !important;
opacity: .55 !important;
}
.sizeBlock {
width: 90% !important;
margin-left: 5% !important;
margin-right: 5% !important;
margin-top: 1%;
margin-bottom: 1%;
}
.btn-mais-info{
color: white;
background-color: #0069d9;
@ -140,6 +171,7 @@ body#page-enrol-index {
text-transform: uppercase;
text-rendering: optimizeLegibility;
color: #444444;
min-height: 72px !important;
}
.elegantshd {
color: #131313;
@ -154,6 +186,23 @@ body#page-enrol-index {
color:#787878 !important;
text-decoration: none !important;
}
.maxWidthModal {
max-width: 70% !important;
}
.btnFechar{
color: #fff;
background-color: #dc3545;
border-color: #dc3545;
border-radius: 5px;
}
.btnFechar:hover{
color: #fff;
background-color: #e25664;
border-color: #e25664;
border-radius: 5px;
}
.btn-inscrever{
color: #fff;

2
templates/head_front.mustache

@ -105,7 +105,7 @@
-->
<!-- Arquivos javascript verificados-->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<!-- INVALIDAM O BOTÃO DE DROPDOWN -->
<script type="text/javascript" src="{{{moodle_url}}}/theme/ilb/js/resourceconfigjqueryjquery-1.11.2.min-cachekey3986.js" ></script>

Loading…
Cancel
Save