templates/fronts/list_publications.html.twig line 1
{% extends 'base_front.html.twig' %}
{% block title %}Publications{% endblock %}
{% block body %}
<section id="publications" class="py-5">
<div class="container">
<h2 class="section-title text-center mb-5">Publications</h2>
<!-- Filtres améliorés -->
<div class="filter-container mb-5">
<form id="filterForm" class="filter-form">
<div class="row g-3">
<div class="col-md-4">
<div class="filter-group">
<label for="filterType" class="filter-label">Type de publication</label>
<select id="filterType" class="form-select">
<option value="">Tous les types</option>
<option value="1">Conférence</option>
<option value="2">Journal</option>
<option value="3">Livre</option>
</select>
</div>
</div>
<div class="col-md-4">
<div class="filter-group">
<label for="filterStructure" class="filter-label">Structure de recherche</label>
<select id="filterStructure" class="form-select">
<option value="">Toutes les structures</option>
{% for structure in structures %}
<option value="{{ structure.id }}">{{ structure.nomLong }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="col-md-4">
<div class="filter-group">
<label for="filterYear" class="filter-label">Année de publication</label>
<select id="filterYear" class="form-select">
<option value="">Toutes les années</option>
{% for annee in annees %}
<option value="{{ annee }}">{{annee }}</option>
{% endfor %}
</select>
</div>
</div>
</div>
</form>
</div>
<!-- Tableau amélioré -->
<div class="table-responsive">
<table class="publication-table">
<thead>
<tr>
<th class="type-col">Type</th>
<th class="title-col">Titre</th>
<th class="authors-col">Auteurs</th>
<th class="details-col">Détails</th>
</tr>
</thead>
<tbody id="publicationContainer">
{% for publication in publications %}
<tr class="publication-row" data-type="{{ publication.revue }}" data-structure="{{ publication.structure.id }}" data-year="{{ publication.getAnnee }}">
<td>
{% if publication.revue == 1 %}
<span class="publication-badge conference">Conférence</span>
{% elseif publication.revue == 2 %}
<span class="publication-badge journal">Journal</span>
{% elseif publication.revue == 3 %}
<span class="publication-badge book">Livre</span>
{% endif %}
</td>
<td><div class="publication-title">{{ publication.titre }}</div></td>
<td>
<div class="publication-authors">
{% for aut in publication.auteur %}
<span class="author"><b>{{ aut.nom }}</b></span>
{% endfor %}
</div>
</td>
<td>
<div class="publication-details">
{% if publication.revue == 1 %}
{% if publication.titreConfr %}
<div class="detail-line"><span class="detail-label">Titre: </span><span class="detail-value">{{ publication.titreConfr }}</span></div>
{% endif %}
{% if publication.getLieuConference %}
<div class="detail-line"><span class="detail-label">Lieu:</span> <span class="detail-value">{{ publication.getLieuConference }}</span></div>
{% endif %}
{% if publication.getDateConference %}
<div class="detail-line"><span class="detail-label">Date:</span> <span class="detail-value">{{ publication.getDateConference|date('Y-m-d') }}</span></div>
{% endif %}
<div class="detail-line"><span class="detail-label">DOI:</span> <a href="{{ publication.doi }}" target="_blank" class="doi-link">{{ publication.doi }}</a></div>
<div class="detail-line">
<span class="detail-label">Conf. Rank:</span>
<span class="quartile-badge q1">{% if publication.getRangConference == 1 %} A*
{% elseif publication.getRangConference == 2 %} A
{% elseif publication.getRangConference == 3 %} B
{% elseif publication.getRangConference == 4 %} C
{% endif %}</span>
</div>
{% elseif publication.revue == 2 %}
{% if publication.titreJournal %}
<div class="detail-line"><span class="detail-label">Titre: </span><span class="detail-value">{{ publication.titreJournal }}</span></div>
{% endif %}
{% if publication.volume %}
<div class="detail-line"><span class="detail-label">Volume:</span> <span class="detail-value">{{ publication.volume }}</span></div>
{% endif %}
{% if publication.getPage %}
<div class="detail-line"><span class="detail-label">Page:</span> <span class="detail-value">{{ publication.getPage }}</span></div>
{% endif %}
{% if publication.getAnnee %}
<div class="detail-line"><span class="detail-label">Annee: </span><span class="detail-value">{{ publication.getAnnee }}</span></div>
{% endif %}
<div class="detail-line"><span class="detail-label">DOI:</span> <a href="{{ publication.doi }}" target="_blank" class="doi-link">{{ publication.doi }}</a></div>
<div class="detail-line">
<span class="detail-label">Quartile:</span>
<span class="quartile-badge q3">{% if publication.getQuartile == 1 %} Q1
{% elseif publication.getQuartile == 2 %} Q2
{% elseif publication.getQuartile == 3 %} Q3
{% elseif publication.getQuartile == 4 %} Q4
{% endif %}</span>
</div>
<span class="impact-factor">IF: {{ publication.getFacteurImpact }}</span>
{% elseif publication.revue == 3 %}
{% if publication.titreLivre %}
<div class="detail-line"><span class="detail-label">Titre: </span><span class="detail-value">{{ publication.titreLivre }}</span></div>
{% endif %}
{% if publication.volume %}
<div class="detail-line"><span class="detail-label">Volume:</span> <span class="detail-value">{{ publication.volume }}</span></div>
{% endif %}
{% if publication.getPage %}
<div class="detail-line"><span class="detail-label">Page:</span> <span class="detail-value">{{ publication.getPage }}</span></div>
{% endif %}
{% if publication.getAnnee %}
<div class="detail-line"><span class="detail-label">Annee: </span><span class="detail-value">{{ publication.getAnnee }}</span></div>
{% endif %}
<div class="detail-line"><span class="detail-label">DOI:</span> <a href="{{ publication.doi }}" target="_blank" class="doi-link">{{ publication.doi }}</a></div>
{% endif %}
{% if publication.description is not null %}
<div class="detail-line">
<a href="#" class="btn btn-sm btn-outline-secondary">
<i class="fas fa-info-circle me-1"></i> Détails
</a>
<span class="publication-description" style="display: none;">
{{ publication.description|raw }}
</span>
</div>
{% endif %}
</div>
</td>
</tr>
{% endfor %}
<!-- Autres lignes avec le même format -->
<!-- ... -->
</tbody>
</table>
</div>
</div>
</section>
<style>
.custom-badge {
padding: 5px 10px;
border-radius: 5px;
color: white;
font-weight: bold;
}
.custom-badge-warning { background-color: orange; }
.custom-badge-purple { background-color: purple; }
.custom-badge-blue { background-color: blue; }
.show-description-link {
cursor: pointer;
color: blue;
text-decoration: underline;
}
.publication-description {
display: none;
margin-top: 10px;
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function() {
const filterForm = document.getElementById('filterForm');
const publicationRows = document.querySelectorAll('.publication-row');
function filterPublications() {
const type = document.getElementById('filterType').value;
const structure = document.getElementById('filterStructure').value;
const year = document.getElementById('filterYear').value;
publicationRows.forEach(row => {
const rowType = row.getAttribute('data-type');
const rowStructure = row.getAttribute('data-structure');
const rowYear = row.getAttribute('data-year');
let isVisible = true;
if (type && rowType !== type) isVisible = false;
if (structure && rowStructure !== structure) isVisible = false;
if (year && rowYear !== year) isVisible = false;
row.style.display = isVisible ? 'table-row' : 'none';
});
}
document.getElementById('filterType').addEventListener('change', filterPublications);
document.getElementById('filterStructure').addEventListener('change', filterPublications);
document.getElementById('filterYear').addEventListener('change', filterPublications);
});
</script>
{% endblock %}