Dashboard do usuário

This commit is contained in:
eduardogusmao
2019-09-03 19:49:41 -03:00
parent 503ed90b8a
commit 05f4a327f7
9 changed files with 239 additions and 25 deletions

View File

@@ -84,7 +84,7 @@ $THEME->layouts = array(
'file' => 'my.php', 'file' => 'my.php',
'regions' => array('side-pre'), 'regions' => array('side-pre'),
'defaultregion' => 'side-pre', 'defaultregion' => 'side-pre',
'options' => array('nonavbar' => true), 'options' => array('nonavbar' => false),
), ),
'course' => array( 'course' => array(
'file' => 'course.php', 'file' => 'course.php',

View File

@@ -54,6 +54,7 @@ $phoneno = theme_qualisaude_get_setting('phoneno');
$emailid = theme_qualisaude_get_setting('emailid'); $emailid = theme_qualisaude_get_setting('emailid');
$scallus = get_string('callus', 'theme_qualisaude'); $scallus = get_string('callus', 'theme_qualisaude');
$semail = get_string('email', 'theme_qualisaude'); $semail = get_string('email', 'theme_qualisaude');
$username = $USER->firstname.' '.$USER->lastname;
// Footer Content. // Footer Content.
$footlogourl = get_footer_logo_url(); $footlogourl = get_footer_logo_url();
@@ -145,7 +146,8 @@ $templatecontext = [
"footerblock1" => $footerblock1, "footerblock1" => $footerblock1,
"colclass" => $colclass, "colclass" => $colclass,
"block1" => $block1, "block1" => $block1,
"footlogourl" => $footlogourl "footlogourl" => $footlogourl,
"username" => $username
]; ];
$templatecontext['flatnavigation'] = $PAGE->flatnav; $templatecontext['flatnavigation'] = $PAGE->flatnav;

View File

@@ -54,6 +54,32 @@ class theme_qualisaude_core_renderer extends theme_boost\output\core_renderer {
return $content; return $content;
} }
/**
* This renders the navbar.
* Uses bootstrap compatible html.
*/
public function breadscrumb() {
// print_object($this->page->navbar);
return $this->render_from_template('theme_qualisaude/breadscrumb', $this->page->navbar);
}
/**
* Wrapper for header elements.
*
* @return string HTML to display the main header.
*/
public function edit_buttons() {
global $PAGE;
$header = new stdClass();
$header->settingsmenu = $this->context_header_settings_menu();
$header->contextheader = $this->context_header();
$header->hasnavbar = empty($PAGE->layout_options['nonavbar']);
$header->navbar = $this->navbar();
$header->pageheadingbutton = $this->page_heading_button();
$header->courseheader = $this->course_header();
return $this->render_from_template('theme_qualisaude/edit_buttons', $header);
}
/** /**
* Extract first image from html * Extract first image from html

View File

@@ -194,7 +194,7 @@ section#inicial{
} }
} }
/* ################################### HEADER ################################# */ /* ################################### TOPO ################################# */
#header{ #header{
.navbar-nav{ .navbar-nav{
.logo{ .logo{
@@ -209,3 +209,48 @@ section#inicial{
} }
} }
} }
/* ################################### HEADER ################################# */
.cabecalho-header{
background-image: url([[pix:theme|bg/bg-cabecalho]]);
background-repeat: round;
//background-position: center center;
//background-attachment: fixed;
background-color: #ffffff;
//background-size: cover;
min-height: 250px;
}
#cabecalho-geral{
max-width: 1280px;
padding-top: 40px;
}
#cabecalho-geral .card{
background-color:transparent;
}
#cabecalho-geral .breadcrumb .breadcrumb-item{
color:#fff;
text-transform: uppercase;
font-size: 12px;
}
#cabecalho-geral .breadcrumb >li>a{color:#fff;}
#cabecalho-geral .breadcrumb >li>a:hover{color:#f60; text-decoration: none;}
#cabecalho-geral .breadcrumb-item + .breadcrumb-item::before{
color:#fff;
content: ">";
padding-left: 0px;
padding-right: 0px;
}
#cabecalho-geral div.page-title > h1{
color:#fff;
font-size: 28px;
font-weight: 700;
}
/* ################################### DASHBOARD ################################# */
.pagelayout-mydashboard{
#region-main{
border: 0px;
}
}

View File

@@ -44,8 +44,8 @@ $color_whisper: #e6e6e6;
$color_light_gray: #f8f9fa; $color_light_gray: #f8f9fa;
//fonts //fonts
$font_0: Century Gothic; $font_0: 'Lato';
$font_1: Arial; $font_1: 'Poppins';
$font_2: Helvetica; $font_2: Helvetica;
$font_3: sans-serif; $font_3: sans-serif;
$font_4: FontAwesome; $font_4: FontAwesome;
@@ -1876,7 +1876,7 @@ input {
color: $color_chicago_approx; color: $color_chicago_approx;
&.form-submit { &.form-submit {
font-weight: bold; font-weight: bold;
font-family: $font_1, $font_2, $font_3; font-family: $font_0, $font_1, $font_2;
color: $white; color: $white;
padding: 11px 16px; padding: 11px 16px;
border-radius: 0; border-radius: 0;
@@ -1982,7 +1982,7 @@ input {
} }
} }
button { button {
font-family: $font_1, $font_2, $font_3; font-family: $font_0, $font_1, $font_2;
color: $white; color: $white;
font-weight: bold; font-weight: bold;
text-shadow: none; text-shadow: none;
@@ -2191,7 +2191,7 @@ input[type="color"] {
.btn-primary, .btn-primary,
input[type="button"] { input[type="button"] {
font-weight: bold; font-weight: bold;
font-family: $font_1, $font_2, $font_3; font-family: $font_0, $font_1, $font_2;
color: $white; color: $white;
text-shadow: none; text-shadow: none;
background: $color_olivine_approx; background: $color_olivine_approx;
@@ -2218,7 +2218,7 @@ input[type="button"] {
.btn-primary, .btn-primary,
input[type="submit"] { input[type="submit"] {
font-weight: bold; font-weight: bold;
font-family: $font_1, $font_2, $font_3; font-family: $font_0, $font_1, $font_2;
color: $white; color: $white;
text-shadow: none; text-shadow: none;
background: $color_olivine_approx; background: $color_olivine_approx;
@@ -2266,7 +2266,7 @@ input[type="submit"] {
} }
input[type="reset"] { input[type="reset"] {
font-weight: bold; font-weight: bold;
font-family: $font_1, $font_2, $font_3; font-family: $font_0, $font_1, $font_2;
color: $white; color: $white;
text-shadow: none; text-shadow: none;
background: $color_olivine_approx; background: $color_olivine_approx;
@@ -2451,19 +2451,26 @@ table {
border-color: $color_gray_nurse_approx; border-color: $color_gray_nurse_approx;
border-radius: 0; border-radius: 0;
box-shadow: none; box-shadow: none;
&.block_myoverview{
.card-body{
.card-title{
display: none !important;
}
}
}
.card-body { .card-body {
padding: 0; padding: 0;
.card-title { .card-title {
width: 60%; width: 60%;
padding: 15px; padding: 15px;
margin-bottom: 0; margin-bottom: 0;
display: inline-block !important; //display: none !important;
} }
.content { .content {
padding: 10px 18px; padding: 10px 18px;
margin: 0 !important; margin: 0 !important;
background: $color_alabaster_approx; background: $color_alabaster_approx;
border-top: 1px solid $color_gray_nurse_approx; //border-top: 1px solid $color_gray_nurse_approx;
.content { .content {
border: 0; border: 0;
} }
@@ -2882,11 +2889,11 @@ table {
display: inline-block; display: inline-block;
} }
.fpassword .unmask label { .fpassword .unmask label {
font: 14px $font_1, $font_2, $font_3; font: 14px $font_0, $font_1, $font_2;
padding: 0 0 0 7px; padding: 0 0 0 7px;
} }
.fdescription.required { .fdescription.required {
font: 12px $font_1, $font_2, $font_3; font: 12px $font_0, $font_1, $font_2;
color: $color_stack_approx; color: $color_stack_approx;
margin: 0; margin: 0;
text-align: right; text-align: right;
@@ -3012,7 +3019,7 @@ table {
clear: none; clear: none;
border: 1px solid $color_celeste_approx; border: 1px solid $color_celeste_approx;
li { li {
font-family: $font_1, $font_2, $font_3; font-family: $font_0, $font_1, $font_2;
} }
} }
.summary { .summary {
@@ -3160,7 +3167,7 @@ table {
} }
} }
.summary .no-overflow { .summary .no-overflow {
font-family: $font_1, $font_2, $font_3; font-family: $font_0, $font_1, $font_2;
color: $color_boston_blue_approx; color: $color_boston_blue_approx;
line-height: 24px; line-height: 24px;
background: $color_link_water_approx; background: $color_link_water_approx;
@@ -3522,7 +3529,7 @@ select[size] {
} }
#notice .singlebutton + .singlebutton input { #notice .singlebutton + .singlebutton input {
font-weight: bold; font-weight: bold;
font-family: $font_1, $font_2, $font_3; font-family: $font_0, $font_1, $font_2;
color: $white; color: $white;
text-shadow: none; text-shadow: none;
background: $color_olivine_approx; background: $color_olivine_approx;
@@ -3543,7 +3550,7 @@ select[size] {
} }
.submit.buttons input[name="cancel"] { .submit.buttons input[name="cancel"] {
font-weight: bold; font-weight: bold;
font-family: $font_1, $font_2, $font_3; font-family: $font_0, $font_1, $font_2;
color: $white; color: $white;
text-shadow: none; text-shadow: none;
background: $color_olivine_approx; background: $color_olivine_approx;

View File

@@ -3,7 +3,7 @@
/*############################################################# Reset*/ /*############################################################# Reset*/
h1, h2, h3, h4, h5, h6{ h1, h2, h3, h4, h5, h6{
font-family: 'Poppins', sans-serif; /*font-family: 'Poppins', sans-serif;*/
} }
a{color: #474749;} a{color: #474749;}
@@ -90,7 +90,7 @@ a{color: #474749;}
/* Course page */ /* Course page */
.barra_progresso{ .barra_progresso{
font-family: "Poppins",sans-serif; /*font-family: "Poppins",sans-serif;*/
margin-bottom: 30px; margin-bottom: 30px;
} }
.barra_progresso > .progresso{background-color: #ebebeb;} .barra_progresso > .progresso{background-color: #ebebeb;}

View File

@@ -0,0 +1,80 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core/navbar
Navbar template.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* get_items - array of items
* has_action - boolean
* action - string
* get_title - string
* get_content - string
* is_hidden - boolean
Example context (json):
{
"get_items": [
{
"has_action": true,
"action": "#",
"get_title": "Test title",
"get_content": "First & fresh",
"is_hidden": false
},
{
"has_action": true,
"action": "#",
"get_title": "Second item & a title",
"get_content": "Second item",
"is_hidden": false
},
{
"has_action": false,
"get_content": "Third item",
"is_hidden": false
},
{
"has_action": false,
"get_content": "Fourth & last",
"is_hidden": true
}
]
}
}}
<nav role="navigation" aria-label="{{#str}}breadcrumb, access{{/str}}">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{{ config.wwwroot }}}/?redirect=0" class="">Início</a></li>
{{#get_items}}
{{#has_action}}
<li class="breadcrumb-item{{#is_hidden}} dimmed_text{{/is_hidden}}">
<a href="{{{action}}}" {{#is_last}}aria-current="page"{{/is_last}} {{#get_title}}title="{{get_title}}"{{/get_title}}>{{{get_content}}}</a>
</li>
{{/has_action}}
{{^has_action}}
<li class="breadcrumb-item{{#is_hidden}} dimmed_text{{/is_hidden}}">{{{text}}}</li>
{{/has_action}}
{{/get_items}}
</ol>
</nav>

View File

@@ -0,0 +1,48 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template boost/header
This template renders the header.
Example context (json):
{
"contextheader": "context_header_html",
"settingsmenu": "settings_html",
"hasnavbar": false,
"navbar": "navbar_if_available",
"courseheader": "course_header_html"
}
Page header.
}}
<header id="page-header" class="row">
<div class="col-12 pt-3 pb-3">
<div class="card {{^contextheader}}border-0 bg-transparent{{/contextheader}}">
<div class="card-body {{^contextheader}}p-2{{/contextheader}}">
<div class="d-flex flex-wrap">
<div class="ml-auto d-flex">
{{{pageheadingbutton}}}
</div>
<div id="course-header">
{{{courseheader}}}
</div>
</div>
</div>
</div>
</div>
</header>

View File

@@ -58,12 +58,18 @@
{{>theme_qualisaude/header}} {{>theme_qualisaude/header}}
<div id="page" class="container-fluid"> <div class="cabecalho-header">
<div id="cabecalho-geral" class="container-fluid">
{{{ output.full_header }}} <div class="page-title">
<div class="page-title"> {{{ output.breadscrumb }}}
<h1>Meus cursos</h1> <label style="color:#fff; margin: 15px 0 0 0;">Bem-vindo {{username}}</label>
<h1>Meus módulos</h1>
</div>
{{{ output.edit_buttons }}}
</div> </div>
</div>
<div id="page" class="container-fluid">
<div id="page-content" class="row pb-3"> <div id="page-content" class="row pb-3">
<div id="region-main-box" class="col-12"> <div id="region-main-box" class="col-12">
{{#hasregionmainsettingsmenu}} {{#hasregionmainsettingsmenu}}