Przeglądaj źródła

Merge branch 'interface'

Alex Aragón 6 lat temu
rodzic
commit
c3356f499b

+ 16 - 446
assets/css/scss/_sidebar.scss

@@ -3,455 +3,25 @@
 // ---------------------------------------------------------
 
 .sidebar {
-  background-color: $default-white;
-  bottom: 0;
-  overflow: hidden;
-  position: fixed;
-  top: 0;
-  transition: all 0.2s ease;
-  width: $offscreen-size;
-  z-index: 1000;
-
-  .sidebar-search{
-    margin-left: 15px;
-    margin-right: 15px;
-    .input-group-text{
-      background-color: rgba(0,0,0,.05);
-      border: 1px solid rgba(0,0,0,.075);
-      border-radius: 0.25rem;
-      border-right: 0;
-      color: #FFF;
-    }
-    .form-control{
-      background-color: rgba(0,0,0,.05);
-      border: 1px solid rgba(0,0,0,.075);
-      border-left: 0;
-      color: #FFF;
-      &::placeholder {
-        color: #FFF;
-        opacity: 1;
-      }
-      &:-ms-input-placeholder {
-        color: #FFF;
-      }
-      &:-ms-input-placeholder {
-        color: #FFF;
-      }
-    }
-  }
-
-  ul {
-    list-style-type: none;
-    .sidebar-search{
-
-    }
-    .muted-title{
-      padding: 12px 20px;
-      letter-spacing: .05em;
-      pointer-events: none;
-      cursor: default;
-      font-size: 11px;
-      text-transform: uppercase;
-      color: #98a6ad;
-    }
-  }
-
-  @include between($breakpoint-md, $breakpoint-xl) {
-    width: $collapsed-size;
-
-    .sidebar-inner {
-      .sidebar-logo {
-        border-bottom: 1px solid transparent;
-        padding: 0;
-
-        a {
-          .logo {
-            background-position: center center;
-            width: $collapsed-size;
-          }
-        }
-      }
-
-      .sidebar-menu {
-        overflow-x: hidden;
-
-        > li {
-          > a {
-            .title {
-              display: none;
-            }
-          }
-        }
-
-        li {
-          &.dropdown {
-            .arrow {
-              opacity: 0;
-            }
-
-            &.open {
-              ul.dropdown-menu {
-                display: none !important;
-              }
-            }
-          }
-        }
-      }
-    }
-
-    &:hover {
-      width: $offscreen-size;
-
-      .sidebar-inner {
-        .sidebar-logo {
-          border-bottom: 1px solid $border-color;
-          padding: 0 20px;
-        }
-
-        .sidebar-menu {
-          > li {
-            > a {
-              .title {
-                display: inline-block;
-              }
-            }
-          }
-
-          li {
-            &.dropdown {
-              .arrow {
-                opacity: 1;
-              }
-            }
-
-            &.open {
-              > ul.dropdown-menu {
-                display: block !important;
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-
-  @include to($breakpoint-md) {
-    left: -$offscreen-size;
-    width: calc(#{$offscreen-size} - 30px);
-  }
+  background-color: $sidebar-background;
 }
-
-// ---------------------------------------------------------
-// SIDEBAR INNER
-// ---------------------------------------------------------
-
-.sidebar-inner {
-  position: relative;
-  height: 100%;
+.section-slider{
+  background: #9d7bd7; /* Old browsers */ /* FF3.6-15 */ /* Chrome10-25,Safari5.1-6 */
+  background: linear-gradient(to right, #9d7bd7 0%,#38bcf4 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
+  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9d7bd7', endColorstr='#38bcf4',GradientType=1 ); /* IE6-9 */
 }
-
-// ---------------------------------------------------------
-// SIDEBAR LOGO
-// ---------------------------------------------------------
-
-.sidebar-logo {
-  border-bottom: 1px solid $border-color;
-  border-right: 1px solid $border-color;
-  line-height: 0;
-  padding: 0 20px;
-  transition: all 0.2s ease;
-
-  a {
-    display: inline-block;
-    width: 100%;
-
-    .logo {
-      background: no-repeat center left;
-      display: inline-block;
-      min-height: calc(#{$header-height} - 1px);
-      width: 100%;
-    }
-
-    .logo-text {
-      color: $grey-900;
-    }
-  }
-
-  .mobile-toggle {
-    display: none;
-    float: right;
-    font-size: 18px;
-    line-height: calc(#{$header-height} - 1px);
-
-    a {
-      color: $default-text-color;
-    }
-
-    @include to($breakpoint-md) {
-      display: inline-block;
-    }
-
-    @include between($breakpoint-md, $breakpoint-xl) {
-      display: none;
-    }
-  }
+.breadcrumb{
+  margin-bottom: 0;
 }
-
-// ---------------------------------------------------------
-// SIDEBAR MENU
-// ---------------------------------------------------------
-
-.sidebar-menu {
-  @include clearfix;
-  border-right: 1px solid $border-color;
-  height: calc(100vh - #{$header-height});
-  list-style: none;
-  margin: 0;
-  overflow: auto;
-  padding: 0;
-  position: relative;
-  background: $sidebar-background;
-
-  .nav-header {
-    margin-top: 10px;
-    margin-bottom: 10px;
-    padding-left: 10px;
-    padding-right: 10px;
-    font-size: 12px;
-    color: $default-white;
-  }
-
-  .sidebar-divider {
-    height: 0;
-    margin: 0;
-    overflow: hidden;
-    border-top: 1px solid $sidebar-div-top;
-    border-bottom: 1px solid $sidebar-div-down;
-  }
-
-  .current{
-    background-color: $sidebar-current;
-  }
-
-  li {
-    position: relative;
-    border-radius: 0;
-    &.dropdown{
-      &.open{
-        a{
-          .arrow{
-            transform: rotate(90deg);
-          }
-        }
-      }
-      .arrow{
-        line-height: 35px;
-        position: absolute;
-        right: 15px;
-        transition: all .05s ease-in;
-        i{
-          font-size: 12px;
-        }
-      }
-      ul{
-        &.dropdown-menu{
-          background-color: $sidebar-dropdown;
-          padding: 0;
-          border: none;
-          border-radius: 0;
-          .sub-link{
-            padding: 2px 15px;
-            i{
-              height: 35px;
-              left: 0;
-              line-height: 35px;
-              margin-right: 14px;
-              position: relative;
-              text-align: center;
-              transition: all 0.3s ease;
-              width: 40px;
-            }
-          }
-        }
-      }
-    }
-    a {
-      color: $sidebar-link;
-      transition: all 0.3s ease;
-      display: block;
-      font-size: 14px;
-      font-weight: normal;
-      padding: 5px 15px;
-      position: relative;
-      white-space: nowrap;
-      .icon-holder{
-        i {
-          border-radius: 6px;
-          display: inline-block;
-          font-size: 17px;
-          height: 35px;
-          left: 0;
-          line-height: 35px;
-          margin-right: 14px;
-          position: relative;
-          text-align: center;
-          transition: all 0.3s ease;
-          width: 40px;
-        }
-      }
-
-      &.active {
-        background: $default-link;
-      }
-
-      &:hover,
-      &:focus {
-        color: $sidebar-link;
-        text-decoration: none;
-        background: $sidebar-focus;
-        .icon-holder {
-          color: $sidebar-link;
-        }
-      }
-    }
-  }
+.block-platform{
+  padding-top: 3em;
+  color: $grey-0;
 }
-
-// ---------------------------------------------------------
-// SIDEBAR COLLAPSED
-// ---------------------------------------------------------
-
-.is-collapsed {
-  .sidebar {
-    @include from($breakpoint-xl) {
-      width: $collapsed-size;
-
-      .sidebar-inner {
-        .sidebar-logo {
-          border-bottom: 1px solid transparent;
-          padding: 0;
-        }
-
-        .sidebar-menu {
-          overflow-x: hidden;
-
-          > li {
-            &.nav-header {
-              display: none;
-            }
-
-            > a {
-              .title {
-                display: none;
-              }
-            }
-          }
-
-          li {
-            &.dropdown {
-              .arrow {
-                opacity: 0;
-              }
-
-              &.open {
-                ul.dropdown-menu {
-                  display: none !important;
-                }
-              }
-            }
-          }
-        }
-      }
-
-      &:hover {
-        width: $offscreen-size;
-
-        .sidebar-inner {
-          .sidebar-logo {
-            border-bottom: 1px solid $border-color;
-            padding: 0 20px;
-          }
-
-          .sidebar-menu {
-            > li {
-              &.nav-header {
-                display: inline-block;
-              }
-              > a {
-                .title {
-                  display: inline-block;
-                }
-              }
-            }
-
-            li {
-              &.dropdown {
-                .arrow {
-                  opacity: 1;
-                }
-              }
-
-              &.open {
-                > ul.dropdown-menu {
-                  display: block !important;
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-
-    @include between($breakpoint-md, $breakpoint-xl) {
-      width: $offscreen-size;
-
-      .sidebar-inner {
-        .sidebar-logo {
-          border-bottom: 1px solid $border-color;
-          padding: 0 20px;
-
-          > a {
-            .logo {
-              background-position: center left;
-              width: 150px;
-            }
-          }
-        }
-
-        .sidebar-menu {
-          > li {
-            > a {
-              .title {
-                display: inline-block;
-              }
-            }
-          }
-
-          li {
-            &.dropdown {
-              .arrow {
-                opacity: 1;
-              }
-            }
-
-            &.open {
-              > ul.dropdown-menu {
-                display: block !important;
-              }
-            }
-          }
-        }
-      }
-    }
-
-    @include to($breakpoint-md) {
-      left: 0;
-    }
-  }
+.app-footer{
+  background: #3094DC;
+  border-top: 1px solid #3094DC;
+  color: #ffffff;
 }
-
-.search-box{
-  @include landscape($breakpoint-sm) {
-    display: none;
-  }
+.app-footer a{
+  color: #ffc500;
 }

+ 0 - 292
assets/css/scss/_topbar.scss

@@ -1,292 +0,0 @@
-// ---------------------------------------------------------
-// TOPBAR USER
-// ---------------------------------------------------------
-.breadcrumb{
-  background-color: $breadcrumb-color;
-  padding: 0.5rem 0.75rem;
-}
-.header {
-  background: $menu-background;
-  border-bottom: 1px solid $border-color;
-  display: block;
-  margin-bottom: 0;
-  padding: 0;
-  position: fixed;
-  transition: all 0.2s ease;
-  width: calc(100% - #{$offscreen-size});
-  z-index: 800;
-  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.15);
-
-  @include to($breakpoint-md) {
-    width: 100%;
-  }
-
-  @include between($breakpoint-md, $breakpoint-xl) {
-    width: calc(100% - #{$collapsed-size});
-  }
-
-  .header-container {
-    @include clearfix;
-
-    height: $header-height;
-
-    .btn-menu {
-      padding-left: 10px;
-      padding-right: 0;
-    }
-
-    .nav-left,
-    .nav-right {
-      list-style: none;
-      margin-bottom: 0;
-      padding-left: 0;
-      position: relative;
-
-      > li {
-        float: left;
-
-        &.btn-padding {
-          padding-top: 15px;
-          padding-bottom: 15px;
-          margin-left: 5px;
-          margin-right: 5px;
-        }
-
-        > a {
-          color: $header-link;
-          display: block;
-          line-height: $header-height;
-          min-height: $header-height;
-          padding: 0 15px;
-          transition: all 0.2s ease-in-out;
-
-          &.btn {
-            min-height: 30px;
-            padding: 0 10px;
-            line-height: 30px;
-          }
-
-          i {
-            font-size: 17px;
-          }
-
-          &:hover,
-          &:focus {
-            color: $header-hover;
-            text-decoration: none;
-          }
-
-          .rounded-circle{
-            margin-right: 10px;
-            width: 40px;
-            border: 2px solid $default-primary;
-          }
-
-          @include to($breakpoint-md) {
-            padding: 0 15px;
-          }
-        }
-      }
-
-      .notifications {
-        position: relative;
-
-        .counter {
-          background-color: $default-danger;
-          border-radius: 50px;
-          color: $default-white;
-          font-size: 10px;
-          line-height: 1;
-          padding: 3px 5.5px;
-          position: absolute;
-          right: 6px;
-          top: 12px;
-        }
-
-        .dropdown-menu {
-          min-width: 350px;
-          padding: 0;
-
-          @include to($breakpoint-sm) {
-            max-width: 300px;
-          }
-        }
-      }
-    }
-
-    .dropdown-menu {
-      display: block;
-      margin: 0;
-      transform-origin: top right;
-      transform: scale(0, 0);
-      transition: transform 0.15s ease-out;
-
-      .divider {
-        border-bottom: 1px solid $border-color;
-        height: 1px;
-        overflow: hidden;
-      }
-
-      > li {
-        > a {
-          transition: all 0.2s ease-out;
-        }
-      }
-    }
-
-    .show {
-      font-size: 14px;
-      .dropdown-menu {
-        transform: scale(1, 1);
-      }
-    }
-
-    .nav-left {
-      float: left;
-      margin-left: 15px;
-    }
-
-    .nav-right {
-      float: right;
-
-      .dropdown-menu {
-        left: auto;
-        right: 0;
-
-        > li {
-          width: 100%;
-
-          > a {
-            line-height: 1.5;
-            min-height: auto;
-            padding: 10px 15px;
-            color: $header-link;
-          }
-        }
-      }
-    }
-  }
-
-  .search-box {
-    .search-icon-close {
-      display: none;
-    }
-
-    &.active {
-      .search-icon {
-        display: none;
-      }
-
-      .search-icon-close {
-        display: inline-block;
-      }
-    }
-  }
-
-  .search-input {
-    display: none;
-
-    &.active {
-      display: inline-block;
-    }
-
-    input {
-      background-color: transparent;
-      border: 0;
-      box-shadow: none;
-      font-size: 18px;
-      height: 40px;
-      margin-top: 12px;
-      outline: none;
-      padding: 5px;
-
-      @include to($breakpoint-sm) {
-        width: 85px;
-      }
-
-    }
-  }
-}
-.no-after{
-  &:after {
-    display: none;
-  }
-}
-.dropdown-menu{
-  .dropdown-divider{
-    margin: 0;
-  }
-  .dropdown-item {
-    margin-bottom: 0;
-    padding: 7px 25px;
-    align-items: center !important;
-    display: flex !important;
-    .badge{
-      margin-left: 2.5rem;
-    }
-    .preview-item-content {
-      line-height: 1;
-      padding-left: 15px;
-      .preview-subject{
-        max-width: 100%;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        font-weight: 500;
-        white-space: nowrap;
-        font-size: 0.9375rem;
-        margin-bottom: 2px;
-        .date-ago{
-          font-size: 0.75rem;
-          font-weight: 300 !important;
-        }
-      }
-      .preview-text{
-        font-size: 0.75rem;
-        margin-bottom: 10px;
-        font-weight: 300 !important;
-      }
-    }
-    .flex-grow {
-      flex-grow: 1;
-    }
-    .preview-thumbnail{
-      color: #ffffff;
-      position: relative;
-      .preview-icon{
-        width: 40px;
-        height: 40px;
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        padding: 6px;
-        text-align: center;
-        border-radius: 100%;
-      }
-      img {
-        width: 36px;
-        height: 36px;
-        border: 2px solid #FFF;
-        box-shadow: 0 5px 10px 0 rgba(43, 43, 43, 0.2);
-      }
-    }
-  }
-}
-
-// ---------------------------------------------------------
-// @Collapsed State
-// ---------------------------------------------------------
-
-.is-collapsed {
-  .header {
-    width: calc(100% - #{$collapsed-size});
-
-    @include to($breakpoint-md) {
-      width: 100%;
-    }
-
-    @include between($breakpoint-md, $breakpoint-xl) {
-      width: calc(100% - #{$offscreen-size});
-    }
-  }
-}
-

+ 1 - 6
assets/css/scss/_variables.scss

@@ -12,6 +12,7 @@ $breakpoint-xs : 480px;
 // GREYSCALE COLORS
 // ---------------------------------------------------------
 
+$grey-0               : #ffffff;
 $grey-100             : #f9fafb;
 $grey-200             : #f2f3f5;
 $grey-300             : #e6eaf0;
@@ -52,12 +53,6 @@ $menu-secondary       : #ff3c7e;
 
 // SIDEBAR
 $sidebar-background   : #0BADFE;
-$sidebar-focus        : #42BEFF;
-$sidebar-link         : #FFFFFF;
-$sidebar-div-top      : #19D3FF;
-$sidebar-div-down     : #0caffe;
-$sidebar-current      : #0aa4f1;
-$sidebar-dropdown     : $sidebar-current;
 
 $header-link          : #54667a;
 $header-hover         : #ff3c7e;

+ 1 - 3
assets/css/scss/index.scss

@@ -2,9 +2,7 @@
 @import "media";
 //@import 'loader';
 @import 'base';
-/*
-@import 'topbar';
-@import 'sidebar';*/
+@import 'sidebar';
 @import 'login';
 @import 'install';
 /*

Plik diff jest za duży
+ 193 - 557
public/img/developer.svg


+ 6 - 6
src/CoreBundle/Menu/NavBuilder.php

@@ -396,25 +396,25 @@ class NavBuilder implements ContainerAwareInterface
             $childClass = '';
             $hasChildren = $child->hasChildren();
             if ($hasChildren) {
-                $childClass = 'dropdown';
-                $child->setChildrenAttribute('class', 'dropdown-menu');
+                $childClass = 'nav-dropdown';
+                $child->setChildrenAttribute('class', 'nav-dropdown-items');
                 if ($child->isCurrent()) {
                     $child->setChildrenAttribute('style', 'display:block');
                 }
             }
 
             $child
-                ->setLinkAttribute('class', 'sidebar-link')
+                ->setLinkAttribute('class', 'nav-link')
                 ->setAttribute('class', 'nav-item '.$childClass)
             ;
 
             if ($child->isCurrent()) {
-                $child->setAttribute('class', 'nav-item open '.$childClass);
+                $child->setAttribute('class', 'nav-item '.$childClass);
             }
 
             if ($hasChildren) {
                 $child
-                    ->setLinkAttribute('class', 'sidebar-link ') //dropdown-toggle
+                    ->setLinkAttribute('class', 'nav-link nav-dropdown-toggle ') //dropdown-toggle
                     //->setLinkAttribute('data-toggle', 'dropdown')
                     //->setLinkAttribute('role', 'button')
                     //->setLinkAttribute('aria-haspopup', 'true')
@@ -424,7 +424,7 @@ class NavBuilder implements ContainerAwareInterface
                 $children = $child->getChildren();
                 foreach ($children as $subChild) {
                     $subChild
-                        ->setLinkAttribute('class', 'sub-link ')
+                        ->setLinkAttribute('class', 'nav-link ')
                         ->setAttribute('class', 'nav-item ');
                 }
             }

+ 26 - 10
src/ThemeBundle/Resources/views/Index/index.html.twig

@@ -1,17 +1,33 @@
 {% extends "@ChamiloTheme/Layout/layout_content.html.twig" %}
 
-{% block chamilo_right_column %}
+{% block content %}
     {% autoescape false %}
-        {{ render(controller('ChamiloPageBundle:Page:renderPage', {'slug': 'welcome'} )) }}
 
-        {% if chamilo_settings_get('announcement.hide_global_announcements_when_not_connected') == 'false' %}
-            {{ render(controller('ChamiloCoreBundle:News:news')) }}
-        {% endif %}
+    <section class="section-slider pb-5 pt-5">
+        <div class="container">
+            {% if chamilo_settings_get('announcement.hide_global_announcements_when_not_connected') == 'false' %}
+                {{ render(controller('ChamiloCoreBundle:News:news')) }}
+            {% endif %}
+        </div>
+    </section>
+    <section class="section-welcome pb-5 pt-5">
+        <div class="container">
+            {{ render(controller('ChamiloPageBundle:Page:renderPage', {'slug': 'welcome'} )) }}
+        </div>
+    </section>
+    <section class="section-content">
+        <div class="container">
+            {{ content }}
+        </div>
+    </section>
+    <section class="section-courses">
+        <div class="container">
+            {% if chamilo_settings_get('display.show_hot_courses') == 'true' %}
+                {# See CourseBlockService.php #}
+                {{ sonata_block_render({'type': 'chamilo_core.block.course'}) }}
+            {% endif %}
+        </div>
+    </section>
 
-        {{ content }}
-        {% if chamilo_settings_get('display.show_hot_courses') == 'true' %}
-            {# See CourseBlockService.php #}
-            {{ sonata_block_render({'type': 'chamilo_core.block.course'}) }}
-        {% endif %}
     {% endautoescape %}
 {% endblock %}

+ 9 - 5
src/ThemeBundle/Resources/views/Index/page.html.twig

@@ -11,17 +11,21 @@
 
 {% set welcome %}
 
-    {{ macro.box_header("Introduction of platform" | trans, buttons) }}
+    {{ buttons }}
 
     {% if content %}
         {{ content }}
     {% else %}
         <div class="row">
-            <div class="col-md-4">
-                <img class="img-fluid" src="{{ asset('img/developer.svg') }}">
+            <div class="col-md-6">
+                <div class="text-center">
+                    <img class="img-fluid" src="{{ asset('img/developer.svg') }}">
+                </div>
             </div>
-            <div class="col-md-8">
-                <h2>{{ "Congratulations, you have successfully installed your Chamilo e-learning portal!"|trans }}</h2>
+            <div class="col-md-6">
+                <h4>{{ "Community"|trans }}</h4>
+                <h1>{{ "Hello and welcome to the new Chamilo 2.0"|trans }}</h1>
+                <p>{{ "We create the easiest to use online learning environment, we involve educators to improve our world ..."|trans }}</p>
                 <p>{{ "You can always find more information about this software on our website:"|trans }} <a href="http://www.chamilo.org" target="_blank"> http://www.chamilo.org</a>.</p>
                 <p>{{ "Have fun, do not hesitate to join the community and give us your opinion through our forum:"|trans }} <a href="https://forum.chamilo.org/" target="_blank">https://forum.chamilo.org/</a></p>
             </div>

+ 0 - 10
src/ThemeBundle/Resources/views/Layout/_footer.html.twig

@@ -1,10 +0,0 @@
-<footer class="app-footer">
-    <div>
-        <a href="https://wwww.chamilo.org">Chamilo</a>
-        <span>&copy; 2018 Derechos reservados.</span>
-    </div>
-    <div class="ml-auto">
-        <span>Administrado por</span>
-        <a href="#">Alex Aragón</a>
-    </div>
-</footer>

+ 0 - 100
src/ThemeBundle/Resources/views/Layout/_header.html.twig

@@ -1,100 +0,0 @@
-{% autoescape false %}
-<header class="app-header navbar">
-    <button class="navbar-toggler sidebar-toggler d-lg-none mr-auto" type="button" data-toggle="sidebar-show">
-        <span class="navbar-toggler-icon"></span>
-    </button>
-    <a class="navbar-brand" href="{{ url('legacy_index') }}">
-        <img class="navbar-brand-full" width="130" src="{{ url('legacy_public') ~ 'build/css/themes/'~ theme ~'/images/logo_chamilo.svg' }}" alt="Chamilo"/>
-        <img class="navbar-brand-minimized" width="35" src="{{ url('legacy_public') ~ 'build/css/themes/'~ theme ~'/images/avatar.svg' }}"  alt="Chamilo">
-    </a>
-    <button class="navbar-toggler sidebar-toggler d-md-down-none" type="button" data-toggle="sidebar-lg-show">
-        <span class="navbar-toggler-icon"></span>
-    </button>
-    <ul class="nav navbar-nav d-md-down-none">
-        <li class="nav-item px-3 dropdown">
-            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
-                Catálogo de cursos
-            </a>
-            <div class="dropdown-menu" aria-labelledby="navbarDropdown">
-                <a class="dropdown-item" href="#">Action</a>
-                <a class="dropdown-item" href="#">Another action</a>
-                <a class="dropdown-item" href="#">Something else here</a>
-            </div>
-        </li>
-        <form class="form-inline my-2 my-lg-0">
-            <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
-            <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
-        </form>
-    </ul>
-    {% if app.user is not null and is_granted('IS_AUTHENTICATED_FULLY') %}
-    <ul class="nav navbar-nav ml-auto">
-        <li class="nav-item d-md-down-none">
-            <a class="nav-link" href="#">
-                Mis cursos
-            </a>
-        </li>
-        <li class="nav-item d-md-down-none">
-            <a class="nav-link" href="#">
-                <i class="fa fa-shopping-cart" aria-hidden="true"></i>
-                <span class="badge badge-pill badge-success">1</span>
-            </a>
-        </li>
-        <li class="nav-item d-md-down-none">
-            <a class="nav-link" href="#">
-                <i class="icon-bell"></i>
-                <span class="badge badge-pill badge-danger">5</span>
-            </a>
-        </li>
-        <li class="nav-item d-md-down-none">
-            <a class="nav-link" href="#">
-                <i class="fa fa-envelope-o"></i>
-                <span class="badge badge-pill badge-info">20</span>
-            </a>
-        </li>
-        <li class="nav-item dropdown">
-
-            {% set avatar %}
-                {% if app.user.pictureUri is empty %}
-                    <img
-                        class="img-avatar"
-                        src="{{ url('legacy_public') ~ app.user.avatarOrAnonymous(32) }}"
-                        alt="{{ app.user.firstname }} {{ app.user.lastname }}"
-                    >
-                {% else %}
-                    <img
-                        class="img-avatar"
-                        src="{{ url('legacy_upload') ~ app.user.getPictureLegacy() }}"
-                        alt="{{ app.user.firstname }} {{ app.user.lastname }}"
-                    >
-                {% endif %}
-            {% endset %}
-
-            <a class="nav-link" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
-                {{ avatar }}
-            </a>
-
-            <div class="dropdown-menu dropdown-menu-right">
-                <div class="dropdown-header text-center">
-                    <strong>Settings</strong>
-                </div>
-                <a class="dropdown-item" href="#">
-                    <i class="fa fa-bell-o"></i> Notificaciones
-                    <span class="badge badge-info">42</span>
-                </a>
-                <a class="dropdown-item" href="{{ url('legacy_main', { 'name' : 'messages/inbox.php' }) }}">
-                    <i class="fa fa-envelope-o"></i> {{ "Inbox"|trans }}
-                    <span class="badge badge-success">42</span>
-                </a>
-                <a class="dropdown-item" href="{{ url('legacy_main', { 'name' : 'auth/profile.php' }) }}">
-                    <i class="fa fa-user"></i> {{ "Edit profile"|trans }} </a>
-                <a class="dropdown-item" href="#">
-                    <i class="fa fa-wrench"></i> Configuración</a>
-
-                <a class="dropdown-item" href="#">
-                    <i class="fa fa-lock"></i> Salir</a>
-            </div>
-        </li>
-    </ul>
-    {% endif %}
-</header>
-{% endautoescape %}

+ 0 - 37
src/ThemeBundle/Resources/views/Layout/_sidebar.html.twig

@@ -1,37 +0,0 @@
-{% autoescape false %}
-<div class="sidebar">
-    <nav class="sidebar-nav">
-
-        {% set menu = knp_menu_get('menuApp') %}
-        {{ knp_menu_render(menu, {'ancestorClass': 'current_open open', 'template': '@ChamiloTheme/Menu/left_menu.html.twig'}) }}
-
-        <li class="sidebar-divider"></li>
-        <li class="nav-item">
-            <a class='sidebar-link' href="https://docs.chamilo.org/">
-            <span class="icon-holder">
-                <i class="far fa-file-alt"></i>
-            </span>
-                {{ "Documentation"|trans }}
-            </a>
-        </li>
-        <li class="nav-item">
-            <a class='sidebar-link' href="https://forum.chamilo.org/">
-            <span class="icon-holder">
-                <i class="fa fa-users"></i>
-            </span>
-                {{ "Forums"|trans }}
-            </a>
-        </li>
-        <li class="nav-item">
-            <a class='sidebar-link' href="https://github.com/chamilo/chamilo-lms">
-            <span class="icon-holder">
-                <i class="fab fa-github"></i>
-            </span>
-                {{ "GithubRepository"|trans }}
-            </a>
-        </li>
-
-    </nav>
-    <button class="sidebar-minimizer brand-minimizer" type="button"></button>
-</div>
-{% endautoescape %}

+ 4 - 5
src/ThemeBundle/Resources/views/Layout/base-layout.html.twig

@@ -17,7 +17,7 @@
 {% endblock %}
 
 <body
-    class="{{ section_name }} app header-fixed sidebar-fixed aside-menu-fixed sidebar-lg-show"
+    class="{{ section_name }} app header-fixed sidebar-fixed aside-menu-fixed"
     {{ sonata_seo_html_attributes() }}
     data-in-course="{{ course ? 'true' : 'false' }}"
     data-course-code="{{ course ? course.code : '' }}"
@@ -29,7 +29,7 @@
 
 <!-- HEADER -->
     {% block page_header %}
-        {% include '@ChamiloTheme/Layout/_header.html.twig' %}
+        {% include '@ChamiloTheme/Layout/header.html.twig' %}
     {% endblock %}
 <!-- END HEADER -->
 
@@ -37,7 +37,7 @@
 
     <!-- SIDEBAR -->
     {% block page_sidebar %}
-        {% include '@ChamiloTheme/Layout/_sidebar.html.twig' %}
+        {% include '@ChamiloTheme/Layout/sidebar.html.twig' %}
     {% endblock %}
     <!-- END SIDEBAR -->
 
@@ -54,14 +54,13 @@
         <!-- END CONTENT -->
     </div>
 
-
 </div>
 {% endblock %}
 <!-- END PAGE -->
 
 <!-- FOOTER -->
 {% block page_footer %}
-    {% include '@ChamiloTheme/Layout/_footer.html.twig' %}
+    {% include '@ChamiloTheme/Layout/footer.html.twig' %}
 {% endblock %}
 <!-- END FOOTER -->
 

+ 15 - 18
src/ThemeBundle/Resources/views/Layout/footer.html.twig

@@ -1,21 +1,18 @@
 {% autoescape false %}
-<footer class="footer bdT ta-c lh-0 fsz-sm c-grey-600 text-right">
-    {% if plugin_pre_footer %}
-        <div id="plugin_pre_footer">
-            {{ plugin_pre_footer }}
-        </div>
-    {% endif %}
-    {% if administrator_name is not null %}
-        {{ administrator_name }}
-    {% endif %}
-    <a href="{{_p.web}}" target="_blank">
-        {{ "PoweredByX" |trans | format(_s.software_name) }}
-    </a>&copy; {{ "now"|date("Y") }}
+<footer class="app-footer">
+    <div>
+        <a href="{{_p.web}}" target="_blank">
+            {{ "PoweredByX" |trans | format(_s.software_name) }}
+            {{ "Chamilo"| trans }}
+        </a>&copy; {{ "now"|date("Y") }}
+    </div>
+    <div class="ml-auto">
+        {% if administrator_name is not null %}
+            {{ administrator_name }}
+        {% endif %}
+    </div>
 </footer>
 
-{#<footer {% block footer_open_attributes %}{% endblock footer_open_attributes %}>#}
-{% endautoescape %}
-
 {# Delete modal #}
 <div class="modal fade" id="confirm-delete" tabindex="-1" role="dialog" aria-labelledby="confirm-delete-title" aria-hidden="true">
     <div class="modal-dialog">
@@ -37,7 +34,7 @@
     </div>
 </div>
 
-{{ execution_stats }}
-
+{% endautoescape %}
 
-{{ footer_extra_content }}
+{{ execution_stats }}
+{{ footer_extra_content }}

+ 220 - 0
src/ThemeBundle/Resources/views/Layout/header.html.twig

@@ -0,0 +1,220 @@
+{% autoescape false %}
+    <script type="text/javascript">
+        $(document).ready(function() {
+            /**
+             * Notifications Systems
+             */
+            $.get(
+                '{{ url('legacy_main', { name : 'inc/ajax/message.ajax.php'}) }}',
+                {'a': 'get_count_message'},
+                function (data) {
+                    var countFriends = data.ms_friends;
+                    var countInbox = data.ms_inbox
+                    if (countFriends != 0) {
+                        $("#notifications-social").removeClass('d-none');
+                        $("#notifications-social").append(countFriends);
+                    }
+                    if(countInbox != 0){
+                        $("#notifications-inbox").removeClass('d-none');
+                        $("#notifications-inbox").append(countInbox);
+                    }
+                }
+            );
+
+            $('#list_notifications_friends').on('click', e => {
+                const $listFriends = $('#list_friends .content');
+                let $html;
+                $.get(
+                    '{{ url('legacy_main', { name : 'inc/ajax/message.ajax.php'}) }}',
+                    {'a': 'get_notifications_friends'},
+                    function (data) {
+                        $listFriends.empty();
+                        for (let i in data){
+                            $html = '<a class="dropdown-item preview-item">';
+                            $html += '<div class="preview-thumbnail"><img class="rounded-circle" src="'+data[i].avatar+'"/></div>';
+                            $html += '<div class="preview-item-content flex-grow">';
+                            $html += '<h6 class="preview-subject">' + data[i].fullname + '<span class="date-ago float-right">'+data[i].date+'</span></h6>';
+                            $html += '<p class="preview-text">' + data[i].content + '</p>';
+                            $html += '</div></a>';
+                            $listFriends.append($html);
+                        }
+                    }
+                );
+            });
+
+            $('#list_notifications_inbox').on('click', e => {
+                const $listInbox = $('#list_inbox .content');
+                let $html;
+                $.get(
+                    '{{ url('legacy_main', { name : 'inc/ajax/message.ajax.php'}) }}',
+                    {'a': 'get_notifications_inbox'},
+                    function (data) {
+                        $listInbox.empty();
+                        for (let i in data){
+                            $html = '<a class="dropdown-item preview-item" href="'+data[i].url+'">';
+                            $html += '<div class="preview-thumbnail"><div class="preview-icon bg-info">';
+                            $html += '<i class="far fa-envelope"></i>';
+                            $html += '</div></div>';
+                            $html += '<div class="preview-item-content flex-grow">';
+                            $html += '<h6 class="preview-subject">' + data[i].fullname + '<span class="date-ago float-right">'+data[i].date+'</span></h6>';
+                            $html += '<p class="preview-text">' + data[i].title + '</p>';
+                            $html += '</div></a>';
+                            $listInbox.append($html);
+                        }
+                    }
+                );
+            });
+
+        });
+    </script>
+<header class="app-header navbar">
+    <button class="navbar-toggler sidebar-toggler d-lg-none mr-auto" type="button" data-toggle="sidebar-show">
+        <span class="navbar-toggler-icon"></span>
+    </button>
+    <a class="navbar-brand" href="{{ url('legacy_index') }}">
+        <img class="navbar-brand-full" width="130" src="{{ url('legacy_public') ~ 'build/css/themes/'~ theme ~'/images/logo_chamilo.svg' }}" alt="Chamilo"/>
+        <img class="navbar-brand-minimized" width="35" src="{{ url('legacy_public') ~ 'build/css/themes/'~ theme ~'/images/avatar.svg' }}"  alt="Chamilo">
+    </a>
+    <button class="navbar-toggler sidebar-toggler d-md-down-none" type="button" data-toggle="sidebar-lg-show">
+        <span class="navbar-toggler-icon"></span>
+    </button>
+    <ul class="nav navbar-nav d-md-down-none">
+        <li class="nav-item px-3 dropdown">
+            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+                Catálogo de cursos
+            </a>
+            <div class="dropdown-menu" aria-labelledby="navbarDropdown">
+                <a class="dropdown-item" href="#">Action</a>
+                <a class="dropdown-item" href="#">Another action</a>
+                <a class="dropdown-item" href="#">Something else here</a>
+            </div>
+        </li>
+        <form class="form-inline my-2 my-lg-0">
+            <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
+            <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
+        </form>
+    </ul>
+
+    <ul class="nav navbar-nav ml-auto">
+        {% if app.user is not null and is_granted('IS_AUTHENTICATED_FULLY') %}
+        <li class="nav-item d-md-down-none">
+            <a class="nav-link" href="#">
+                Mis cursos
+            </a>
+        </li>
+        {#<li class="nav-item d-md-down-none">
+            <a class="nav-link" href="#">
+                <i class="fa fa-shopping-cart" aria-hidden="true"></i>
+                <span class="badge badge-pill badge-success">1</span>
+            </a>
+        </li>#}
+        {% if language_form %}
+            <li class="nav-item d-md-down-none">
+                {{ language_form }}
+            </li>
+        {% endif %}
+        <li class="nav-item dropdown">
+            <a id="list_notifications_friends" class="nav-link" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
+                <i class="far fa-bell"></i>
+                <span id="notifications-social" class="badge badge-pill badge-danger"></span>
+            </a>
+            <ul id="list_friends" class="dropdown-menu dropdown-menu-right">
+                <a class="dropdown-item">
+                    {{ "Your recent notifications"|trans }}
+                    <span class="badge badge-pill badge-warning float-right">{{ "View all"|trans }}</span>
+                </a>
+                <div class="content">
+                    <div class="spinner"></div>
+                </div>
+            </ul>
+        </li>
+        <li class="nav-item d-md-down-none">
+            <a id="list_notifications_inbox" class="nav-link" href="#" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
+                <i class="far fa-envelope"></i>
+                <span id="notifications-inbox" class="badge badge-pill badge-info"></span>
+            </a>
+            <ul id="list_inbox" class="dropdown-menu dropdown-menu-right">
+                <a class="dropdown-item">
+                    {{ "Recent messages"|trans }}
+                    <span class="badge badge-pill badge-warning float-right">{{ "View all"|trans }}</span>
+                </a>
+                <div class="content">
+                    <div class="spinner"></div>
+                </div>
+            </ul>
+        </li>
+        <li class="nav-item dropdown">
+
+            {% set avatar %}
+                {% if app.user.pictureUri is empty %}
+                    <img
+                        class="img-avatar"
+                        src="{{ url('legacy_public') ~ app.user.avatarOrAnonymous(32) }}"
+                        alt="{{ app.user.firstname }} {{ app.user.lastname }}"
+                    >
+                {% else %}
+                    <img
+                        class="img-avatar"
+                        src="{{ url('legacy_upload') ~ app.user.getPictureLegacy() }}"
+                        alt="{{ app.user.firstname }} {{ app.user.lastname }}"
+                    >
+                {% endif %}
+            {% endset %}
+
+            <a class="nav-link" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
+                {{ avatar }}
+            </a>
+
+            <div class="dropdown-menu dropdown-menu-right">
+                <div class="dropdown-header text-center">
+                    <strong>Settings</strong>
+                </div>
+                <a class="dropdown-item" href="{{ url('legacy_main', { 'name' : 'survey/pending.php' }) }}">
+                    <i class="fa fa-chart-pie"></i> {{ 'PendingSurveys'|trans }}
+                </a>
+                <a class="dropdown-item" title="{{ "MyCertificates"|trans }}"
+                   href="{{ url('legacy_main', { 'name' : 'gradebook/my_certificates.php' }) }}">
+                    <i class="fa fa-graduation-cap" aria-hidden="true"></i>
+                     {{ "MyCertificates"|trans }}
+                </a>
+                <a class="dropdown-item" href="{{ url('legacy_main', { 'name' : 'messages/inbox.php' }) }}">
+                    <i class="fa fa-envelope" aria-hidden="true"></i>
+                     {{ "Inbox"|trans }}
+                    <span class="badge badge-success">42</span>
+                </a>
+                <a class="dropdown-item" href="{{ url('legacy_main', { 'name' : 'auth/profile.php' }) }}">
+                    <i class="fa fa-user"></i>
+                     {{ "Edit profile"|trans }}
+                </a>
+                <a class="dropdown-item" href="#">
+                    <i class="fa fa-wrench"></i> {{ "Configuration"|trans }}
+                </a>
+
+                <a class="dropdown-item" id="logout_button" title="{{ "Logout"|trans }}"
+                   href="{{ path('legacy_main', { 'name' : '../public/logout'}) }}">
+                    <i class="fa fa-sign-out-alt"></i>
+                    {{ "Logout"|trans }}
+                </a>
+
+            </div>
+        </li>
+    {% else %}
+
+        <li class="nav-item d-md-down-none">
+            <a class="btn btn-light btn-sm mr-2" href="{{ url('legacy_main', { 'name' : 'auth/inscription.php' }) }}">
+                <i class="fas fa-pencil-alt"></i>
+                {{ "Register"|trans }}
+            </a>
+        </li>
+        <li class="nav-item d-md-down-none">
+            <a class="btn btn-light btn-sm mr-2" href="{{ url('legacy_main', { 'name' : '../public/login' }) }}">
+                <i class="fas fa-sign-in-alt"></i>
+                {{ "Sign in"|trans }}
+            </a>
+        </li>
+
+    {% endif %}
+    </ul>
+
+</header>
+{% endautoescape %}

+ 30 - 32
src/ThemeBundle/Resources/views/Layout/layout_content.html.twig

@@ -6,50 +6,48 @@
 {#%}#}
 
 {% block page_content %}
-    <div class="row">
+    <div class="section-page">
         {% autoescape false %}
             {% if plugin_main_top %}
                 <div id="plugin_main_top" class="col-md-12">
                     {{ plugin_main_top }}
                 </div>
             {% endif %}
-            {#  Right column #}
-            <div class="col-12 col-md-12">
-                {% if plugin_content_top %}
-                    <div id="plugin_content_top">
-                        {{ plugin_content_top }}
-                    </div>
-                {% endif %}
-
-
-
-                {% block chamilo_messages %}
-                    {# Flash messages #}
-                    {% autoescape false %}
-                        {% include '@ChamiloTheme/FlashMessage/render.html.twig' %}
-                    {% endautoescape %}
-                {% endblock %}
-
-                {% block chamilo_right_column %}
-                    {% block content %}
-                        <section class="right_column">
-                            {{ content }}
-                        </section>
-                    {% endblock %}
-                {% endblock %}
-
-                {% if plugin_content_bottom %}
-                    <div id="plugin_content_bottom">
-                        {{ plugin_content_bottom }}
-                    </div>
-                {% endif %}
-            </div>
+
+            {% if plugin_content_top %}
+                <div id="plugin_content_top">
+                    {{ plugin_content_top }}
+                </div>
+            {% endif %}
+
+            {% block chamilo_messages %}
+                {# Flash messages #}
+                {% autoescape false %}
+                    {% include '@ChamiloTheme/FlashMessage/render.html.twig' %}
+                {% endautoescape %}
+            {% endblock %}
+
+
+            {% block content %}
+
+                    {{ content }}
+
+            {% endblock %}
+
+
+
+            {% if plugin_content_bottom %}
+                <div id="plugin_content_bottom">
+                    {{ plugin_content_bottom }}
+                </div>
+            {% endif %}
 
             {% if plugin_main_bottom %}
                 <div id="plugin_main_bottom" class="col-md-12">
                     {{ plugin_main_bottom }}
                 </div>
             {% endif %}
+
         {% endautoescape %}
     </div>
 {% endblock %}

+ 0 - 2
src/ThemeBundle/Resources/views/Layout/layout_one_col.html.twig

@@ -32,8 +32,6 @@
             <div class="col-xs-12 col-md-12">
                 {% autoescape false %}
 
-              
-
                 {% if actions != '' %}
                     {{ actions }}
                 {% endif %}

+ 0 - 84
src/ThemeBundle/Resources/views/Layout/layout_two_col.html.twig

@@ -1,84 +0,0 @@
-{% extends "@ChamiloTheme/Layout/base-layout.html.twig" %}
-
-{#{% set pathInfo = path(#}
-    {#app.request.attributes.get('_route'),#}
-    {#app.request.attributes.get('_route_params'))#}
-{#%}#}
-
-{% block page_content %}
-    <div class="row">
-        {% autoescape false %}
-            {% if plugin_main_top %}
-                <div id="plugin_main_top" class="col-md-12">
-                    {{ plugin_main_top }}
-                </div>
-            {% endif %}
-
-            {#  Left column #}
-            <div class="col-md-3">
-                {% if plugin_menu_top %}
-                    <div id="plugin_menu_top">
-                        {{ plugin_menu_top }}
-                    </div>
-                {% endif %}
-
-                {% block chamilo_left_column %}
-                    <section class="left_column">
-                        {% if is_granted('IS_AUTHENTICATED_FULLY') %}
-                            {# User avatar #}
-                            {{ render(controller('ChamiloThemeBundle:Sidebar:userPanel', {'pathInfo': pathInfo })) }}
-                        {% endif %}
-                        {# Login, Courses, Skills menu #}
-                        {{ render(controller('ChamiloThemeBundle:Sidebar:leftMenu', {'request' : app.request, pathInfo: pathInfo })) }}
-                        {{ render(controller('ChamiloPageBundle:Page:renderPage', {'slug': 'index-left-column-notice'} )) }}
-                    </section>
-                {% endblock %}
-                {% if plugin_menu_bottom %}
-                    <div id="plugin_menu_bottom">
-                        {{ plugin_menu_bottom }}
-                    </div>
-                {% endif %}
-            </div>
-
-            {#  Right column #}
-            <div class="col-md-9">
-                {% if plugin_content_top %}
-                    <div id="plugin_content_top">
-                        {{ plugin_content_top }}
-                    </div>
-                {% endif %}
-
-                {% block chamilo_breadcrumb %}
-                    {% include '@ChamiloTheme/Layout/breadcrumb.html.twig' %}
-                {% endblock %}
-
-                {% block chamilo_messages %}
-                    {# Flash messages #}
-                    {% autoescape false %}
-                        {% include '@ChamiloTheme/FlashMessage/render.html.twig' %}
-                    {% endautoescape %}
-                {% endblock %}
-
-                {% block chamilo_right_column %}
-                    {% block content %}
-                        <section class="right_column">
-                            {{ content }}
-                        </section>
-                    {% endblock %}
-                {% endblock %}
-
-                {% if plugin_content_bottom %}
-                    <div id="plugin_content_bottom">
-                        {{ plugin_content_bottom }}
-                    </div>
-                {% endif %}
-            </div>
-
-            {% if plugin_main_bottom %}
-                <div id="plugin_main_bottom" class="col-md-12">
-                    {{ plugin_main_bottom }}
-                </div>
-            {% endif %}
-        {% endautoescape %}
-    </div>
-{% endblock %}

+ 0 - 91
src/ThemeBundle/Resources/views/Layout/menu.html.twig

@@ -1,91 +0,0 @@
-{% autoescape false %}
-    <nav id="menubar" class="navbar navbar-expand-lg navbar-dark bg-primary">
-        <div class="container">
-            <a class="navbar-brand" href="{{ _p.web }}">{{ _s.site_name }}</a>
-            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#menuone"
-                    aria-controls="menuone" aria-expanded="false" aria-label="Toggle navigation">
-                <span class="navbar-toggler-icon"></span>
-            </button>
-
-            <div class="collapse navbar-collapse" id="menuone">
-                {{ mopa_bootstrap_menu('ChamiloCoreBundle:NavBuilder:leftMenu', {'automenu': 'navbar', 'stacked' : false}) }}
-                {% if app.user is not null and is_granted('IS_AUTHENTICATED_FULLY') %}
-                    <ul class="navbar-nav ml-0 mr-0 ml-md-auto">
-                        <li id="count_message_li" class="nav-item">
-                            <script>
-                                $(document).ready(function () {
-                                    $.get(
-                                        '{{ url('legacy_main', { name : 'inc/ajax/message.ajax.php'}) }}',
-                                        {'a': 'get_count_message'},
-                                        function (data) {
-                                            if (data === '0') {
-                                                $("#count_message_li").addClass('hidden');
-                                            } else {
-                                                $("#count_message_li").removeClass('hidden');
-                                                $("#count_message").append(data);
-                                            }
-                                        }
-                                    );
-                                });
-                            </script>
-                            <a href="{{ message_url }}">
-                                <span id="count_message" class="badge badge-warning"></span>
-                            </a>
-                        </li>
-                        {% if language_form %}
-                            <li class="nav-item dropdown language">
-                                {{ language_form }}
-                            </li>
-                        {% endif %}
-
-                        <li class="nav-item dropdown user user-menu">
-                            <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown" role="button"
-                               id="navar-user" aria-expanded="false" aria-haspopup="true">
-                                <img class="img-circle" src="{{ asset(app.user.avatarOrAnonymous(32)) }}"
-                                     alt="{{ app.user.completeName }}"/>
-                            </a>
-
-                            <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navar-user">
-                                <div class="user-header text-center">
-                                    <p class="mb-0 pt-0 pr-2 pb-0 pl-2">
-                                        <img class="img-circle" src="{{ asset(app.user.avatarOrAnonymous(64)) }}"
-                                             alt="{{ app.user.completeName }}"/>
-                                    </p>
-                                    <p class="mb-0 pt-0 pr-2 pb-0 pl-2">
-                                        <a href="{{ url('legacy_main', { 'name' : 'social/home.php' }) }}">
-                                            {{ app.user.completeName }}
-                                        </a>
-                                    </p>
-                                    <p class="mb-0 pt-0 pr-2 pb-0 pl-2">
-                                        {#<span class="fa fa-envelope" aria-hidden="true"></span>#}
-                                        {{ app.user.email }}
-                                    </p>
-                                </div>
-                                <div class="dropdown-divider"></div>
-                                <a title="{{ "Inbox"|trans }}" class="dropdown-item"
-                                   href="{{ url('legacy_main', { 'name' : 'messages/inbox.php' }) }}">
-                                    <em class="fa fa-envelope" aria-hidden="true"></em> {{ "Inbox"|trans }}
-                                </a>
-
-                                <a href="{{ url('legacy_main', { 'name' : 'survey/pending.php' }) }}" class="dropdown-item">
-                                    <em class="fa fa-chart-pie"></em> {{ 'PendingSurveys'|trans }}
-                                </a>
-
-                                <a title="{{ "MyCertificates"|trans }}" class="dropdown-item"
-                                   href="{{ url('legacy_main', { 'name' : 'gradebook/my_certificates.php' }) }}">
-                                    <em class="fa fa-graduation-cap"
-                                        aria-hidden="true"></em> {{ "MyCertificates"|trans }}
-                                </a>
-
-                                <a id="logout_button" title="{{ "Logout"|trans }}" class="dropdown-item"
-                                   href="{{ path('legacy_main', { 'name' : '../public/logout'}) }}">
-                                    <em class="fa fa-sign-out-alt"></em> {{ "Logout"|trans }}
-                                </a>
-                            </div>
-                        </li>
-                    </ul>
-                {% endif %}
-            </div>
-        </div>
-    </nav>
-{% endautoescape %}

+ 27 - 42
src/ThemeBundle/Resources/views/Layout/sidebar.html.twig

@@ -1,47 +1,32 @@
 {% autoescape false %}
-<ul class="sidebar-menu scrollable pos-r">
+<div class="sidebar">
+    <nav class="sidebar-nav">
 
-    <form class="form-inline sidebar-search mt-2">
-        <div class="input-group mb-3">
-            <div class="input-group-prepend">
-                <span class="input-group-text" id="basic-search">
-                    <i class="fa fa-search"></i>
-                </span>
-            </div>
-            <input type="text" class="form-control" placeholder="{{ 'Search'|trans }}" aria-label="{{ 'Search'|trans }}" aria-describedby="basic-search">
-        </div>
-    </form>
+        {% set menu = knp_menu_get('menuApp') %}
+        {{ knp_menu_render(menu, {'ancestorClass': 'current_open open', 'template': '@ChamiloTheme/Menu/left_menu.html.twig'}) }}
 
-    {% set menu = knp_menu_get('menuApp') %}
 
-    <li class="sidebar-divider"></li>
-
-    {{ knp_menu_render(menu, {'ancestorClass': 'current_open open', 'template': '@ChamiloTheme/Menu/left_menu.html.twig'}) }}
-
-    <li class="sidebar-divider"></li>
-    <li class="nav-item">
-        <a class='sidebar-link' href="https://docs.chamilo.org/">
-            <span class="icon-holder">
-                <i class="far fa-file-alt"></i>
-            </span>
-            {{ "Documentation"|trans }}
-        </a>
-    </li>
-    <li class="nav-item">
-        <a class='sidebar-link' href="https://forum.chamilo.org/">
-            <span class="icon-holder">
-                <i class="fa fa-users"></i>
-            </span>
-            {{ "Forums"|trans }}
-        </a>
-    </li>
-    <li class="nav-item">
-        <a class='sidebar-link' href="https://github.com/chamilo/chamilo-lms">
-            <span class="icon-holder">
-                <i class="fab fa-github"></i>
-            </span>
-            {{ "GithubRepository"|trans }}
-        </a>
-    </li>
-</ul>
+        <ul class="navbar-nav">
+            <li class="nav-item">
+                <a class='nav-link' href="https://docs.chamilo.org/">
+                    <i class="far fa-file-alt"></i>
+                    {{ "Documentation"|trans }}
+                </a>
+            </li>
+            <li class="nav-item">
+                <a class='nav-link' href="https://forum.chamilo.org/">
+                    <i class="fa fa-users"></i>
+                    {{ "Forums"|trans }}
+                </a>
+            </li>
+            <li class="nav-item">
+                <a class='nav-link' href="https://github.com/chamilo/chamilo-lms">
+                    <i class="fab fa-github"></i>
+                    {{ "GithubRepository"|trans }}
+                </a>
+            </li>
+        </ul>
+    </nav>
+    {#<button class="sidebar-minimizer brand-minimizer" type="button"></button>#}
+</div>
 {% endautoescape %}

+ 0 - 286
src/ThemeBundle/Resources/views/Layout/topbar.html.twig

@@ -1,286 +0,0 @@
-<!-- Topbar -->
-{% autoescape false %}
-    <script type="text/javascript">
-        $(document).ready(function() {
-            // Sidebar links
-            $('.sidebar .sidebar-menu li a').on('click', function () {
-                const $this = $(this);
-
-                if ($this.parent().hasClass('open')) {
-                    $this
-                        .parent()
-                        .children('.dropdown-menu')
-                        .slideUp(200, () => {
-                            $this.parent().removeClass('open');
-                        });
-                } else {
-                    $this
-                        .parent()
-                        .parent()
-                        .children('li.open')
-                        .children('.dropdown-menu')
-                        .slideUp(200);
-
-                    $this
-                        .parent()
-                        .parent()
-                        .children('li.open')
-                        .children('a')
-                        .removeClass('open');
-
-                    $this
-                        .parent()
-                        .parent()
-                        .children('li.open')
-                        .removeClass('open');
-
-                    $this
-                        .parent()
-                        .children('.dropdown-menu')
-                        .slideDown(200, () => {
-                            $this.parent().addClass('open');
-                        });
-                }
-            });
-
-            // Sidebar Activity Class
-            const sidebarLinks = $('.sidebar').find('.sidebar-link');
-
-            sidebarLinks
-                .each((index, el) => {
-                    $(el).removeClass('active');
-                })
-                .filter(function () {
-                    const href = $(this).attr('href');
-                    const pattern = href[0] === '/' ? href.substr(1) : href;
-                    return pattern === (window.location.pathname).substr(1);
-                })
-                .addClass('active');
-
-            // ٍSidebar Toggle
-            $('.sidebar-toggle').on('click', e => {
-                $('.app').toggleClass('is-collapsed');
-                e.preventDefault();
-                $('.sidebar-search').toggleClass('d-none');
-            });
-
-            /**
-             * Wait until sidebar fully toggled (animated in/out)
-             * then trigger window resize event in order to recalculate
-             * masonry layout widths and gutters.
-             */
-            $('#sidebar-toggle').click(e => {
-                e.preventDefault();
-                setTimeout(() => {
-                    window.dispatchEvent(window.EVENT);
-                }, 300);
-            });
-
-            /**
-             * Notifications Systems
-             */
-            $.get(
-                '{{ url('legacy_main', { name : 'inc/ajax/message.ajax.php'}) }}',
-                {'a': 'get_count_message'},
-                function (data) {
-                    var countFriends = data.ms_friends;
-                    var countInbox = data.ms_inbox
-                    if (countFriends != 0) {
-                        $("#notifications-social").removeClass('d-none');
-                        $("#notifications-social").append(countFriends);
-                    }
-                    if(countInbox != 0){
-                        $("#notifications-inbox").removeClass('d-none');
-                        $("#notifications-inbox").append(countInbox);
-                    }
-                }
-            );
-
-            $('#list_notifications_friends').on('click', e => {
-                const $listFriends = $('#list_friends .content');
-                let $html;
-                $.get(
-                    '{{ url('legacy_main', { name : 'inc/ajax/message.ajax.php'}) }}',
-                    {'a': 'get_notifications_friends'},
-                    function (data) {
-                        $listFriends.empty();
-                        for (let i in data){
-                            $html =  '<div class="dropdown-divider"></div>';
-                            $html += '<a class="dropdown-item preview-item">';
-                            $html += '<div class="preview-thumbnail"><img class="rounded-circle" src="'+data[i].avatar+'"/></div>';
-                            $html += '<div class="preview-item-content flex-grow">';
-                            $html += '<h6 class="preview-subject">' + data[i].fullname + '<span class="date-ago float-right">'+data[i].date+'</span></h6>';
-                            $html += '<p class="preview-text">' + data[i].content + '</p>';
-                            $html += '</div></a>';
-                            $listFriends.append($html);
-                        }
-                    }
-                );
-            });
-
-            $('#list_notifications_inbox').on('click', e => {
-                const $listInbox = $('#list_inbox .content');
-                let $html;
-                $.get(
-                    '{{ url('legacy_main', { name : 'inc/ajax/message.ajax.php'}) }}',
-                    {'a': 'get_notifications_inbox'},
-                    function (data) {
-                        $listInbox.empty();
-                        for (let i in data){
-                            $html =  '<div class="dropdown-divider"></div>';
-                            $html += '<a class="dropdown-item preview-item" href="'+data[i].url+'">';
-                            $html += '<div class="preview-thumbnail"><div class="preview-icon bg-info">';
-                            $html += '<i class="far fa-envelope"></i>';
-                            $html += '</div></div>';
-                            $html += '<div class="preview-item-content flex-grow">';
-                            $html += '<h6 class="preview-subject">' + data[i].fullname + '<span class="date-ago float-right">'+data[i].date+'</span></h6>';
-                            $html += '<p class="preview-text">' + data[i].title + '</p>';
-                            $html += '</div></a>';
-                            $listInbox.append($html);
-                        }
-                    }
-                );
-            });
-        });
-    </script>
-    <div class="header navbar">
-        <div class="header-container">
-
-            <!-- NAVBAR LEFT -->
-            <ul class="nav-left">
-                <li>
-                    <a id='sidebar-toggle' class="sidebar-toggle" href="javascript:void(0);">
-                        <i class="fas fa-bars"></i>
-                    </a>
-                </li>
-                <li>
-
-                </li>
-            </ul>
-            <!-- END NAVBAR LEFT -->
-            <!-- NAVBAR RIGHT -->
-
-            {% if app.user is not null and is_granted('IS_AUTHENTICATED_FULLY') %}
-            <ul class="nav-right">
-
-                <li class="btn-menu">
-                    <a href="{{ url('legacy_main', { 'name' : 'calendar/agenda_js.php' }) }}">
-                        <i class="far fa-calendar"></i>
-                    </a>
-                </li>
-
-                <li class="notifications dropdown">
-                    <span id="notifications-social" class="counter d-none"></span>
-                    <a id="list_notifications_friends" href="#" class="dropdown-toggle no-after" data-toggle="dropdown">
-                        <i class="far fa-bell"></i>
-                    </a>
-
-                    <ul id="list_friends" class="dropdown-menu ">
-                        <a class="dropdown-item">
-                            <p id="notifications_text" class="mb-0 font-weight-normal float-left">
-                                Your recent notifications
-                            </p>
-                            <span class="badge badge-pill badge-warning float-right">View all</span>
-                        </a>
-                        <div class="content">
-                            <div class="spinner"></div>
-                        </div>
-                    </ul>
-
-                </li>
-                <li class="notifications">
-                    <span id="notifications-inbox" class="counter d-none"></span>
-                    <a id="list_notifications_inbox" href="#" class="dropdown-toggle no-after" data-toggle="dropdown">
-                        <i class="far fa-envelope"></i>
-                    </a>
-                    <ul id="list_inbox" class="dropdown-menu ">
-                        <a class="dropdown-item">
-                            <p id="notifications_text" class="mb-0 font-weight-normal float-left">
-                                Recent messages
-                            </p>
-                            <span class="badge badge-pill badge-warning float-right">View all</span>
-                        </a>
-                        <div class="content">
-                            <div class="spinner"></div>
-                        </div>
-                    </ul>
-                </li>
-
-                <li class="dropdown">
-                    <a href="" class="dropdown-toggle" data-toggle="dropdown">
-
-                        {% set avatar %}
-                            {% if app.user.pictureUri is empty %}
-                                <img
-                                    class="rounded-circle"
-                                    src="{{ url('legacy_public') ~ app.user.avatarOrAnonymous(32) }}"
-                                    alt="{{ app.user.firstname }} {{ app.user.lastname }}"
-                                >
-                            {% else %}
-                                <img
-                                    class="rounded-circle"
-                                    src="{{ url('legacy_upload') ~ app.user.getPictureLegacy() }}"
-                                    alt="{{ app.user.firstname }} {{ app.user.lastname }}"
-                                >
-                            {% endif %}
-                        {% endset %}
-
-                        {{ avatar }}
-
-                        <span class="profile-text">{{ app.user.firstname }} {{ app.user.lastname }}</span>
-                    </a>
-                    <ul class="dropdown-menu">
-                        <li>
-                            <a title="{{ "Inbox"|trans }}" class="dropdown-item"
-                               href="{{ url('legacy_main', { 'name' : 'auth/profile.php' }) }}">
-                                <em class="fa fa-envelope" aria-hidden="true"></em> {{ "Edit profile"|trans }}
-                            </a>
-                        </li>
-                        <li>
-                            <a title="{{ "Inbox"|trans }}" class="dropdown-item"
-                               href="{{ url('legacy_main', { 'name' : 'messages/inbox.php' }) }}">
-                                <em class="fa fa-envelope" aria-hidden="true"></em> {{ "Inbox"|trans }}
-                            </a>
-                        </li>
-                        <li>
-                            <a href="{{ url('legacy_main', { 'name' : 'survey/pending.php' }) }}" class="dropdown-item">
-                                <em class="fa fa-chart-pie"></em> {{ 'PendingSurveys'|trans }}
-                            </a>
-                        </li>
-                        <li>
-                            <a title="{{ "MyCertificates"|trans }}" class="dropdown-item"
-                               href="{{ url('legacy_main', { 'name' : 'gradebook/my_certificates.php' }) }}">
-                                <em class="fa fa-graduation-cap"
-                                    aria-hidden="true"></em> {{ "MyCertificates"|trans }}
-                            </a>
-                        </li>
-                        <li role="separator" class="divider"></li>
-                        <li>
-                            <a id="logout_button" title="{{ "Logout"|trans }}" class="dropdown-item"
-                               href="{{ path('legacy_main', { 'name' : '../public/logout'}) }}">
-                                <em class="fa fa-sign-out-alt"></em> {{ "Logout"|trans }}
-                            </a>
-                        </li>
-                    </ul>
-                </li>
-            </ul>
-            {% else %}
-                <ul class="nav-right">
-                    <li class="btn-padding">
-                        <a class="btn btn-light btn-create-two btn-sm" href="{{ url('legacy_main', { 'name' : 'auth/inscription.php' }) }}">
-                            <i class="fas fa-pencil-alt"></i>
-                            {{ "Register"|trans }}
-                        </a>
-                    </li>
-                    <li class="btn-padding">
-                        <a class="btn btn-light btn-create-one btn-sm" href="{{ url('legacy_main', { 'name' : '../public/login' }) }}">
-                            <i class="fas fa-sign-in-alt"></i>
-                            {{ "Sign in"|trans }}
-                        </a>
-                    </li>
-                </ul>
-            {% endif %}
-            <!-- END NAVBAR RIGHT -->
-        </div>
-    </div>
-{% endautoescape %}

+ 3 - 7
src/ThemeBundle/Resources/views/Menu/left_menu.html.twig

@@ -12,19 +12,15 @@
 
 {% block label %}
     {% if item.extras.icon is not null %}
-        <span class="icon-holder">
             <i class="fa fa-{{ item.extras.icon }}"></i>
-        </span>
     {% else %}
         <i class="far fa-circle"></i>
     {% endif %}
-    <span class="title">
+
     {{ parent() }}
-    </span>
+
     {% set childrenCount = item.children|length %}
-    {% if childrenCount > 0 %}
-        <span class="arrow"><i class="fas fa-angle-right"></i></span>
-    {% endif %}
+
 {% endblock %}
 
 {% block linkElement %}

+ 19 - 12
src/ThemeBundle/Resources/views/News/slider.html.twig

@@ -1,17 +1,8 @@
 {% import '@ChamiloTheme/Macros/box.html.twig' as macro %}
 
 {% autoescape false %}
-    {% set buttons %}
-        {% if is_granted('ROLE_ADMIN') %}
-            <a  href="{{ url('legacy_index') }}main/admin/system_announcements.php" class="btn btn-light btn-sm" >
-                <i class="fas fa-pencil-alt"></i>
-            </a>
-        {% endif %}
-    {% endset %}
-    {% set content %}
-
-    {{ macro.box_header("System announcements" | trans, buttons) }}
-
+{% set content %}
+    {% if announcements %}
     <div id="carousel-announcement" class="carousel slide" data-ride="carousel">
         <ol class="carousel-indicators">
             {% for announcement in announcements %}
@@ -46,6 +37,22 @@
             <span class="sr-only">Next</span>
         </a>
     </div>
-    {% endset %}
+    {% else %}
+        <div class="row">
+            <div class="col-md-6">
+                <div class="block-platform d-none d-block">
+                    <h1>{{ "Accelerate your future. Learn where you want and when you want"|trans }}</h1>
+                    <h5>{{ "Develop your skills with Chamilo 2.0"|trans }}</h5>
+                </div>
+            </div>
+            <div class="col-md-6">
+                <img class="d-block w-100" data-src="slide" alt="" src="{{ asset('img/intro_chamilo.svg') }}"
+                     data-holder-rendered="true">
+            </div>
+        </div>
+    {% endif %}
+{% endset %}
+
     {{ content }}
+
 {% endautoescape %}

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików