templates/Curso/ver.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}
  3.     {{ parent() }}
  4.     - Aula Virtual
  5.     {{ curso.nombre }}
  6. {% endblock %}
  7. {% block contenido %}
  8.     <div class="row contenidoPagina" style="margin-bottom:0px">
  9.         {# Botonera #}
  10.         {% if is_granted('ROLE_ADMIN') %}
  11.             {% include "Curso/showBotoneraCurso.html.twig" with { 'curso':  curso } %}
  12.         {% endif %}
  13.         {# Botonera #}
  14.         {% include "default/alertasFlash.html.twig" %}
  15.         <div class="col s12 m12 l12">
  16.             <h3 class="tituloColorOficial">
  17.                 <strong>{{ curso.nombre }}</strong>
  18.             </h3>
  19.             <p class="gris90 bajadaNota">{{ curso.descripcion }}</p>
  20.             {% if usuario is not defined %}
  21.                 {% set usuario = app.user %}
  22.             {% endif %}
  23.             {# Si existe usuario y posee el curso , muestro todo los datos #}
  24.             {% if usuario %}
  25.                 {% if usuario.poseeUnCurso(curso) == true or is_granted('ROLE_ADMIN') or curso.flagPublico == true %}
  26.                     {# Datos del Curso #}
  27.                     {# {% include "Curso/showDatosCurso.html.twig" with { 'curso':  curso } %} #}
  28.                     {% include "Curso/showPresentacionCurso.html.twig" with { 'curso':  curso } %}
  29.                     {# Datos del Curso #}
  30.                     {# Clases del Curso #}
  31.                     {% include "Clase/showClasesCurso.html.twig" with { 'curso':  curso } %}
  32.                     {# Clases del Curso #}
  33.                     {# Archivos Adjuntos del Curso #}
  34.                     {% include "Curso/showArchivosAdjuntos.html.twig" with { 'curso':  curso } %}
  35.                     {# Archivos Adjuntos del Curso #}
  36.                     {# Imagenes del Curso #}
  37.                     {% include "Curso/showImagenes.html.twig" with { 'curso':  curso } %} 
  38.                     {# Imagenes del Curso #}
  39.                     
  40.                 {% else %}
  41.                     {# Datos del Curso #}
  42.                     {% include "Curso/showPresentacionCurso.html.twig" with { 'curso':  curso } %}
  43.                     {# Datos del Curso #}
  44.                     {% if flagVentas.activo == 1 and curso.flagPublico == false %}
  45.                         <a href="{{ path('curso_comprar',{'idCurso': curso.id}) }}" class="waves-effect waves-light btn-small colorOficial white-text">Comprar</a>
  46.                     {% endif %}
  47.                 {% endif %}
  48.             {% else %}
  49.                 {# Presentacion del curso #}
  50.                 {% include "Curso/showPresentacionCurso.html.twig" with { 'curso':  curso } %}
  51.                 {# Presentacion del curso #}
  52.                 {% include "default/showMensajeInfo.html.twig" with { 'message':  'Debe iniciar sesion para poder adquirir el curso actual' } %}
  53.             {% endif %}
  54.             {# Si existe usuario y posee el curso , muestro todo los datos #}
  55.         </div>
  56.     </div>
  57. {% endblock %}