Skip to content
Extraits de code Groupes Projets
Valider de91fb2c rédigé par Jouski's avatar Jouski
Parcourir les fichiers

nb reponses

parent 12e863f4
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Pipeline #83005 réussi
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
<thead> <thead>
<tr> <tr>
<th id='titre' onclick="trierTableau('titre')">Sujet</th> <th id='titre' onclick="trierTableau('titre')">Sujet</th>
<th id='reponses' onclick="trierTableau('reponses')">Rép.</th>
<th id='votes' onclick="trierTableau('votes')">Votes</th> <th id='votes' onclick="trierTableau('votes')">Votes</th>
<th id='auteur' onclick="trierTableau('auteur')">Ouvert par</th> <th id='auteur' onclick="trierTableau('auteur')">Ouvert par</th>
<th id='date' onclick="trierTableau('date')">Mis à jour</th> <th id='date' onclick="trierTableau('date')">Mis à jour</th>
......
...@@ -146,6 +146,8 @@ function displayIssues(issues) { ...@@ -146,6 +146,8 @@ function displayIssues(issues) {
issues.forEach(issue => { issues.forEach(issue => {
console.log(issue.user_notes_count)
let description = issue.description; let description = issue.description;
// Limiter à 200 caractères la description // Limiter à 200 caractères la description
if (description.length > 200) { if (description.length > 200) {
...@@ -202,7 +204,8 @@ function displayIssues(issues) { ...@@ -202,7 +204,8 @@ function displayIssues(issues) {
<a class="bouton" href="${issue.web_url}" target="_blank">... la suite</a> <a class="bouton" href="${issue.web_url}" target="_blank">... la suite</a>
</div> </div>
</td> </td>
<td>${issue.upvotes} 👍</td> <td class="nombre">${issue.user_notes_count} 🗨️</td>
<td class="nombre">${issue.upvotes} 👍</td>
<td class="auteur"><img class="avatar" src="${issue.author.avatar_url}"> <a target="_blank" href="${issue.author.web_url}">${issue.author.name}</a></td> <td class="auteur"><img class="avatar" src="${issue.author.avatar_url}"> <a target="_blank" href="${issue.author.web_url}">${issue.author.name}</a></td>
<td>${date.toLocaleDateString()}</td> <td>${date.toLocaleDateString()}</td>
`; `;
...@@ -218,6 +221,7 @@ function displayIssues(issues) { ...@@ -218,6 +221,7 @@ function displayIssues(issues) {
row.auteur = issue.author.name; row.auteur = issue.author.name;
row.titre = issue.title; row.titre = issue.title;
row.reponses = issue.user_notes_count;
row.date = date; row.date = date;
row.votes = issue.upvotes; row.votes = issue.upvotes;
......
...@@ -179,6 +179,10 @@ td.auteur { ...@@ -179,6 +179,10 @@ td.auteur {
text-overflow: ellipsis; /* Ajouter des points de suspension (...) si le texte est trop long */ text-overflow: ellipsis; /* Ajouter des points de suspension (...) si le texte est trop long */
} }
td.nombre {
text-align: center;
}
th { th {
background-color: #6c63ff; background-color: #6c63ff;
color: white; color: white;
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter