templates/frontend/Comite/competicionesComite.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.         #tableComite .cambioYear{
  12.             background: #e4e4e4 !important;
  13.             color: black !important;
  14.         }
  15.         {% if movil %}
  16.             #tableComite tr td {
  17.                 text-align: left;
  18.                 padding-left: 0.75em;
  19.             }
  20.             .mobile.segment > .form{
  21.                 padding: 0.75em;
  22.             }
  23.         {% endif %}
  24.     </style>
  25. {% endblock %}
  26. {% block container %}
  27.     <div class="ui {% if movil %}mobile basic noPaddingLeft noPaddingRight {% else %} very padded {% endif %}segment">
  28.         
  29.         {% include 'mensajes_new.html.twig' with {'layout': 0} %}
  30.         
  31.         {% if movil %}
  32.             <h2 class="ui  center aligned header">
  33.                 {{ 'competiciones'|trans({}, 'FrontendBundle') }}
  34.             </h2>
  35.         {% endif %}
  36.         {{ form_start(form) }}
  37.         <div class="four fields">
  38.             <div class="field">
  39.                 {{ form_widget(form.anio) }}
  40.             </div>
  41.             <div class="field">
  42.                 {{ form_widget(form.comite) }}
  43.             </div>
  44.             <div class="field">
  45.                 {{ form_widget(form.provincia) }}
  46.             </div>
  47.             <div class="field">
  48.                 <div class="two fields">
  49.                     <div class="field">
  50.                         {{ form_rest(form) }}
  51.                     </div>
  52.                     <div class="field">
  53.                         <button class="ui {% if movil %} right floated {% endif %} basic icon button export">
  54.                             <i class="large middle aligned icon">
  55.                                 <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">
  56.                                     <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"/>
  57.                                     <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
  58.                                           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
  59.                                           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
  60.                                           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
  61.                                           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
  62.                                           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
  63.                                           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
  64.                                           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
  65.                                           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
  66.                                           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
  67.                                           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
  68.                                           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"/>
  69.                                 </svg>
  70.                             </i>
  71.                         </button>
  72.                     </div>
  73.                 </div>
  74.             </div>
  75.         </div>
  76.         {{ form_end(form) }}
  77.         <table id="tableComite" class="ui celled striped table">
  78.             <thead>
  79.                 {% if not movil %}
  80.                     <tr>
  81.                         <th>
  82.                             <div class="mobile hidden">
  83.                                 {{ 'Competicion'|trans({}, 'FrontendBundle') }}
  84.                             </div>
  85.                         </th>
  86.                         <th>
  87.                             <div class="mobile hidden">
  88.                                 {{ 'comite.fecha'|trans({}, 'FrontendBundle') }}
  89.                             </div>
  90.                         </th>
  91.                         <th>
  92.                             <div class="mobile hidden">
  93.                                 {{ 'comite.inscrito'|trans({}, 'FrontendBundle') }}
  94.                             </div>
  95.                         </th>
  96.                     </tr>
  97.                 {% endif %}
  98.             </thead>
  99.             {% set mesAnt = "0" %}
  100.             {% for competicion in competiciones %}
  101.                 {% if competicion.fecha|date('m') != mesAnt %}
  102.                     <tr class="active cambioMes">
  103.                         <td {% if not movil %}colspan="2"{% else %}colspan="2"{% endif %}>
  104.                             {{ (competicion.fecha|format_date(pattern='MMMM', locale=locale))|capitalize }} {% if movil %}<label class="ui basic circular blue disabled label">{{ numCompeticionesMes[competicion.fecha|date('m')] }}</label>{% endif %}
  105.                         </td>
  106.                         {% if not movil %}
  107.                             <td>
  108.                                 <label class="ui basic circular blue disabled label">{{ numCompeticionesMes[competicion.fecha|date('m')] }}</label>
  109.                             </td>
  110.                         {% endif %}
  111.                     </tr>
  112.                 {% endif %}
  113.                 <tr>
  114.                     <td>
  115.                         <h4 class="ui header">
  116.                             <div class="content">
  117.                                 <a href="{{ path('_tournament', { 'id': competicion.id }) }}">
  118.                                     {% if "cancelada" != competicion.estado %}
  119.                                         {{ competicion.nombre }}
  120.                                     {% else %}
  121.                                         <em><s><span class="ui grey text">{{ competicion.nombre }}</span></s></em>
  122.                                     {% endif %}
  123.                                 </a>
  124.                                 {% if competicion.wagr == "1"%}
  125.                                     <div class="aWAGR ui tiny right teal basic label" data-tooltip="Puntuable para el World Amateur Golf Ranking" data-position="bottom left">
  126.                                         WAGR
  127.                                     </div>
  128.                                 {% endif %}
  129.                                 <div class="sub header">
  130.                                     {{ competicion.club.nombre}}
  131.                                 </div>                                   
  132.                             </div>    
  133.                             {% if competicion.estado == "abierta" and competicion.modo.id == "3"%}
  134.                                 <a href="{{ path('_tournament', { 'id': competicion.id }) }}" class="mobile hidden aInsc ui right floated inverted blue button">Inscripcion</a>
  135.                             {% endif %}
  136.                         </h4>
  137.                     </td>
  138.                     <td class="collapsing">
  139.                         <h4 class="ui{% if competicion.fecha|date('Ymd') < 'now'|date('Ymd') %} disabled {% endif %}header">
  140.                             <div class="content">
  141.                                 {{ (competicion.fecha|format_date(pattern='dd MMM yyyy', locale=locale))|capitalize }}
  142.                                 {% set numjor = jornadas[competicion.id] %}
  143.                                 {% if numjor > 1 %}
  144.                                     <span class="ui tiny basic label">
  145.                                         {{ numjor }} {{ 'competicion.clasificacion.rounds'|trans({}, 'FrontendBundle') }}
  146.                                     </span>
  147.                                 {% endif %}
  148.                                 <div class="diaSemana sub header">
  149.                                     {{ competicion.fecha|format_date(pattern='E', locale=locale) }}
  150.                                 </div>
  151.                             </div>
  152.                         </h4>
  153.                     </td>
  154.                     <td class="center aligned collapsing">
  155.                         <div class="mobile hidden">
  156.                             {% set numIns = numInscritos[competicion.id][1] %}
  157.                             {% if numIns > 0 %}
  158.                                 <div class="ui circular {% if competicion.estado == "abierta" and competicion.modo.id == "3"%}blue{% endif %} label">
  159.                                     {{ numIns }}
  160.                                 </div>      
  161.                             {% endif %}
  162.                         </div>
  163.                     </td>
  164.                 </tr>
  165.                 {% set mesAnt = competicion.fecha|date('m') %}
  166.             {% endfor %}
  167.         </table>
  168.     </div>
  169. {% endblock %}
  170. {% block javascripts %}
  171.     {#<script type="text/javascript" src="{{ asset('js/frontend/jquery.table2excel.min.js')}}"></script>#}
  172.     <script src="//cdn.rawgit.com/rainabba/jquery-table2excel/1.1.0/dist/jquery.table2excel.min.js"></script>
  173.     <script>
  174.         {% if comite > 0%}
  175.             $("#form_comite").val({{ comite }});
  176.         {% endif %}
  177.             $(".dropdown").dropdown({placeholder: false});
  178.             $(".export").click(function () {
  179.                 var tempTable = $("#tableComite").clone();
  180.                 tempTable.find('a').replaceWith(function() {
  181.                     return $(this).text();
  182.                 });
  183.                 tempTable.table2excel({
  184.                     exclude: ".noExl",
  185.                     exclude_img: true,
  186.                     name: "CompeticionesComite",
  187.                     filename: "CompeticionesComite"
  188.                 });
  189.             });
  190.     </script>
  191. {% endblock %}