diff --git a/app/templates/board.html b/app/templates/board.html
index e316545..d5b5e16 100644
--- a/app/templates/board.html
+++ b/app/templates/board.html
@@ -253,25 +253,43 @@
function renderCardDetail(owner, repo, data) {
const issue = data.issue || {}, comments = data.comments || [], checklists = data.checklists || [], card = data.card || {};
window._issueData = {owner, repo, issue, comments, checklists, card};
- let h = '';
- h += '
'+issue.state+' '+escHtml(issue.title||'')+'
';
- h += '';
- (issue.labels||[]).forEach(l => h += ''+escHtml(l.name)+' ');
- if (issue.milestone) h += '📅 '+escHtml(issue.milestone.title)+' ';
- if (issue.assignee) h += '👤 '+escHtml(issue.assignee.login)+' ';
- h += '
';
- h += 'Priorité: ';
- ['Low','Medium','High','Urgent'].forEach(p => h += ''+p+' ');
- h += ' Échéance:
';
- h += 'Description '+escHtml(issue.body||'')+'
';
- h += renderChecklists(owner, repo, issue.number, checklists);
- h += '
Commentaires ('+comments.length+') ';
- comments.forEach(c => h += '');
- h += '';
- h += '';
- return h;
+
+ const labelsHtml = (issue.labels || []).map(l =>
+ `${escHtml(l.name)} `
+ ).join('');
+
+ const prio = card.priority || 'Medium';
+ const prioOpts = ['Low','Medium','High','Urgent'].map(p =>
+ `${p} `
+ ).join('');
+
+ return `
+ ${issue.state} ${escHtml(issue.title||'')}
+
+ ${labelsHtml}
+ ${issue.milestone ? '📅 '+escHtml(issue.milestone.title)+' ' : ''}
+ ${issue.assignee ? '👤 '+escHtml(issue.assignee.login)+' ' : ''}
+
+
+ Priorité: ${prioOpts}
+ Échéance:
+
+ Description ${escHtml(issue.body||'')}
+ ${renderChecklists(owner, repo, issue.number, checklists)}
+
Commentaires (${comments.length})
+ ${comments.map(c => `
+ `).join('')}
+
+ `;
}
function renderChecklists(owner, repo, issueId, checklists) {