templates/frontend/Club/competicionesClub.html.twig line 1

Open in your IDE?
  1. {% extends 'base_frontend_new.html.twig' %}
  2. {% block title %}Listado de Competiciones{% endblock %}
  3. {% block stylesheets %}
  4.     <style>
  5.         .aWAGR{
  6.             vertical-align: top !important;
  7.         }
  8.         .diaSemana{
  9.             text-transform: capitalize !important;
  10.         }
  11.     </style>
  12. {% endblock %}
  13. {% block container %}
  14.     <div class="mobile only mobileLiveContainer">
  15.         <div class="mobileLiveHeader">
  16.             <div class="headerLogo">
  17.                 <svg class="nxt-long-svg" viewBox="-0.5 -0.9 285 40">
  18.                     <path fill="#fff" d="M63 20L73.8 3.2h-2L62 18.4 52 3.2h-2L61 20 50 36.8h2l10-15.4 10 15.4h2L63 20zM75 3.2V5h11v31.8h1.8V4.9h11V3.2H75zM29.8 35.1V21h17v-1.8h-17V4.9H48V3.2H27.9v33.6h20.2V35H29.7zM190.5 3.2h-11.4v33.6h11.4c6.9 0 11-3.4 11-9.1V12.4c0-5.8-4.1-9.2-11-9.2zm9.2 24.5c0 6.7-6.4 7.4-9.2 7.4h-9.7V4.9h9.7c2.8 0 9.2.8 9.2 7.5v15.3zM21.4 3.2v31.1L2.2 3.3H0v33.5h1.7L1.8 6l19 30.8H23V3.2h-1.7zm203.8 0l-10.7 18.4-10.2-18.2-.1-.2h-2l11.4 20.3v13.3h1.7V23.5l12-20.3h-2.1zm-61.4 0h-11.4v33.6h11.4c6.9 0 11-3.4 11-9.1V12.4c0-5.8-4.1-9.2-11-9.2zm9.2 24.5c0 6.7-6.4 7.4-9.2 7.4h-9.7V4.9h9.7c2.8 0 9.2.8 9.2 7.5v15.3zM137.4 3.2H135l-12.4 33.6h1.9l4.3-11.8h14.7l4.3 11.8h1.9L137.4 3.2zm-7.8 20l6.6-18 6.7 18h-13.3zm-9 8.1v.2c-1.7 2.5-5.2 4-9.2 4-4.9 0-10.1-2.4-10.1-7.7V12.3c0-5.2 5-7.9 10-7.9 4 0 7.7 1.7 9.2 4.3l.2.2 1.5-1-.2-.2c-1.8-3-5.9-5-10.5-5-5.8 0-11.7 3.2-12 9.2v15.8c0 6.3 6 9.6 11.9 9.6 4.6 0 8.7-2 10.6-5l.2-.2-1.5-.8zM284 37.7c-28.4-15-44.3.5-44.3.5V2.7s4.7-7.7 22 2.8c15 9.3 22 5.6 22 5.6s.5 3.6-1 9c-2 7 1.3 17.5 1.3 17.5"></path>
  19.                 </svg>
  20.             </div>
  21.         </div>
  22.     </div>
  23.     <div class="ui very padded segment basicMobile noPaddingMobile">
  24.         <div id="anioCompeticion" class="ui selection dropdown competicionSelect" data-clase="Competicion">
  25.             <div class="default text" data-value="{{ anio }}">{{ anio }} </div>
  26.             <i class="dropdown icon"></i>
  27.             <div class="menu">
  28.                 {% for i in ('now'|date('Y') + 1)..2013 %}
  29.                     <div class="item">
  30.                         {{ i }}
  31.                     </div>
  32.                 {% endfor %}
  33.             </div>
  34.         </div>
  35.         <button class="ui basic icon button export">
  36.             <i class="icon">
  37.                 <svg fill="currentColor" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 31.425 31.426" style="enable-background:new 0 0 31.425 31.426;" xml:space="preserve">
  38.                     <path d="M11.15,0L3.011,8.592v22.834h25.403V0H11.15z M10.434,3.613v3.808H6.826L10.434,3.613z M26.449,29.462H4.977V9.385h7.421 V1.964h14.053v27.498H26.449z"/>
  39.                     <path d="M15.004,14.766h0.491v-1.768H9.444v1.768h0.737c0.202,0,0.402,0.055,0.617,0.168c0.203,0.107,0.396,0.306,0.572,0.585
  40.                           l2.919,4.738l-2.939,4.21c-0.16,0.229-0.306,0.421-0.438,0.576c-0.113,0.133-0.228,0.242-0.337,0.321
  41.                           c-0.098,0.07-0.198,0.119-0.307,0.148c-0.127,0.034-0.282,0.051-0.462,0.051H9.198v1.769h5.438v-1.276l-0.055-0.49H14.09
  42.                           c-0.449,0-0.643-0.057-0.724-0.094c0-0.053,0.01-0.115,0.028-0.186c0.024-0.088,0.055-0.176,0.095-0.264
  43.                           c0.043-0.097,0.087-0.188,0.138-0.279c0.046-0.084,0.091-0.159,0.139-0.229l1.65-2.44l1.769,2.843
  44.                           c0.068,0.114,0.123,0.209,0.159,0.289c0.036,0.077,0.05,0.121,0.054,0.139l0.013,0.108c0,0-0.112,0.113-0.625,0.113h-0.592v1.768
  45.                           h6.033v-1.768h-0.729c-0.144,0-0.3-0.052-0.464-0.151c-0.133-0.08-0.35-0.259-0.616-0.613l-3.272-5.259l2.529-3.646
  46.                           c0.164-0.238,0.314-0.437,0.452-0.594c0.125-0.142,0.246-0.26,0.362-0.349c0.092-0.069,0.182-0.116,0.272-0.142
  47.                           c0.104-0.03,0.226-0.045,0.361-0.045h0.655v-1.768h-5.074v1.277l0.055,0.491h0.491c0.125,0,0.237,0.006,0.341,0.02
  48.                           c0.091,0.011,0.145,0.029,0.173,0.029h0.001c0,0.1-0.027,0.213-0.085,0.336c-0.075,0.168-0.176,0.346-0.301,0.535l-1.349,2.051
  49.                           l-1.287-2.08c-0.095-0.15-0.17-0.276-0.222-0.375c-0.047-0.09-0.083-0.168-0.107-0.231c-0.017-0.046-0.029-0.087-0.033-0.113
  50.                           c-0.006-0.039-0.009-0.08-0.031-0.089c0.002-0.001,0.042-0.025,0.162-0.049C14.628,14.776,14.775,14.766,15.004,14.766z"/>
  51.                 </svg>
  52.             </i>
  53.         </button>
  54.         <i id="loading" class="spinner loading large icon" style="display:none"></i>
  55.         <form method="POST" autocomplete="off">
  56.             <input type="hidden" name ="anio" id="anio">
  57.         </form>
  58.         <table id="tableComite" class="ui celled striped table">
  59.             <thead>
  60.                 <tr>
  61.                     <th colspan="3" class="center aligned">
  62.                         <h1 class="ui header">
  63.                             {{ club.nombre }}
  64.                         </h1>
  65.                     </th>                            
  66.                 </tr>
  67.                 <tr>
  68.                     <th>
  69.                         <div class="mobile hidden">
  70.                             {{ 'Competicion'|trans({}, 'FrontendBundle') }}
  71.                         </div>
  72.                     </th>
  73.                     <th>
  74.                         <div class="mobile hidden">
  75.                             {{ 'comite.fecha'|trans({}, 'FrontendBundle') }}
  76.                         </div>
  77.                     </th>
  78.                     <th>
  79.                         <div class="mobile hidden">
  80.                             {{ 'comite.inscrito'|trans({}, 'FrontendBundle') }}
  81.                         </div>
  82.                     </th>
  83.                 </tr>
  84.             </thead>
  85.             {% set mesAnt = "0" %}
  86.             {% for competicion in competiciones %}
  87.                 {% if competicion.fecha|date('m') != mesAnt %}
  88.                     <tr class="active cambioMes">
  89.                         <td colspan="3">
  90.                             {{ (competicion.fecha|format_date(pattern='MMMM', locale=locale))|capitalize }}
  91.                         </td>
  92.                     </tr>
  93.                 {% endif %}
  94.                 <tr>
  95.                     <td>
  96.                         <h4 class="ui header">
  97.                             <div class="content">
  98.                                 <a href="{{ path('_tournament', { 'id': competicion.id }) }}">
  99.                                     {% if "cancelada" != competicion.estado %}
  100.                                         {{ competicion.nombre }}
  101.                                     {% else %}
  102.                                         <em><s><span class="ui grey text">{{ competicion.nombre }}</span></s></em>
  103.                                     {% endif %}
  104.                                 </a>  
  105.                                 {% if competicion.wagr == "1"%}
  106.                                     <div class="aWAGR ui tiny right teal basic label" data-tooltip="Puntuable para el World Amateur Golf Ranking" data-position="bottom left">
  107.                                         WAGR
  108.                                     </div>
  109.                                 {% endif %}
  110.                                 <div class="sub header">
  111.                                     {{ competicion.club.nombre}}
  112.                                 </div>                                   
  113.                             </div>    
  114.                             {% if competicion.estado == "abierta" and competicion.modo.id == "3"%}
  115.                                 <a href="{{ path('_tournament', { 'id': competicion.id }) }}" class="mobile hidden aInsc ui right floated inverted blue button">Inscripcion</a>
  116.                             {% endif %}
  117.                         </h4>
  118.                     </td>
  119.                     <td class="collapsing">
  120.                         <h4 class="ui{% if competicion.fecha|date('Ymd') < 'now'|date('Ymd') %} disabled {% endif %}header">
  121.                             <div class="content">
  122.                                 {{ (competicion.fecha|format_date(pattern='dd MMM yyyy', locale=locale))|capitalize }}
  123.                                 {% set numjor = jornadas[competicion.id] %}
  124.                                 {% if numjor > 1 %}
  125.                                     <span class="ui tiny basic label">
  126.                                         {{ numjor }} {{ 'competicion.clasificacion.rounds'|trans({}, 'FrontendBundle') }}
  127.                                     </span>
  128.                                 {% endif %}
  129.                                 <div class="diaSemana sub header">
  130.                                     {{ competicion.fecha|format_date(pattern='E', locale=locale) }}
  131.                                 </div>
  132.                             </div>
  133.                         </h4>
  134.                     </td>
  135.                     <td class="center aligned collapsing">
  136.                         <div class="mobile hidden">
  137.                             {% set numIns = numInscritos[competicion.id][1] %}
  138.                             {% if numIns > 0 %}
  139.                                 <div class="ui circular {% if competicion.estado == "abierta" and competicion.modo.id == "3"%}blue{% endif %} label">
  140.                                     {{ numIns }}
  141.                                 </div>      
  142.                             {% endif %}
  143.                         </div>
  144.                     </td>
  145.                 </tr>
  146.                 {% set mesAnt = competicion.fecha|date('m') %}
  147.             {% endfor %}
  148.         </table>
  149.     </div>
  150. {% endblock %}
  151. {% block javascripts %}
  152.     <script type="text/javascript" src="{{ asset('js/frontend/jquery.table2excel.min.js')}}"></script>
  153.     <script>
  154.         $(".dropdown").dropdown({
  155.             onChange: function (value, text, $choice) {
  156.                 $('#loading').show();
  157.                 $("#anio").val(value);
  158.                 $("form").submit();
  159.             }
  160.         });
  161.         $(".export").click(function () {
  162.             $("#tableComite").table2excel({
  163.                 exclude: ".noExl",
  164.                 name: "CompeticionesComite",
  165.                 filename: "CompeticionesComite"
  166.             });
  167.         });
  168.     </script>
  169. {% endblock %}