templates/fronts/list_publications.html.twig line 1

  1. {% extends 'base_front.html.twig' %}
  2. {% block title %}Publications{% endblock %}
  3. {% block body %}
  4.     <section id="publications" class="py-5">
  5.     <div class="container">
  6.         <h2 class="section-title text-center mb-5">Publications</h2>
  7.         
  8.         <!-- Filtres améliorés -->
  9.         <div class="filter-container mb-5">
  10.             <form id="filterForm" class="filter-form">
  11.                 <div class="row g-3">
  12.                     <div class="col-md-4">
  13.                         <div class="filter-group">
  14.                             <label for="filterType" class="filter-label">Type de publication</label>
  15.                             <select id="filterType" class="form-select">
  16.                                 <option value="">Tous les types</option>
  17.                                 <option value="1">Conférence</option>
  18.                                 <option value="2">Journal</option>
  19.                                 <option value="3">Livre</option>
  20.                             </select>
  21.                         </div>
  22.                     </div>
  23.                     <div class="col-md-4">
  24.                         <div class="filter-group">
  25.                             <label for="filterStructure" class="filter-label">Structure de recherche</label>
  26.                             <select id="filterStructure" class="form-select">
  27.                                 <option value="">Toutes les structures</option>
  28.                                {% for structure in structures %}
  29.                                 <option value="{{ structure.id }}">{{ structure.nomLong }}</option>
  30.                             {% endfor %}
  31.                             </select>
  32.                         </div>
  33.                     </div>
  34.                     <div class="col-md-4">
  35.                         <div class="filter-group">
  36.                             <label for="filterYear" class="filter-label">Année de publication</label>
  37.                             <select id="filterYear" class="form-select">
  38.                                 <option value="">Toutes les années</option>
  39.                                 {% for annee in annees %}
  40.                                 <option value="{{ annee }}">{{annee }}</option>
  41.                             {% endfor %}
  42.                             </select>
  43.                         </div>
  44.                     </div>
  45.                 </div>
  46.             </form>
  47.         </div>
  48.         <!-- Tableau amélioré -->
  49.         <div class="table-responsive">
  50.             <table class="publication-table">
  51.                 <thead>
  52.                     <tr>
  53.                         <th class="type-col">Type</th>
  54.                         <th class="title-col">Titre</th>
  55.                         <th class="authors-col">Auteurs</th>
  56.                         <th class="details-col">Détails</th>
  57.                     </tr>
  58.                 </thead>
  59.                 <tbody id="publicationContainer">
  60.                     {% for publication in publications %}
  61.                         <tr class="publication-row" data-type="{{ publication.revue }}" data-structure="{{ publication.structure.id }}" data-year="{{ publication.getAnnee }}">
  62.                             <td>
  63.                                 {% if publication.revue == 1 %}
  64.                                     <span class="publication-badge conference">Conférence</span>
  65.                                 {% elseif publication.revue == 2 %}
  66.                                     <span class="publication-badge journal">Journal</span>
  67.                                 {% elseif publication.revue == 3 %}
  68.                                     <span class="publication-badge book">Livre</span>
  69.                                 {% endif %}
  70.                             </td>
  71.                             <td><div class="publication-title">{{ publication.titre }}</div></td>
  72.                             <td>
  73.                                 <div class="publication-authors">
  74.                                     {% for aut in publication.auteur %}
  75.                                         <span class="author"><b>{{ aut.nom }}</b></span>
  76.                                      {% endfor %}
  77.                                 </div>
  78.                             </td>
  79.                             <td>
  80.                                 <div class="publication-details">
  81.                                     {% if publication.revue == 1 %}
  82.                                         {% if publication.titreConfr %}
  83.                                             <div class="detail-line"><span class="detail-label">Titre: </span><span class="detail-value">{{ publication.titreConfr }}</span></div>
  84.                                         {% endif  %}
  85.                                         {% if publication.getLieuConference %}
  86.                                             <div class="detail-line"><span class="detail-label">Lieu:</span> <span class="detail-value">{{ publication.getLieuConference }}</span></div>
  87.                                         {% endif  %}
  88.                                         {% if publication.getDateConference %}
  89.                                             <div class="detail-line"><span class="detail-label">Date:</span> <span class="detail-value">{{ publication.getDateConference|date('Y-m-d') }}</span></div>
  90.                                         {% endif  %}
  91.                                         <div class="detail-line"><span class="detail-label">DOI:</span> <a href="{{ publication.doi }}" target="_blank" class="doi-link">{{ publication.doi }}</a></div>
  92.                                         <div class="detail-line">
  93.                                             <span class="detail-label">Conf. Rank:</span>
  94.                                             <span class="quartile-badge q1">{% if publication.getRangConference == 1 %} A* 
  95.                                                 {% elseif publication.getRangConference == 2 %} A 
  96.                                                 {% elseif publication.getRangConference == 3 %} B 
  97.                                                 {% elseif publication.getRangConference == 4 %} C 
  98.                                             {% endif %}</span>
  99.                                         </div>
  100.                                     {% elseif publication.revue == 2 %}
  101.                                         {% if publication.titreJournal %}
  102.                                             <div class="detail-line"><span class="detail-label">Titre: </span><span class="detail-value">{{ publication.titreJournal }}</span></div>
  103.                                         {% endif  %}
  104.                                         {% if publication.volume %}
  105.                                             <div class="detail-line"><span class="detail-label">Volume:</span> <span class="detail-value">{{ publication.volume }}</span></div>
  106.                                         {% endif  %}
  107.                                         {% if publication.getPage %}
  108.                                             <div class="detail-line"><span class="detail-label">Page:</span> <span class="detail-value">{{ publication.getPage }}</span></div>
  109.                                         {% endif  %}
  110.                                         {% if publication.getAnnee %}
  111.                                             <div class="detail-line"><span class="detail-label">Annee: </span><span class="detail-value">{{ publication.getAnnee }}</span></div>
  112.                                         {% endif  %}
  113.                                         <div class="detail-line"><span class="detail-label">DOI:</span> <a href="{{ publication.doi }}" target="_blank" class="doi-link">{{ publication.doi }}</a></div>
  114.                                         <div class="detail-line">
  115.                                             <span class="detail-label">Quartile:</span>
  116.                                             <span class="quartile-badge q3">{% if publication.getQuartile == 1 %} Q1 
  117.                                                 {% elseif publication.getQuartile == 2 %} Q2 
  118.                                                 {% elseif publication.getQuartile == 3 %} Q3 
  119.                                                 {% elseif publication.getQuartile == 4 %} Q4
  120.                                             {% endif %}</span>
  121.                                         </div>
  122.                                         <span class="impact-factor">IF: {{ publication.getFacteurImpact }}</span>
  123.                                     {% elseif publication.revue == 3 %}
  124.                                         {% if publication.titreLivre %}
  125.                                             <div class="detail-line"><span class="detail-label">Titre: </span><span class="detail-value">{{ publication.titreLivre }}</span></div>
  126.                                         {% endif  %}
  127.                                         {% if publication.volume %}
  128.                                             <div class="detail-line"><span class="detail-label">Volume:</span> <span class="detail-value">{{ publication.volume }}</span></div>
  129.                                         {% endif  %}
  130.                                         {% if publication.getPage %}
  131.                                             <div class="detail-line"><span class="detail-label">Page:</span> <span class="detail-value">{{ publication.getPage }}</span></div>
  132.                                         {% endif  %}
  133.                                         {% if publication.getAnnee %}
  134.                                             <div class="detail-line"><span class="detail-label">Annee: </span><span class="detail-value">{{ publication.getAnnee }}</span></div>
  135.                                         {% endif  %}
  136.                     
  137.                                         <div class="detail-line"><span class="detail-label">DOI:</span> <a href="{{ publication.doi }}" target="_blank" class="doi-link">{{ publication.doi }}</a></div>
  138.                                     {% endif %}
  139.                                     {% if publication.description is not null %}
  140.                                     <div class="detail-line">
  141.                                         <a href="#" class="btn btn-sm btn-outline-secondary">
  142.                                             <i class="fas fa-info-circle me-1"></i> Détails
  143.                                         </a>
  144.                                         <span class="publication-description" style="display: none;">
  145.                                             {{ publication.description|raw }}
  146.                                         </span>
  147.                                     </div>
  148.                                        
  149.                                     {% endif %}
  150.                                 </div>
  151.                             </td>
  152.                         </tr>
  153.                     {% endfor %}
  154.                     
  155.                     <!-- Autres lignes avec le même format -->
  156.                     <!-- ... -->
  157.                 </tbody>
  158.             </table>
  159.         </div>
  160.      
  161.     </div>
  162. </section>
  163. <style>
  164.     .custom-badge {
  165.         padding: 5px 10px;
  166.         border-radius: 5px;
  167.         color: white;
  168.         font-weight: bold;
  169.     }
  170.     .custom-badge-warning { background-color: orange; }
  171.     .custom-badge-purple { background-color: purple; }
  172.     .custom-badge-blue { background-color: blue; }
  173.     .show-description-link {
  174.         cursor: pointer;
  175.         color: blue;
  176.         text-decoration: underline;
  177.     }
  178.     .publication-description {
  179.         display: none;
  180.         margin-top: 10px;
  181.     }
  182. </style>
  183. <script>
  184.     document.addEventListener('DOMContentLoaded', function() {
  185.         const filterForm = document.getElementById('filterForm');
  186.         const publicationRows = document.querySelectorAll('.publication-row');
  187.         function filterPublications() {
  188.             const type = document.getElementById('filterType').value;
  189.             const structure = document.getElementById('filterStructure').value;
  190.             const year = document.getElementById('filterYear').value;
  191.             publicationRows.forEach(row => {
  192.                 const rowType = row.getAttribute('data-type');
  193.                 const rowStructure = row.getAttribute('data-structure');
  194.                 const rowYear = row.getAttribute('data-year');
  195.                 let isVisible = true;
  196.                 if (type && rowType !== type) isVisible = false;
  197.                 if (structure && rowStructure !== structure) isVisible = false;
  198.                 if (year && rowYear !== year) isVisible = false;
  199.                 row.style.display = isVisible ? 'table-row' : 'none';
  200.             });
  201.         }
  202.         document.getElementById('filterType').addEventListener('change', filterPublications);
  203.         document.getElementById('filterStructure').addEventListener('change', filterPublications);
  204.         document.getElementById('filterYear').addEventListener('change', filterPublications);
  205.     });
  206. </script>
  207. {% endblock %}