templates/frontend/Competicion/onlinePanel_new-torneo.html.twig line 1

Open in your IDE?
  1. {% set numplazas = competicion.plazas - num_inscritos %}
  2. {% set clase_plazas = 'green' %}
  3. {% set isOffline = (competicion.modo.id == 2) %}
  4. {% if numplazas <= 0 %}
  5.     {% set clase_plazas = 'red' %}
  6. {% endif %}
  7. {% if (competicion.modo.id >= 3) %}
  8.     <div class="ui secondary basic segment mobile only">
  9.         <!-- HACER SEGMENTO -->
  10.         <h4 class="ui header">
  11.             Plazas disponibles
  12.             {% if competicion.mostrarPlazas %}
  13.                 <div class="ui small circular basic label {{ clase_plazas }}">
  14.                     {% if competicion.organizador.id != "AM00" %}
  15.                         {{ numplazas }}
  16.                     {% else %}
  17.                         {{ 'messages.segun-reglamento'|trans({}, 'FrontendBundle') }}
  18.                     {% endif %}
  19.                 </div>
  20.             {% else %}
  21.                 {{ 'messages.segun-reglamento'|trans({}, 'FrontendBundle') }}
  22.             {% endif %}
  23.         </h4>
  24.     </div>
  25.     {% set oculto = "" %}
  26.     {% set rutaInsc = app.request.attributes.get('_route') %}
  27.     {% if ((competicion.fin|date('Y-m-d') < "now"|date('Y-m-d')) or (rutaInsc == 'competicion_inscritos_new' or rutaInsc == 'competicion_inscritos_pareja_new')) %}
  28.         {% set oculto = "mobile hidden" %}
  29.     {% endif %}
  30.     <div class="ui attached segment {{ oculto }} messagesBlock">
  31.         {% if competicion.social and competicion.estado == 'abierta' %}
  32.             <div class="ui orange top right attached label">
  33.                 {{ 'messages.inscripcion.social'|trans({}, 'FrontendBundle') }}
  34.             </div>
  35.         {% endif %}
  36.         <div class="ui grid stackable container">
  37.             <div class="five wide column">
  38.                 <h4 class="ui header slab verydisabled">{{ 'titles.fare'|trans({}, 'FrontendBundle') }}</h4>
  39.                 {% if not competicion.tarifaReglamento %}
  40.                     {% for tar in tarifas %}
  41.                         <p class="grisCursiva">{{ tar.nombre }}:&nbsp;&nbsp;<span
  42.                                     class="ui small circular verydisabled label">{{ tar.importe }} €</span></p>
  43.                     {% endfor %}
  44.                 {% else %}
  45.                     <div class="ui circular label">{{ 'messages.segun-reglamento'|trans({}, 'FrontendBundle') }}</div>
  46.                 {% endif %}
  47.             </div>
  48.             <div class="six wide column grisCursiva">
  49.                 <h4 class="ui header slab verydisabled">{{ 'titles.time-limit'|trans({}, 'FrontendBundle') }} (hora local)</h4>
  50.                 {% if competicion.inicio != null %}
  51.                     <i class="unlock disabled grey icon"></i>
  52.                     <span>{{ competicion.inicio|date('d/m/y', competicion.club.timezone.nombre) }}&nbsp;</span>
  53.                     <i class="wait disabled grey icon"></i>
  54.                     <span>{{ competicion.inicio|date('H:i', competicion.club.timezone.nombre) }}</span>&nbsp;&nbsp;
  55.                 {% endif %}
  56.                 {% if competicion.fin != null %}
  57.                     <i class="lock disabled grey icon"></i>
  58.                     <span>{{ competicion.fin|date('d/m/y', competicion.club.timezone.nombre) }}</span>&nbsp;
  59.                     <i class="wait disabled grey icon"></i>
  60.                     <span>{{ competicion.fin|date('H:i', competicion.club.timezone.nombre) }}</span>
  61.                 {% endif %}
  62.             </div>
  63.             <div class="five wide middle aligned column">
  64.                 {% if competicion.estado == 'abierta' and (not competicion.inicio is null) and competicion.modo.id != 5 %}
  65.                     {% set lic = app.request.get('lic')|default('') %}
  66.                     {% set email = app.request.get('email')|default('') %}
  67.                     {% set clase_inscripcion = "disabled" %}
  68.                     {% set plazas_disponibles = competicion.plazas - num_inscritos %}
  69.                     {% if (
  70.                             (
  71.                                 ((plazas_disponibles <= 0) and competicion.listaEspera) or (plazas_disponibles > 0)
  72.                             )
  73.                             and (
  74.                                 'now'|date("U") >= competicion.inicio|date("U") and 'now'|date("U") < competicion.fin|date("U")
  75.                             )
  76.                         ) %}
  77.                             {% set clase_inscripcion = "blue" %}
  78.                     {% endif %}
  79.                     {% if competicion.jugadores == 1 %}
  80.                         <a class="ui animated fluid {{ clase_inscripcion }} middle aligned button" tabindex="0"
  81.                            href="{{ path('competicion_inscritos_new', {'id': competicion.id }) }}?lic={{ lic }}&email={{ email }}#insc{{ competicion.id }}">
  82.                             <div class="visible content">
  83.                                 {% if (plazas_disponibles > 0) %}
  84.                                     {{ 'competicion.inscritos.inscripcion'|trans({}, 'FrontendBundle') }}
  85.                                 {% elseif ((plazas_disponibles <= 0) and competicion.listaEspera) %}
  86.                                     {{ 'competicion.inscritos.inscripcion'|trans({}, 'FrontendBundle') }}
  87.                                 {% else %}
  88.                                     {{ 'competicion.inscritos.no_available'|trans({}, 'FrontendBundle') }}
  89.                                 {% endif %}
  90.                             </div>
  91.                             <div class="hidden content">
  92.                                 Plazas disponibles:
  93.                                 {% if competicion.mostrarPlazas %}
  94.                                     {% if competicion.organizador.id != "AM00" %}
  95.                                         {{ numplazas }}
  96.                                     {% else %}
  97.                                         {{ 'messages.segun-reglamento'|trans({}, 'FrontendBundle') }}
  98.                                     {% endif %}
  99.                                 {% else %}
  100.                                     {{ 'messages.segun-reglamento'|trans({}, 'FrontendBundle') }}
  101.                                 {% endif %}
  102.                             </div>
  103.                         </a>
  104.                     {% elseif competicion.jugadores == 2 %}
  105.                         <a href="{{ path('competicion_inscritos_pareja_new', {'id': competicion.id }) }}?lic={{ lic }}&email={{ email }}#insc{{ competicion.id }}"
  106.                            class="{{ clase_inscripcion }}">
  107.                             <div class="ui animated fluid {{ clase_inscripcion }} button" tabindex="0">
  108.                                 <div class="visible content">
  109.                                     {{ 'competicion.inscritos.inscripcion'|trans({}, 'FrontendBundle') }}
  110.                                 </div>
  111.                                 <div class="hidden content">
  112.                                     Plazas disponibles:
  113.                                     {% if competicion.mostrarPlazas %}
  114.                                         {% if competicion.organizador.id != "AM00" %}
  115.                                             {{ numplazas }}
  116.                                         {% else %}
  117.                                             {{ 'messages.segun-reglamento'|trans({}, 'FrontendBundle') }}
  118.                                         {% endif %}
  119.                                     {% else %}
  120.                                         {{ 'messages.segun-reglamento'|trans({}, 'FrontendBundle') }}
  121.                                     {% endif %}
  122.                                 </div>
  123.                             </div>
  124.                         </a>
  125.                     {% elseif competicion.jugadores > 2 %}
  126.                         <a href="{{ path('competicion_inscritos_equipo_new', {'id': competicion.id }) }}?lic={{ lic }}&email={{ email }}#insc{{ competicion.id }}"
  127.                            class="{{ clase_inscripcion }}">
  128.                             <div class="ui animated fluid {{ clase_inscripcion }} button" tabindex="0">
  129.                                 <div class="visible content">
  130.                                     {{ 'competicion.inscritos.inscripcion'|trans({}, 'FrontendBundle') }}
  131.                                 </div>
  132.                                 <div class="hidden content">
  133.                                     Plazas disponibles:
  134.                                     {% if competicion.mostrarPlazas %}
  135.                                         {% if competicion.organizador.id != "AM00" %}
  136.                                             {{ numplazas }}
  137.                                         {% else %}
  138.                                             {{ 'messages.segun-reglamento'|trans({}, 'FrontendBundle') }}
  139.                                         {% endif %}
  140.                                     {% else %}
  141.                                         {{ 'messages.segun-reglamento'|trans({}, 'FrontendBundle') }}
  142.                                     {% endif %}
  143.                                 </div>
  144.                             </div>
  145.                         </a>
  146.                     {% endif %}
  147.                 {% else %}
  148.                     {% set mensaje_boton = 'messages.inscripcion.sinPlazo'|trans({}, 'FrontendBundle') %}
  149.                     {% if competicion.estado == 'congelada' %}
  150.                         {% set mensaje_boton = 'messages.inscripcion.congelada'|trans({}, 'FrontendBundle') %}
  151.                     {% elseif competicion.estado == 'cancelada' %}
  152.                         {% set mensaje_boton = 'messages.inscripcion.cancelada'|trans({}, 'FrontendBundle') %}
  153.                     {% elseif competicion.estado == 'finalizada' %}
  154.                         {% set mensaje_boton = 'messages.inscripcion.finalizada'|trans({}, 'FrontendBundle') %}
  155.                     {% endif %}
  156.                     {% if competicion.modo.id == 5 %}
  157.                         {% set mensaje_boton = 'Debe realizar la inscripción en el correo ' ~ (competicion.organizador.getEmpleadoTipo(7).emailCod|decod(secret))|default(competicion.organizador.user.email) %}
  158.                     {% endif %}
  159.                     <button class="ui grey basic fluid button boton-modal right floated"
  160.                             data-texto="{{ mensaje_boton }}">
  161.                         {{ 'competicion.inscritos.inscripcion'|trans({}, 'FrontendBundle') }}
  162.                     </button>
  163.                     <div class="ui page dimmer" id="dimmerEstado">
  164.                         <div class="content">
  165.                             <h2 class="center">
  166.                                 <i class="info circle icon"></i>
  167.                                 <span id="modal-text"></span>
  168.                             </h2>
  169.                             <h2 class="center">
  170.                                 {{ 'messages.inscripcion.abiertas'|trans({}, 'FrontendBundle') }} <a
  171.                                         href="{{ path('competiciones_abiertas', {id: competicion.organizador.id }) }}">{{ 'competiciones'|trans({}, 'FrontendBundle')|lower }}</a>
  172.                             </h2>
  173.                         </div>
  174.                     </div>
  175.                 {% endif %}
  176.             </div>
  177.         </div>
  178.     </div>
  179. {% elseif isOffline %}
  180.     <div class="ui attached segment messagesBlock">
  181.         <div class="ui grid">
  182.             <div class="five wide right floated column">
  183.                 <button class="ui fluid basic black disabled button" type="button">
  184.                     {{ 'competicion.inscritos.inscriptionInClub'|trans({}, 'FrontendBundle') }}
  185.                 </button>
  186.             </div>
  187.         </div>
  188.     </div>
  189. {% endif %}
  190. {# Se elimina condicion de mostrado del message del covid
  191. {% if ((competicion.showLiveScoring == "publico" and algunaHoy) or (is_granted('ROLE_ADMIN') and algunaHoy) or (competicion.showLiveScoring == "club" and is_granted('ROLE_CLUB') and algunaHoy) or (competicion.showLiveScoring == "federacion" and is_granted('ROLE_FEDE') and algunaHoy)) or (competicion.aviso is not null or competicion.aviso is not empty) or (competicion.observaciones is not null and competicion.observaciones|trim != "") or (competicion.premios is not null and competicion.premios|trim != "") or (competicion.informacion != null) or (competicion.organizador.id == "AM00") %} #}
  192. {% if ((competicion.showLiveScoring == "publico" and algunaHoy) or (is_granted('ROLE_ADMIN') and algunaHoy) or (competicion.showLiveScoring == "club" and is_granted('ROLE_CLUB') and algunaHoy) or (competicion.showLiveScoring == "federacion" and is_granted('ROLE_FEDE') and algunaHoy)) or (competicion.aviso is not null or competicion.aviso is not empty) or (competicion.observaciones is not null and competicion.observaciones|trim != "") or (competicion.premios is not null and competicion.premios|trim != "") or (competicion.informacion != null) %}
  193.     <div class="ui attached segment messagesBlock">
  194.         {% if competicion.formula.id not in ['P', 'R'] and (((competicion.showLiveScoring == "publico" and algunaHoy) or (is_granted('ROLE_ADMIN') and algunaHoy) or (competicion.showLiveScoring == "club" and is_granted('ROLE_CLUB') and algunaHoy) or (competicion.showLiveScoring == "federacion" and is_granted('ROLE_FEDE') and algunaHoy))) %}
  195.             {% set urlLiveScoring = url('livescoring', {'id': competicion.id}) %}
  196.             {% include 'frontend/Default/liveScoringAlert.html.twig' with {'data': urlLiveScoring } %}
  197.         {% endif %}
  198.         {# Se elimina COVID de la inscripción AM00 - NEX-1838
  199.         {% if competicion.organizador.id == "AM00" %}
  200.             <div class="ui warning icon message messageShadow">
  201.                 <i class="edit outline large icon"></i>
  202.                 <div class="content">
  203.                     <div class="header">
  204.                         {{ 'messages.competicion.covid-title'|trans({}, 'FrontendBundle') }}
  205.                     </div>
  206.                     <div class="textoAviso">
  207.                         {{ 'messages.competicion.covid-body'|trans({}, 'FrontendBundle')|raw }}
  208.                     </div>
  209.                 </div>
  210.             </div>
  211.         {% endif %} #}
  212.         {% if competicion.aviso is not null or competicion.aviso is not empty %}
  213.             {% include 'frontend/Default/infoPanels/notice-panel-dropdown.html.twig' with {'data': competicion.aviso} %}
  214.         {% endif %}
  215.         {% if competicion.observaciones is not null and competicion.observaciones|trim != "" %}
  216.             {% include 'frontend/Default/infoPanels/observations-panel-dropdown.html.twig' with {'data': competicion.observaciones} %}
  217.         {% endif %}
  218.         {% if competicion.informacion != null %}
  219.             {% include 'frontend/Default/infoPanels/info-panel-dropdown.html.twig' with {'data': competicion.informacion} %}
  220.         {% endif %}
  221.         {% if competicion.premios != null %}
  222.             {% include 'frontend/Default/infoPanels/awards-panel-dropdown.html.twig' with {'data': competicion.premios} %}
  223.         {% endif %}
  224.     </div>
  225. {% endif %}
  226. {% if clima is defined and clima is not empty %}
  227.     {% set elements = ["first", "second"] %}
  228.     <div class="ui top attached tabular menu climatologia">
  229.         {% for cli in clima %}
  230.             {% set active = "" %}
  231.             {% if loop.first %}
  232.                 {% set active = "active" %}
  233.             {% endif %}
  234.             <a class="item {{ active }}"
  235.                data-tab="{{ elements[loop.index0] }}">{{ cli["fecha"]|format_date(pattern='E', locale=locale) }}</a>
  236.         {% endfor %}
  237.     </div>
  238.     {% for cli in clima %}
  239.         {% set active = "" %}
  240.         {% if loop.first %}
  241.             {% set active = "active" %}
  242.         {% endif %}
  243.         <div class="ui bottom attached {{ active }} tab segment climatologia messageBlock"
  244.              data-tab="{{ elements[loop.index0] }}">
  245.             <div class="ui message messageShadow">
  246.                 <div class="content">
  247.                     {# <div class="ui fitted divider hidden"></div>
  248.                     <div class="ui disabled small {% if cli.horario is defined and cli.horario is empty %}center aligned{% endif %} header">
  249.                         <i class="info grey disabled circle icon"></i>
  250.                         &nbsp;{{ cli.summary }}
  251.                     </div> #}
  252.                     {#                    <div class="ui {% if not cli.horario is empty %}fitted{% endif %} divider hidden"></div> #}
  253.                     {#                    <div class="ui fitted divider hidden"></div> #}
  254.                     {% if cli.horario is defined and cli.horario is empty %}
  255.                         <div class="ui equal width grid divided middle aligned weathertext">
  256.                             <div class="center aligned column mobile hidden">
  257.                                 <svg class="noWidth" width="39" height="39" xmlns="http://www.w3.org/2000/svg"
  258.                                 >
  259.                                     <g fill="#ddd">
  260.                                         <g stroke="null"
  261.                                            transform="matrix(0.7916406393051147,0,0,0.7916406393051147,-0.20773422856450452,6.4587236917304836)"
  262.                                            id="svg_9">
  263.                                             <svg stroke="null" viewBox="0 0 100 100" height="100px" width="100px"
  264.                                                  y="-35.7368" x="-25.7368" id="svg_8"
  265.                                                  xmlns="http://www.w3.org/2000/svg">
  266.                                                 <g stroke="null" id="svg_3">
  267.                                                     <g stroke="null" id="svg_4">
  268.                                                         <path stroke="null" id="svg_5"
  269.                                                               d="m38.688,41.859l-2.828,-2.828c-0.781,-0.78 -2.047,-0.78 -2.828,0c-0.781,0.781 -0.781,2.047 0,2.828l2.828,2.828c0.781,0.781 2.047,0.781 2.828,0c0.781,-0.781 0.781,-2.046 0,-2.828zm33.309,12.141l-3.999,0c-1.104,0 -1.999,0.896 -1.999,2s0.895,2 1.999,2l3.999,0c1.105,0 2,-0.896 2,-2s-0.894,-2 -2,-2zm-39.994,0l-4,0c-1.104,0 -2,0.896 -2,2s0.896,2 2,2l4,0c1.104,0 2,-0.896 2,-2s-0.897,-2 -2,-2zm27.996,9.999l-19.998,0c-1.104,0 -1.999,0.896 -1.999,2s0.896,1.999 1.999,1.999l19.998,0c1.104,0 2,-0.895 2,-1.999s-0.895,-2 -2,-2zm6.97,-24.968c-0.78,-0.78 -2.048,-0.78 -2.828,0l-2.828,2.828c-0.78,0.781 -0.78,2.047 0,2.828c0.781,0.781 2.048,0.781 2.828,0l2.828,-2.828c0.78,-0.781 0.78,-2.047 0,-2.828zm-16.968,0.971c1.104,0 1.999,-0.896 1.999,-2l0,-3.999c0,-1.104 -0.896,-2 -1.999,-2c-1.105,0 -2,0.896 -2,2l0,3.999c0,1.104 0.895,2 2,2zm0,4c-6.627,0 -11.999,5.371 -11.999,11.998c0,1.404 0.254,2.747 0.697,3.999l4.381,0c-0.683,-1.177 -1.079,-2.54 -1.079,-3.999c0,-4.418 3.582,-7.999 8,-7.999c4.417,0 7.998,3.581 7.998,7.999c0,1.459 -0.396,2.822 -1.078,3.999l4.381,0c0.443,-1.252 0.697,-2.595 0.697,-3.999c0,-6.627 -5.372,-11.998 -11.998,-11.998zm0,16.247c0.552,0 0.999,-0.447 0.999,-1l0,-3.827l2.536,2.535c0.39,0.391 1.023,0.391 1.414,0c0.39,-0.391 0.39,-1.023 0,-1.414l-4.242,-4.242c-0.391,-0.391 -1.024,-0.391 -1.414,0l-4.242,4.242c-0.391,0.391 -0.391,1.023 0,1.414s1.023,0.391 1.414,0l2.535,-2.535l0,3.827c0,0.553 0.447,1 1,1z"
  270.                                                               clip-rule="evenodd" fill-rule="evenodd"/>
  271.                                                     </g>
  272.                                                 </g>
  273.                                             </svg>
  274.                                         </g>
  275.                                     </g>
  276.                                 </svg>
  277.                                 <span class="suntimes">
  278.                                     {{ cli.sunriseTime is defined and cli.sunriseTime|date("H:i", competicion.club.timezone ? competicion.club.timezone.nombre : default_timezone_get()) }}
  279.                                 </span>
  280.                                 <svg class="noWidth" width="39" height="39" xmlns="http://www.w3.org/2000/svg"
  281.                                 >
  282.                                     <path fill="#ddd" stroke="null" id="svg_7"
  283.                                           d="m36.67492,25.88526l-3.14573,0c-0.86822,0 -1.57208,-0.70464 -1.57208,-1.57286s0.70386,-1.57286 1.57208,-1.57286l3.14573,0c0.86822,0 1.57208,0.70464 1.57208,1.57286s-0.70307,1.57286 -1.57208,1.57286zm-6.17821,-10.46898c-0.6142,0.6142 -1.61061,0.6142 -2.22403,0c-0.6142,-0.6142 -0.6142,-1.60983 0,-2.22403l2.22403,-2.22403c0.61342,-0.61342 1.60983,-0.61342 2.22324,0c0.6142,0.6142 0.6142,1.60983 0,2.22403l-2.22324,2.22403zm-2.23347,12.04105l-3.44536,0c0.53635,-0.92563 0.84777,-1.99754 0.84777,-3.14494c0,-3.47445 -2.81621,-6.29067 -6.28988,-6.29067c-3.47445,0 -6.29145,2.81621 -6.29145,6.29067c0,1.1474 0.31221,2.21931 0.84935,3.14494l-3.44614,0c-0.34839,-0.98461 -0.54814,-2.04079 -0.54814,-3.14494c0,-5.21168 4.22471,-9.43561 9.43639,-9.43561c5.2109,0 9.43561,4.22392 9.43561,9.43561c0,1.10415 -0.19975,2.16033 -0.54814,3.14494zm-8.88746,-15.72627c-0.86901,0 -1.57286,-0.70464 -1.57286,-1.57286l0,-3.14494c0,-0.86822 0.70386,-1.57286 1.57286,-1.57286c0.86822,0 1.57286,0.70464 1.57286,1.57286l0,3.14494c0,0.86822 -0.70543,1.57286 -1.57286,1.57286zm-11.12093,3.68522l-2.22403,-2.22403c-0.6142,-0.6142 -0.6142,-1.60983 0,-2.22403c0.6142,-0.61342 1.60983,-0.61342 2.22403,0l2.22403,2.22403c0.6142,0.6142 0.6142,1.60983 0,2.22403s-1.60904,0.6142 -2.22403,0zm-1.4604,8.89611c0,0.86822 -0.70464,1.57286 -1.57286,1.57286l-3.14573,0c-0.86822,0 -1.57286,-0.70464 -1.57286,-1.57286s0.70464,-1.57286 1.57286,-1.57286l3.14573,0c0.86822,0 1.57286,0.70464 1.57286,1.57286zm12.58133,-3.14573c0.43411,0 0.78643,0.35232 0.78643,0.78643l0,3.01046l1.9936,-1.9936c0.30749,-0.30749 0.80452,-0.30749 1.11201,0s0.30749,0.80452 0,1.11201l-3.33604,3.33604c-0.30749,0.30749 -0.80452,0.30749 -1.11201,0l-3.33604,-3.33604c-0.30749,-0.30749 -0.30749,-0.80452 0,-1.11201s0.80452,-0.30749 1.11201,0l1.9936,1.9936l0,-3.01046c0,-0.43411 0.35153,-0.78643 0.78643,-0.78643zm-7.86353,9.43639l15.72627,0c0.86822,0 1.57286,0.70464 1.57286,1.57286s-0.70464,1.57208 -1.57286,1.57208l-15.72627,0c-0.86822,0 -1.57286,-0.70386 -1.57286,-1.57208s0.70386,-1.57286 1.57286,-1.57286z"
  284.                                           clip-rule="evenodd" fill-rule="evenodd"/>
  285.                                 </svg>
  286.                                 <span class="suntimes">
  287.                                     {{ cli.sunsetTime is defined and cli.sunsetTime|date("H:i", competicion.club.timezone ? competicion.club.timezone.nombre : default_timezone_get()) }}
  288.                                 </span>
  289.                             </div>
  290.                             <div class="center aligned column">
  291.                                 {# tomamos la temperatura mas cercana por abajo #}
  292.                                 {% if cli.horario is defined and cli.horario is not empty %}
  293.                                     {% set enc = false %}
  294.                                     {% set valorTemp = cli.horario[0].clima.temperature|number_format(0, '','') %}
  295.                                     {% for horario in cli.horario %}
  296.                                         {# buscamos la mas cercana a la actual #}
  297.                                         {% if horario.fecha|date("H") == "now"|date('H') %}
  298.                                             {% set valorTemp = horario.clima.temperature|number_format(0, '','') %}
  299.                                             {% set enc = true %}
  300.                                         {% endif %}
  301.                                         {# tomamos la temperatura mas cercana por arriba #}
  302.                                         {% if not enc %}
  303.                                             {% set valorTemp = cli.horario[cli.horario|length - 1].clima.temperature|number_format(0, '','') %}
  304.                                         {% endif %}
  305.                                     {% endfor %}
  306.                                     {# controlamos para que no salga -0 al redondear #}
  307.                                     {% if valorTemp < 1 and valorTemp > -1 %}
  308.                                         {% set valorTemp = 0 %}
  309.                                     {% endif %}
  310.                                     <span class="emph">{{ valorTemp }}º</span>
  311.                                 {% endif %}
  312.                                 <span class="skyicon">
  313.                                     {% if cli.conditionCode is defined and cli.conditionCode is not empty %}
  314.                                         <i class="ui large grey icon">
  315.                                         {# <canvas class="{{ cli.conditionCode }}" width="35" height="35">
  316.                                         </canvas> #}
  317.                                             {% include 'FrontendBundle:Climacon:' ~ cli.conditionCode ~ '.html.twig' ignore missing %}
  318.                                         </i>
  319.                                     {% endif %}
  320.                                 </span>
  321.                                 {% if cli.precipitationChance is defined and ((cli.precipitationChance * 100) < 15) %}
  322.                                     <span class="windtext">{{ cli.windSpeed|number_format(0, '', '') }}
  323.                                         <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"
  324.                                              viewBox="4 0 24 16">
  325.                                         <path d="M11 10H0V8h11c.55 0 1-.45 1-1s-.45-1-1-1c-.4 0-.75.24-.9.6l-1.75-.97C8.85 4.67 9.85 4 11 4c3.97 0 3.97 6 0 6zm7 7c0-1.66-1.34-3-3-3H0v2h15c.55 0 1 .45 1 1s-.45 1-1 1c-.4 0-.75-.24-.9-.6l-1.75.97c.5.96 1.5 1.63 2.65 1.63 1.66 0 3-1.34 3-3zm1-7.66c.1-.75.73-1.34 1.5-1.34.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5H0v2h20.5c1.93 0 3.5-1.57 3.5-3.5S22.43 6 20.5 6c-1.62 0-2.98 1.12-3.37 2.62l1.88.73z"/>
  326.                                         </svg>
  327.                                     </span>
  328.                                 {% endif %}
  329.                             </div>
  330.                             <div class="center aligned column">
  331.                                 <span class="min">{{ cli.temperatureMin|number_format(0, '','') }}º</span>
  332.                                 <span class="windtext">
  333.                                     <svg xmlns="http://www.w3.org/2000/svg" width="18" height="24" viewBox="-2 0 18 22">
  334.                                     <path d="M7.65 4.34v6.78c0 1.42-.46 2.06-1.27 2.75-.9.77-1.43 1.9-1.43 3.08C4.95 19.2 6.75 21 9 21c2.23 0 4.05-1.8 4.05-4.05 0-1.18-.52-2.3-1.43-3.08-.8-.7-1.27-1.34-1.27-2.75V4.35C10.35 3.6 9.75 3 9 3s-1.35.6-1.35 1.33zm4.5 0v6.78c0 .53.23 1.03.64 1.38 1.23 1.07 2.03 2.67 2.03 4.45 0 3.24-2.62 5.86-5.85 5.86-3.25 0-5.87-2.6-5.87-5.83 0-1.78.8-3.38 2.08-4.45.4-.34.65-.84.65-1.37v-6.8C5.85 2.6 7.25 1.2 9 1.2s3.15 1.4 3.15 3.13zm0 12.6c0 1.75-1.4 3.16-3.15 3.16s-3.15-1.4-3.15-3.15c0-1.02.54-1.87 1.25-2.5.9-.8 1.45-1.56 1.45-2.9v-.45h.9v.45c0 1.34.54 2.1 1.45 2.9.7.63 1.25 1.48 1.25 2.5z"/>
  335.                                     </svg>
  336.                                 </span>
  337.                                 <span class="max">{{ cli.temperatureMax|number_format(0, '','') }}º</span>
  338.                             </div>
  339.                             {% if cli.precipitationChance is defined and cli.precipitationChance != 0 %}
  340.                                 <div class="center aligned column ">
  341.                                     <span class="raintext">{{ (100 * cli.precipitationChance)|number_format(0, '', '') }}%</span>
  342.                                     <svg class="windtext" xmlns="http://www.w3.org/2000/svg" width="18" height="18"
  343.                                          viewBox="0 0 24 24">
  344.                                         <path d="M13 2.06V1c0-.55-.45-1-1-1s-1 .45-1 1v1.05c-6.92.52-10.37 5.6-11 9.9 1.86-2.67 6.14-2.67 8 0 1.84-2.63 6.05-2.68 7.92 0 1.86-2.67 6.22-2.67 8.08 0-.63-4.28-4.13-9.32-11-9.9zm0 10.1V21c0 1.66-1.34 3-3 3s-3-1.34-3-3v-1h2v1c0 .55.45 1 1 1s1-.45 1-1v-8.87c.68-.22 1.27-.24 2 .03z"/>
  345.                                     </svg>
  346.                                 </div>
  347.                             {% endif %}
  348.                         </div>
  349.                     {% else %}
  350.                         <div class="ui equal width grid divided middle aligned weathertext mobile only">
  351.                             <div class="center aligned column">
  352.                                 {# tomamos la temperatura mas cercana por abajo #}
  353.                                 {% if cli.horario is defined and cli.horario is not empty %}
  354.                                     {% set enc = false %}
  355.                                     {% set valorTemp = cli.horario[0].clima.temperature|number_format(0, '','') %}
  356.                                     {% for horario in cli.horario %}
  357.                                         {# buscamos la mas cercana a la actual #}
  358.                                         {% if horario.fecha|date("H") == "now"|date('H') %}
  359.                                             {% set valorTemp = horario.clima.temperature|number_format(0, '','') %}
  360.                                             {% set enc = true %}
  361.                                         {% endif %}
  362.                                         {# tomamos la temperatura mas cercana por arriba #}
  363.                                         {% if not enc %}
  364.                                             {% set valorTemp = cli.horario[cli.horario|length - 1].clima.temperature|number_format(0, '','') %}
  365.                                         {% endif %}
  366.                                     {% endfor %}
  367.                                     <span class="emph">{{ valorTemp }}º</span>
  368.                                 {% endif %}
  369.                                 <span class="skyicon mobile hidden">
  370.                                     {# <canvas class="{{ cli.conditionCode }}" width="35" height="35">
  371.                                     </canvas> #}
  372.                                     {% if cli.conditionCode is defined and cli.conditionCode is not empty %}
  373.                                         <i class="ui small grey icon">
  374.                                         {# <canvas class="{{ cli.conditionCode }}" width="35" height="35">
  375.                                         </canvas> #}
  376.                                             {% include 'FrontendBundle:Climacon:' ~ cli.conditionCode ~ '.html.twig' ignore missing %}
  377.                                         </i>
  378.                                     {% endif %}
  379.                                 </span>
  380.                                 {% if cli.precipitationChance is defined and ((cli.precipitationChance * 100) < 15) %}
  381.                                     <span class="windtext">{{ cli.windSpeed|number_format(0, '', '') }}
  382.                                         <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"
  383.                                              viewBox="4 0 24 16">
  384.                                         <path d="M11 10H0V8h11c.55 0 1-.45 1-1s-.45-1-1-1c-.4 0-.75.24-.9.6l-1.75-.97C8.85 4.67 9.85 4 11 4c3.97 0 3.97 6 0 6zm7 7c0-1.66-1.34-3-3-3H0v2h15c.55 0 1 .45 1 1s-.45 1-1 1c-.4 0-.75-.24-.9-.6l-1.75.97c.5.96 1.5 1.63 2.65 1.63 1.66 0 3-1.34 3-3zm1-7.66c.1-.75.73-1.34 1.5-1.34.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5H0v2h20.5c1.93 0 3.5-1.57 3.5-3.5S22.43 6 20.5 6c-1.62 0-2.98 1.12-3.37 2.62l1.88.73z"/>
  385.                                         </svg>
  386.                                     </span>
  387.                                 {% endif %}
  388.                             </div>
  389.                             <div class="center aligned column">
  390.                                 <span class="min">{{ cli.temperatureMin|number_format(0, '','') }}º</span>
  391.                                 <span class="windtext">
  392.                                     <svg xmlns="http://www.w3.org/2000/svg" width="18" height="24" viewBox="-2 0 18 22">
  393.                                     <path d="M7.65 4.34v6.78c0 1.42-.46 2.06-1.27 2.75-.9.77-1.43 1.9-1.43 3.08C4.95 19.2 6.75 21 9 21c2.23 0 4.05-1.8 4.05-4.05 0-1.18-.52-2.3-1.43-3.08-.8-.7-1.27-1.34-1.27-2.75V4.35C10.35 3.6 9.75 3 9 3s-1.35.6-1.35 1.33zm4.5 0v6.78c0 .53.23 1.03.64 1.38 1.23 1.07 2.03 2.67 2.03 4.45 0 3.24-2.62 5.86-5.85 5.86-3.25 0-5.87-2.6-5.87-5.83 0-1.78.8-3.38 2.08-4.45.4-.34.65-.84.65-1.37v-6.8C5.85 2.6 7.25 1.2 9 1.2s3.15 1.4 3.15 3.13zm0 12.6c0 1.75-1.4 3.16-3.15 3.16s-3.15-1.4-3.15-3.15c0-1.02.54-1.87 1.25-2.5.9-.8 1.45-1.56 1.45-2.9v-.45h.9v.45c0 1.34.54 2.1 1.45 2.9.7.63 1.25 1.48 1.25 2.5z"/>
  394.                                     </svg>
  395.                                 </span>
  396.                                 <span class="max">{{ cli.temperatureMax|number_format(0, '','') }}º</span>
  397.                             </div>
  398.                             {% if cli.precipitationChance is defined and cli.precipitationChance != 0 %}
  399.                                 <div class="center aligned column ">
  400.                                     <span class="raintext">{{ (100 * cli.precipitationChance)|number_format(0, '', '') }}%</span>
  401.                                     <svg class="windtext" xmlns="http://www.w3.org/2000/svg" width="18" height="18"
  402.                                          viewBox="0 0 24 24">
  403.                                         <path d="M13 2.06V1c0-.55-.45-1-1-1s-1 .45-1 1v1.05c-6.92.52-10.37 5.6-11 9.9 1.86-2.67 6.14-2.67 8 0 1.84-2.63 6.05-2.68 7.92 0 1.86-2.67 6.22-2.67 8.08 0-.63-4.28-4.13-9.32-11-9.9zm0 10.1V21c0 1.66-1.34 3-3 3s-3-1.34-3-3v-1h2v1c0 .55.45 1 1 1s1-.45 1-1v-8.87c.68-.22 1.27-.24 2 .03z"/>
  404.                                     </svg>
  405.                                 </div>
  406.                             {% endif %}
  407.                         </div>
  408.                         <div class="ui padded grid mobile hidden">
  409.                             <div class="sixteen wide column">
  410.                                 <div class="ui equal width center aligned grid timetext">
  411.                                     <div class="column emph">
  412.                                         <b>
  413.                                             {{ cli.sunriseTime is defined and cli.sunriseTime|date("H:i", competicion.club.timezone ? competicion.club.timezone.nombre : default_timezone_get()) }}
  414.                                         </b>
  415.                                     </div>
  416.                                     {% for horario in cli.horario|default([]) %}
  417.                                         <div class="column">
  418.                                             {{ horario.fecha|date("G") }}
  419.                                         </div>
  420.                                     {% endfor %}
  421.                                     <div class="column emph">
  422.                                         <b>
  423.                                             {{ cli.sunsetTime|date("H:i", competicion.club.timezone ? competicion.club.timezone.nombre : default_timezone_get()) }}
  424.                                         </b>
  425.                                     </div>
  426.                                 </div>
  427.                                 {% set maxClass = "" %}
  428.                                 {% set minClass = "" %}
  429.                                 {# este es el grid para version ordenador #}
  430.                                 <div class="ui equal width center aligned grid tempbg temptext">
  431.                                     {% if cli.posMin == -1 %}
  432.                                         {% set minClass = "min emph" %}
  433.                                     {% endif %}
  434.                                     {# controlamos para que no salga -0 al redondear #}
  435.                                     {% set valorTemp = cli.primera.temperature %}
  436.                                     {% if valorTemp < 1 and valorTemp > -1 %}
  437.                                         {% set valorTemp = 0 %}
  438.                                     {% endif %}
  439.                                     <div class="column {{ minClass }}">{{ valorTemp|number_format(0, '', '') }}º</div>
  440.                                     {% for horario in cli.horario|default([]) %}
  441.                                         {% set maxClass = "" %}
  442.                                         {% set minClass = "" %}
  443.                                         {% if cli.posMin == loop.index0 %}
  444.                                             {% set minClass = "min emph" %}
  445.                                         {% endif %}
  446.                                         {% if cli.posMax == loop.index0 %}
  447.                                             {% set maxClass = "max emph" %}
  448.                                         {% endif %}
  449.                                         {% set valTemp = horario.clima.temperature %}
  450.                                         {% if valTemp < 1 and valTemp > -1 %}
  451.                                             {% set valTemp = 0 %}
  452.                                         {% endif %}
  453.                                         <div class="column {{ minClass }} {{ maxClass }}">{{ valTemp|number_format(0, '','') }}
  454.                                             º
  455.                                         </div>
  456.                                     {% endfor %}
  457.                                     {% set valorTemp = cli.ultima.temperature|number_format(0, '', '') %}
  458.                                     {% if valorTemp is not null and valorTemp is not empty %}
  459.                                         {% if valorTemp < 1 and valorTemp > -1 %}
  460.                                             {% set valorTemp = 0 %}
  461.                                         {% endif %}
  462.                                         {% set valorTemp = valorTemp ~ "º" %}
  463.                                     {% else %}
  464.                                         {% set valorTemp = "-" %}
  465.                                     {% endif %}
  466.                                     {% if cli.posMax == -1 %}
  467.                                         {% set maxClass = "max emph" %}
  468.                                     {% endif %}
  469.                                     <div class="column {{ maxClass }}">{{ valorTemp }}</div>
  470.                                 </div>
  471.                                 <div class="ui equal width center aligned grid scale">
  472.                                     <div class="column">
  473.                                         <svg class="noWidth" width="39" height="39" xmlns="http://www.w3.org/2000/svg"
  474.                                         >
  475.                                             <g fill="#ddd">
  476.                                                 <g stroke="null"
  477.                                                    transform="matrix(0.7916406393051147,0,0,0.7916406393051147,-0.20773422856450452,6.4587236917304836)"
  478.                                                    id="svg_9">
  479.                                                     <svg stroke="null" viewBox="0 0 100 100" height="100px"
  480.                                                          width="100px" y="-35.7368" x="-25.7368" id="svg_8"
  481.                                                          xmlns="http://www.w3.org/2000/svg">
  482.                                                         <g stroke="null" id="svg_3">
  483.                                                             <g stroke="null" id="svg_4">
  484.                                                                 <path stroke="null" id="svg_5"
  485.                                                                       d="m38.688,41.859l-2.828,-2.828c-0.781,-0.78 -2.047,-0.78 -2.828,0c-0.781,0.781 -0.781,2.047 0,2.828l2.828,2.828c0.781,0.781 2.047,0.781 2.828,0c0.781,-0.781 0.781,-2.046 0,-2.828zm33.309,12.141l-3.999,0c-1.104,0 -1.999,0.896 -1.999,2s0.895,2 1.999,2l3.999,0c1.105,0 2,-0.896 2,-2s-0.894,-2 -2,-2zm-39.994,0l-4,0c-1.104,0 -2,0.896 -2,2s0.896,2 2,2l4,0c1.104,0 2,-0.896 2,-2s-0.897,-2 -2,-2zm27.996,9.999l-19.998,0c-1.104,0 -1.999,0.896 -1.999,2s0.896,1.999 1.999,1.999l19.998,0c1.104,0 2,-0.895 2,-1.999s-0.895,-2 -2,-2zm6.97,-24.968c-0.78,-0.78 -2.048,-0.78 -2.828,0l-2.828,2.828c-0.78,0.781 -0.78,2.047 0,2.828c0.781,0.781 2.048,0.781 2.828,0l2.828,-2.828c0.78,-0.781 0.78,-2.047 0,-2.828zm-16.968,0.971c1.104,0 1.999,-0.896 1.999,-2l0,-3.999c0,-1.104 -0.896,-2 -1.999,-2c-1.105,0 -2,0.896 -2,2l0,3.999c0,1.104 0.895,2 2,2zm0,4c-6.627,0 -11.999,5.371 -11.999,11.998c0,1.404 0.254,2.747 0.697,3.999l4.381,0c-0.683,-1.177 -1.079,-2.54 -1.079,-3.999c0,-4.418 3.582,-7.999 8,-7.999c4.417,0 7.998,3.581 7.998,7.999c0,1.459 -0.396,2.822 -1.078,3.999l4.381,0c0.443,-1.252 0.697,-2.595 0.697,-3.999c0,-6.627 -5.372,-11.998 -11.998,-11.998zm0,16.247c0.552,0 0.999,-0.447 0.999,-1l0,-3.827l2.536,2.535c0.39,0.391 1.023,0.391 1.414,0c0.39,-0.391 0.39,-1.023 0,-1.414l-4.242,-4.242c-0.391,-0.391 -1.024,-0.391 -1.414,0l-4.242,4.242c-0.391,0.391 -0.391,1.023 0,1.414s1.023,0.391 1.414,0l2.535,-2.535l0,3.827c0,0.553 0.447,1 1,1z"
  486.                                                                       clip-rule="evenodd" fill-rule="evenodd"/>
  487.                                                             </g>
  488.                                                         </g>
  489.                                                     </svg>
  490.                                                 </g>
  491.                                             </g>
  492.                                         </svg>
  493.                                     </div>
  494.                                     {% set icono_clima = "" %}
  495.                                     {% for horario in cli.horario|default([]) %}
  496.                                         <div class="column skyicon">
  497.                                             {% if icono_clima != horario.clima.conditionCode %}
  498.                                                 {% set icono_clima = horario.clima.conditionCode %}
  499.                                                 {# <canvas class="{{ icono_clima }}" width="35" height="35">
  500.                                                 </canvas> #}
  501.                                                 {% if horario.clima.conditionCode is defined and horario.clima.conditionCode is not empty %}
  502.                                                     <i class="ui huge grey icon">
  503.                                                         {# <canvas class="{{ cli.conditionCode }}" width="35" height="35">
  504.                                                         </canvas> #}
  505.                                                         {% include 'FrontendBundle:Climacon:' ~ horario.clima.conditionCode ~ '.html.twig' ignore missing %}
  506.                                                     </i>
  507.                                                 {% endif %}
  508.                                             {% endif %}
  509.                                         </div>
  510.                                     {% endfor %}
  511.                                     <div class="column">
  512.                                         <svg class="noWidth" width="39" height="39" xmlns="http://www.w3.org/2000/svg"
  513.                                         >
  514.                                             <g fill="#ddd">
  515.                                                 <g stroke="null" id="svg_6">
  516.                                                     <path stroke="null" id="svg_7"
  517.                                                           d="m36.67492,25.88526l-3.14573,0c-0.86822,0 -1.57208,-0.70464 -1.57208,-1.57286s0.70386,-1.57286 1.57208,-1.57286l3.14573,0c0.86822,0 1.57208,0.70464 1.57208,1.57286s-0.70307,1.57286 -1.57208,1.57286zm-6.17821,-10.46898c-0.6142,0.6142 -1.61061,0.6142 -2.22403,0c-0.6142,-0.6142 -0.6142,-1.60983 0,-2.22403l2.22403,-2.22403c0.61342,-0.61342 1.60983,-0.61342 2.22324,0c0.6142,0.6142 0.6142,1.60983 0,2.22403l-2.22324,2.22403zm-2.23347,12.04105l-3.44536,0c0.53635,-0.92563 0.84777,-1.99754 0.84777,-3.14494c0,-3.47445 -2.81621,-6.29067 -6.28988,-6.29067c-3.47445,0 -6.29145,2.81621 -6.29145,6.29067c0,1.1474 0.31221,2.21931 0.84935,3.14494l-3.44614,0c-0.34839,-0.98461 -0.54814,-2.04079 -0.54814,-3.14494c0,-5.21168 4.22471,-9.43561 9.43639,-9.43561c5.2109,0 9.43561,4.22392 9.43561,9.43561c0,1.10415 -0.19975,2.16033 -0.54814,3.14494zm-8.88746,-15.72627c-0.86901,0 -1.57286,-0.70464 -1.57286,-1.57286l0,-3.14494c0,-0.86822 0.70386,-1.57286 1.57286,-1.57286c0.86822,0 1.57286,0.70464 1.57286,1.57286l0,3.14494c0,0.86822 -0.70543,1.57286 -1.57286,1.57286zm-11.12093,3.68522l-2.22403,-2.22403c-0.6142,-0.6142 -0.6142,-1.60983 0,-2.22403c0.6142,-0.61342 1.60983,-0.61342 2.22403,0l2.22403,2.22403c0.6142,0.6142 0.6142,1.60983 0,2.22403s-1.60904,0.6142 -2.22403,0zm-1.4604,8.89611c0,0.86822 -0.70464,1.57286 -1.57286,1.57286l-3.14573,0c-0.86822,0 -1.57286,-0.70464 -1.57286,-1.57286s0.70464,-1.57286 1.57286,-1.57286l3.14573,0c0.86822,0 1.57286,0.70464 1.57286,1.57286zm12.58133,-3.14573c0.43411,0 0.78643,0.35232 0.78643,0.78643l0,3.01046l1.9936,-1.9936c0.30749,-0.30749 0.80452,-0.30749 1.11201,0s0.30749,0.80452 0,1.11201l-3.33604,3.33604c-0.30749,0.30749 -0.80452,0.30749 -1.11201,0l-3.33604,-3.33604c-0.30749,-0.30749 -0.30749,-0.80452 0,-1.11201s0.80452,-0.30749 1.11201,0l1.9936,1.9936l0,-3.01046c0,-0.43411 0.35153,-0.78643 0.78643,-0.78643zm-7.86353,9.43639l15.72627,0c0.86822,0 1.57286,0.70464 1.57286,1.57286s-0.70464,1.57208 -1.57286,1.57208l-15.72627,0c-0.86822,0 -1.57286,-0.70386 -1.57286,-1.57208s0.70386,-1.57286 1.57286,-1.57286z"
  518.                                                           clip-rule="evenodd" fill-rule="evenodd"/>
  519.                                                 </g>
  520.                                             </g>
  521.                                         </svg>
  522.                                     </div>
  523.                                 </div>
  524.                             </div>
  525.                         </div>
  526.                     {% endif %}
  527.                 </div>
  528.             </div>
  529.         </div>
  530.     {% endfor %}
  531. {% endif %}